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 API name. 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.
stringoptionalThe version of the given Function, written <major>.<minor>.<patch>-<tag>, where -<tag> is optional.
Examples: 1.2.3, 1.2.3-rc1.
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/myQueryFunction?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 | ||
|---|---|---|
Query | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given Query could not be found. | |
| Parameters | queryApiName | |
See Errors for a general overview of errors in the platform.