Skip to main content

Get groups

This endpoint enables you to get groups of your organization. You can use this endpoint to get all groups, you can also get a specific group by providing the group ID. The response will include the group ID, name, and creation date.

How to use

You can use the following cURL to obtain a response from this endpoint:

curl --location --request GET https://nodeapi.superviz.com/groups \
--header "Authorization: Bearer ${TOKEN}" \
--header "apikey: ${API_KEY}"

HTTP Request

GET https://nodeapi.superviz.com/groups

Headers

When using this endpoint, you need to provide the Authorization Bearer token and the API Key. The following headers are required:

NameDescription
AuthorizationRequired. You must utilize the authentication token.
apikeyRequired. You must utilize the SuperViz Token that can be found on the developer page. By utilizing this key, we will define whether to get data from the developer or the production environment.

Response

Status code 200 will indicate that the request was successful. The response will be in JSON format, following the pagination guide for SuperViz REST API, and include the following fields:

NameTypeDescription
idstringThe group ID.
namestringThe group name.
createdAtstringThe group creation date.

If you want to get a list of participants in the group, you can use the get participants from a specific group endpoint.

Example:

{
"pagination": {
"page": 1,
"totalPages": 10,
"limit": 10,
"total": 100
},
"data": [
{
"id": "example-id",
"name": "Red Team",
"createdAt": "2021-05-30T21:23:00.000Z"
}
]
}