@@ -4556,6 +4556,127 @@ components:
4556
4556
format: int64
4557
4557
type: integer
4558
4558
type: object
4559
+ ChangeEventCustomAttributes:
4560
+ description: Object representing custom change event attributes.
4561
+ properties:
4562
+ author:
4563
+ $ref: '#/components/schemas/ChangeEventCustomAttributesAuthor'
4564
+ change_metadata:
4565
+ additionalProperties: {}
4566
+ description: Free form object with information related to the `change` event.
4567
+ Can be arbitrarily nested and contain any valid JSON.
4568
+ example:
4569
+ dd:
4570
+ team: datadog_team
4571
+ user_email: datadog@datadog.com
4572
+ user_id: datadog_user_id
4573
+ user_name: datadog_username
4574
+ resource_link: datadog.com/feature/fallback_payments_test
4575
+ type: object
4576
+ changed_resource:
4577
+ $ref: '#/components/schemas/ChangeEventCustomAttributesChangedResource'
4578
+ impacted_resources:
4579
+ description: 'A list of resources impacted by this change. It is recommended
4580
+ to provide an impacted resource to display
4581
+
4582
+ the change event at the right location. Only resources of type `service`
4583
+ are supported.'
4584
+ example:
4585
+ - name: payments_api
4586
+ type: service
4587
+ items:
4588
+ $ref: '#/components/schemas/ChangeEventCustomAttributesImpactedResourcesItems'
4589
+ type: array
4590
+ new_value:
4591
+ additionalProperties: {}
4592
+ description: Free form object to track new value of the changed resource.
4593
+ example:
4594
+ enabled: true
4595
+ percentage: 50%
4596
+ rule:
4597
+ datacenter: devcycle.us1.prod
4598
+ type: object
4599
+ prev_value:
4600
+ additionalProperties: {}
4601
+ description: Free form object to track previous value of the changed resource.
4602
+ example:
4603
+ enabled: true
4604
+ percentage: 10%
4605
+ rule:
4606
+ datacenter: devcycle.us1.prod
4607
+ type: object
4608
+ required:
4609
+ - changed_resource
4610
+ type: object
4611
+ ChangeEventCustomAttributesAuthor:
4612
+ description: Object representing the entity which made the change. Optional
4613
+ field but if provided should include `type` and `name`.
4614
+ properties:
4615
+ name:
4616
+ description: Author's name. Limited to 128 characters.
4617
+ example: datadog@datadog.com
4618
+ maxLength: 128
4619
+ type: string
4620
+ type:
4621
+ $ref: '#/components/schemas/ChangeEventCustomAttributesAuthorType'
4622
+ required:
4623
+ - name
4624
+ - type
4625
+ type: object
4626
+ ChangeEventCustomAttributesAuthorType:
4627
+ description: Author's type.
4628
+ enum:
4629
+ - user
4630
+ - system
4631
+ example: user
4632
+ type: string
4633
+ x-enum-varnames:
4634
+ - USER
4635
+ - SYSTEM
4636
+ ChangeEventCustomAttributesChangedResource:
4637
+ description: Object representing a uniquely identified resource. Only the resource
4638
+ type `feature_flag` is supported.
4639
+ properties:
4640
+ name:
4641
+ description: Resource's name.
4642
+ example: fallback_payments_test
4643
+ type: string
4644
+ type:
4645
+ $ref: '#/components/schemas/ChangeEventCustomAttributesChangedResourceType'
4646
+ required:
4647
+ - type
4648
+ - name
4649
+ type: object
4650
+ ChangeEventCustomAttributesChangedResourceType:
4651
+ description: Resource's type.
4652
+ enum:
4653
+ - feature_flag
4654
+ example: feature_flag
4655
+ type: string
4656
+ x-enum-varnames:
4657
+ - FEATURE_FLAG
4658
+ ChangeEventCustomAttributesImpactedResourcesItems:
4659
+ description: Object representing a uniquely identified resource. Only the resource
4660
+ type `service` is supported.
4661
+ properties:
4662
+ name:
4663
+ description: Resource's name.
4664
+ example: payments_api
4665
+ type: string
4666
+ type:
4667
+ $ref: '#/components/schemas/ChangeEventCustomAttributesImpactedResourcesItemsType'
4668
+ required:
4669
+ - type
4670
+ - name
4671
+ type: object
4672
+ ChangeEventCustomAttributesImpactedResourcesItemsType:
4673
+ description: Resource's type.
4674
+ enum:
4675
+ - service
4676
+ example: service
4677
+ type: string
4678
+ x-enum-varnames:
4679
+ - SERVICE
4559
4680
ChargebackBreakdown:
4560
4681
description: Charges breakdown.
4561
4682
properties:
@@ -9335,6 +9456,125 @@ components:
9335
9456
example: Oh boy!
9336
9457
type: string
9337
9458
type: object
9459
+ EventCategory:
9460
+ description: Event category to identify the type of event. Only the value `change`
9461
+ is supported. Support for other categories are coming. please reach out to
9462
+ datadog support if you're interested.
9463
+ enum:
9464
+ - change
9465
+ example: change
9466
+ type: string
9467
+ x-enum-varnames:
9468
+ - CHANGE
9469
+ EventCreateRequest:
9470
+ description: Object representing an event creation request.
9471
+ properties:
9472
+ attributes:
9473
+ $ref: '#/components/schemas/EventPayload'
9474
+ type:
9475
+ $ref: '#/components/schemas/EventCreateRequestType'
9476
+ type: object
9477
+ EventCreateRequestPayload:
9478
+ description: Payload for creating an event.
9479
+ properties:
9480
+ data:
9481
+ $ref: '#/components/schemas/EventCreateRequest'
9482
+ type: object
9483
+ EventCreateRequestType:
9484
+ description: Entity type.
9485
+ enum:
9486
+ - event
9487
+ example: event
9488
+ type: string
9489
+ x-enum-varnames:
9490
+ - EVENT
9491
+ EventCreateResponse:
9492
+ description: Object containing an event response.
9493
+ properties:
9494
+ attributes:
9495
+ $ref: '#/components/schemas/EventCreateResponseAttributes'
9496
+ type:
9497
+ description: Event type
9498
+ example: event
9499
+ type: string
9500
+ type: object
9501
+ EventCreateResponseAttributes:
9502
+ description: JSON object containing all events attributes and their associated
9503
+ values.
9504
+ properties:
9505
+ attributes:
9506
+ $ref: '#/components/schemas/EventCreateResponseAttributesAttributes'
9507
+ type: object
9508
+ EventCreateResponseAttributesAttributes:
9509
+ description: JSON object of attributes from your events.
9510
+ properties:
9511
+ evt:
9512
+ $ref: '#/components/schemas/EventCreateResponseAttributesAttributesEvt'
9513
+ type: object
9514
+ EventCreateResponseAttributesAttributesEvt:
9515
+ description: JSON object of event system attributes.
9516
+ properties:
9517
+ id:
9518
+ description: Event id
9519
+ type: string
9520
+ type: object
9521
+ EventCreateResponsePayload:
9522
+ description: Response containing information about created event.
9523
+ properties:
9524
+ data:
9525
+ $ref: '#/components/schemas/EventCreateResponse'
9526
+ type: object
9527
+ EventPayload:
9528
+ description: Event attributes.
9529
+ properties:
9530
+ aggregation_key:
9531
+ description: An arbitrary string to use for aggregation when correlating
9532
+ events. Limited to 100 characters.
9533
+ maxLength: 100
9534
+ type: string
9535
+ attributes:
9536
+ $ref: '#/components/schemas/EventPayloadAttributes'
9537
+ category:
9538
+ $ref: '#/components/schemas/EventCategory'
9539
+ message:
9540
+ description: The body of the event. Limited to 4000 characters.
9541
+ example: payment_processed feature flag has been enabled
9542
+ maxLength: 4000
9543
+ type: string
9544
+ tags:
9545
+ description: 'A list of tags to apply to the event.
9546
+
9547
+ Refer to [Tags docs](https://docs.datadoghq.com/getting_started/tagging/).'
9548
+ example:
9549
+ - environment:test
9550
+ items:
9551
+ description: A tag.
9552
+ type: string
9553
+ type: array
9554
+ timestamp:
9555
+ description: 'Timestamp when the event occurred. Must follow [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html)
9556
+ format.
9557
+
9558
+ For example `"2017-01-15T01:30:15.010000Z"`.
9559
+
9560
+ Defaults to the timestamp of receipt. Limited to values no older than
9561
+ 18 hours.'
9562
+ type: string
9563
+ title:
9564
+ description: The event title. Limited to 500 characters.
9565
+ example: payment_processed feature flag updated
9566
+ maxLength: 500
9567
+ type: string
9568
+ required:
9569
+ - title
9570
+ - category
9571
+ - attributes
9572
+ type: object
9573
+ EventPayloadAttributes:
9574
+ description: JSON object for custom attributes. Schema are different per each
9575
+ event category.
9576
+ oneOf:
9577
+ - $ref: '#/components/schemas/ChangeEventCustomAttributes'
9338
9578
EventPriority:
9339
9579
description: The priority of the event's monitor. For example, `normal` or `low`.
9340
9580
enum:
@@ -31191,6 +31431,82 @@ paths:
31191
31431
operator: OR
31192
31432
permissions:
31193
31433
- events_read
31434
+ post:
31435
+ description: This endpoint allows you to post events. Only events with `change`
31436
+ category are under General Availability.
31437
+ operationId: CreateEvent
31438
+ requestBody:
31439
+ content:
31440
+ application/json:
31441
+ examples:
31442
+ json-request-body:
31443
+ value:
31444
+ data:
31445
+ attributes:
31446
+ attributes:
31447
+ author:
31448
+ name: datadog@datadog.com
31449
+ type: user
31450
+ change_metadata:
31451
+ dd:
31452
+ team: datadog_team
31453
+ user_email: datadog@datadog.com
31454
+ user_id: datadog_user_id
31455
+ user_name: datadog_username
31456
+ resource_link: datadog.com/feature/fallback_payments_test
31457
+ changed_resource:
31458
+ name: fallback_payments_test
31459
+ type: feature_flag
31460
+ impacted_resources:
31461
+ - name: payments_api
31462
+ type: service
31463
+ new_value:
31464
+ enabled: true
31465
+ percentage: 50%
31466
+ rule:
31467
+ datacenter: devcycle.us1.prod
31468
+ prev_value:
31469
+ enabled: true
31470
+ percentage: 10%
31471
+ rule:
31472
+ datacenter: devcycle.us1.prod
31473
+ category: change
31474
+ message: payment_processed feature flag has been enabled
31475
+ tags:
31476
+ - environment:test
31477
+ title: payment_processed feature flag updated
31478
+ type: event
31479
+ schema:
31480
+ $ref: '#/components/schemas/EventCreateRequestPayload'
31481
+ description: Event request object
31482
+ required: true
31483
+ responses:
31484
+ '200':
31485
+ content:
31486
+ application/json:
31487
+ schema:
31488
+ $ref: '#/components/schemas/EventCreateResponsePayload'
31489
+ description: OK
31490
+ '400':
31491
+ content:
31492
+ application/json:
31493
+ schema:
31494
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
31495
+ description: Bad request
31496
+ '403':
31497
+ content:
31498
+ application/json:
31499
+ schema:
31500
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
31501
+ description: Forbidden
31502
+ '429':
31503
+ $ref: '#/components/responses/TooManyRequestsResponse'
31504
+ security:
31505
+ - apiKeyAuth: []
31506
+ summary: Post an event
31507
+ tags:
31508
+ - Events
31509
+ x-codegen-request-body-name: body
31194
31510
/api/v2/events/search:
31195
31511
post:
31196
31512
description: 'List endpoint returns events that match an events search query.
0 commit comments