Skip to content

Latest commit

 

History

History
202 lines (142 loc) · 4.34 KB

AutomationTokensApi.md

File metadata and controls

202 lines (142 loc) · 4.34 KB

Fastly.AutomationTokensApi

const apiInstance = new Fastly.AutomationTokensApi();

Methods

Note

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

Method HTTP request 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

createAutomationToken({ , [automation_token_create_request] })

Creates a new automation token.

Example

const options = {
  automation_token_create_request: new Fastly.AutomationTokenCreateRequest(),
};

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

Options

Name Type Description Notes
automation_token_create_request AutomationTokenCreateRequest [optional]

Return type

AutomationTokenCreateResponse

getAutomationTokenId

getAutomationTokenId({ id })

Retrieves an automation token by ID.

Example

const options = {
  id: "id_example", // required
};

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

Options

Name Type Description Notes
id String

Return type

AutomationTokenResponse

getAutomationTokensIdServices

getAutomationTokensIdServices({ id, [per_page, ][page] })

List of services associated with the automation token.

Example

const options = {
  id: "id_example", // required
  per_page: 56,
  page: 56,
};

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

Options

Name Type Description Notes
id String
per_page Number [optional]
page Number [optional]

Return type

InlineResponse2001

listAutomationTokens

listAutomationTokens({ , [per_page, ][page] })

Lists all automation tokens for a customer.

Example

const options = {
  per_page: 56,
  page: 56,
};

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

Options

Name Type Description Notes
per_page Number [optional]
page Number [optional]

Return type

[AutomationTokenResponse]

revokeAutomationTokenId

revokeAutomationTokenId({ id })

Revoke an automation token by ID.

Example

const options = {
  id: "id_example", // required
};

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

Options

Name Type Description Notes
id String

Return type

AutomationTokenErrorResponse

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