Skip to main content

Send requests to MongooseIM via the GraphQL API

1 To use domain admin's GraphQL API enter GraphiQL webpage.
GraphQL main page
2 To open GraphQL documentation, click the Docs button marked on the photo. For more details about GraphQL and MongooseIM, visit MongooseIM GraphQL documentation.
GraphQL docs button
3 Select REQUEST HEADERS at the left lower corner of the screen.
Request headers location
4 For the authorization as a domain admin the base64-encoded token should have the form admin@DOMAIN:PASSWORD, where: DOMAIN is the domain to authorize, PASSWORD is the password for the given domain admin. It can be created on a domain management view. In the input field insert: { "Authorization": "Basic TOKEN" }
Authorization header example
5 Click QUERY VARIABLES to open the input field, where you can enter variables used in your GraphQL queries and mutations.
Query variables section
6 Write the request in the text field on the left side of the screen. When you're ready, click the button marked on the picture, to execute the request. You can try an example query , extracting the list of the domain's users. Before executing it make sure to add your domain name in QUERY VARIABLES, and add authorization header in REQUEST HEADERS.
Execute query button