Skip to content

Get GraphQL query for a content type

GET
/api/queries/{repo}/{type}
curl --request GET \
--url https://example.com/api/queries/example/example \
--header 'Authorization: Bearer <token>'

Retrieves the auto-generated GraphQL query string for a specific content type in a repository

repo
required

Repository ID

string
type
required

Content type name

string

GraphQL query retrieved successfully

Media typetext/plain

GraphQL query string for the specified content type

string
Example
query GetArticle($id: ID!) { article(id: $id) { id name slug } }

Repository or type not found

Media typeapplication/json
object
error
required

Indicates an error occurred

boolean
message
required

Error message describing what went wrong

string
Example
{
"error": true,
"message": "Item not found"
}