Making a Test API Request

Use the API to get some information about the current user.

  1. In the Types panel on the right, click Query. This shows a list of queries in the left panel.
  2. Find setup in the list, and drill into SetupQueries:

Graphical user interface

Description automatically generated

Graphical user interface, text, application, email

Description automatically generated

       3. Find userManager in the list and drill into UserManagerQueries:

Graphical user interface

Description automatically generated with medium confidence

Graphical user interface, text, application, email

Description automatically generated

    4. Find currentUser in the list, and drill into UserEmployeeModel:

Graphical user interface

Description automatically generated with medium confidence

Graphical user interface, application

Description automatically generated

    5. This shows the fields that make up the UserEmployeeModel object. Create a query that returns some of these fields.

    6. Return to the Operations view by pulling down the menu that says Schema Reference and changing it to Operations. Optionally, you could open a second tab in the tool (CTRL-ALT-T for Windows; Command-Option-T for Mac). This way, the first tab is on the schema reference and the second tab is on the operations.

    7. Type your desired GraphQL query. Notice that the tool helps with auto-complete functionality:

Graphical user interface, application

Description automatically generated

The completed query should look like this:

A picture containing text

Description automatically generated

This query retrieves only the userName, description, and jobTitle fields.

    8. Click the Run button in the upper-right corner of the Operations panel:

Graphical user interface, text, application

Description automatically generated

The results appear in the Response panel:

A picture containing timeline

Description automatically generated

Note that if you get an error at this point about not being authorized, one of two things has probably happened: either you did not follow the procedure in Getting set up and signed in or the token that you retrieved has expired. Follow the instructions in Getting set up and signed in to get a token, or if your token expired, return to the Connection Settings dialog, and at the bottom of the Authorization tab, click Fetch Token and try again.

Next steps

Familiarize yourself with the API and its structure. If you are unfamiliar with GraphQL or JSON, use the links in the Introduction to learn about those technologies.

Once you are familiar with these concepts, branch out to other tools, or use the information in this document to start using a GraphQL client library to begin integrating this API into your own project.

Was this article helpful?
Thank you for your feedback!