Newer Version Available
Named Query API (Beta)
Use Named Query API (beta) to create custom SOQL queries that
you can expose in REST API calls. For more information about Named Query API, see the Agentforce Developer Guide.
When you create a Named Query API, it’s available as a REST API call. The name of the Named Query API defines the endpoint, while parameters appear as URI query parameters.
Syntax
- URI
- /services/data/vXX.X/named/query/NQ_API_Name?param_name=param_value
- Formats
- JSON
- HTTP Method
- GET
- Authentication
- Authorization: Bearer token
- Parameters
-
Example
- Example Request
-
This request references the Named Query API GetAccountDetailsFromName. The query parameter name is defined on the Named Query API that generates this sample code.
- Example Response Body
-
OpenAPI Support for Named Query API
- If you have the REST API OpenAPI Beta enabled in your org, then you can download an OpenAPI document describing the REST API that the Named Query API is exposed on. To learn more, check out the OpenAPI Beta documentation.