How-to Guides
Use a GraphQL Endpoint
4 min
complete the steps below to use a graphql endpoint step 1 create client you will first need to log in to your keycloak profile for litmus uns and create a new client to create a client access the keycloak admin console at https //\<litmus uns hostname>/auth/admin from the keycloak realm drop down on the left, switch the realm to standalone navigate to clients click create client configure the general settings client type select openid connect client id enter a client id name enter a name for the client description enter a description for the client always display in ui leave the default setting to turn off the setting to always display the client in the user interface click next configure the capability config settings client authentication click the toggle to enable client authentication authorization leave the default setting to turn off authorization authentication flow click the checkbox for standard flow , direct access grants , and service accounts roles click next leave the login settings empty and click save the new client is created step 2 create api request after creating the client in keycloak, you will then create an api request through graphql by using postman in clients , click the new client name click the credentials tab click the copy icon for the client secret you will refer to this later open the postman application open your workspace in the left navigation menu click the new request icon click new click graphql for the new request, enter the following url https //\<litmus uns hostname>/mqtt/gql click the authorization tab for the type , select oauth 2 0 enter the following details for configure new token token name enter a name for the token grant type select client credentials access token url enter the following url https //\<litmus uns hostname>/auth/realms/standalone/protocol/openid connect/token client secret paste the client secret copied previously click get new access token and then proceed from the manage access tokens dialog, click use token the token is added to the request step 3 verify version and hash once the token added to the api request, you can verify the version and hash values click the schema tab click use graphql introspection click the query tab click the checkbox for version the checkboxes for version version! , version string! , and hash string! should be selected click query the response should display the version and hash values