const apiInstance = new Fastly.InvitationsApi();
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({ , [invitation] })
Create an invitation.
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);
});
Name | Type | Description | Notes |
---|---|---|---|
invitation | Invitation | [optional] |
deleteInvitation({ invitation_id })
Delete an invitation.
const options = {
invitation_id: "invitation_id_example", // required
};
apiInstance.deleteInvitation(options)
.then(() => {
console.log('API called successfully.');
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
invitation_id | String | Alphanumeric string identifying an invitation. |
null (empty response body)
listInvitations({ , [page_number, ][page_size] })
List all invitations.
const options = {
page_number: 1,
page_size: 20,
};
apiInstance.listInvitations(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
page_number | Number | Current page. | [optional] |
page_size | Number | Number of records per page. | [optional] [defaults to 20] |