Make your first API call using the Sprinto API Playground

Learn how to make your first query or mutation using the Sprinto API Playground and validate responses in real time.

This guide walks you through making your first API call using the Sprinto API Playground. The playground allows you to execute queries and mutations directly from your browser and inspect responses without writing any client-side code.

Before proceeding, ensure that the API Playground is correctly configured and authenticated.


Prerequisites

Before making an API call, ensure that you have:

  • Successfully set up the Sprinto API Playground

  • A valid API key configured in the playground

  • A basic understanding of GraphQL queries and mutations

For additional context, review the API Structure documentation to understand valid request formats.


Step 1: Choose the API operation type

In the API Playground, all operations are grouped under Root types.

  1. Decide whether you want to make a:

    • Query to read data, or

    • Mutation to modify data

  2. Expand the relevant root type by selecting it from the sidebar.

In the example below, a query operation is selected.


Step 2: Select an API operation

From the expanded root type:

  1. Choose an available API operation.

  2. When you select an operation, the corresponding GraphQL code is automatically added to the Operations editor.

This saves time and ensures the request structure matches the schema.


Step 3: Configure query arguments

Most queries require arguments to define what data should be returned.

You can use:

  • first to specify how many records to retrieve

  • after or before to fetch records relative to a cursor value

For this example:

  • The first argument is selected

  • A value of 10 is entered in the Variables section

To understand how cursors work, refer to the Pagination documentation.


Step 4: Select response fields

GraphQL allows you to control exactly which fields are returned in the response.

  1. Select the fields you want to retrieve.

  2. In this example, only totalCount is selected to return the total number of workflow checks.

  3. Click Query to execute the API call.


Step 5: Review the response

After execution:

  • The response appears in the Response panel

  • You can view the returned data, HTTP status code, and any error messages if the request fails

This feedback helps you validate your query and troubleshoot issues quickly.


What happens next

If the query executes successfully, you have completed your first API call using the Sprinto API Playground.

You can now:

  • Modify the query to retrieve additional fields

  • Experiment with different arguments

  • Try mutation operations

  • Explore other available API operations


Next steps

To continue learning, you can:

  • Explore ready-to-use examples in Sprinto Cookbooks

  • Make paginated queries for large datasets

  • Use the playground to validate queries before integrating them into your application

Last updated