Skip to content

Latest commit

 

History

History
116 lines (87 loc) · 3.92 KB

instanceOrgMembers.md

File metadata and controls

116 lines (87 loc) · 3.92 KB

Instance Org Members Actions

Details on the various actions that can be performed on the Instance Org Members resource, including the expected parameters and the potential responses.

Contents

Get

Returns a collection of instance organization members

var params = {
  instanceId: myInstanceId,
  orgId: myOrgId
};

// with callbacks
client.instanceOrgMembers.get(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.instanceOrgMembers.get(params)
  .then(console.log)
  .catch(console.error);

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Instance, all.Instance.read, all.User, all.User.read, instanceOrgMembers.*, or instanceOrgMembers.get.

Available Parameters

Name Type Required Description Default Example
instanceId string Y ID associated with the instance 575ec8687ae143cd83dc4a97
orgId string Y ID associated with the organization 575ec8687ae143cd83dc4a97
sortField string N Field to sort the results by. Accepted values are: email, role email role
sortDirection string N Direction to sort the results by. Accepted values are: asc, desc asc asc
filterField string N Field to filter the results by. Blank or not provided means no filtering. Accepted values are: email, role email
filter string N Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. my * instance
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Instance Organization Members A collection of instance organization members

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if instance was not found

Post

Creates a new organization member

var params = {
  instanceId: myInstanceId,
  orgId: myOrgId,
  member: myMember
};

// with callbacks
client.instanceOrgMembers.post(params, function (err, result) {
  if (err) { return console.error(err); }
  console.log(result);
});

// with promises
client.instanceOrgMembers.post(params)
  .then(console.log)
  .catch(console.error);

Authentication

The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Instance, all.User, instanceOrgMembers.*, or instanceOrgMembers.post.

Available Parameters

Name Type Required Description Default Example
instanceId string Y ID associated with the instance 575ec8687ae143cd83dc4a97
orgId string Y ID associated with the organization 575ec8687ae143cd83dc4a97
member Instance Org Member Post Y Object containing new member info Instance Org Member Post Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Instance Org Member The newly created instance member

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if instance was not found