$apiInstance = new Fastly\Api\InvitationsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
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($options): \Fastly\Model\InvitationResponse // Create an invitation
Create an invitation.
$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"}}}}]}}}}; // \Fastly\Model\Invitation
try {
$result = $apiInstance->createInvitation($options);
} catch (Exception $e) {
echo 'Exception when calling InvitationsApi->createInvitation: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
invitation | \Fastly\Model\Invitation | [optional] |
\Fastly\Model\InvitationResponse
[Back to top] [Back to API list] [Back to README]
deleteInvitation($options) // Delete an invitation
Delete an invitation.
$options['invitation_id'] = 'invitation_id_example'; // string | Alphanumeric string identifying an invitation.
try {
$apiInstance->deleteInvitation($options);
} catch (Exception $e) {
echo 'Exception when calling InvitationsApi->deleteInvitation: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
invitation_id | string | Alphanumeric string identifying an invitation. |
void (empty response body)
[Back to top] [Back to API list] [Back to README]
listInvitations($options): \Fastly\Model\InvitationsResponse // List invitations
List all invitations.
$options['page_number'] = 1; // int | Current page.
$options['page_size'] = 20; // int | Number of records per page.
try {
$result = $apiInstance->listInvitations($options);
} catch (Exception $e) {
echo 'Exception when calling InvitationsApi->listInvitations: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
page_number | int | Current page. | [optional] |
page_size | int | Number of records per page. | [optional] [defaults to 20] |