Skip to content

Latest commit

 

History

History
163 lines (121 loc) · 4.78 KB

instanceMember.md

File metadata and controls

163 lines (121 loc) · 4.78 KB

Instance Member Actions

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

Contents

Delete

Deletes an instance member

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

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

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

Available Parameters

Name Type Required Description Default Example
instanceId string Y ID associated with the instance 575ec8687ae143cd83dc4a97
userId string Y ID associated with the instance 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 instance or member was not found

Get

Returns an instance member

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

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

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

Available Parameters

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

Successful Responses

Code Type Description
200 Instance Member A single instance member

Error Responses

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

Patch

Modifies the role of an instance member

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

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

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

Available Parameters

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

Successful Responses

Code Type Description
200 Instance Member Patch The modified instance member

Error Responses

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