POST /content-graphs/{cg_instance_id}/query
1 min
POST
https://api.cmp.optimizely.com/v3/content-graphs/{cg_instance_id}/query
cg_instance_idstringUnique identifier of the content graph instance
acceptstringGenerated from available response content types
bodyobjectGraphQL query to run against the content graph instance
200<p>Query reached the content graph and succeeded. The body is the graph's JSON response, passed through unchanged.</p>
400<p>The request was invalid (for example a missing <code>query</code>), or the graph rejected a well-formed query. When it originates from the graph, the body is the graph's GraphQL <code>errors</code> payload.</p>
401Authorization error
403Permission error
404Not found error
429<p>The content graph rate-limited the request. Passed through with the graph's status and body unchanged. Retry after a short delay.</p>
502<p>The content graph is unavailable or returned an error that could not be passed through to the caller. Transient — retry.</p>
504<p>The content graph could not be reached within the timeout. Transient — retry.</p>
curl --request POST \
--url https://api.cmp.optimizely.com/v3/content-graphs/{cg_instance_id}/query \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"query": "query MyQuery($after: String) { cmp_PublicImageAsset(limit: 50, cursor: $after) { total items { Id } cursor } }"
}'