> For the complete documentation index, see [llms.txt](https://docs.concurrence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.concurrence.com/api-reference/readme/platform/functions.md).

# Functions

## List every platform function registered in the workspace

> List every platform function registered in the workspace.\
> \
> Permissions: \`\`Workspace.view\`\` (read role and above).

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Functions"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"RegisteredFunctionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RegisteredFunctionResponse"},"type":"array","title":"Items"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["items","count"],"title":"RegisteredFunctionListResponse"},"RegisteredFunctionResponse":{"properties":{"name":{"type":"string","title":"Name"},"function_type":{"type":"string","title":"Function Type"},"returns_kind":{"type":"string","title":"Returns Kind"},"description":{"type":"string","title":"Description","default":""},"when_to_use":{"type":"string","title":"When To Use","default":""},"parameters":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Parameters"},"sql_template":{"type":"string","title":"Sql Template"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"timeout_ms":{"type":"integer","title":"Timeout Ms","default":30000},"last_test_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test At"},"last_test_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test Status"},"last_test_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test Error"},"last_test_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Test Duration Ms"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"deployed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed By"}},"type":"object","required":["name","function_type","returns_kind","sql_template"],"title":"RegisteredFunctionResponse","description":"One registered function, as stored in the workspace."}}},"paths":{"/v1/{workspace_id}/functions":{"get":{"tags":["Functions"],"summary":"List every platform function registered in the workspace","description":"List every platform function registered in the workspace.\n\nPermissions: ``Workspace.view`` (read role and above).","operationId":"list-functions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredFunctionListResponse"}}}},"429":{"description":"Rate limited"}},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}]}}}}
```

## Get a registered platform function by name

> Resolve a function by name.\
> \
> Permissions: \`\`Workspace.view\`\` (read role and above).

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Functions"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"RegisteredFunctionResponse":{"properties":{"name":{"type":"string","title":"Name"},"function_type":{"type":"string","title":"Function Type"},"returns_kind":{"type":"string","title":"Returns Kind"},"description":{"type":"string","title":"Description","default":""},"when_to_use":{"type":"string","title":"When To Use","default":""},"parameters":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Parameters"},"sql_template":{"type":"string","title":"Sql Template"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"timeout_ms":{"type":"integer","title":"Timeout Ms","default":30000},"last_test_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test At"},"last_test_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test Status"},"last_test_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test Error"},"last_test_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Test Duration Ms"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"deployed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed By"}},"type":"object","required":["name","function_type","returns_kind","sql_template"],"title":"RegisteredFunctionResponse","description":"One registered function, as stored in the workspace."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/functions/{function_name}":{"get":{"tags":["Functions"],"summary":"Get a registered platform function by name","description":"Resolve a function by name.\n\nPermissions: ``Workspace.view`` (read role and above).","operationId":"get-function","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"function_name","in":"path","required":true,"schema":{"type":"string","title":"Function Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredFunctionResponse"}}}},"404":{"description":"Function not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```

## Deploy (validate + upsert) a platform function

> Validate and save a platform function.\
> \
> Validation runs first. For \`\`python\`\` and \`\`udtf\`\` functions, the Unity Catalog function is then created or\
> replaced, and the save follows. If the save fails after that, the Unity Catalog function already has the new\
> body, and the saved function is not updated. On a first deploy there is no saved function to keep, so the\
> Unity Catalog function is left without one. A repeat deploy of the same name in the same workspace\
> replaces the saved function and clears the results of its earlier test runs.\
> \
> The function name comes from the URL path; the request body's \`\`name\`\` field must match or a 400 is\
> raised. The URL is the authoritative source.\
> \
> Permissions: admin, owner.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Functions"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"RegisteredFunction":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name"},"description":{"type":"string","maxLength":2048,"minLength":1,"title":"Description"},"when_to_use":{"type":"string","maxLength":2048,"title":"When To Use","default":""},"function_type":{"type":"string","enum":["sql","ai","udtf","python"],"title":"Function Type","default":"sql"},"returns":{"type":"string","enum":["table","scalar"],"title":"Returns","default":"table"},"returns_type":{"type":"string","enum":["string","integer","number","boolean"],"title":"Returns Type","default":"string"},"parameters":{"items":{"$ref":"#/components/schemas/platform_lib__platform_functions__models__Parameter"},"type":"array","maxItems":32,"title":"Parameters"},"returns_columns":{"items":{"$ref":"#/components/schemas/ReturnColumn"},"type":"array","maxItems":32,"title":"Returns Columns"},"body":{"type":"string","maxLength":8192,"minLength":1,"title":"Body"},"timeout_ms":{"type":"integer","maximum":60000,"minimum":100,"title":"Timeout Ms","default":30000}},"additionalProperties":false,"type":"object","required":["name","description","body"],"title":"RegisteredFunction","description":"The authored shape of a platform function.\n\nThe body is the same whether the function is kept as a YAML file in a repository or sent with\n``PUT /v1/{workspace_id}/functions/{function_name}``, which takes this model as its body. The deploy validates\nit and derives the JSON Schema for the LLM tool spec.\nFor python and udtf functions, the deploy also creates the function in Unity Catalog."},"platform_lib__platform_functions__models__Parameter":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name"},"type":{"type":"string","enum":["string","integer","number","boolean"],"title":"Type"},"description":{"type":"string","maxLength":512,"minLength":1,"title":"Description"},"default":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Default"},"authorization_binding":{"anyOf":[{"$ref":"#/components/schemas/RoleGrantKeysBinding"},{"type":"null"}]},"authorization_binding_test_value":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Authorization Binding Test Value","description":"Canonical CSV resource keys used only by trusted function-test or playground execution when no live authorization block exists."}},"additionalProperties":false,"type":"object","required":["name","type","description"],"title":"Parameter","description":"Typed declaration of one input parameter.\n\nFor SQL function types, ``name`` becomes the ``:name`` placeholder\nin the SQL template. For Python function types, ``name`` becomes\nthe positional argument name in ``def main(...)`` and the input\ncolumn name on the UC UDF signature.\n\nThe ``description`` propagates into the LLM tool spec (this is\nwhat Databricks' Agent Framework reads, and what Anthropic's\ntool-use spec exposes to the model). Missing descriptions\nsilently break tool selection — the registration layer rejects\nempty strings."},"RoleGrantKeysBinding":{"properties":{"source":{"type":"string","const":"role_grant_resource_keys","title":"Source"},"resource_type":{"type":"string","const":"kb_scope","title":"Resource Type"},"access":{"type":"string","const":"read","title":"Access","default":"read"},"encoding":{"type":"string","const":"csv","title":"Encoding","default":"csv"}},"additionalProperties":false,"type":"object","required":["source","resource_type"],"title":"RoleGrantKeysBinding","description":"Binds a SQL parameter to the authorization of the turn, so the platform fills it in and the caller does not.\n\nAt execution the platform discards any caller value, takes the resource keys the turn's authorization\nholds for `resource_type` and `access`, encodes them as `encoding`, and binds the result to the parameter's\n`:name` placeholder. Neither the model nor the caller sees or supplies it. In a trusted test run with no live\nauthorization, the parameter's `authorization_binding_test_value` is bound instead. A bound parameter has no\n`default`. Only the values shown in the schema are accepted."},"ReturnColumn":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z][a-z0-9_]*$","title":"Name"},"type":{"type":"string","enum":["string","integer","number","boolean"],"title":"Type"},"description":{"type":"string","maxLength":512,"title":"Description","default":""}},"additionalProperties":false,"type":"object","required":["name","type"],"title":"ReturnColumn","description":"One column in a UDTF's output schema.\n\nUC ``RETURNS TABLE(<col1> <type1>, <col2> <type2>, ...)`` requires\ndeclaring the schema at deploy time. This list anchors that\nschema for ``function_type=udtf`` rows. ``name`` becomes the\ncolumn name in the result rows; ``type`` maps to a Databricks\nSQL type via the same ``ParameterType`` Literal we use for inputs."},"RegisteredFunctionResponse":{"properties":{"name":{"type":"string","title":"Name"},"function_type":{"type":"string","title":"Function Type"},"returns_kind":{"type":"string","title":"Returns Kind"},"description":{"type":"string","title":"Description","default":""},"when_to_use":{"type":"string","title":"When To Use","default":""},"parameters":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Parameters"},"sql_template":{"type":"string","title":"Sql Template"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"timeout_ms":{"type":"integer","title":"Timeout Ms","default":30000},"last_test_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test At"},"last_test_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test Status"},"last_test_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Test Error"},"last_test_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Test Duration Ms"},"deployed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed At"},"deployed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployed By"}},"type":"object","required":["name","function_type","returns_kind","sql_template"],"title":"RegisteredFunctionResponse","description":"One registered function, as stored in the workspace."}}},"paths":{"/v1/{workspace_id}/functions/{function_name}":{"put":{"tags":["Functions"],"summary":"Deploy (validate + upsert) a platform function","description":"Validate and save a platform function.\n\nValidation runs first. For ``python`` and ``udtf`` functions, the Unity Catalog function is then created or\nreplaced, and the save follows. If the save fails after that, the Unity Catalog function already has the new\nbody, and the saved function is not updated. On a first deploy there is no saved function to keep, so the\nUnity Catalog function is left without one. A repeat deploy of the same name in the same workspace\nreplaces the saved function and clears the results of its earlier test runs.\n\nThe function name comes from the URL path; the request body's ``name`` field must match or a 400 is\nraised. The URL is the authoritative source.\n\nPermissions: admin, owner.","operationId":"deploy-function","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"function_name","in":"path","required":true,"schema":{"type":"string","title":"Function Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredFunction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredFunctionResponse"}}}},"400":{"description":"URL function_name does not match body name"},"422":{"description":"Validation failure (read-only / warehouse guard / bind / parity)"},"429":{"description":"Rate limited"}}}}}}
```

## Remove a registered platform function

> Remove a registered function row.\
> \
> Permissions: admin, owner.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Functions"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/functions/{function_name}":{"delete":{"tags":["Functions"],"summary":"Remove a registered platform function","description":"Remove a registered function row.\n\nPermissions: admin, owner.","operationId":"delete-function","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"function_name","in":"path","required":true,"schema":{"type":"string","title":"Function Name"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Function not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```

## Execute a registered platform function

> Execute a registered function and return its rows.\
> \
> Bound parameters are validated against the stored schema; \`\`ws\_id\`\`\
> is auto-injected from the request context. Returns the executor's\
> shaped response (\`\`rows\`\` for \`\`returns=table\`\`, scalar value for\
> \`\`returns=scalar\`\`).\
> \
> Permissions: \`\`Workspace.view\`\` (read role and above). Read-only\
> keys are intentionally allowed — invocation runs a stored SELECT,\
> and the gate on what can run is the warehouse guard, which a sql or\
> ai body passes for this workspace at deploy and again before every\
> run (422 when it refuses a stored body), not the per-call permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Functions"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"InvokeRequest":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Caller arguments matching input_schema."}},"type":"object","title":"InvokeRequest","description":"Invoke a registered function with caller-supplied args."},"InvokeResponse":{"properties":{"result":{"title":"Result"},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"row_count":{"type":"integer","title":"Row Count","default":0}},"type":"object","title":"InvokeResponse"}}},"paths":{"/v1/{workspace_id}/functions/{function_name}/invoke":{"post":{"tags":["Functions"],"summary":"Execute a registered platform function","description":"Execute a registered function and return its rows.\n\nBound parameters are validated against the stored schema; ``ws_id``\nis auto-injected from the request context. Returns the executor's\nshaped response (``rows`` for ``returns=table``, scalar value for\n``returns=scalar``).\n\nPermissions: ``Workspace.view`` (read role and above). Read-only\nkeys are intentionally allowed — invocation runs a stored SELECT,\nand the gate on what can run is the warehouse guard, which a sql or\nai body passes for this workspace at deploy and again before every\nrun (422 when it refuses a stored body), not the per-call permission.","operationId":"invoke-function","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"function_name","in":"path","required":true,"schema":{"type":"string","title":"Function Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}}},"404":{"description":"Function not found"},"422":{"description":"Bind validation failure, or a stored body the warehouse guard refuses"},"429":{"description":"Rate limited"}}}}}}
```

## Test invoke + persist last\_test\_\* telemetry on the row

> Test invoke: runs the function as invoke does, and stores the result on the function as its last test run.\
> \
> Returns 200 with \`\`status="fail"\`\` and a populated \`\`error\`\` when the run fails or is refused: the arguments do\
> not match the function's parameters, the stored body is refused, or the workspace's data residency refuses the\
> function. Other client errors keep their status, for example 404 when the function does not exist.\
> \
> Permissions: admin, owner.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Functions"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"InvokeRequest":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input","description":"Caller arguments matching input_schema."}},"type":"object","title":"InvokeRequest","description":"Invoke a registered function with caller-supplied args."},"TestInvokeResponse":{"properties":{"result":{"title":"Result"},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"row_count":{"type":"integer","title":"Row Count","default":0},"status":{"type":"string","title":"Status","default":"pass"},"error":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Error"},"test_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Test Duration Ms"}},"type":"object","title":"TestInvokeResponse","description":"The result of testing a function with `POST /v1/{workspace_id}/functions/{function_name}/test`.\n\nIt has the fields of an invoke response, plus `status`, `error` and `test_duration_ms`. A run the executor\nrefuses (422, such as arguments that do not fit or a stored body that is refused) or that fails in\nexecution (5xx) still returns 200, with `status` set to `fail` and the reason in `error`, so the caller can\nshow the message. Any other 4xx, such as a missing function, is returned as that error. `error` is never\nempty when `status` is `fail`."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/functions/{function_name}/test":{"post":{"tags":["Functions"],"summary":"Test invoke + persist last_test_* telemetry on the row","description":"Test invoke: runs the function as invoke does, and stores the result on the function as its last test run.\n\nReturns 200 with ``status=\"fail\"`` and a populated ``error`` when the run fails or is refused: the arguments do\nnot match the function's parameters, the stored body is refused, or the workspace's data residency refuses the\nfunction. Other client errors keep their status, for example 404 when the function does not exist.\n\nPermissions: admin, owner.","operationId":"test-function","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"function_name","in":"path","required":true,"schema":{"type":"string","title":"Function Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestInvokeResponse"}}}},"404":{"description":"Function not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"429":{"description":"Rate limited"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.concurrence.com/api-reference/readme/platform/functions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
