Authentication

The Management API uses JWT for authentication. To authenticate with the Management API, you need to obtain a JWT token by sending a Login mutation to the Management API. You can use the following mutation to log in:

Request

POST
http://modelgw:4000/graphql
mutation Mutation($input: LoginInput!) {
  login(input: $input) {
    token
  }
}

You should get response that looks like this:

{
  "data": {
    "login": {
      "token": "..."
    }
  }
}

Obtain token from the response and use it in the Authorization header to authenticate your requests to the Management API:

HTTP Authorization Header

Authorization: Bearer <token>