Execute a GraphQL operation

POST {{baseUrl}}/

To make an API request to the /collector/graphql endpoint, the following scopes are required: - collector.graphqlschema.read - collector.graphqlquery.execute

Note: You must also include any scopes that correspond to the data sources in your query. For example, the crm.objects.contacts.read scope is required if you're fetching contacts in your query.

Once a user has authorized the required scopes above, you can make a POST request to the /collector/graphql endpoint and include the following fields:

Request Body

{"operationName"=>"<string>", "query"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;extensions&quot;:{&quot;query_complexity&quot;:{&quot;max_points&quot;:&quot;\u003cinteger\u003e&quot;,&quot;used_points&quot;:&quot;\u003cinteger\u003e&quot;,&quot;points_for_internal_api_requests&quot;:{&quot;count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;weight&quot;:&quot;\u003cinteger\u003e&quot;,&quot;used_points&quot;:&quot;\u003cinteger\u003e&quot;},&quot;points_for_objects_retrieved&quot;:{&quot;count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;weight&quot;:&quot;\u003cinteger\u003e&quot;,&quot;used_points&quot;:&quot;\u003cinteger\u003e&quot;},&quot;points_for_properties_with_value&quot;:{&quot;count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;weight&quot;:&quot;\u003cinteger\u003e&quot;,&quot;used_points&quot;:&quot;\u003cinteger\u003e&quot;},&quot;points_for_properties_without_value&quot;:{&quot;count&quot;:&quot;\u003cinteger\u003e&quot;,&quot;weight&quot;:&quot;\u003cinteger\u003e&quot;,&quot;used_points&quot;:&quot;\u003cinteger\u003e&quot;}}},&quot;data&quot;:{&quot;BLOG&quot;:{&quot;post_collection&quot;:{&quot;items&quot;:[{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;},{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;}]}}}}