Ingest Requests
curl --request POST \
--url https://api.example.com/api/v1/ingest/requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"requests": [
{
"project_slug": "<string>",
"app_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"environment": "<string>",
"method": "<string>",
"path": "<string>",
"status_code": 123,
"response_time_ms": 123,
"request_size": 0,
"response_size": 0,
"ip_address": "",
"user_agent": "",
"consumer_id": "",
"consumer_name": "",
"consumer_group": "",
"request_payload": "",
"response_payload": ""
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requests: [
{
project_slug: '<string>',
app_id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
environment: '<string>',
method: '<string>',
path: '<string>',
status_code: 123,
response_time_ms: 123,
request_size: 0,
response_size: 0,
ip_address: '',
user_agent: '',
consumer_id: '',
consumer_name: '',
consumer_group: '',
request_payload: '',
response_payload: ''
}
]
})
};
fetch('https://api.example.com/api/v1/ingest/requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/api/v1/ingest/requests"
payload = { "requests": [
{
"project_slug": "<string>",
"app_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"environment": "<string>",
"method": "<string>",
"path": "<string>",
"status_code": 123,
"response_time_ms": 123,
"request_size": 0,
"response_size": 0,
"ip_address": "",
"user_agent": "",
"consumer_id": "",
"consumer_name": "",
"consumer_group": "",
"request_payload": "",
"response_payload": ""
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accepted": 123
}Ingest
Ingest Requests
Ingest API request records. API key provides project_id, payload provides app_id (UUID or slug) for each record.
POST
/
api
/
v1
/
ingest
/
requests
Ingest Requests
curl --request POST \
--url https://api.example.com/api/v1/ingest/requests \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"requests": [
{
"project_slug": "<string>",
"app_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"environment": "<string>",
"method": "<string>",
"path": "<string>",
"status_code": 123,
"response_time_ms": 123,
"request_size": 0,
"response_size": 0,
"ip_address": "",
"user_agent": "",
"consumer_id": "",
"consumer_name": "",
"consumer_group": "",
"request_payload": "",
"response_payload": ""
}
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requests: [
{
project_slug: '<string>',
app_id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
environment: '<string>',
method: '<string>',
path: '<string>',
status_code: 123,
response_time_ms: 123,
request_size: 0,
response_size: 0,
ip_address: '',
user_agent: '',
consumer_id: '',
consumer_name: '',
consumer_group: '',
request_payload: '',
response_payload: ''
}
]
})
};
fetch('https://api.example.com/api/v1/ingest/requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/api/v1/ingest/requests"
payload = { "requests": [
{
"project_slug": "<string>",
"app_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"environment": "<string>",
"method": "<string>",
"path": "<string>",
"status_code": 123,
"response_time_ms": 123,
"request_size": 0,
"response_size": 0,
"ip_address": "",
"user_agent": "",
"consumer_id": "",
"consumer_name": "",
"consumer_group": "",
"request_payload": "",
"response_payload": ""
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accepted": 123
}⌘I