Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get By Rid

GET/api/v2/functions/queries/getByRid
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Gets a specific query type with the given RID. By default, this gets the latest version of the query.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:functions-read.

Query parameters

rid
string

The unique resource identifier of a Function, useful for interacting with other Foundry APIs.

version
stringoptional

The version of the given Function, written <major>.<minor>.<patch>-<tag>, where -<tag> is optional. Examples: 1.2.3, 1.2.3-rc1.

includePrerelease
booleanoptional

When no version is specified and this flag is set to true, the latest version resolution will consider prerelease versions (e.g., 1.2.3-beta could be returned as the latest). When false, only stable versions are considered when determining the latest version.

Defaults to false.

preview
booleanoptional

Enables the use of preview functionality.

Response body

Query
object
Hide child attributes

Hide child attributes

apiName
string

The name of the Query in the API.

description
stringoptional
displayName
stringoptional

The display name of the entity.

parameters
map<ParameterId, Parameter>optional
Show child attributes

Show child attributes

output
union

A union of all the types supported by Query parameters or outputs.

Show child attributes

Show child attributes

rid
string

The unique resource identifier of a Function, useful for interacting with other Foundry APIs.

version
string

The version of the given Function, written <major>.<minor>.<patch>-<tag>, where -<tag> is optional. Examples: 1.2.3, 1.2.3-rc1.

typeReferences
map<TypeReferenceIdentifier, QueryDataType>optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/functions/queries/getByRid?rid=ri.function-registry.main.function.8cb2d957-f0e6-4e0c-81de-e701bd54b18c&version=1.2.3&preview=true"

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 { "output": { "type": "integer" }, "apiName": "myQueryFunction", "displayName": "My Entity", "rid": "ri.function-registry.main.function.8cb2d957-f0e6-4e0c-81de-e701bd54b18c", "typeReferences": { "MyTypeReference": { "type": "integer" } }, "parameters": { "price": { "dataType": { "type": "integer" } } }, "version": "1.2.3" }

Error responses

Error Name
GetByRidPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not getByRid the Query.
Parameters