$apiInstance = new Fastly\Api\AutomationTokensApi(
// 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
);| Method | Fastly API endpoint | Description |
|---|---|---|
| createAutomationToken() | POST /automation-tokens | Create Automation Token |
| getAutomationTokenId() | GET /automation-tokens/{id} | Retrieve an Automation Token by ID |
| getAutomationTokensIdServices() | GET /automation-tokens/{id}/services | List Automation Token Services |
| listAutomationTokens() | GET /automation-tokens | List Customer Automation Tokens |
| revokeAutomationTokenId() | DELETE /automation-tokens/{id} | Revoke an Automation Token by ID |
createAutomationToken($options): \Fastly\Model\AutomationTokenCreateResponse // Create Automation TokenCreates a new automation token.
$options['automation_token_create_request'] = new \Fastly\Model\AutomationTokenCreateRequest(); // \Fastly\Model\AutomationTokenCreateRequest
try {
$result = $apiInstance->createAutomationToken($options);
} catch (Exception $e) {
echo 'Exception when calling AutomationTokensApi->createAutomationToken: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| automation_token_create_request | \Fastly\Model\AutomationTokenCreateRequest | [optional] |
\Fastly\Model\AutomationTokenCreateResponse
[Back to top] [Back to API list] [Back to README]
getAutomationTokenId($options): \Fastly\Model\AutomationTokenResponse // Retrieve an Automation Token by IDRetrieves an automation token by ID.
$options['id'] = 'id_example'; // string
try {
$result = $apiInstance->getAutomationTokenId($options);
} catch (Exception $e) {
echo 'Exception when calling AutomationTokensApi->getAutomationTokenId: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string |
\Fastly\Model\AutomationTokenResponse
[Back to top] [Back to API list] [Back to README]
getAutomationTokensIdServices($options): \Fastly\Model\InlineResponse2001 // List Automation Token ServicesList of services associated with the automation token.
$options['id'] = 'id_example'; // string
$options['per_page'] = 56; // int
$options['page'] = 56; // int
try {
$result = $apiInstance->getAutomationTokensIdServices($options);
} catch (Exception $e) {
echo 'Exception when calling AutomationTokensApi->getAutomationTokensIdServices: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | ||
| per_page | int | [optional] | |
| page | int | [optional] |
\Fastly\Model\InlineResponse2001
[Back to top] [Back to API list] [Back to README]
listAutomationTokens($options): \Fastly\Model\AutomationTokenResponse[] // List Customer Automation TokensLists all automation tokens for a customer.
$options['per_page'] = 56; // int
$options['page'] = 56; // int
try {
$result = $apiInstance->listAutomationTokens($options);
} catch (Exception $e) {
echo 'Exception when calling AutomationTokensApi->listAutomationTokens: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| per_page | int | [optional] | |
| page | int | [optional] |
\Fastly\Model\AutomationTokenResponse[]
[Back to top] [Back to API list] [Back to README]
revokeAutomationTokenId($options): \Fastly\Model\ErrorResponse // Revoke an Automation Token by IDRevoke an automation token by ID.
$options['id'] = 'id_example'; // string
try {
$result = $apiInstance->revokeAutomationTokenId($options);
} catch (Exception $e) {
echo 'Exception when calling AutomationTokensApi->revokeAutomationTokenId: ', $e->getMessage(), PHP_EOL;
}Note: the input parameter is an associative array with the keys listed below.
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string |