Skip to main content
POST
https://example.com
/
api
/
indexes
/
{indexId}
/
sources
Create index source
curl --request POST \
  --url https://example.com/api/indexes/{indexId}/sources \
  --header 'Content-Type: application/json' \
  --cookie better-auth.session_token= \
  --data '
{
  "sourceId": "<string>",
  "sourceType": "<unknown>",
  "streamName": "<string>"
}
'
{
  "enabled": true,
  "sourceId": "<string>",
  "sourceType": "<string>"
}

Authorizations

better-auth.session_token
string
cookie
required

Path Parameters

indexId
string
required
Minimum string length: 1

Body

application/json
sourceId
string
required
Pattern: ^[a-zA-Z][a-zA-Z0-9_-]{2,254}$
sourceType
any
required
streamName
string
required
Minimum string length: 1
endpoint
string
Minimum string length: 1
inputFormat
enum<string>
Available options:
json,
plain_text,
otlp_logs_json,
otlp_logs_protobuf,
otlp_traces_json,
otlp_traces_protobuf
numPipelines
integer
Required range: x >= 1
region
string
Minimum string length: 1
vrlScript
string

Response

Successful response

enabled
boolean
required
sourceId
string
required
sourceType
string
required