Skip to main content
PUT
/
v1
/
orgs
/
{org_id}
/
metrics
/
sources
Create a metric source
curl --request PUT \
  --url https://api.arklow.io/v1/orgs/{org_id}/metrics/sources \
  --header 'Content-Type: application/json' \
  --header 'x-arklow-auth: <api-key>' \
  --data '
{
  "name": "<string>",
  "kind": "prometheus",
  "endpoint": "<string>",
  "credential_id": "<string>",
  "config": {
    "path": "<string>",
    "auth_header": "<string>",
    "tls_skip_verify": true
  },
  "status": "active"
}
'
{
  "data": {
    "id": "<string>",
    "org_id": "<string>",
    "name": "<string>",
    "kind": "prometheus",
    "status": "active",
    "endpoint": "<string>",
    "poll_interval_seconds": 123,
    "version": "<string>",
    "applied_version": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "credential_id": "<string>",
    "config": {},
    "deleted_at": "2023-11-07T05:31:56Z",
    "queries": [
      {
        "id": "<string>",
        "source_id": "<string>",
        "name": "<string>",
        "status": "active",
        "updated_at": "2023-11-07T05:31:56Z",
        "config": {
          "expression": "<string>",
          "rollup_seconds": 123,
          "window_seconds": 123,
          "group_by": [
            "<string>"
          ],
          "tags": {}
        },
        "deleted_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ]
}

Authorizations

x-arklow-auth
string
header
required

Path Parameters

org_id
string
required
Pattern: ^[0-9]+$

Body

application/json
name
string
required
kind
required
Available options:
prometheus
endpoint
string
required
credential_id
string | null
config
object
status
Available options:
active

Response

200 - application/json

Default Response

data
object
required
errors
object[] | null
required