Skip to content

Latest commit

 

History

History
169 lines (127 loc) · 5.22 KB

instanceOrgMember.md

File metadata and controls

169 lines (127 loc) · 5.22 KB

Instance Org Member Actions

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

Contents

Delete

Deletes an organization member

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

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

// with promises
client.instanceOrgMember.delete(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, instanceOrgMember.*, or instanceOrgMember.delete.

Available Parameters

Name Type Required Description Default Example
instanceId string Y ID associated with the instance 575ec8687ae143cd83dc4a95
orgId string Y ID associated with the organization 575ec8687ae143cd83dc4a97
userId string Y ID associated with the organization member 575ec8687ae143cd83dc4a94
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Success If member was successfully deleted

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if organization or member was not found

Get

Returns an organization member

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

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

// with promises
client.instanceOrgMember.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, instanceOrgMember.*, or instanceOrgMember.get.

Available Parameters

Name Type Required Description Default Example
instanceId string Y ID associated with the instance 575ec8687ae143cd83dc4a95
orgId string Y ID associated with the organization 575ec8687ae143cd83dc4a97
userId string Y ID associated with the organization member 575ec8687ae143cd83dc4a94
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Instance Org Member A single organization member

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if instance, organization, or member was not found

Patch

Modifies the role of an organization member

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

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

// with promises
client.instanceOrgMember.patch(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, instanceOrgMember.*, or instanceOrgMember.patch.

Available Parameters

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

Successful Responses

Code Type Description
200 Instance Org Member The modified organization member

Error Responses

Code Type Description
400 Error Error if malformed request
404 Error Error if organization or member was not found