@@ -585,6 +585,15 @@ components:
585
585
type : string
586
586
x-enum-varnames :
587
587
- APPLICATION_KEYS
588
+ ContentEncoding :
589
+ description : HTTP header used to compress the media-type.
590
+ enum :
591
+ - gzip
592
+ - deflate
593
+ type : string
594
+ x-enum-varnames :
595
+ - GZIP
596
+ - DEFLATE
588
597
Creator :
589
598
description : Creator of the object.
590
599
properties :
@@ -846,6 +855,80 @@ components:
846
855
example : Application Key for submitting metrics
847
856
type : string
848
857
type : object
858
+ HTTPLog :
859
+ description : Structured log message.
860
+ items :
861
+ $ref : ' #/components/schemas/HTTPLogItem'
862
+ type : array
863
+ HTTPLogError :
864
+ description : List of errors.
865
+ properties :
866
+ detail :
867
+ description : Error message.
868
+ example : Malformed payload
869
+ type : string
870
+ status :
871
+ description : Error code.
872
+ example : 400
873
+ type : string
874
+ title :
875
+ description : Error title.
876
+ example : Bad Request
877
+ type : string
878
+ type : object
879
+ HTTPLogErrors :
880
+ description : Invalid query performed.
881
+ properties :
882
+ errors :
883
+ description : Structured errors.
884
+ items :
885
+ $ref : ' #/components/schemas/HTTPLogError'
886
+ type : array
887
+ type : object
888
+ HTTPLogItem :
889
+ description : Logs that are sent over HTTP.
890
+ properties :
891
+ ddsource :
892
+ description : ' The integration name associated with your log: the technology
893
+ from which the log originated.
894
+
895
+ When it matches an integration name, Datadog automatically installs the
896
+ corresponding parsers and facets.
897
+
898
+ See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).'
899
+ example : nginx
900
+ type : string
901
+ ddtags :
902
+ description : Tags associated with your logs.
903
+ example : env:staging,version:5.1
904
+ type : string
905
+ hostname :
906
+ description : The name of the originating host of the log.
907
+ example : i-012345678
908
+ type : string
909
+ message :
910
+ description : ' The message [reserved attribute](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes)
911
+
912
+ of your log. By default, Datadog ingests the value of the message attribute
913
+ as the body of the log entry.
914
+
915
+ That value is then highlighted and displayed in the Logstream, where it
916
+ is indexed for full text search.'
917
+ example : 2019-11-19T14:37:58,995 INFO [process.name][20081] Hello World
918
+ type : string
919
+ service :
920
+ description : ' The name of the application or service generating the log
921
+ events.
922
+
923
+ It is used to switch from Logs to APM, so make sure you define the same
924
+ value when you use both products.
925
+
926
+ See [reserved attributes](https://docs.datadoghq.com/logs/log_collection/#reserved-attributes).'
927
+ example : payment
928
+ type : string
929
+ required :
930
+ - name
931
+ type : object
849
932
IncidentCreateAttributes :
850
933
description : The incident's attributes for a create request.
851
934
properties :
@@ -6182,6 +6265,222 @@ paths:
6182
6265
x-unstable : ' **Note**: This endpoint is in public beta.
6183
6266
6184
6267
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6268
+ /api/v2/logs :
6269
+ post :
6270
+ description : ' Send your logs to your Datadog platform over HTTP. Limits per
6271
+ HTTP request are:
6272
+
6273
+
6274
+ - Maximum content size per payload (uncompressed): 5MB
6275
+
6276
+ - Maximum size for a single log: 1MB
6277
+
6278
+ - Maximum array size if sending multiple logs in an array: 1000 entries
6279
+
6280
+
6281
+ Any log exceeding 1MB is accepted and truncated by Datadog:
6282
+
6283
+ - For a single log request, the API truncates the log at 1MB and returns a
6284
+ 2xx.
6285
+
6286
+ - For a multi-logs request, the API processes all logs, truncates only logs
6287
+ larger than 1MB, and returns a 2xx.
6288
+
6289
+
6290
+ Datadog recommends sending your logs compressed.
6291
+
6292
+ Add the `Content-Encoding: gzip` header to the request when sending compressed
6293
+ logs.
6294
+
6295
+
6296
+ The status codes answered by the HTTP API are:
6297
+
6298
+ - 202: Accepted: the request has been accepted for processing
6299
+
6300
+ - 400: Bad request (likely an issue in the payload formatting)
6301
+
6302
+ - 401: Unauthorized (likely a missing API Key)
6303
+
6304
+ - 403: Permission issue (likely using an invalid API Key)
6305
+
6306
+ - 408: Request Timeout, request should be retried after some time
6307
+
6308
+ - 413: Payload too large (batch is above 5MB uncompressed)
6309
+
6310
+ - 429: Too Many Requests, request should be retried after some time
6311
+
6312
+ - 500: Internal Server Error, the server encountered an unexpected condition
6313
+ that prevented it from fulfilling the request, request should be retried after
6314
+ some time
6315
+
6316
+ - 503: Service Unavailable, the server is not ready to handle the request
6317
+ probably because it is overloaded, request should be retried after some time'
6318
+ operationId : SubmitLog
6319
+ parameters :
6320
+ - description : HTTP header used to compress the media-type.
6321
+ in : header
6322
+ name : Content-Encoding
6323
+ required : false
6324
+ schema :
6325
+ $ref : ' #/components/schemas/ContentEncoding'
6326
+ - description : Log tags can be passed as query parameters with `text/plain`
6327
+ content type.
6328
+ example : env:prod,user:my-user
6329
+ in : query
6330
+ name : ddtags
6331
+ required : false
6332
+ schema :
6333
+ type : string
6334
+ requestBody :
6335
+ content :
6336
+ application/json :
6337
+ examples :
6338
+ multi-json-messages :
6339
+ description : Pass multiple log objects at once.
6340
+ summary : Multi JSON Messages
6341
+ value :
6342
+ - message : hello
6343
+ - message : world
6344
+ simple-json-message :
6345
+ description : Log attributes can be passed as `key:value` pairs in
6346
+ valid JSON messages.
6347
+ summary : Simple JSON Message
6348
+ value :
6349
+ ddsource : agent
6350
+ ddtags : env:prod,user:joe.doe
6351
+ hostname : fa1e1e739d95
6352
+ message : hello world
6353
+ schema :
6354
+ $ref : ' #/components/schemas/HTTPLog'
6355
+ application/logplex-1 :
6356
+ examples :
6357
+ multi-raw-message :
6358
+ description : Submit log messages.
6359
+ summary : Multi Logplex Messages
6360
+ value : ' hello
6361
+
6362
+ world'
6363
+ simple-logplex-message :
6364
+ description : Submit log string.
6365
+ summary : Simple Logplex Message
6366
+ value : hello world
6367
+ schema :
6368
+ type : string
6369
+ text/plain :
6370
+ examples :
6371
+ multi-raw-message :
6372
+ description : Submit log string.
6373
+ summary : Multi Raw Messages
6374
+ value : ' hello
6375
+
6376
+ world
6377
+
6378
+ '
6379
+ simple-raw-message :
6380
+ description : ' Submit log string. Log attributes can be passed as query
6381
+ parameters in the URL. This enables the addition of tags or the
6382
+ source by using the `ddtags` and `ddsource` parameters: `?host=my-hostname&service=my-service&ddsource=my-source&ddtags=env:prod,user:my-user`.'
6383
+ summary : Simple Raw Message
6384
+ value : hello world
6385
+ schema :
6386
+ type : string
6387
+ description : Log to send (JSON format).
6388
+ required : true
6389
+ responses :
6390
+ ' 202 ' :
6391
+ content :
6392
+ application/json :
6393
+ schema :
6394
+ type : object
6395
+ description : Request accepted for processing (always 202 empty JSON).
6396
+ ' 400 ' :
6397
+ content :
6398
+ application/json :
6399
+ schema :
6400
+ $ref : ' #/components/schemas/HTTPLogErrors'
6401
+ description : Bad Request
6402
+ ' 401 ' :
6403
+ content :
6404
+ application/json :
6405
+ schema :
6406
+ $ref : ' #/components/schemas/HTTPLogErrors'
6407
+ description : Unauthorized
6408
+ ' 403 ' :
6409
+ content :
6410
+ application/json :
6411
+ schema :
6412
+ $ref : ' #/components/schemas/HTTPLogErrors'
6413
+ description : Forbidden
6414
+ ' 408 ' :
6415
+ content :
6416
+ application/json :
6417
+ schema :
6418
+ $ref : ' #/components/schemas/HTTPLogErrors'
6419
+ description : Request Timeout
6420
+ ' 413 ' :
6421
+ content :
6422
+ application/json :
6423
+ schema :
6424
+ $ref : ' #/components/schemas/HTTPLogErrors'
6425
+ description : Payload Too Large
6426
+ ' 429 ' :
6427
+ content :
6428
+ application/json :
6429
+ schema :
6430
+ $ref : ' #/components/schemas/HTTPLogErrors'
6431
+ description : Too Many Requests
6432
+ ' 500 ' :
6433
+ content :
6434
+ application/json :
6435
+ schema :
6436
+ $ref : ' #/components/schemas/HTTPLogErrors'
6437
+ description : Internal Server Error
6438
+ ' 503 ' :
6439
+ content :
6440
+ application/json :
6441
+ schema :
6442
+ $ref : ' #/components/schemas/HTTPLogErrors'
6443
+ description : Service Unavailable
6444
+ security :
6445
+ - apiKeyAuth : []
6446
+ servers :
6447
+ - url : https://{subdomain}.{site}
6448
+ variables :
6449
+ site :
6450
+ default : datadoghq.com
6451
+ description : The regional site for customers.
6452
+ enum :
6453
+ - datadoghq.com
6454
+ - us3.datadoghq.com
6455
+ - us5.datadoghq.com
6456
+ - datadoghq.eu
6457
+ - ddog-gov.com
6458
+ subdomain :
6459
+ default : http-intake.logs
6460
+ description : The subdomain where the API is deployed.
6461
+ - url : ' {protocol}://{name}'
6462
+ variables :
6463
+ name :
6464
+ default : http-intake.logs.datadoghq.com
6465
+ description : Full site DNS name.
6466
+ protocol :
6467
+ default : https
6468
+ description : The protocol for accessing the API.
6469
+ - url : https://{subdomain}.{site}
6470
+ variables :
6471
+ site :
6472
+ default : datadoghq.com
6473
+ description : Any Datadog deployment.
6474
+ subdomain :
6475
+ default : http-intake.logs
6476
+ description : The subdomain where the API is deployed.
6477
+ summary : Send logs
6478
+ tags :
6479
+ - Logs
6480
+ x-codegen-request-body-name : body
6481
+ x-menu-order : 1
6482
+ x-undo :
6483
+ type : safe
6185
6484
/api/v2/logs/analytics/aggregate :
6186
6485
post :
6187
6486
description : The API endpoint to aggregate events into buckets and compute metrics
0 commit comments