Query examples for management operations
The Authoring and Management GraphQL API allows you to extend Experience Manager with custom dialogs and user interfaces. You can use the API to perform tasks previously possible only through the Sitecore user interface.
You can perform authoring operations using queries and mutations for the following GraphQL types:
-
Archiving
-
Database
-
Indexing
-
Job
-
Language
-
Publishing
-
Security
-
Workflow
-
Rules
For a complete list of available types and operations, refer to the built-in documentation in the GraphQL IDE.
Trigger an index rebuild
You can use the rebuildIndexes mutation to run an index rebuilding operation.
Query
Result
Check a job status by job name
You can query the job details by the job name or job handle returned from the result using Job API.
Query
Result
Check a job status using wildcards
You can use a wildcard to get details about available jobs.
You can query by wildcard alone or use the wildcard before or after a job name fragment. Specifically:
-
*- returns the status for all jobs. -
*myjob- returns the status for jobs where the name ends withmyjob. -
myjob*- returns the status for jobs where the name starts withmyjob. -
*myjob*- returns the status for jobs where the name containsmyjob.
Query
Result
Publish an item to the edge
You can use the publishItem mutation to publish an item to the edge. If you want to check the operation status, return the operationId property of the publish operation.
Query
Result
Check the publishing status
You can query the status of a publishing operation using the operation identifier returned by the publishItem mutation.