Skip to content

Latest commit

 

History

History
169 lines (127 loc) · 5.28 KB

instanceOrgInvite.md

File metadata and controls

169 lines (127 loc) · 5.28 KB

Instance Org Invite Actions

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

Contents

Delete

Revokes an instance org invitation

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

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

// with promises
client.instanceOrgInvite.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, instanceOrgInvite.*, or instanceOrgInvite.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
inviteId string Y ID associated with the organization invite 575ec8687ae143cd83dc4a94
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Success If an invite was successfully deleted

Error Responses

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

Get

Returns an organization invite

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

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

// with promises
client.instanceOrgInvite.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, instanceOrgInvite.*, or instanceOrgInvite.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
inviteId string Y ID associated with the organization invite 575ec8687ae143cd83dc4a94
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
200 Organization Invitation A single organization invite

Error Responses

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

Resend Invite

Resend an organization invite with modified role info

var params = {
  instanceId: myInstanceId,
  orgId: myOrgId,
  inviteId: myInviteId,
  roleInfo: myRoleInfo
};

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

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

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
inviteId string Y ID associated with the organization invite 575ec8687ae143cd83dc4a94
roleInfo Organization Role Info Y Object containing updated role info Organization Role Info Example
losantdomain string N Domain scope of request (rarely needed) example.com

Successful Responses

Code Type Description
201 Organization Invitation The new org invite

Error Responses

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