Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
bulk_revoke_tokens | DELETE /tokens | Revoke multiple tokens |
create_token | POST /tokens | Create a token |
get_token | GET /tokens/{token_id} | Get a token |
get_token_current | GET /tokens/self | Get the current token |
list_tokens_customer | GET /customer/{customer_id}/tokens | List tokens for a customer |
list_tokens_user | GET /tokens | List tokens for the authenticated user |
revoke_token | DELETE /tokens/{token_id} | Revoke a token |
revoke_token_current | DELETE /tokens/self | Revoke the current token |
Revoke Tokens in bulk format. Users may only revoke their own tokens. Superusers may revoke tokens of others.
let cfg = &Configuration::default();
let params = BulkRevokeTokensParams {
// parameters
};
bulk_revoke_tokens(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
request_body | Option<::std::collections::HashMap<String, serde_json::Value>> |
(empty response body)
- Content-Type: application/vnd.api+json; ext=bulk
- Accept: Not defined
[Back to top] [Back to API list] [Back to README]
Create an API token. If two-factor authentication is enabled for your account, review the instructions for including a one-time password in the request.
let cfg = &Configuration::default();
let params = CreateTokenParams {
// parameters
};
create_token(cfg, params)
This endpoint does not need any parameter.
crate::models::TokenCreatedResponse
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Get a single token by its id.
let cfg = &Configuration::default();
let params = GetTokenParams {
// parameters
};
get_token(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
token_id | String | Alphanumeric string identifying a token. | [required] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Get a single token based on the access_token used in the request.
let cfg = &Configuration::default();
let params = GetTokenCurrentParams {
// parameters
};
get_token_current(cfg, params)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
List all tokens belonging to a specific customer.
let cfg = &Configuration::default();
let params = ListTokensCustomerParams {
// parameters
};
list_tokens_customer(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
customer_id | String | Alphanumeric string identifying the customer. | [required] |
Vec<crate::models::TokenResponse>
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
List all tokens belonging to the authenticated user.
let cfg = &Configuration::default();
let params = ListTokensUserParams {
// parameters
};
list_tokens_user(cfg, params)
This endpoint does not need any parameter.
Vec<crate::models::TokenResponse>
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Revoke a specific token by its id.
let cfg = &Configuration::default();
let params = RevokeTokenParams {
// parameters
};
revoke_token(cfg, params)
Name | Type | Description | Required | Notes |
---|---|---|---|---|
token_id | String | Alphanumeric string identifying a token. | [required] |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to README]
Revoke a token that is used to authenticate the request.
let cfg = &Configuration::default();
let params = RevokeTokenCurrentParams {
// parameters
};
revoke_token_current(cfg, params)
This endpoint does not need any parameter.
(empty response body)
- Content-Type: Not defined
- Accept: application/json