openapi: 3.0.0 info: title: Cockpit API description: "Scaleway's Cockpit allows you to monitor your applications and their infrastructure by giving you insights and context into their behavior. Cockpit also enables you to visualize your metrics and logs through a Grafana dashboard. With Cockpit, you can also push your own data as Scaleway products' data is included by default.\n\nThe Observability Cockpit provides you with two Prometheus Remote Write endpoints for pushing metrics and logs. You can push metrics with any `Prometheus Remote Write` compatible agent such as [Prometheus](https://prometheus.io/docs/introduction/overview/), [Grafana](https://grafana.com/docs/agent/latest/) or [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/).\n\nYou can push logs with any Loki compatible agent such as [Promtail](https://grafana.com/docs/loki/latest/clients/promtail/), [Fluentd](https://docs.fluentd.org/), [Fluent Bit](https://docs.fluentbit.io/manual/) or [Logstash](https://www.elastic.co/guide/en/logstash/current/introduction.html).\n\n(switchcolumn)\n(switchcolumn)\n\n## Concepts\n\nRefer to our [dedicated concepts page](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) to find definitions of the different terms referring to the Observability Cockpit.\n\n(switchcolumn)\n(switchcolumn)\n## Quickstart\n\n1. **Configure your environment variables.**\n\n \n \ This is an optional step that seeks to simplify your usage of the API.\n \n\n \ ```bash\n export SCW_SECRET_KEY=\"\"\n export SCW_PROJECT_ID=\"\n ```\n2. **Activate your Cockpit.**\n\n Run the following command to activate your Cockpit:\n\n ```bash\n curl -X POST \\\n -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n https://api.scaleway.com/cockpit/v1beta1/activate \\\n -H \"Content-Type: application/json\" \\\n -d '{\"project_id\": \"'\"$SCW_PROJECT_ID\"'\"}'\n ```\n3. **Build push URLs.**\n\n Your Cockpit has 4 [endpoints](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#endpoints) which look like the following:\n\n ```json\n {\n [...],\n \"endpoints\": {\n \"metrics_url\": \"https://metrics.cockpit.fr-par.scw.cloud\",\n \ \"logs_url\": \"https://logs.cockpit.fr-par.scw.cloud\",\n \"alertmanager_url\": \"https://alertmanager.cockpit.fr-par.scw.cloud\"\n \"grafana_url\": \".dashboard.obs.fr-par.scw.cloud\"\n },\n [...]\n }\n \ ```\n\n The `metrics_url` is a domain that exposes a Prometheus-like API to manage metrics, and the `logs_url` exposes a Loki API to manage logs.\n\n \n To be able to send metrics and logs, you need the **exact URL** to use with your **pushers**.\n \n\n - The Prometheus Remote Write endpoint to push your metrics is the following: `https://metrics.cockpit.fr-par.scw.cloud/api/v1/push`\n \ - The Remote Write endpoint to push your logs is the following: `https://logs.cockpit.fr-par.scw.cloud/loki/api/v1/push`\n \ - The Prometheus Alertmanager endpoint is the following: `https://alertmanager.cockpit.fr-par.scw.cloud/alertmanager`\n \ - Traces have different endpoints depending on the [push path](https://www.scaleway.com/en/docs/observability/cockpit/how-to/activate-push-traces/#retrieve-traces-push-paths) you use. The traces endpoint for the OpenTelemetry agent is: `https://traces.cockpit.fr-par.scw.cloud/otlp`.\n\n4. **Create your token to push metrics and logs.**\n\n Find out [how to create your token via the console](https://www.scaleway.com/en/docs/observability/cockpit/how-to/create-token/) or run the following command to create your token via API.\n\n ```bash\n curl -X POST \\\n \"https://api.scaleway.com/cockpit/v1beta1/tokens\" \\\n -H \"Content-Type: application/json\" \\\n -H \"X-Auth-Token: $SCW_SECRET_KEY\" \\\n -d '{\n \"project_id\": \"00000000-0000-0000-0000-000000000000\",\n \ \"name\": \"token-name\",\n \"scopes\": {\n \"query_metrics\": false,\n \"write_metrics\": true,\n \"setup_metrics_rules\": false,\n \ \"query_logs\": false,\n \"write_logs\": true,\n \"setup_logs_rules\": false,\n \"setup_alerts\": false,\n \"query_traces\": false,\n \"write_traces\": false\n }\n }'\n ```\n\n \n Your token's `secret_key` only displays once. Make sure that you save it. We strongly recommend that you only give the minimal amount of permissions to your token. Metric pushers should only have the `write_metrics` scope, and log pushers the `write_logs` one.\n \n\n5. **Configure the Grafana agent.**\n\n Find out [how to configure, start the Grafana agent and see your metrics and logs](https://www.scaleway.com/en/docs/observability/cockpit/api-cli/configuring-grafana-agent/) in our documentation.\n\n \n The promtail configuration for the logs does not support custom headers. The `tenant_id` field corresponds to the header `X-Scope-OrgID` which\n is one of the supported headers. For more details on the different supported headers, see our [troubleshooting documentation for when your pusher does not support custom HTTP headers](https://www.scaleway.com/en/docs/observability/cockpit/troubleshooting/pusher-does-not-support-custom-http-headers/).\n \ \n\n6. **Configure rules and alerts.**\n\n Upon creation, your Grafana instance is already configured by default with your logs and metrics data sources and with the alert manager data source. This means that you will be able to configure and manage advanced alerting rules, for metrics and logs, configure contact points and notification policies, from Grafana.\n\n To do so, [access your Grafana dashboard](https://www.scaleway.com/en/docs/observability/cockpit/how-to/access-grafana-and-managed-dashboards/) and read our [dedicated documentation](https://www.scaleway.com/en/docs/observability/cockpit/how-to/configure-alerts-for-scw-resources/) to find out how to configure alert rules for Scaleway resources. Refer to the **External links** section of this page if you are not familiar with the alert manager or alert rules.\n\n \n For the alerts and rules to be created in your Cockpit, you must use the data sources provided by Scaleway.\n \n\n \n Make sure that you select `Scaleway Alerting` as your alert manager when configuring as the alerts are managed by the platform. If you use `Grafana` you will work with the local alert manager which is deactivated.\n \n\n(switchcolumn)\n\n\n - You have a [Scaleway account](https://console.scaleway.com/)\n - You have [created an API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) and that the API key has sufficient [IAM permissions](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/permission-sets/) to perform the actions described on this page\n - You have activated your Cockpit via the [console](https://www.scaleway.com/en/docs/observability/cockpit/how-to/activate-cockpit/) or [API](#path-cockpits-activate-a-cockpit)\n - You have [installed `curl`](https://curl.se/download.html)\n - You have [installed docker](https://www.docker.com/)\n - You have [installed docker compose](https://docs.docker.com/compose/install/)\n - You have a Linux machine to run the container on. You can still run the container on macOS or Windows, but your logs will not be available in your Cockpit.\n\n(switchcolumn)\n\n## Technical information\n\n### Regional availability\n\nScaleway's infrastructure is spread across different [regions and Availability Zones](https://www.scaleway.com/en/docs/console/account/reference-content/organization-quotas/).\nYour Cockpit resources are available in the Paris, Amsterdam and Warsaw regions.\n\n### Current supported endpoints\n\n- The current supported endpoints for metrics are the following. For more information about the endpoints, refer to the [Mimir documentation](https://grafana.com/docs/mimir/latest/references/http-api/)\n \ ```\n # Remote write endpoints\n path /api/v1/push\n\n # Query endpoints\n \ path /prometheus/api/v1/query\n path /prometheus/api/v1/query_range\n path /prometheus/api/v1/query_exemplars\n path /prometheus/api/v1/series\n path /prometheus/api/v1/labels\n path /prometheus/api/v1/label/*\n path /prometheus/api/v1/metadata\n \ path /prometheus/api/v1/read\n path /prometheus/api/v1/status/buildinfo\n \ \n # Ruler endpoints\n path /prometheus/api/v1/rules\n path /prometheus/api/v1/alerts\n \ path /prometheus/config/v1/rules\n path /prometheus/config/v1/rules/*\n \ ```\n- The current supported endpoints for logs are the following. For more information about the endpoints, refer to the [Loki documentation](https://grafana.com/docs/loki/latest/api/)\n \ ```\n # Remote write endpoints\n path /loki/api/v1/push\n \n # Query endpoints\n path /loki/api/v1/query\n path /loki/api/v1/query_range\n \ path /loki/api/v1/labels\n path /loki/api/v1/label\n path /loki/api/v1/label/*\n \ path /loki/api/v1/tail\n path /loki/api/v1/series\n \n # Ruler endpoints\n \ path /loki/api/v1/rules\n path /loki/api/v1/rules/*\n path /api/prom/rules\n \ path /api/prom/rules/*\n path /prometheus/api/v1/rules\n path /prometheus/api/v1/alerts\n \ ```\n- The current supported endpoints for the alert manager are the following. For more information on the endpoints, refer to the [Prometheus documentation](https://prometheus.io/docs/prometheus/latest/querying/api/#alerts)\n\n \ ```\n # Prometheus alertmanager\n path /alertmanager/* \n \n # Alertmanager configuration (see Mimir doc)\n path /api/v1/alerts\n ```\n### Troubleshooting\n\nRefer to our troubleshooting documentation if [your pusher does not support HTTP headers](https://www.scaleway.com/en/docs/observability/cockpit/troubleshooting/pusher-does-not-support-custom-http-headers/) or if you want to [reset your Grafana password.](https://www.scaleway.com/en/docs/observability/cockpit/troubleshooting/resetting-grafana-password-via-the-api/)\n\n## Technical limitations\n\n- Metrics and logs data is retained **31 days**. After this period, data older than 31 days is deleted.\n- The number of **active metrics time series** is limited to **250,000 per Cockpit** by default.\n- The number of **active log streams** is limited to **5000 per Cockpit**.\n- It is not yet possible to downsample metrics.\n\n\n## Going further\n\nFor more information about Cockpit, you can check out the following pages:\n\n- [Cockpit Documentation](https://www.scaleway.com/en/docs/observability/cockpit/)\n- [Scaleway Slack Community](http://slack.scaleway.com) join the #observability-beta and the #observability channels\n- [Contact our support team](https://console.scaleway.com/support/tickets)\n\n### External links\n\nIf you are interested in learning more, you can check out the following pages:\n\n- [Introduction to Prometheus](https://prometheus.io/docs/introduction/overview/). This page gives a general introduction to what Prometheus is.\n- [Introduction to Promtail](https://grafana.com/docs/loki/latest/clients/promtail/). Promtail is an agent that collects and forwards logs to a Grafana Loki instance.\n- [Introduction to Grafana Agent](https://grafana.com/docs/grafana-cloud/agent/). Grafana Agent is an agent that embeds multiple other agents like Prometheus or Promtail.\n- [Pushing logs using Fluentbit](https://docs.fluentbit.io/manual/pipeline/outputs/loki). Fluentbit is another commonly used agent that collects and forwards logs.\n- [Pushing metrics using Prometheus's agent mode](https://prometheus.io/blog/2021/11/16/agent/). Prometheus can be used in an \"agent-mode\" that can scrape local targets and forward them using remote-write. This is useful for scenarios where targets are exposed in a private network (like a VPN or a single host) but need to be forwarded outside of it.\n- [Prometheus remote write configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write). This page gives the exact configuration parameters that can be used to configure Prometheus's remote-write.\n- [Prometheus data model](https://prometheus.io/docs/concepts/data_model/). This page explains the Prometheus data model to help understand the concepts of metrics, time series, labels and samples, and how they work together.\n- [Article on Prometheus label cardinality and performance](https://www.robustperception.io/cardinality-is-key). When working with metrics, the cardinality, which is the number time series for a given metric, is extremely important. This article explains why.\n- [Integrations supported by Grafana Agent](https://grafana.com/docs/agent/latest/configuration/integrations/). Grafana Agent has many other embedded agents that can be used to monitor various software, like PostgreSQL or MongoDB. All of them can be found on the left menu of this page.\n- [Introduction to alerting using Prometheus](https://prometheus.io/docs/alerting/latest/overview/)\n- [How to create a Mimir or Loki managed alerting rule using Grafana](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-rule/)\n- [How to manage alerting rules using Grafana](https://grafana.com/docs/grafana/latest/alerting/unified-alerting/alerting-rules/rule-list/)\n- [How to manage contact points using Grafana](https://grafana.com/docs/grafana/latest/alerting/unified-alerting/contact-points/)\n- [How to manage notification policies using Grafana](https://grafana.com/docs/grafana/latest/alerting/unified-alerting/notifications/)\n- [How to manage silences using Grafana](https://grafana.com/docs/grafana/latest/alerting/unified-alerting/silences/)." version: v1beta1 servers: - url: https://api.scaleway.com tags: - name: Cockpits description: | A Cockpit is an instance that stores metrics and logs, and provides a dedicated dashboarding system on Grafana to visualize them. Each Scaleway Project can have only one Cockpit - name: Data sources description: | Data sources are endpoints that allow you to fetch metrics, logs and traces from your Cockpit. You can configure multiple datasources for each type - name: Tokens description: | Tokens are secret keys that allow you to authenticate against your Cockpit’s endpoints (metrics, logs, alerts) - name: Alert Contact Points description: | Contact points define individuals or channels to notify when an alert is triggered. Contact points include email addresses. You can configure other contact point types such as on-call systems, slack and texts in your Grafana. Whenever an alert is triggered, all contact points receive a notification - name: Managed Alerts description: | Managed alerts are predefined monitoring rules configured by Scaleway. They send notifications when abnormal behaviors are detected on your resources. These alerts are limited to metrics and logs related to the Scaleway resources integrated with Cockpit - name: Grafana Users description: | Grafana users are individuals who can log in to Grafana. Each user is associated with a role. Users can have two roles: viewer and editor. A viewer can only view dashboards, whereas an editor can create and edit dashboards. Note that the `admin` username is not available for creation - name: Pricing Plans description: | Pricing plans give you information on how you are billed for your usage of the Cockpit product. - name: Product Dashboards description: | Product dashboards are Grafana dashboards that are configured by Scaleway. They are available in your Grafana instance and are associated with your Cockpit. They are designed to help you monitor your Scaleway resources. components: schemas: scaleway.cockpit.v1beta1.Cockpit: type: object properties: project_id: type: string description: ID of the Project the Cockpit belongs to. created_at: type: string description: Date and time of the Cockpit's creation. (RFC 3339 format) format: date-time example: "2022-03-22T12:34:56.123456Z" nullable: true updated_at: type: string description: Date and time of the Cockpit's last update. (RFC 3339 format) format: date-time example: "2022-03-22T12:34:56.123456Z" nullable: true endpoints: type: object description: Endpoints of the Cockpit. properties: metrics_url: type: string description: URL for metrics. logs_url: type: string description: URL for logs. traces_url: type: string description: URL for traces. alertmanager_url: type: string description: URL for the alert manager. grafana_url: type: string description: URL for the Grafana dashboard. x-properties-order: - metrics_url - logs_url - traces_url - alertmanager_url - grafana_url status: type: string description: Status of the Cockpit. enum: - unknown_status - creating - ready - deleting - updating - error default: unknown_status managed_alerts_enabled: type: boolean description: Specifies whether managed alerts are enabled or disabled. plan: type: object description: Pricing plan information. properties: id: type: string description: ID of a given pricing plan. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d name: type: string description: Name of a given pricing plan. enum: - unknown_name - free - premium - custom x-enum-descriptions: values: free: The free plan is the default plan premium: The premium plan with a longer retention custom: The custom plan default: unknown_name retention_metrics_interval: type: string description: Interval of time during which Scaleway's Cockpit keeps your metrics. (in seconds) example: 2.5s nullable: true retention_logs_interval: type: string description: Interval of time during which Scaleway's Cockpit keeps your logs. (in seconds) example: 2.5s nullable: true retention_traces_interval: type: string description: Interval of time during which Scaleway's Cockpit keeps your traces. (in seconds) example: 2.5s nullable: true sample_ingestion_price: type: integer description: Ingestion price in cents for 1 million samples. format: uint32 logs_ingestion_price: type: integer description: Ingestion price in cents for 1 GB of logs. format: uint32 traces_ingestion_price: type: integer description: Ingestion price in cents for 1 GB of traces. format: uint32 retention_price: type: integer description: Retention price in euros per month. format: uint32 x-properties-order: - id - name - retention_metrics_interval - retention_logs_interval - retention_traces_interval - sample_ingestion_price - logs_ingestion_price - traces_ingestion_price - retention_price x-properties-order: - project_id - created_at - updated_at - endpoints - status - managed_alerts_enabled - plan scaleway.cockpit.v1beta1.CockpitMetrics: type: object properties: timeseries: type: array description: Time series array. items: $ref: '#/components/schemas/scaleway.std.TimeSeries' x-properties-order: - timeseries scaleway.cockpit.v1beta1.ContactPoint: type: object properties: email: type: object description: Contact point configuration. properties: to: type: string nullable: true x-properties-order: - to x-one-of: configuration x-properties-order: - email scaleway.cockpit.v1beta1.Datasource: type: object properties: id: type: string description: ID of the data source. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d project_id: type: string description: ID of the Project the Cockpit belongs to. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d name: type: string description: Data source name. url: type: string description: Data source URL. type: type: string description: Data source type. enum: - unknown_datasource_type - metrics - logs - traces - alerts default: unknown_datasource_type is_managed_by_scaleway: type: boolean description: Specifies that the data source receives data from Scaleway products and is managed by Scaleway. x-properties-order: - id - project_id - name - url - type - is_managed_by_scaleway scaleway.cockpit.v1beta1.DatasourceType: type: string enum: - unknown_datasource_type - metrics - logs - traces - alerts default: unknown_datasource_type scaleway.cockpit.v1beta1.GrafanaProductDashboard: type: object properties: dashboard_name: type: string description: Name of the dashboard. title: type: string description: Title of the dashboard. url: type: string description: URL of the dashboard. tags: type: array description: Tags of the dashboard. items: type: string variables: type: array description: Variables of the dashboard. items: type: string x-properties-order: - dashboard_name - title - url - tags - variables scaleway.cockpit.v1beta1.GrafanaUser: type: object properties: id: type: integer description: ID of the Grafana user. format: uint32 login: type: string description: Username of the Grafana user. role: type: string description: Role assigned to the Grafana user. enum: - unknown_role - editor - viewer default: unknown_role password: type: string description: The Grafana user's password. nullable: true x-properties-order: - id - login - role - password scaleway.cockpit.v1beta1.ListContactPointsResponse: type: object properties: total_count: type: integer description: Count of all contact points created. format: uint32 contact_points: type: array description: Array of contact points. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ContactPoint' has_additional_receivers: type: boolean description: Specifies whether the contact point has other receivers than the default receiver. has_additional_contact_points: type: boolean description: Specifies whether there are unmanaged contact points. x-properties-order: - total_count - contact_points - has_additional_receivers - has_additional_contact_points scaleway.cockpit.v1beta1.ListDatasourcesResponse: type: object properties: total_count: type: integer description: Count of all datasources corresponding to the request. format: uint32 datasources: type: array description: List of the datasources within the pagination. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Datasource' x-properties-order: - total_count - datasources scaleway.cockpit.v1beta1.ListGrafanaProductDashboardsResponse: type: object properties: total_count: type: integer description: Count of grafana dasboards. format: uint64 dashboards: type: array description: Information on grafana dashboards. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.GrafanaProductDashboard' x-properties-order: - total_count - dashboards scaleway.cockpit.v1beta1.ListGrafanaUsersRequest.OrderBy: type: string enum: - login_asc - login_desc default: login_asc scaleway.cockpit.v1beta1.ListGrafanaUsersResponse: type: object properties: total_count: type: integer description: Count of all Grafana users. format: uint32 grafana_users: type: array description: Information on all Grafana users. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.GrafanaUser' x-properties-order: - total_count - grafana_users scaleway.cockpit.v1beta1.ListPlansRequest.OrderBy: type: string enum: - name_asc - name_desc default: name_asc scaleway.cockpit.v1beta1.ListPlansResponse: type: object properties: total_count: type: integer description: Count of all pricing plans. format: uint64 plans: type: array description: Information on plans. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Plan' x-properties-order: - total_count - plans scaleway.cockpit.v1beta1.ListTokensResponse: type: object properties: total_count: type: integer description: Count of all tokens created. format: uint32 tokens: type: array description: List of all tokens created. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Token' x-properties-order: - total_count - tokens scaleway.cockpit.v1beta1.Plan: type: object properties: id: type: string description: ID of a given pricing plan. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d name: type: string description: Name of a given pricing plan. enum: - unknown_name - free - premium - custom x-enum-descriptions: values: free: The free plan is the default plan premium: The premium plan with a longer retention custom: The custom plan default: unknown_name retention_metrics_interval: type: string description: Interval of time during which Scaleway's Cockpit keeps your metrics. (in seconds) example: 2.5s nullable: true retention_logs_interval: type: string description: Interval of time during which Scaleway's Cockpit keeps your logs. (in seconds) example: 2.5s nullable: true retention_traces_interval: type: string description: Interval of time during which Scaleway's Cockpit keeps your traces. (in seconds) example: 2.5s nullable: true sample_ingestion_price: type: integer description: Ingestion price in cents for 1 million samples. format: uint32 logs_ingestion_price: type: integer description: Ingestion price in cents for 1 GB of logs. format: uint32 traces_ingestion_price: type: integer description: Ingestion price in cents for 1 GB of traces. format: uint32 retention_price: type: integer description: Retention price in euros per month. format: uint32 x-properties-order: - id - name - retention_metrics_interval - retention_logs_interval - retention_traces_interval - sample_ingestion_price - logs_ingestion_price - traces_ingestion_price - retention_price scaleway.cockpit.v1beta1.SelectPlanResponse: type: object scaleway.cockpit.v1beta1.Token: type: object properties: id: type: string description: ID of the token. project_id: type: string description: ID of the Project. name: type: string description: Name of the token. created_at: type: string description: Date and time of the token's creation. (RFC 3339 format) format: date-time example: "2022-03-22T12:34:56.123456Z" nullable: true updated_at: type: string description: Date and time of the token's last update. (RFC 3339 format) format: date-time example: "2022-03-22T12:34:56.123456Z" nullable: true scopes: type: object description: Token's permissions. properties: query_metrics: type: boolean description: Permission to fetch metrics. write_metrics: type: boolean description: Permission to write metrics. setup_metrics_rules: type: boolean description: Permission to setup metrics rules. query_logs: type: boolean description: Permission to fetch logs. write_logs: type: boolean description: Permission to write logs. setup_logs_rules: type: boolean description: Permission to set up logs rules. setup_alerts: type: boolean description: Permission to set up alerts. query_traces: type: boolean description: Permission to fetch traces. write_traces: type: boolean description: Permission to write traces. x-properties-order: - query_metrics - write_metrics - setup_metrics_rules - query_logs - write_logs - setup_logs_rules - setup_alerts - query_traces - write_traces secret_key: type: string description: Token's secret key. nullable: true x-properties-order: - id - project_id - name - created_at - updated_at - scopes - secret_key scaleway.std.TimeSeries: type: object properties: name: type: string points: type: array items: $ref: '#/components/schemas/scaleway.std.TimeSeries.Point' metadata: type: object properties: : type: string additionalProperties: true x-properties-order: - name - points - metadata scaleway.std.TimeSeries.Point: type: array items: oneOf: - type: string format: date-time - type: number securitySchemes: scaleway: in: header name: X-Auth-Token type: apiKey paths: /cockpit/v1beta1/activate: post: tags: - Cockpits operationId: ActivateCockpit summary: Activate the Cockpit of a given Project specified by the Project ID responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Cockpit' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project the Cockpit belongs to. x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/activate" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/activate" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/cockpit: get: tags: - Cockpits operationId: GetCockpit summary: Retrieve the Cockpit of a given Project specified by the Project ID parameters: - in: query name: project_id description: ID of the Project the Cockpit belongs to. required: true schema: type: string description: ID of the Project the Cockpit belongs to. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Cockpit' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/cockpit?project_id=string" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/cockpit" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==string /cockpit/v1beta1/cockpit/metrics: get: tags: - Cockpits operationId: GetCockpitMetrics summary: Retrieve metrics from your Cockpit specified by the ID of the Project the Cockpit belongs to parameters: - in: query name: project_id description: ID of the Project the Cockpit belongs to. (UUID format) required: true schema: type: string description: ID of the Project the Cockpit belongs to. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d - in: query name: start_date description: Desired time range's start date for the metrics. (RFC 3339 format) schema: type: string description: Desired time range's start date for the metrics. (RFC 3339 format) format: date-time example: "2022-03-22T12:34:56.123456Z" - in: query name: end_date description: Desired time range's end date for the metrics. (RFC 3339 format) schema: type: string description: Desired time range's end date for the metrics. (RFC 3339 format) format: date-time example: "2022-03-22T12:34:56.123456Z" - in: query name: metric_name description: Name of the metric requested. schema: type: string description: Name of the metric requested. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.CockpitMetrics' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/cockpit/metrics?project_id=6170692e-7363-616c-6577-61792e636f6d" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/cockpit/metrics" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==6170692e-7363-616c-6577-61792e636f6d /cockpit/v1beta1/contact-points: get: tags: - Alert Contact Points operationId: ListContactPoints summary: Get a list of contact points created for a given Cockpit, specified by the ID of the Project the Cockpit belongs to parameters: - in: query name: page description: Page number. schema: type: integer description: Page number. format: int32 - in: query name: page_size description: Page size. schema: type: integer description: Page size. format: uint32 - in: query name: project_id description: ID of the Project from which to list the contact points. required: true schema: type: string description: ID of the Project from which to list the contact points. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListContactPointsResponse' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/contact-points?project_id=string" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/contact-points" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==string post: tags: - Alert Contact Points operationId: CreateContactPoint summary: Create a contact point associated with the default receiver, to receive alerts responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ContactPoint' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project in which to create the contact point. contact_point: type: object description: Contact point to create. properties: email: type: object description: Contact point configuration. properties: to: type: string nullable: true x-properties-order: - to x-one-of: configuration x-properties-order: - email x-properties-order: - project_id - contact_point security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/contact-points" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/contact-points" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/datasources: get: tags: - Data sources operationId: ListDatasources summary: Get a list of data sources for the specified Project ID parameters: - in: query name: page description: Page number. schema: type: integer description: Page number. format: int32 - in: query name: page_size description: Page size. schema: type: integer description: Page size. format: uint32 - in: query name: order_by description: How the response is ordered. schema: type: string description: How the response is ordered. enum: - created_at_asc - created_at_desc - name_asc - name_desc default: created_at_asc - in: query name: project_id description: ID of the Project. (UUID format) required: true schema: type: string description: ID of the Project. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d - in: query name: types description: Filter by datasource types. schema: type: array description: Filter by datasource types. items: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.DatasourceType' - in: query name: is_managed_by_scaleway description: Filter by managed datasources. schema: type: boolean description: Filter by managed datasources. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListDatasourcesResponse' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/datasources?project_id=6170692e-7363-616c-6577-61792e636f6d" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/datasources" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==6170692e-7363-616c-6577-61792e636f6d post: tags: - Data sources operationId: CreateDatasource summary: Create a data source for a given Project specified by the Project ID and the data source type responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Datasource' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project the Cockpit belongs to. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d name: type: string description: Data source name. type: type: string description: Data source type. enum: - unknown_datasource_type - metrics - logs - traces - alerts default: unknown_datasource_type is_default: type: boolean description: Specifies that the returned output is the default data source per type. x-properties-order: - project_id - name - type - is_default security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "is_default": false, "name": "string", "project_id": "6170692e-7363-616c-6577-61792e636f6d" }' \ "https://api.scaleway.com/cockpit/v1beta1/datasources" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/datasources" \ X-Auth-Token:$SCW_SECRET_KEY \ is_default:=false \ name="string" \ project_id="6170692e-7363-616c-6577-61792e636f6d" /cockpit/v1beta1/datasources/{datasource_id}: delete: tags: - Data sources operationId: DeleteDatasource summary: Delete a given data source specified by the data source ID parameters: - in: path name: datasource_id description: ID of the data source. (UUID format) required: true schema: type: string description: ID of the data source. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d responses: "204": description: "" security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X DELETE \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/datasources/{datasource_id}" - lang: HTTPie source: |- http DELETE "https://api.scaleway.com/cockpit/v1beta1/datasources/{datasource_id}" \ X-Auth-Token:$SCW_SECRET_KEY /cockpit/v1beta1/deactivate: post: tags: - Cockpits operationId: DeactivateCockpit summary: Deactivate the Cockpit of a given Project specified by the Project ID responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Cockpit' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project the Cockpit belongs to. x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/deactivate" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/deactivate" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/delete-contact-point: post: tags: - Alert Contact Points operationId: DeleteContactPoint summary: Delete a contact point associated with the default receiver responses: "204": description: "" requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. contact_point: type: object description: Contact point to delete. properties: email: type: object description: Contact point configuration. properties: to: type: string nullable: true x-properties-order: - to x-one-of: configuration x-properties-order: - email x-properties-order: - project_id - contact_point security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/delete-contact-point" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/delete-contact-point" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/disable-managed-alerts: post: tags: - Managed Alerts operationId: DisableManagedAlerts summary: Disable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to responses: "204": description: "" requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/disable-managed-alerts" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/disable-managed-alerts" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/enable-managed-alerts: post: tags: - Managed Alerts operationId: EnableManagedAlerts summary: Enable the sending of managed alerts for a given Cockpit, specified by the ID of the Project the Cockpit belongs to responses: "204": description: "" requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/enable-managed-alerts" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/enable-managed-alerts" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/grafana-product-dashboards: get: tags: - Product Dashboards operationId: ListGrafanaProductDashboards summary: List product dashboards description: Get a list of available product dashboards. parameters: - in: query name: project_id description: ID of the Project. (UUID format) required: true schema: type: string description: ID of the Project. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d - in: query name: page description: Page number. schema: type: integer description: Page number. format: int32 - in: query name: page_size description: Page size. schema: type: integer description: Page size. format: uint32 - in: query name: tags description: Tags to filter the dashboards. schema: type: array description: Tags to filter the dashboards. items: type: string responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListGrafanaProductDashboardsResponse' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/grafana-product-dashboards?project_id=6170692e-7363-616c-6577-61792e636f6d" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/grafana-product-dashboards" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==6170692e-7363-616c-6577-61792e636f6d /cockpit/v1beta1/grafana-product-dashboards/{dashboard_name}: get: tags: - Product Dashboards operationId: GetGrafanaProductDashboard summary: Get a product dashboard description: Get a product dashboard specified by the dashboard ID. parameters: - in: path name: dashboard_name description: Name of the dashboard. required: true schema: type: string description: Name of the dashboard. - in: query name: project_id description: ID of the Project. (UUID format) required: true schema: type: string description: ID of the Project. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.GrafanaProductDashboard' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/grafana-product-dashboards/{dashboard_name}?project_id=6170692e-7363-616c-6577-61792e636f6d" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/grafana-product-dashboards/{dashboard_name}" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==6170692e-7363-616c-6577-61792e636f6d /cockpit/v1beta1/grafana-users: get: tags: - Grafana Users operationId: ListGrafanaUsers summary: Get a list of all Grafana users created in your Cockpit's Grafana parameters: - in: query name: page description: Page number. schema: type: integer description: Page number. format: int32 - in: query name: page_size description: Page size. schema: type: integer description: Page size. format: uint32 - in: query name: order_by schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListGrafanaUsersRequest.OrderBy' - in: query name: project_id description: ID of the Project. required: true schema: type: string description: ID of the Project. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListGrafanaUsersResponse' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/grafana-users?project_id=string" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/grafana-users" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==string post: tags: - Grafana Users operationId: CreateGrafanaUser summary: Create a Grafana user for your Cockpit's Grafana. Make sure you save the automatically-generated password and the Grafana user ID responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.GrafanaUser' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. login: type: string description: Username of the Grafana user. role: type: string description: Role assigned to the Grafana user. enum: - unknown_role - editor - viewer default: unknown_role x-properties-order: - project_id - login - role security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"login":"string","project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/grafana-users" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/grafana-users" \ X-Auth-Token:$SCW_SECRET_KEY \ login="string" \ project_id="string" /cockpit/v1beta1/grafana-users/{grafana_user_id}/delete: post: tags: - Grafana Users operationId: DeleteGrafanaUser summary: Delete a Grafana user from your Cockpit's Grafana, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user parameters: - in: path name: grafana_user_id description: ID of the Grafana user. required: true schema: type: integer description: ID of the Grafana user. format: uint32 responses: "204": description: "" requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/grafana-users/{grafana_user_id}/delete" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/grafana-users/{grafana_user_id}/delete" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/grafana-users/{grafana_user_id}/reset-password: post: tags: - Grafana Users operationId: ResetGrafanaUserPassword summary: Reset the password of a Grafana user, specified by the ID of the Project the Cockpit belongs to, and the ID of the Grafana user parameters: - in: path name: grafana_user_id description: ID of the Grafana user. required: true schema: type: integer description: ID of the Grafana user. format: uint32 responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.GrafanaUser' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/grafana-users/{grafana_user_id}/reset-password" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/grafana-users/{grafana_user_id}/reset-password" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string" /cockpit/v1beta1/plans: get: tags: - Pricing Plans operationId: ListPlans summary: Get a list of all pricing plans available parameters: - in: query name: page description: Page number. schema: type: integer description: Page number. format: int32 - in: query name: page_size description: Page size. schema: type: integer description: Page size. format: uint32 - in: query name: order_by schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListPlansRequest.OrderBy' responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListPlansResponse' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/plans" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/plans" \ X-Auth-Token:$SCW_SECRET_KEY /cockpit/v1beta1/select-plan: post: tags: - Pricing Plans operationId: SelectPlan summary: Select your chosen pricing plan for your Cockpit, specifying the Cockpit's Project ID and the pricing plan's ID in the request responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.SelectPlanResponse' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d plan_id: type: string description: ID of the pricing plan. (UUID format) example: 6170692e-7363-616c-6577-61792e636f6d x-properties-order: - project_id - plan_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"plan_id":"6170692e-7363-616c-6577-61792e636f6d","project_id":"6170692e-7363-616c-6577-61792e636f6d"}' \ "https://api.scaleway.com/cockpit/v1beta1/select-plan" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/select-plan" \ X-Auth-Token:$SCW_SECRET_KEY \ plan_id="6170692e-7363-616c-6577-61792e636f6d" \ project_id="6170692e-7363-616c-6577-61792e636f6d" /cockpit/v1beta1/tokens: get: tags: - Tokens operationId: ListTokens summary: Get a list of tokens in a given Project specified by the Project ID parameters: - in: query name: page description: Page number. schema: type: integer description: Page number. format: int32 - in: query name: page_size description: Page size. schema: type: integer description: Page size. format: uint32 - in: query name: order_by description: How the response is ordered. schema: type: string description: How the response is ordered. enum: - created_at_asc - created_at_desc - name_asc - name_desc default: created_at_asc - in: query name: project_id description: ID of the Project. required: true schema: type: string description: ID of the Project. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.ListTokensResponse' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/tokens?project_id=string" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/tokens" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id==string post: tags: - Tokens operationId: CreateToken summary: Create a token in a given Project specified by the Project ID responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Token' requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string description: ID of the Project. name: type: string description: Name of the token. scopes: type: object description: Token's permissions. properties: query_metrics: type: boolean description: Permission to fetch metrics. write_metrics: type: boolean description: Permission to write metrics. setup_metrics_rules: type: boolean description: Permission to setup metrics rules. query_logs: type: boolean description: Permission to fetch logs. write_logs: type: boolean description: Permission to write logs. setup_logs_rules: type: boolean description: Permission to set up logs rules. setup_alerts: type: boolean description: Permission to set up alerts. query_traces: type: boolean description: Permission to fetch traces. write_traces: type: boolean description: Permission to write traces. x-properties-order: - query_metrics - write_metrics - setup_metrics_rules - query_logs - write_logs - setup_logs_rules - setup_alerts - query_traces - write_traces x-properties-order: - project_id - name - scopes security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"string","project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/tokens" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/tokens" \ X-Auth-Token:$SCW_SECRET_KEY \ name="string" \ project_id="string" /cockpit/v1beta1/tokens/{token_id}: get: tags: - Tokens operationId: GetToken summary: Retrieve a given token specified by the token ID parameters: - in: path name: token_id description: ID of the token. required: true schema: type: string description: ID of the token. responses: "200": description: "" content: application/json: schema: $ref: '#/components/schemas/scaleway.cockpit.v1beta1.Token' security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X GET \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/tokens/{token_id}" - lang: HTTPie source: |- http GET "https://api.scaleway.com/cockpit/v1beta1/tokens/{token_id}" \ X-Auth-Token:$SCW_SECRET_KEY delete: tags: - Tokens operationId: DeleteToken summary: Delete a given token specified by the token ID parameters: - in: path name: token_id description: ID of the token. required: true schema: type: string description: ID of the token. responses: "204": description: "" security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X DELETE \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ "https://api.scaleway.com/cockpit/v1beta1/tokens/{token_id}" - lang: HTTPie source: |- http DELETE "https://api.scaleway.com/cockpit/v1beta1/tokens/{token_id}" \ X-Auth-Token:$SCW_SECRET_KEY /cockpit/v1beta1/trigger-test-alert: post: tags: - Managed Alerts operationId: TriggerTestAlert summary: Send a test alert to make sure your contact points get notified when an actual alert is triggered responses: "204": description: "" requestBody: required: true content: application/json: schema: type: object properties: project_id: type: string x-properties-order: - project_id security: - scaleway: [] x-codeSamples: - lang: cURL source: |- curl -X POST \ -H "X-Auth-Token: $SCW_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"project_id":"string"}' \ "https://api.scaleway.com/cockpit/v1beta1/trigger-test-alert" - lang: HTTPie source: |- http POST "https://api.scaleway.com/cockpit/v1beta1/trigger-test-alert" \ X-Auth-Token:$SCW_SECRET_KEY \ project_id="string"