Getting Started with Squadcast GraphQL

This document provides instructions on how to use Squadcast's GraphQL APIs in Postman.

Looking for schema instead? Click here (paste your access token and refresh the page)

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

Squadcast GraphQL APIs - Postman Usage Guide

Follow the steps below to get started:

1. Generate Access Token

Obtain your access token by using the authentication API in Postman.

2. Set API Endpoint

Set the API endpoint based on your region:

  • For the US region, use: https://api.squadcast.com/v3/graphql

  • For the EU region, use: https://api.eu.squadcast.com/v3/graphql

3. Execute GraphQL Query

  1. In Postman, navigate to the query section.

  2. Start typing your query, and Postman will provide auto-suggestions for the available fields.

  3. Once your query is ready, click the "Send" button to execute the GraphQL query.

That's it! You have successfully used Squadcast's GraphQL APIs in Postman. Feel free to explore the available queries and customize them according to your requirements.

How do I use Squadcast’s GraphQL APIs?

First, you’ll need to create a client. Once you’ve done this, follow our instructions to authenticate against the API.

Both GraphQL and the REST API use the same authentication API.

After you’ve got your access token, you can start querying the API. Let’s check some examples of schedule API.

curl --location 'https://api.squadcast.com/v3/graphql' \
--header 'authorization: Bearer <Your-access-token>' \
--header 'content-type: application/json' \
--data '{"query":"{\n  schedules(\n    filters: {teamID: \"6129ac15518568defa92794b\"}\n  ) {\n    teamID\n    name\n    ID\n    orgID\n    description\n    timeZone\n    rotations {\n      name\n      participantGroups {\n        participants {\n          type\n          ID\n        }\n      }\n      startDate\n      period\n      endDate\n      endsAfterIterations\n    }\n  }\n}\n"}'

You get the response:

{
  "data": {
    "schedules": [
      {
        "teamID": "6129ac15518568defa92794b",
        "name": "test1 (migrated)",
        "ID": 5259,
        "orgID": "60cb200bc9de4a0008d2fc41",
        "description": "This Schedule is Migrated from calendar test1 from v1\n",
        "timeZone": "Etc/GMT+8",
        "rotations": [
          {
            "name": "Shift 43",
            "participantGroups": [
              {
                "participants": [
                  {
                    "type": "user",
                    "ID": "612f9bbc4afb140007314590"
                  }
                ]
              },
              {
                "participants": [
                  {
                    "type": "user",
                    "ID": "60f12dd3814bef0008c4036e"
                  }
                ]
              }
            ],
            "startDate": "2023-05-01T07:00:00Z",
            "period": "daily",
            "endDate": null,
            "endsAfterIterations": null
          }
        ]
      }
    ]
  }
}

GraphQL API References:

Last updated