From f7b281336ecb6d1e587e6e74977b7094f03cad78 Mon Sep 17 00:00:00 2001 From: Boris Tane Date: Thu, 6 Jun 2024 15:54:07 +0100 Subject: [PATCH] adds api docs for services --- api-docs/index.md | 64 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/api-docs/index.md b/api-docs/index.md index 24e82317..18102083 100644 --- a/api-docs/index.md +++ b/api-docs/index.md @@ -17,7 +17,7 @@ This endpoint enables the client to interact with resources on Baselime platform ## Authentication Headers * `content-type: application/json` -* `x-api-key: ` - get your API key from [Baselime console](https://console.baselime.io) +* `x-api-key: ` - get your admin API key from [Baselime console](https://console.baselime.io) ## Dashboards @@ -371,7 +371,6 @@ This endpoint enables the client to interact with resources on Baselime platform } ``` === - ## Alerts ==- [!badge GET] `/alerts` @@ -621,6 +620,65 @@ This endpoint enables the client to interact with resources on Baselime platform --- +## Services + +==- [!badge GET] `/services` +**Description:** Lists all services in the environment. + +**Response** +```typescript Body +{ + "data": Array<{ + "name": string + "workspaceId": string + "environmentId": string + "userId": string + "generated": boolean + "created": string + "updated": string + "metadata": Record + }> +} + +``` + +==- [!badge GET] `/services/{name}` +**Description:** Gets a service by name. + + +**Request** +* `{id}` - The name of the service. + +**Response** +```typescript Body +{ + "data": { + "name": string + "workspaceId": string + "environmentId": string + "userId": string + "generated": boolean + "created": string + "updated": string + "metadata": Record + } +} +``` + +==- [!badge variant="danger" text="DELETE"] `/services/{name}` +**Description:** Deletes a service. + +**Request** +* `{name}` - The name of the service. + +**Response** +```typescript Body +{ + "message": "Service deleted", +} +``` +=== + # Telemetry data @@ -630,7 +688,7 @@ This endpoint enables you to query your telemetry data. ## Authentication * `content-type: application/json` -* `x-api-key: ` - get your API key from [Baselime console](https://console.baselime.io) +* `x-api-key: ` - get your admin API key from [Baselime console](https://console.baselime.io) ==- [!badge POST] `/query_runs` **Description:** Creates a new query run and returns its results.