A list of all methods in the GroupsService service. Click on the method name to view detailed information about that method.
| Methods | Description |
|---|---|
| getGroups | Gets all of a team's Postman groups. |
| getGroup | Gets information about a Postman user group. |
Gets all of a team's Postman groups.
- HTTP Method:
GET - Endpoint:
/groups
Return Type
PostmanGroupsInformation
Example Usage Code Snippet
import { PostmanApi } from '@postman/api-sdk';
(async () => {
const postmanApi = new PostmanApi({
apiKey: 'YOUR_API_KEY',
});
const data = await postmanApi.groups.getGroups();
console.log(data);
})();Gets information about a Postman user group.
- HTTP Method:
GET - Endpoint:
/groups/{groupId}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| groupId | number | ✅ | The group's ID. |
Return Type
PostmanGroupInformation
Example Usage Code Snippet
import { PostmanApi } from '@postman/api-sdk';
(async () => {
const postmanApi = new PostmanApi({
apiKey: 'YOUR_API_KEY',
});
const data = await postmanApi.groups.getGroup(123);
console.log(data);
})();