Skip to content

Latest commit

 

History

History
126 lines (88 loc) · 2.88 KB

InvitationsApi.md

File metadata and controls

126 lines (88 loc) · 2.88 KB

Fastly.InvitationsApi

const apiInstance = new Fastly.InvitationsApi();

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
createInvitation POST /invitations Create an invitation
deleteInvitation DELETE /invitations/{invitation_id} Delete an invitation
listInvitations GET /invitations List invitations

createInvitation

createInvitation({ , [invitation] })

Create an invitation.

Example

const options = {
  invitation: {"data":{"type":"invitation","attributes":{"email":"[email protected]","limit_services":true,"role":"engineer"},"relationships":{"customer":{"data":{"id":"44tb1D3asjhhuh2SH8e8YD","type":"customer"}},"service_invitations":{"data":[{"type":"service_invitation","attributes":{"permission":"purge_all"},"relationships":{"service":{"data":{"type":"service","id":"6yrrdleXQ9QDtum9rMB0nr"}}}}]}}}},
};

apiInstance.createInvitation(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
invitation Invitation [optional]

Return type

InvitationResponse

deleteInvitation

deleteInvitation({ invitation_id })

Delete an invitation.

Example

const options = {
  invitation_id: "invitation_id_example", // required
};

apiInstance.deleteInvitation(options)
  .then(() => {
    console.log('API called successfully.');
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
invitation_id String Alphanumeric string identifying an invitation.

Return type

null (empty response body)

listInvitations

listInvitations({ , [page_number, ][page_size] })

List all invitations.

Example

const options = {
  page_number: 1,
  page_size: 20,
};

apiInstance.listInvitations(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
page_number Number Current page. [optional]
page_size Number Number of records per page. [optional] [defaults to 20]

Return type

InvitationsResponse

[Back to top] [Back to API list] [Back to README]