Update a source

Updates an existing source. Send only the parameters you wish to change (e.g. name )

PATCH https://logs.betterstack.com/api/v1/sources/{source_id}

URL parameters

id
required string

Body parameters

ingesting_paused
boolean
name
string
autogenerate_views
boolean
200

Response body

{
  "id": "95",
  "type": "source",
  "attributes": {
    "team_id": 123,
    "name": "Nginx",
    "table_name": "nginx",
    "platform": "nginx",
    "token": "FczKcxEhjEDE58dBX7XaeX1q",
    "created_at": "2021-05-27T12:30:41.695Z",
    "updated_at": "2021-06-11T14:00:50.756Z",
    "resource_group_id": 0,
    "position": 0,
    "retention": 14,
    "receiving_logs": false,
    "columns": [

    ],
    "columns_quota": 300,
    "ingesting_paused": false,
    "autogenerate_views": false,
    "livetail_primary_fields": [
      "level_string",
      "nginx.status_integer",
      "nginx.method_string",
      "nginx.host_string",
      "nginx.path_string",
      "nginx.client_string",
      "nginx.agent_string",
      "message_string"
    ],
    "grafana_primary_fields": [
      "level_string",
      "nginx.status_integer",
      "nginx.method_string",
      "nginx.host_string",
      "nginx.path_string",
      "nginx.client_string",
      "nginx.agent_string",
      "message_string"
    ]
  }
}
404

Response body

{
  "errors": "Resource with provided ID was not found"
}
422

Response body

{
  "errors": "Failed to update the source."
}