Skip to content

Latest commit

 

History

History
180 lines (122 loc) · 5.05 KB

PermissionSetsApi.md

File metadata and controls

180 lines (122 loc) · 5.05 KB

Pipedrive.PermissionSetsApi

All URIs are relative to https://api.pipedrive.com/v1

Method HTTP request Description
getPermissionSet GET /permissionSets/{id} Get one permission set
getPermissionSetAssignments GET /permissionSets/{id}/assignments List permission set assignments
getPermissionSets GET /permissionSets Get all permission sets

getPermissionSet

SinglePermissionSetsItem getPermissionSet(id)

Get one permission set

Returns data about a specific permission set.

Example

import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Pipedrive.PermissionSetsApi(apiClient);
let id = "id_example"; // String | The ID of the permission set
apiInstance.getPermissionSet(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String The ID of the permission set

Return type

SinglePermissionSetsItem

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getPermissionSetAssignments

UserAssignmentsToPermissionSet getPermissionSetAssignments(id, opts)

List permission set assignments

Returns the list of assignments for a permission set.

Example

import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Pipedrive.PermissionSetsApi(apiClient);
let id = "id_example"; // String | The ID of the permission set
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
  'start': 0, // Number | Pagination start
  'limit': 56 // Number | Items shown per page
};
apiInstance.getPermissionSetAssignments(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String The ID of the permission set
start Number Pagination start [optional] [default to 0]
limit Number Items shown per page [optional]

Return type

UserAssignmentsToPermissionSet

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getPermissionSets

PermissionSets getPermissionSets(opts)

Get all permission sets

Returns data about all permission sets.

Example

import Pipedrive from 'pipedrive';
let apiClient = new Pipedrive.ApiClient();
// Configure API key authorization: api_key
let api_key = apiClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = apiClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new Pipedrive.PermissionSetsApi(apiClient);
// snake_case as well as camelCase is supported for naming opts properties
let opts = {
  'app': "app_example" // String | The app to filter the permission sets by
};
apiInstance.getPermissionSets(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
app String The app to filter the permission sets by [optional]

Return type

PermissionSets

Authorization

api_key, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json