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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"extensions":{"query_complexity":{"max_points":"\u003cinteger\u003e","used_points":"\u003cinteger\u003e","points_for_internal_api_requests":{"count":"\u003cinteger\u003e","weight":"\u003cinteger\u003e","used_points":"\u003cinteger\u003e"},"points_for_objects_retrieved":{"count":"\u003cinteger\u003e","weight":"\u003cinteger\u003e","used_points":"\u003cinteger\u003e"},"points_for_properties_with_value":{"count":"\u003cinteger\u003e","weight":"\u003cinteger\u003e","used_points":"\u003cinteger\u003e"},"points_for_properties_without_value":{"count":"\u003cinteger\u003e","weight":"\u003cinteger\u003e","used_points":"\u003cinteger\u003e"}}},"data":{"BLOG":{"post_collection":{"items":[{"id":"\u003cstring\u003e","name":"\u003cstring\u003e"},{"id":"\u003cstring\u003e","name":"\u003cstring\u003e"}]}}}}