datahub-events
restish dci datahub-events
Sends a batch of events to DataHub.
Request
Content-Type: application/json
Schema
{
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"required": [
"provider",
"time"
],
"properties": {
"provider": {
"type": "string",
"description": "The identifier of the data provider. Allowed characters: alphanumeric (0-9,a-z,A-Z), underscore (_), space, dash (-).",
"example": "Datadog"
},
"id": {
"type": "string",
"description": "The event id. Must be unique within the dataset. If not set, a UUIDv4 will be generated at ingestion time.",
"example": "beb21d99-a8c9-4dc0-8a69-5d684cc41e6c"
},
"dimensions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "project_id",
"description": "If the type is `fixed`, the key must be a valid fixed value. See the [DataHub API Guide](https://developer.doit.com/docs/datahub-api) for more information."
},
"type": {
"type": "string",
"description": "The dimension type.",
"x-type": "string",
"enum": [
"fixed",
"label",
"project_label",
"system_label"
]
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "boolean"
}
],
"example": "production-project"
}
}
}
},
"time": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the event in RFC3339 format.",
"example": "2024-03-10T23:00:00Z"
},
"metrics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "number",
"format": "double",
"description": "The value of the metric.",
"example": 10.5
},
"type": {
"type": "string",
"description": "The type of the metric. If you choose \"cost\" or \"usage\", it will map to the basic \"Cost\" or \"Usage\" metric in Cloud Analytics reports. You can also use this field to define custom metric types, such as \"working_hours\", \"ride\", etc.",
"example": "cost"
}
}
}
}
}
}
}
}
}
Responses
201 (application/json)
OK - Ingestion succeeded.
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Ingestion success"
}
}
}
400 (application/json)
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)
Unauthorized - Invalid API key.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
500 (application/json)
Internal Server Error - Something went wrong with the DoiT API server.
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: datahub-events, datahubevents