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_main_page

3. Select REQUEST HEADERS at the left lower corner of the screen.

graphql_main_page

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"}.

psi account name

5. Click QUERY VARIABLES to open the input field, where you can enter variables used in your GraphQL queries and mutations.

psi account details

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.

psi user online