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.
stringThe unique resource identifier of a Function, useful for interacting with other Foundry APIs.
stringoptionalThe version of the given Function, written <major>.<minor>.<patch>-<tag>, where -<tag> is optional.
Examples: 1.2.3, 1.2.3-rc1.
booleanoptionalWhen 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.
booleanoptionalEnables the use of preview functionality.
objectstringThe name of the Query in the API.
stringoptionalstringoptionalThe display name of the entity.
map<ParameterId, Parameter>optionalunionA union of all the types supported by Query parameters or outputs.
stringThe unique resource identifier of a Function, useful for interacting with other Foundry APIs.
stringThe version of the given Function, written <major>.<minor>.<patch>-<tag>, where -<tag> is optional.
Examples: 1.2.3, 1.2.3-rc1.
map<TypeReferenceIdentifier, QueryDataType>optional1
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"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 Name | ||
|---|---|---|
Get | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not getByRid the Query. | |
| Parameters | | |
See Errors for a general overview of errors in the platform.