POST Send Query
POST /graphql
Operation ID: sendQuery.
Returns the result of a GraphQL query.
Execute a GraphQL query.
Before you can send a GraphQL API query, make sure you set up authorization by following a Quick Start. You need an API access token to authenticate your requests via a client like Altair or Postman. For example requests, see the Postman Collection.
Request body
Media type: application/json. Schema: GraphQLInputRepresentation.
Example
{
"query": "query accounts { uiapi { query { Account { edges { node { Name { value } } } } } } }"
}
Responses
- 200
Success
Media type:
application/json. Schema:GraphQLRepresentation.Example
{ "data": { "uiapi": { "query": { "Account": { "edges": [ { "node": { "Id": "0011a000005slmbAAA", "Name": { "value": "GenePoint" } } }, { "node": { "Id": "0011a000005slmcAAA", "Name": { "value": "United Oil & Gas, UK" } } }, { "node": { "Id": "0011a000005slmeAAA", "Name": { "value": "Edge Communications" } } } ] } } } }, "errors": [ { "extensions": { "ErrorType": "ValidationError" }, "locations": [ { "column": 7, "line": 4 } ], "message": "Validation error of type FieldUndefined: Field 'Accounts' in type 'RecordQuery' is undefined @ 'uiapi/query/Accounts'", "paths": [ "uiapi", "query", "Account", "edges", 4, "node" ] } ], "extensions": {} }