Dev GuideAPI ReferenceChangelog
Dev GuideAPI ReferenceChangelogUser GuideDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

POST /content-graphs/{cg_instance_id}/query

Experimental Run a GraphQL query against a content graph instance. Get the cg_instance_id from GET /content-graphs.

Use this to check whether a given asset has synced to the graph, by querying for its identifier and seeing whether the graph returns it.

Reading the response. A 200 carries the graph's JSON payload (data, and extensions when present) passed through unchanged. If the graph rejects a well-formed query, the endpoint returns the graph's own 4xx status with its GraphQL errors body (for example 429 when the graph rate-limits). A 502 means the content graph is unavailable or returned a server error, and a 504 means it could not be reached in time — both are transient, so retry. A 500 is a server-side failure on our end and, unlike 502/504, will not be resolved by retrying.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the content graph instance

Body Params

GraphQL query to run against the content graph instance

GraphQL request envelope. Both properties are forwarded to Optimizely Graph verbatim, so they use the GraphQL protocol names rather than the snake_case convention used elsewhere in this API.

string
required
length ≥ 1

GraphQL query to execute against the content graph instance

Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json