Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 1.85 KB

GroupsService.md

File metadata and controls

68 lines (44 loc) · 1.85 KB

GroupsService

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.

getGroups

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);
})();

getGroup

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);
})();