Skip to content
Management API Reference

Create a log drain for a project

post/v2/projects/{ref}/analytics/log-drains

OAuth scopes

  • analytics_config:write

This endpoint is only available on the following plans:

  • Pro
  • Team
  • Enterprise

Path parameters

  • ref
    Required
    string

    Project ref

Body

  • data
    Required
    object

Response codes

  • 201
  • 401
  • 402
  • 403
  • 429
  • 500

Response (201)

1
{
2
"data": {
3
"type": "log_drain",
4
"id": "lorem",
5
"attributes": {
6
"name": "lorem",
7
"description": "lorem",
8
"config": {
9
"url": "lorem",
10
"schema": "lorem",
11
"username": "lorem",
12
"password": "lorem",
13
"port": 42,
14
"hostname": "lorem"
15
},
16
"backend_type": "postgres"
17
}
18
}
19
}