Skip to content

Latest commit

 

History

History
192 lines (133 loc) · 3.99 KB

ObservabilityCustomDashboardsApi.md

File metadata and controls

192 lines (133 loc) · 3.99 KB

Fastly.ObservabilityCustomDashboardsApi

const apiInstance = new Fastly.ObservabilityCustomDashboardsApi();

Methods

Note

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

Method HTTP request Description
createDashboard POST /observability/dashboards Create a new dashboard
deleteDashboard DELETE /observability/dashboards/{dashboard_id} Delete an existing dashboard
getDashboard GET /observability/dashboards/{dashboard_id} Retrieve a dashboard by ID
listDashboards GET /observability/dashboards List all custom dashboards
updateDashboard PATCH /observability/dashboards/{dashboard_id} Update an existing dashboard

createDashboard

createDashboard({ , [create_dashboard_request] })

Create a new dashboard

Example

const options = {
  create_dashboard_request: new Fastly.CreateDashboardRequest(),
};

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

Options

Name Type Description Notes
create_dashboard_request CreateDashboardRequest [optional]

Return type

Dashboard

deleteDashboard

deleteDashboard({ dashboard_id })

Delete an existing dashboard

Example

const options = {
  dashboard_id: 2eGFXF4F4kTxd4gU39Bg3e, // required
};

apiInstance.deleteDashboard(options)
  .then(() => {
    console.log('API called successfully.');
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
dashboard_id String

Return type

null (empty response body)

getDashboard

getDashboard({ dashboard_id })

Retrieve a dashboard by ID

Example

const options = {
  dashboard_id: 2eGFXF4F4kTxd4gU39Bg3e, // required
};

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

Options

Name Type Description Notes
dashboard_id String

Return type

Dashboard

listDashboards

listDashboards()

List all custom dashboards

Example

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

Options

This endpoint does not need any parameters.

Return type

ListDashboardsResponse

updateDashboard

updateDashboard({ dashboard_id, [update_dashboard_request] })

Update an existing dashboard

Example

const options = {
  dashboard_id: 2eGFXF4F4kTxd4gU39Bg3e, // required
  update_dashboard_request: new Fastly.UpdateDashboardRequest(),
};

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

Options

Name Type Description Notes
dashboard_id String
update_dashboard_request UpdateDashboardRequest [optional]

Return type

Dashboard

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