diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index f45d9a1cc953..586cc6152490 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -9396,6 +9396,110 @@ components:
- name
- expression
type: object
+ CampaignResponse:
+ description: Response containing campaign data.
+ properties:
+ data:
+ $ref: "#/components/schemas/CampaignResponseData"
+ required:
+ - data
+ type: object
+ CampaignResponseAttributes:
+ description: Campaign attributes.
+ properties:
+ created_at:
+ description: Creation time of the campaign.
+ example: "2023-12-15T10:30:00Z"
+ format: date-time
+ type: string
+ description:
+ description: The description of the campaign.
+ example: Campaign to improve security posture for Q1 2024.
+ type: string
+ due_date:
+ description: The due date of the campaign.
+ example: "2024-03-31T23:59:59Z"
+ format: date-time
+ type: string
+ entity_scope:
+ description: Entity scope query to filter entities for this campaign.
+ example: kind:service AND team:platform
+ type: string
+ guidance:
+ description: Guidance for the campaign.
+ example: Please ensure all services pass the security requirements.
+ type: string
+ key:
+ description: The unique key for the campaign.
+ example: q1-security-2024
+ type: string
+ modified_at:
+ description: Time of last campaign modification.
+ example: "2024-01-05T14:20:00Z"
+ format: date-time
+ type: string
+ name:
+ description: The name of the campaign.
+ example: Q1 Security Campaign
+ type: string
+ owner:
+ description: The UUID of the campaign owner.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ type: string
+ start_date:
+ description: The start date of the campaign.
+ example: "2024-01-01T00:00:00Z"
+ format: date-time
+ type: string
+ status:
+ description: The status of the campaign.
+ example: in_progress
+ type: string
+ required:
+ - key
+ - name
+ - owner
+ - status
+ - start_date
+ - created_at
+ - modified_at
+ type: object
+ CampaignResponseData:
+ description: Campaign data.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/CampaignResponseAttributes"
+ id:
+ description: The unique ID of the campaign.
+ example: c10ODp0VCrrIpXmz
+ type: string
+ type:
+ $ref: "#/components/schemas/CampaignType"
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ CampaignStatus:
+ description: The status of the campaign.
+ enum:
+ - in_progress
+ - not_started
+ - completed
+ example: in_progress
+ type: string
+ x-enum-varnames:
+ - IN_PROGRESS
+ - NOT_STARTED
+ - COMPLETED
+ CampaignType:
+ description: The JSON:API type for campaigns.
+ enum:
+ - campaign
+ example: campaign
+ type: string
+ x-enum-varnames:
+ - CAMPAIGN
CancelDataDeletionResponseBody:
description: The response from the cancel data deletion request endpoint.
properties:
@@ -14378,6 +14482,78 @@ components:
example: Postmortem-IR-123
type: string
type: object
+ CreateCampaignRequest:
+ description: Request to create a new campaign.
+ properties:
+ data:
+ $ref: "#/components/schemas/CreateCampaignRequestData"
+ required:
+ - data
+ type: object
+ CreateCampaignRequestAttributes:
+ description: Attributes for creating a new campaign.
+ properties:
+ description:
+ description: The description of the campaign.
+ example: Campaign to improve security posture for Q1 2024.
+ type: string
+ due_date:
+ description: The due date of the campaign.
+ example: "2024-03-31T23:59:59Z"
+ format: date-time
+ type: string
+ entity_scope:
+ description: Entity scope query to filter entities for this campaign.
+ example: kind:service AND team:platform
+ type: string
+ guidance:
+ description: Guidance for the campaign.
+ example: Please ensure all services pass the security requirements.
+ type: string
+ key:
+ description: The unique key for the campaign.
+ example: q1-security-2024
+ type: string
+ name:
+ description: The name of the campaign.
+ example: Q1 Security Campaign
+ type: string
+ owner_id:
+ description: The UUID of the campaign owner.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ type: string
+ rule_ids:
+ description: Array of rule IDs associated with this campaign.
+ example: ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"]
+ items:
+ description: The unique ID of a scorecard rule.
+ type: string
+ type: array
+ start_date:
+ description: The start date of the campaign.
+ example: "2024-01-01T00:00:00Z"
+ format: date-time
+ type: string
+ status:
+ $ref: "#/components/schemas/CampaignStatus"
+ required:
+ - name
+ - key
+ - owner_id
+ - start_date
+ - rule_ids
+ type: object
+ CreateCampaignRequestData:
+ description: Data for creating a new campaign.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/CreateCampaignRequestAttributes"
+ type:
+ $ref: "#/components/schemas/CampaignType"
+ required:
+ - type
+ - attributes
+ type: object
CreateCaseRequestArray:
description: List of requests to create cases for security findings.
properties:
@@ -15324,6 +15500,41 @@ components:
id:
$ref: "#/components/schemas/ApiID"
type: object
+ CreateOrUpdateWidgetRequest:
+ description: Request body for creating or updating a widget.
+ properties:
+ data:
+ $ref: "#/components/schemas/CreateOrUpdateWidgetRequestData"
+ required:
+ - data
+ type: object
+ CreateOrUpdateWidgetRequestAttributes:
+ description: Attributes for creating or updating a widget.
+ properties:
+ definition:
+ $ref: "#/components/schemas/WidgetDefinition"
+ tags:
+ description: User-defined tags for organizing the widget.
+ items:
+ type: string
+ nullable: true
+ type: array
+ required:
+ - definition
+ type: object
+ CreateOrUpdateWidgetRequestData:
+ description: Data for creating or updating a widget.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/CreateOrUpdateWidgetRequestAttributes"
+ type:
+ description: Widgets resource type.
+ example: widgets
+ type: string
+ required:
+ - type
+ - attributes
+ type: object
CreatePageRequest:
description: Full request to trigger an On-Call Page.
example:
@@ -15447,7 +15658,7 @@ components:
description: Scorecard create rule request data.
properties:
attributes:
- $ref: "#/components/schemas/RuleAttributes"
+ $ref: "#/components/schemas/RuleAttributesRequest"
type:
$ref: "#/components/schemas/RuleType"
type: object
@@ -36309,6 +36520,22 @@ components:
required:
- data
type: object
+ ListCampaignsResponse:
+ description: Response containing a list of campaigns.
+ properties:
+ data:
+ $ref: "#/components/schemas/ListCampaignsResponseData"
+ meta:
+ $ref: "#/components/schemas/PaginatedResponseMeta"
+ required:
+ - data
+ - meta
+ type: object
+ ListCampaignsResponseData:
+ description: Array of campaigns.
+ items:
+ $ref: "#/components/schemas/CampaignResponseData"
+ type: array
ListConnectionsResponse:
description: Response containing the list of all data source connections configured for an entity.
example:
@@ -36772,6 +36999,19 @@ components:
example: "/api/v2/scorecard/rules?page%5Blimit%5D=2&page%5Boffset%5D=2&page%5Bsize%5D=2"
type: string
type: object
+ ListScorecardsResponse:
+ description: Response containing a list of scorecards.
+ properties:
+ data:
+ $ref: "#/components/schemas/ListScorecardsResponseData"
+ required:
+ - data
+ type: object
+ ListScorecardsResponseData:
+ description: Array of scorecards.
+ items:
+ $ref: "#/components/schemas/ScorecardListResponseData"
+ type: array
ListSecurityFindingsResponse:
description: The expected response schema when listing security findings.
properties:
@@ -47404,6 +47644,35 @@ components:
x-enum-varnames:
- LOW
- HIGH
+ PaginatedResponseMeta:
+ description: Metadata for scores response.
+ properties:
+ count:
+ description: Number of entities in this response.
+ example: 10
+ format: int64
+ type: integer
+ limit:
+ description: Pagination limit.
+ example: 10
+ format: int64
+ type: integer
+ offset:
+ description: Pagination offset.
+ example: 0
+ format: int64
+ type: integer
+ total:
+ description: Total number of entities available.
+ example: 150
+ format: int64
+ type: integer
+ required:
+ - count
+ - total
+ - limit
+ - offset
+ type: object
Pagination:
description: Pagination object.
properties:
@@ -53274,6 +53543,38 @@ components:
owner:
description: Owner of the rule.
type: string
+ scope_query:
+ description: A query to filter which entities this rule applies to.
+ example: "kind:service"
+ type: string
+ scorecard_name:
+ description: The scorecard name to which this rule must belong.
+ example: Deployments automated via Deployment Trains
+ type: string
+ type: object
+ RuleAttributesRequest:
+ description: Attributes for creating or updating a rule. Server-managed fields (created_at, modified_at, custom) are excluded.
+ properties:
+ description:
+ description: Explanation of the rule.
+ type: string
+ enabled:
+ description: If enabled, the rule is calculated as part of the score.
+ example: true
+ type: boolean
+ level:
+ $ref: "#/components/schemas/RuleLevel"
+ name:
+ description: Name of the rule.
+ example: Team Defined
+ type: string
+ owner:
+ description: Owner of the rule.
+ type: string
+ scope_query:
+ description: A query to filter which entities this rule applies to.
+ example: "kind:service"
+ type: string
scorecard_name:
description: The scorecard name to which this rule must belong.
example: Deployments automated via Deployment Trains
@@ -55779,6 +56080,56 @@ components:
type: string
x-enum-varnames:
- USERS
+ ScorecardListResponseAttributes:
+ description: Scorecard attributes.
+ properties:
+ created_at:
+ description: Creation time of the scorecard.
+ example: "2023-01-15T10:30:00Z"
+ format: date-time
+ type: string
+ description:
+ description: The description of the scorecard.
+ example: Best practices for observability.
+ type: string
+ modified_at:
+ description: Time of last scorecard modification.
+ example: "2024-01-05T14:20:00Z"
+ format: date-time
+ type: string
+ name:
+ description: The name of the scorecard.
+ example: Observability Best Practices
+ type: string
+ required:
+ - name
+ - created_at
+ - modified_at
+ type: object
+ ScorecardListResponseData:
+ description: Scorecard data.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/ScorecardListResponseAttributes"
+ id:
+ description: The unique ID of the scorecard.
+ example: q8MQxk8TCqrHnWkx
+ type: string
+ type:
+ $ref: "#/components/schemas/ScorecardListType"
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ ScorecardListType:
+ description: The JSON:API type for scorecard list.
+ enum:
+ - scorecard
+ example: scorecard
+ type: string
+ x-enum-varnames:
+ - SCORECARD
ScorecardType:
default: scorecard
description: The JSON:API type for scorecard.
@@ -69014,6 +69365,80 @@ components:
description: The display name of the datastore.
type: string
type: object
+ UpdateCampaignRequest:
+ description: Request to update a campaign.
+ properties:
+ data:
+ $ref: "#/components/schemas/UpdateCampaignRequestData"
+ required:
+ - data
+ type: object
+ UpdateCampaignRequestAttributes:
+ description: Attributes for updating a campaign.
+ properties:
+ description:
+ description: The description of the campaign.
+ example: Campaign to improve security posture for Q1 2024.
+ type: string
+ due_date:
+ description: The due date of the campaign.
+ example: "2024-03-31T23:59:59Z"
+ format: date-time
+ type: string
+ entity_scope:
+ description: Entity scope query to filter entities for this campaign.
+ example: kind:service AND team:platform
+ type: string
+ guidance:
+ description: Guidance for the campaign.
+ example: Please ensure all services pass the security requirements.
+ type: string
+ key:
+ description: The unique key for the campaign.
+ example: q1-security-2024
+ type: string
+ name:
+ description: The name of the campaign.
+ example: Q1 Security Campaign
+ type: string
+ owner_id:
+ description: The UUID of the campaign owner.
+ example: 550e8400-e29b-41d4-a716-446655440000
+ type: string
+ rule_ids:
+ description: Array of rule IDs associated with this campaign.
+ example: ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"]
+ items:
+ description: The unique ID of a scorecard rule.
+ type: string
+ type: array
+ start_date:
+ description: The start date of the campaign.
+ example: "2024-01-01T00:00:00Z"
+ format: date-time
+ type: string
+ status:
+ description: The status of the campaign.
+ example: in_progress
+ type: string
+ required:
+ - name
+ - owner_id
+ - status
+ - start_date
+ - rule_ids
+ type: object
+ UpdateCampaignRequestData:
+ description: Data for updating a campaign.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/UpdateCampaignRequestAttributes"
+ type:
+ $ref: "#/components/schemas/CampaignType"
+ required:
+ - type
+ - attributes
+ type: object
UpdateConnectionRequest:
description: Request body for updating an existing data source connection by adding, modifying, or removing fields.
example:
@@ -69595,7 +70020,7 @@ components:
description: Data for the request to update a scorecard rule.
properties:
attributes:
- $ref: "#/components/schemas/RuleAttributes"
+ $ref: "#/components/schemas/RuleAttributesRequest"
type:
$ref: "#/components/schemas/RuleType"
type: object
@@ -71675,6 +72100,136 @@ components:
- FRIDAY
- SATURDAY
- SUNDAY
+ WidgetAttributes:
+ description: Attributes of a widget resource.
+ properties:
+ created_at:
+ description: ISO 8601 timestamp of when the widget was created.
+ example: "2024-01-15T00:00:00.000Z"
+ type: string
+ definition:
+ $ref: "#/components/schemas/WidgetDefinition"
+ is_favorited:
+ description: "Will be implemented soon. Currently always returns false."
+ example: false
+ type: boolean
+ modified_at:
+ description: ISO 8601 timestamp of when the widget was last modified.
+ example: "2024-01-15T00:00:00.000Z"
+ type: string
+ tags:
+ description: User-defined tags for organizing widgets.
+ example:
+ - "team:my-team"
+ items:
+ type: string
+ nullable: true
+ type: array
+ required:
+ - definition
+ - tags
+ - is_favorited
+ - created_at
+ - modified_at
+ type: object
+ WidgetData:
+ description: A widget resource object.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/WidgetAttributes"
+ id:
+ description: The unique identifier of the widget.
+ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
+ type: string
+ relationships:
+ $ref: "#/components/schemas/WidgetRelationships"
+ type:
+ description: Widgets resource type.
+ example: widgets
+ type: string
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ WidgetDefinition:
+ additionalProperties: {}
+ description: The definition of a widget, including its type and configuration.
+ properties:
+ title:
+ description: The display title of the widget.
+ example: My Widget
+ maxLength: 100
+ minLength: 1
+ type: string
+ type:
+ $ref: "#/components/schemas/WidgetType"
+ required:
+ - type
+ - title
+ type: object
+ WidgetExperienceType:
+ description: Widget experience types that differentiate between the products using the specific widget.
+ enum:
+ - ccm_reports
+ - logs_reports
+ - csv_reports
+ - product_analytics
+ example: ccm_reports
+ type: string
+ x-enum-varnames:
+ - CCM_REPORTS
+ - LOGS_REPORTS
+ - CSV_REPORTS
+ - PRODUCT_ANALYTICS
+ WidgetIncludedUser:
+ description: A user resource included in the response.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/WidgetIncludedUserAttributes"
+ id:
+ description: The unique identifier of the user.
+ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
+ type: string
+ type:
+ description: Users resource type.
+ example: users
+ type: string
+ required:
+ - id
+ - type
+ type: object
+ WidgetIncludedUserAttributes:
+ description: Attributes of an included user resource.
+ properties:
+ handle:
+ description: The email handle of the user.
+ example: "john.doe@example.com"
+ type: string
+ name:
+ description: The display name of the user.
+ example: "John Doe"
+ nullable: true
+ type: string
+ type: object
+ WidgetListResponse:
+ description: Response containing a list of widgets.
+ properties:
+ data:
+ description: List of widget resources.
+ items:
+ $ref: "#/components/schemas/WidgetData"
+ type: array
+ included:
+ description: Array of user resources related to the widgets.
+ items:
+ $ref: "#/components/schemas/WidgetIncludedUser"
+ type: array
+ meta:
+ $ref: "#/components/schemas/WidgetSearchMeta"
+ required:
+ - data
+ type: object
WidgetLiveSpan:
description: The available timeframes depend on the widget you are using.
enum:
@@ -71711,6 +72266,108 @@ components:
- PAST_SIX_MONTHS
- PAST_ONE_YEAR
- ALERT
+ WidgetRelationshipData:
+ description: Relationship data referencing a user resource.
+ properties:
+ id:
+ description: The unique identifier of the user.
+ example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
+ type: string
+ type:
+ description: Users resource type.
+ example: users
+ type: string
+ required:
+ - id
+ - type
+ type: object
+ WidgetRelationshipItem:
+ description: A JSON:API relationship to a user.
+ properties:
+ data:
+ $ref: "#/components/schemas/WidgetRelationshipData"
+ type: object
+ WidgetRelationships:
+ description: Relationships of the widget resource.
+ properties:
+ created_by:
+ $ref: "#/components/schemas/WidgetRelationshipItem"
+ description: The user who created the widget.
+ modified_by:
+ $ref: "#/components/schemas/WidgetRelationshipItem"
+ description: The user who last modified the widget.
+ type: object
+ WidgetResponse:
+ description: Response containing a single widget.
+ properties:
+ data:
+ $ref: "#/components/schemas/WidgetData"
+ included:
+ description: Array of user resources related to the widget.
+ items:
+ $ref: "#/components/schemas/WidgetIncludedUser"
+ type: array
+ required:
+ - data
+ type: object
+ WidgetSearchMeta:
+ description: Metadata about the search results.
+ properties:
+ created_by_anyone_total:
+ description: Total number of widgets created by anyone.
+ format: int64
+ type: integer
+ created_by_you_total:
+ description: Total number of widgets created by the current user.
+ format: int64
+ type: integer
+ favorited_by_you_total:
+ description: Total number of widgets favorited by the current user.
+ format: int64
+ type: integer
+ filtered_total:
+ description: Total number of widgets matching the current filter criteria.
+ format: int64
+ type: integer
+ type: object
+ WidgetType:
+ description: |-
+ Widget types that are allowed to be stored as individual records.
+ This is not a complete list of dashboard and notebook widget types.
+ enum:
+ - bar_chart
+ - change
+ - cloud_cost_summary
+ - cohort
+ - funnel
+ - geomap
+ - list_stream
+ - query_table
+ - query_value
+ - retention_curve
+ - sankey
+ - sunburst
+ - timeseries
+ - toplist
+ - treemap
+ example: bar_chart
+ type: string
+ x-enum-varnames:
+ - BAR_CHART
+ - CHANGE
+ - CLOUD_COST_SUMMARY
+ - COHORT
+ - FUNNEL
+ - GEOMAP
+ - LIST_STREAM
+ - QUERY_TABLE
+ - QUERY_VALUE
+ - RETENTION_CURVE
+ - SANKEY
+ - SUNBURST
+ - TIMESERIES
+ - TOPLIST
+ - TREEMAP
WorkflowData:
description: Data related to the workflow.
properties:
@@ -99006,6 +99663,389 @@ paths:
operator: OR
permissions:
- org_management
+ /api/v2/scorecard/campaigns:
+ get:
+ description: Fetches all scorecard campaigns.
+ operationId: ListScorecardCampaigns
+ parameters:
+ - description: Maximum number of campaigns to return.
+ in: query
+ name: page[limit]
+ required: false
+ schema:
+ default: 10
+ example: 10
+ format: int64
+ type: integer
+ - description: Offset for pagination.
+ in: query
+ name: page[offset]
+ required: false
+ schema:
+ default: 0
+ example: 0
+ format: int64
+ type: integer
+ - description: Filter campaigns by name (full-text search).
+ in: query
+ name: filter[campaign][name]
+ required: false
+ schema:
+ example: security
+ type: string
+ - description: Filter campaigns by status.
+ in: query
+ name: filter[campaign][status]
+ required: false
+ schema:
+ example: in_progress
+ type: string
+ - description: Filter campaigns by owner UUID.
+ in: query
+ name: filter[campaign][owner]
+ required: false
+ schema:
+ example: 550e8400-e29b-41d4-a716-446655440000
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ created_at: "2026-01-01T00:00:00Z"
+ entity_scope: kind:service
+ key: test-campaign-1
+ modified_at: "2026-01-01T00:00:00Z"
+ name: Test Campaign 1
+ owner: ""
+ start_date: "2026-01-01T00:00:00Z"
+ status: in_progress
+ id: campaign-1
+ meta:
+ entity_count: 25
+ rule_count: 2
+ relationships:
+ rules:
+ data:
+ - id: rule-1
+ type: rule
+ - id: rule-2
+ type: rule
+ type: campaign
+ meta:
+ count: 1
+ limit: 10
+ offset: 0
+ total: 1
+ schema:
+ $ref: "#/components/schemas/ListCampaignsResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - apm_service_catalog_read
+ - cases_read
+ summary: List all campaigns
+ tags:
+ - Scorecards
+ post:
+ description: Creates a new scorecard campaign.
+ operationId: CreateScorecardCampaign
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateCampaignRequest"
+ description: Campaign data.
+ required: true
+ responses:
+ "201":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2026-01-01T00:00:00Z"
+ key: minimal-campaign
+ modified_at: "2026-01-01T00:00:00Z"
+ name: Minimal Campaign
+ owner: 21f98ae1-4ae2-11eb-958f-07e105a6e810
+ start_date: "2026-01-01T00:00:00Z"
+ status: in_progress
+ id: campaign-2
+ relationships:
+ rules:
+ data:
+ - id: rule-1
+ type: rule
+ type: campaign
+ schema:
+ $ref: "#/components/schemas/CampaignResponse"
+ description: Created
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - apm_service_catalog_write
+ - cases_write
+ summary: Create a new campaign
+ tags:
+ - Scorecards
+ /api/v2/scorecard/campaigns/{campaign_id}:
+ delete:
+ description: Deletes a single campaign by ID or key.
+ operationId: DeleteScorecardCampaign
+ parameters:
+ - description: Campaign ID or key.
+ in: path
+ name: campaign_id
+ required: true
+ schema:
+ example: c10ODp0VCrrIpXmz
+ type: string
+ responses:
+ "204":
+ description: No Content
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - apm_service_catalog_write
+ - cases_write
+ summary: Delete a campaign
+ tags:
+ - Scorecards
+ get:
+ description: Fetches a single campaign by ID or key.
+ operationId: GetScorecardCampaign
+ parameters:
+ - description: Campaign ID or key.
+ in: path
+ name: campaign_id
+ required: true
+ schema:
+ example: c10ODp0VCrrIpXmz
+ type: string
+ - description: Include related data (for example, scores).
+ in: query
+ name: include
+ required: false
+ schema:
+ example: scores
+ type: string
+ - description: Include metadata (entity and rule counts).
+ in: query
+ name: include_meta
+ required: false
+ schema:
+ example: true
+ type: boolean
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2026-01-01T00:00:00Z"
+ key: test-campaign
+ modified_at: "2026-01-01T00:00:00Z"
+ name: Test Campaign
+ owner: ""
+ start_date: "2026-01-01T00:00:00Z"
+ status: in_progress
+ id: c2b79b87-327c-40fa-b726-228f1a60bbb4
+ relationships:
+ campaign_score:
+ data:
+ id: c2b79b87-327c-40fa-b726-228f1a60bbb4
+ type: score
+ rule_scores:
+ data:
+ - id: rule-1
+ type: score
+ rules:
+ data:
+ - id: rule-1
+ type: rule
+ type: campaign
+ included:
+ - attributes:
+ aggregation: campaign
+ denominator: 13
+ numerator: 10
+ score: 76.92
+ total_fail: 2
+ total_no_data: 0
+ total_pass: 10
+ total_skip: 1
+ id: c2b79b87-327c-40fa-b726-228f1a60bbb4
+ type: score
+ schema:
+ $ref: "#/components/schemas/CampaignResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - apm_service_catalog_read
+ - cases_read
+ summary: Get a campaign
+ tags:
+ - Scorecards
+ put:
+ description: Updates an existing campaign.
+ operationId: UpdateScorecardCampaign
+ parameters:
+ - description: Campaign ID or key.
+ in: path
+ name: campaign_id
+ required: true
+ schema:
+ example: c10ODp0VCrrIpXmz
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/UpdateCampaignRequest"
+ description: Campaign data.
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ created_at: "2026-01-01T00:00:00Z"
+ description: Updated Description
+ key: updated-campaign
+ modified_at: "2026-01-02T00:00:00Z"
+ name: Updated Campaign
+ owner: 21f98ae1-4ae2-11eb-958f-07e105a6e810
+ start_date: "2026-01-01T00:00:00Z"
+ status: completed
+ id: 9c15b9ca-5abd-4875-84c2-02e166a45959
+ relationships:
+ rules:
+ data:
+ - id: rule-1
+ type: rule
+ - id: rule-2
+ type: rule
+ type: campaign
+ schema:
+ $ref: "#/components/schemas/CampaignResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - apm_service_catalog_write
+ - cases_write
+ summary: Update a campaign
+ tags:
+ - Scorecards
/api/v2/scorecard/outcomes:
get:
description: Fetches all rule outcomes.
@@ -99034,21 +100074,21 @@ paths:
schema:
example: name
type: string
- - description: Filter the outcomes on a specific service name.
+ - description: Filter outcomes on a specific service name.
in: query
name: filter[outcome][service_name]
required: false
schema:
example: web-store
type: string
- - description: Filter the outcomes by a specific state.
+ - description: Filter outcomes by a specific state.
in: query
name: filter[outcome][state]
required: false
schema:
example: fail
type: string
- - description: Filter outcomes on whether a rule is enabled/disabled.
+ - description: Filter outcomes based on whether a rule is enabled or disabled.
in: query
name: filter[rule][enabled]
required: false
@@ -99073,6 +100113,25 @@ paths:
"200":
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ created_at: "2026-01-06T12:51:32.000546001Z"
+ modified_at: "2026-01-06T12:51:32.000546001Z"
+ remarks: test
+ service_name: my-service
+ state: pass
+ id: a75tJIv_kNQ
+ relationships:
+ rule:
+ data:
+ id: rule-1
+ type: rule
+ type: outcome
+ links:
+ next: /api/v2/scorecard/outcomes?page%5Blimit%5D=100&page%5Boffset%5D=100
schema:
$ref: "#/components/schemas/OutcomesResponse"
description: OK
@@ -99089,17 +100148,14 @@ paths:
- apm_service_catalog_read
summary: List all rule outcomes
tags:
- - Service Scorecards
+ - Scorecards
x-pagination:
limitParam: page[size]
pageOffsetParam: page[offset]
resultsPath: data
- x-unstable: |-
- **Note**: This endpoint is in public beta.
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: Updates multiple scorecard rule outcomes in a single batched request.
- operationId: UpdateScorecardOutcomesAsync
+ operationId: UpdateScorecardOutcomes
requestBody:
content:
application/json:
@@ -99123,15 +100179,13 @@ paths:
appKeyAuth: []
- AuthZ:
- apm_service_catalog_write
- summary: Update Scorecard outcomes asynchronously
+ summary: Update Scorecard outcomes
tags:
- - Service Scorecards
+ - Scorecards
x-codegen-request-body-name: body
- x-unstable: |-
- **Note**: This endpoint is in public beta.
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/scorecard/outcomes/batch:
post:
+ deprecated: true
description: Sets multiple service-rule outcomes in a single batched request.
operationId: CreateScorecardOutcomesBatch
requestBody:
@@ -99145,6 +100199,25 @@ paths:
"200":
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ modified_at: "2026-03-11T07:37:20.758067Z"
+ remarks: test remarks
+ service_name: my-service
+ state: pass
+ id: nFs2_9E97Zo
+ relationships:
+ rule:
+ data:
+ id: rule-1
+ type: rule
+ type: outcome
+ meta:
+ total_received: 1
+ total_staged: 1
schema:
$ref: "#/components/schemas/OutcomesBatchResponse"
description: OK
@@ -99161,10 +100234,11 @@ paths:
- apm_service_catalog_write
summary: Create outcomes batch
tags:
- - Service Scorecards
+ - Scorecards
x-codegen-request-body-name: body
+ x-sunset: "2026-04-01"
x-unstable: |-
- **Note**: This endpoint is in public beta.
+ **Note**: This endpoint is in Preview.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/scorecard/rules:
get:
@@ -99233,6 +100307,34 @@ paths:
"200":
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ category: Test Scorecard
+ created_at: "2026-01-06T12:51:32Z"
+ custom: true
+ enabled: true
+ level: 3
+ modified_at: "2026-01-06T12:51:32Z"
+ name: Test Rule 1
+ scorecard_name: Test Scorecard
+ id: rule-1
+ relationships:
+ scorecard:
+ data:
+ id: scorecard-1
+ type: scorecard
+ type: rule
+ included:
+ - attributes:
+ description: Scorecard Description
+ name: Test Scorecard
+ id: scorecard-1
+ type: scorecard
+ links:
+ next: /api/v2/scorecard/rules?include=scorecard&page%5Blimit%5D=100&page%5Boffset%5D=100
schema:
$ref: "#/components/schemas/ListRulesResponse"
description: OK
@@ -99249,20 +100351,27 @@ paths:
- apm_service_catalog_read
summary: List all rules
tags:
- - Service Scorecards
+ - Scorecards
x-pagination:
limitParam: page[size]
pageOffsetParam: page[offset]
resultsPath: data
- x-unstable: |-
- **Note**: This endpoint is in public beta.
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: Creates a new rule.
operationId: CreateScorecardRule
requestBody:
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ enabled: true
+ name: My Rule
+ owner: Datadog
+ scorecard_name: My Scorecard
+ type: rule
schema:
$ref: "#/components/schemas/CreateRuleRequest"
description: Rule attributes.
@@ -99271,6 +100380,26 @@ paths:
"201":
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ category: Test Scorecard
+ created_at: "2026-01-06T12:51:32Z"
+ custom: true
+ enabled: true
+ level: 3
+ modified_at: "2026-01-06T12:51:32Z"
+ name: Test Rule
+ scorecard_name: Test Scorecard
+ id: rule-1
+ relationships:
+ scorecard:
+ data:
+ id: scorecard-1
+ type: scorecard
+ type: rule
schema:
$ref: "#/components/schemas/CreateRuleResponse"
description: Created
@@ -99287,11 +100416,8 @@ paths:
- apm_service_catalog_write
summary: Create a new rule
tags:
- - Service Scorecards
+ - Scorecards
x-codegen-request-body-name: body
- x-unstable: |-
- **Note**: This endpoint is in public beta.
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/scorecard/rules/{rule_id}:
delete:
description: Deletes a single rule.
@@ -99316,10 +100442,7 @@ paths:
- apm_service_catalog_write
summary: Delete a rule
tags:
- - Service Scorecards
- x-unstable: |-
- **Note**: This endpoint is in public beta.
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ - Scorecards
put:
description: Updates an existing rule.
operationId: UpdateScorecardRule
@@ -99328,6 +100451,18 @@ paths:
requestBody:
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ description: Updated Description
+ enabled: false
+ name: Updated Rule
+ owner: team:updated-team
+ scope_query: kind:service
+ scorecard_name: Updated Scorecard
+ type: rule
schema:
$ref: "#/components/schemas/UpdateRuleRequest"
description: Rule attributes.
@@ -99336,6 +100471,33 @@ paths:
"200":
content:
application/json:
+ examples:
+ default:
+ value:
+ data:
+ attributes:
+ category: Updated Scorecard
+ created_at: "2026-01-06T12:51:32Z"
+ custom: true
+ description: Updated Description
+ enabled: false
+ level: 1
+ modified_at: "2026-01-06T13:00:00Z"
+ name: Updated Rule
+ owner: team:updated-team
+ scope_query: kind:service
+ scorecard_name: Updated Scorecard
+ id: rule-1
+ relationships:
+ scope:
+ data:
+ id: ae07a16e-1319-5e61-bdba-b3026bc2bdcd
+ type: entity-scope
+ scorecard:
+ data:
+ id: scorecard-2
+ type: scorecard
+ type: rule
schema:
$ref: "#/components/schemas/UpdateRuleResponse"
description: Rule updated successfully
@@ -99350,13 +100512,88 @@ paths:
appKeyAuth: []
- AuthZ:
- apm_service_catalog_write
- summary: Update an existing rule
+ summary: Update an existing scorecard rule
tags:
- - Service Scorecards
+ - Scorecards
x-codegen-request-body-name: body
- x-unstable: |-
- **Note**: This endpoint is in public beta.
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ /api/v2/scorecard/scorecards:
+ get:
+ description: Fetches all scorecards.
+ operationId: ListScorecards
+ parameters:
+ - description: Offset for pagination.
+ in: query
+ name: page[offset]
+ required: false
+ schema:
+ default: 0
+ example: 0
+ format: int64
+ type: integer
+ - description: Maximum number of scorecards to return.
+ in: query
+ name: page[size]
+ required: false
+ schema:
+ default: 100
+ example: 10
+ format: int64
+ type: integer
+ - description: Filter by scorecard ID.
+ in: query
+ name: filter[scorecard][id]
+ required: false
+ schema:
+ example: q8MQxk8TCqrHnWkx
+ type: string
+ - description: Filter by scorecard name (partial match).
+ in: query
+ name: filter[scorecard][name]
+ required: false
+ schema:
+ example: Observability
+ type: string
+ - description: Filter by scorecard description (partial match).
+ in: query
+ name: filter[scorecard][description]
+ required: false
+ schema:
+ example: Best Practices
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ data:
+ - attributes:
+ created_at: "2026-01-01T00:00:00Z"
+ description: Best practices for observability.
+ modified_at: "2026-01-05T14:20:00Z"
+ name: Observability Best Practices
+ id: q8MQxk8TCqrHnWkx
+ type: scorecard
+ schema:
+ $ref: "#/components/schemas/ListScorecardsResponse"
+ description: OK
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - apm_service_catalog_read
+ summary: List all scorecards
+ tags:
+ - Scorecards
/api/v2/seats/users:
delete:
description: |-
@@ -109866,6 +111103,328 @@ paths:
operator: OR
permissions:
- teams_read
+ /api/v2/widgets/{experience_type}:
+ get:
+ description: Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination.
+ operationId: SearchWidgets
+ parameters:
+ - description: The experience type for the widget.
+ in: path
+ name: experience_type
+ required: true
+ schema:
+ $ref: "#/components/schemas/WidgetExperienceType"
+ - description: Filter widgets by widget type.
+ in: query
+ name: filter[widgetType]
+ schema:
+ $ref: "#/components/schemas/WidgetType"
+ - description: Filter widgets by the email handle of the creator.
+ in: query
+ name: filter[creatorHandle]
+ schema:
+ example: "john.doe@example.com"
+ type: string
+ - description: Filter to only widgets favorited by the current user.
+ in: query
+ name: filter[isFavorited]
+ schema:
+ type: boolean
+ - description: Filter widgets by title (substring match).
+ in: query
+ name: filter[title]
+ schema:
+ type: string
+ - description: Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`.
+ in: query
+ name: filter[tags]
+ schema:
+ type: string
+ - description: |-
+ Sort field for the results. Prefix with `-` for descending order.
+ Allowed values: `title`, `created_at`, `modified_at`.
+ in: query
+ name: sort
+ schema:
+ default: "-modified_at"
+ example: "-modified_at"
+ type: string
+ - description: Page number for pagination (0-indexed).
+ in: query
+ name: page[number]
+ schema:
+ default: 0
+ minimum: 0
+ type: integer
+ - description: Number of widgets per page.
+ in: query
+ name: page[size]
+ schema:
+ default: 50
+ maximum: 100
+ type: integer
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WidgetListResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Forbidden
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Search widgets
+ tags:
+ - Widgets
+ x-permission:
+ operator: OR
+ permissions:
+ - cloud_cost_management_read
+ - generate_log_reports
+ - manage_log_reports
+ - product_analytics_saved_widgets_read
+ post:
+ description: Create a new widget for a given experience type.
+ operationId: CreateWidget
+ parameters:
+ - description: The experience type for the widget.
+ in: path
+ name: experience_type
+ required: true
+ schema:
+ $ref: "#/components/schemas/WidgetExperienceType"
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateOrUpdateWidgetRequest"
+ description: Widget request body.
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WidgetResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Forbidden
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Create a widget
+ tags:
+ - Widgets
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - cloud_cost_management_write
+ - generate_log_reports
+ - manage_log_reports
+ - product_analytics_saved_widgets_write
+ /api/v2/widgets/{experience_type}/{uuid}:
+ delete:
+ description: Soft-delete a widget by its UUID for a given experience type.
+ operationId: DeleteWidget
+ parameters:
+ - description: The experience type for the widget.
+ in: path
+ name: experience_type
+ required: true
+ schema:
+ $ref: "#/components/schemas/WidgetExperienceType"
+ - description: The UUID of the widget.
+ in: path
+ name: uuid
+ required: true
+ schema:
+ format: uuid
+ type: string
+ responses:
+ "204":
+ description: No Content
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Delete a widget
+ tags:
+ - Widgets
+ x-permission:
+ operator: OR
+ permissions:
+ - cloud_cost_management_write
+ - generate_log_reports
+ - manage_log_reports
+ - product_analytics_saved_widgets_write
+ get:
+ description: Retrieve a widget by its UUID for a given experience type.
+ operationId: GetWidget
+ parameters:
+ - description: The experience type for the widget.
+ in: path
+ name: experience_type
+ required: true
+ schema:
+ $ref: "#/components/schemas/WidgetExperienceType"
+ - description: The UUID of the widget.
+ in: path
+ name: uuid
+ required: true
+ schema:
+ format: uuid
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WidgetResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Get a widget
+ tags:
+ - Widgets
+ x-permission:
+ operator: OR
+ permissions:
+ - cloud_cost_management_read
+ - generate_log_reports
+ - manage_log_reports
+ - product_analytics_saved_widgets_read
+ put:
+ description: Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition.
+ operationId: UpdateWidget
+ parameters:
+ - description: The experience type for the widget.
+ in: path
+ name: experience_type
+ required: true
+ schema:
+ $ref: "#/components/schemas/WidgetExperienceType"
+ - description: The UUID of the widget.
+ in: path
+ name: uuid
+ required: true
+ schema:
+ format: uuid
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/CreateOrUpdateWidgetRequest"
+ description: Widget request body.
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/WidgetResponse"
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/APIErrorResponse"
+ description: Not Found
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Update a widget
+ tags:
+ - Widgets
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: OR
+ permissions:
+ - cloud_cost_management_write
+ - generate_log_reports
+ - manage_log_reports
+ - product_analytics_saved_widgets_write
/api/v2/workflows:
post:
description: Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access).
@@ -110632,6 +112191,9 @@ tags:
- description: |-
Manage retention filters through [Manage Applications](https://app.datadoghq.com/rum/list) of RUM for your organization.
name: Rum Retention Filters
+ - description: |-
+ API to create and update scorecard rules and outcomes. See [Scorecards](https://docs.datadoghq.com/service_catalog/scorecards) for more information.
+ name: Scorecards
- description: |-
The seats API allows you to view, assign, and unassign seats for your organization.
name: Seats
@@ -110656,11 +112218,6 @@ tags:
balance feature development with platform stability,
and improve communication with internal and external users.
name: Service Level Objectives
- - description: |-
- API to create and update scorecard rules and outcomes. See [Service Scorecards](https://docs.datadoghq.com/service_catalog/scorecards) for more information.
-
- This feature is currently in BETA. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
- name: Service Scorecards
- description: Manage your ServiceNow Integration. ServiceNow is a cloud-based platform that helps organizations manage digital workflows for enterprise operations.
name: ServiceNow Integration
- description: |-
@@ -110716,6 +112273,11 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/account_management/users
name: Users
+ - description: |-
+ Create, read, update, and delete saved widgets. Widgets are reusable
+ visualization components stored independently from any dashboard or notebook,
+ partitioned by experience type and identified by a UUID.
+ name: Widgets
- description: |-
Datadog Workflow Automation allows you to automate your end-to-end processes by connecting Datadog with the rest of your tech stack. Build workflows to auto-remediate your alerts, streamline your incident and security processes, and reduce manual toil. Workflow Automation supports over 1,000+ OOTB actions, including AWS, JIRA, ServiceNow, GitHub, and OpenAI. Learn more in our Workflow Automation docs [here](https://docs.datadoghq.com/service_management/workflows/).
externalDocs:
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Bad-Request-response_4112202994/frozen.json b/cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Bad-Request-response_4112202994/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Bad-Request-response_4112202994/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Bad-Request-response_4112202994/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Bad-Request-response_4112202994/recording.har b/cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Bad-Request-response_4112202994/recording.har
similarity index 95%
rename from cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Bad-Request-response_4112202994/recording.har
rename to cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Bad-Request-response_4112202994/recording.har
index abb864f62ce5..d9b891c7731b 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Bad-Request-response_4112202994/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Bad-Request-response_4112202994/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Create a new rule returns \"Bad Request\" response",
+ "_recordingName": "Scorecards/Create a new rule returns \"Bad Request\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Created-response_522570232/frozen.json b/cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Created-response_522570232/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Created-response_522570232/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Created-response_522570232/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Created-response_522570232/recording.har b/cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Created-response_522570232/recording.har
similarity index 97%
rename from cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Created-response_522570232/recording.har
rename to cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Created-response_522570232/recording.har
index b1ba9596bbdb..ba186e1eab8f 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Create-a-new-rule-returns-Created-response_522570232/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Create-a-new-rule-returns-Created-response_522570232/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Create a new rule returns \"Created\" response",
+ "_recordingName": "Scorecards/Create a new rule returns \"Created\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-Bad-Request-response_4200540942/frozen.json b/cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-Bad-Request-response_4200540942/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-Bad-Request-response_4200540942/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-Bad-Request-response_4200540942/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-Bad-Request-response_4200540942/recording.har b/cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-Bad-Request-response_4200540942/recording.har
similarity index 98%
rename from cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-Bad-Request-response_4200540942/recording.har
rename to cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-Bad-Request-response_4200540942/recording.har
index 6ddb8c34ba35..a46adbec889e 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-Bad-Request-response_4200540942/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-Bad-Request-response_4200540942/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Create outcomes batch returns \"Bad Request\" response",
+ "_recordingName": "Scorecards/Create outcomes batch returns \"Bad Request\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-OK-response_3991487588/frozen.json b/cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-OK-response_3991487588/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-OK-response_3991487588/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-OK-response_3991487588/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-OK-response_3991487588/recording.har b/cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-OK-response_3991487588/recording.har
similarity index 98%
rename from cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-OK-response_3991487588/recording.har
rename to cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-OK-response_3991487588/recording.har
index 2ed5f8edd197..90625c4a44a5 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Create-outcomes-batch-returns-OK-response_3991487588/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Create-outcomes-batch-returns-OK-response_3991487588/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Create outcomes batch returns \"OK\" response",
+ "_recordingName": "Scorecards/Create outcomes batch returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-Not-Found-response_164235844/frozen.json b/cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-Not-Found-response_164235844/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-Not-Found-response_164235844/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-Not-Found-response_164235844/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-Not-Found-response_164235844/recording.har b/cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-Not-Found-response_164235844/recording.har
similarity index 94%
rename from cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-Not-Found-response_164235844/recording.har
rename to cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-Not-Found-response_164235844/recording.har
index fe7ab8a8203d..443952125d1d 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-Not-Found-response_164235844/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-Not-Found-response_164235844/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Delete a rule returns \"Not Found\" response",
+ "_recordingName": "Scorecards/Delete a rule returns \"Not Found\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-OK-response_1881171271/frozen.json b/cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-OK-response_1881171271/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-OK-response_1881171271/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-OK-response_1881171271/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-OK-response_1881171271/recording.har b/cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-OK-response_1881171271/recording.har
similarity index 98%
rename from cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-OK-response_1881171271/recording.har
rename to cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-OK-response_1881171271/recording.har
index 4c7ca0d12f22..4a74d3f49910 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Delete-a-rule-returns-OK-response_1881171271/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Delete-a-rule-returns-OK-response_1881171271/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Delete a rule returns \"OK\" response",
+ "_recordingName": "Scorecards/Delete a rule returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Get-all-rules-returns-OK-response_1077715861/frozen.json b/cassettes/v2/Scorecards_1099427156/Get-all-rules-returns-OK-response_1077715861/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Get-all-rules-returns-OK-response_1077715861/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Get-all-rules-returns-OK-response_1077715861/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Get-all-rules-returns-OK-response_1077715861/recording.har b/cassettes/v2/Scorecards_1099427156/Get-all-rules-returns-OK-response_1077715861/recording.har
similarity index 98%
rename from cassettes/v2/Service-Scorecards_320411317/Get-all-rules-returns-OK-response_1077715861/recording.har
rename to cassettes/v2/Scorecards_1099427156/Get-all-rules-returns-OK-response_1077715861/recording.har
index a0199f5acd57..0b98c1012800 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Get-all-rules-returns-OK-response_1077715861/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Get-all-rules-returns-OK-response_1077715861/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Get all rules returns \"OK\" response",
+ "_recordingName": "Scorecards/Get all rules returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/frozen.json b/cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/frozen.json
rename to cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/recording.har b/cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/recording.har
similarity index 97%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/recording.har
rename to cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/recording.har
index 3f2bbee8f774..b8be67b4c7ab 100644
--- a/cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response-with-pagination_1119793127/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/List all rule outcomes returns \"OK\" response with pagination",
+ "_recordingName": "Scorecards/List all rule outcomes returns \"OK\" response with pagination",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response_427126415/frozen.json b/cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response_427126415/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response_427126415/frozen.json
rename to cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response_427126415/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response_427126415/recording.har b/cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response_427126415/recording.har
similarity index 96%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response_427126415/recording.har
rename to cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response_427126415/recording.har
index 17b697626491..0d51f09bfa2e 100644
--- a/cassettes/v2/Service-Scorecards_320411317/List-all-rule-outcomes-returns-OK-response_427126415/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/List-all-rule-outcomes-returns-OK-response_427126415/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/List all rule outcomes returns \"OK\" response",
+ "_recordingName": "Scorecards/List all rule outcomes returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response-with-pagination_1123075563/frozen.json b/cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response-with-pagination_1123075563/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response-with-pagination_1123075563/frozen.json
rename to cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response-with-pagination_1123075563/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response-with-pagination_1123075563/recording.har b/cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response-with-pagination_1123075563/recording.har
similarity index 98%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response-with-pagination_1123075563/recording.har
rename to cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response-with-pagination_1123075563/recording.har
index 828d55576a5c..37b86b04feba 100644
--- a/cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response-with-pagination_1123075563/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response-with-pagination_1123075563/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/List all rules returns \"OK\" response with pagination",
+ "_recordingName": "Scorecards/List all rules returns \"OK\" response with pagination",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response_4242635547/frozen.json b/cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response_4242635547/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response_4242635547/frozen.json
rename to cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response_4242635547/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response_4242635547/recording.har b/cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response_4242635547/recording.har
similarity index 97%
rename from cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response_4242635547/recording.har
rename to cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response_4242635547/recording.har
index 3a79316890b6..dfebcbc0b3da 100644
--- a/cassettes/v2/Service-Scorecards_320411317/List-all-rules-returns-OK-response_4242635547/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/List-all-rules-returns-OK-response_4242635547/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/List all rules returns \"OK\" response",
+ "_recordingName": "Scorecards/List all rules returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/frozen.json b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/recording.har b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/recording.har
similarity index 97%
rename from cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/recording.har
rename to cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/recording.har
index 6cd2d3fd2f9a..3668c7619665 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Accepted-response_3550004421/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Update Scorecard outcomes asynchronously returns \"Accepted\" response",
+ "_recordingName": "Scorecards/Update Scorecard outcomes asynchronously returns \"Accepted\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/frozen.json b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/recording.har b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/recording.har
similarity index 97%
rename from cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/recording.har
rename to cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/recording.har
index c3c9470d945f..5c218290bc86 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Bad-Request-response_3858316768/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Update Scorecard outcomes asynchronously returns \"Bad Request\" response",
+ "_recordingName": "Scorecards/Update Scorecard outcomes asynchronously returns \"Bad Request\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/frozen.json b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/recording.har b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/recording.har
similarity index 94%
rename from cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/recording.har
rename to cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/recording.har
index cdd06ff9b139..af1c45ec7f54 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Update-Scorecard-outcomes-asynchronously-returns-Conflict-response_2488160814/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Update Scorecard outcomes asynchronously returns \"Conflict\" response",
+ "_recordingName": "Scorecards/Update Scorecard outcomes asynchronously returns \"Conflict\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/frozen.json b/cassettes/v2/Scorecards_1099427156/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/recording.har b/cassettes/v2/Scorecards_1099427156/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/recording.har
similarity index 96%
rename from cassettes/v2/Service-Scorecards_320411317/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/recording.har
rename to cassettes/v2/Scorecards_1099427156/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/recording.har
index 2ab38f28782b..25279da42fb6 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Update-an-existing-rule-returns-Rule-updated-successfully-response_2113887026/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Update an existing rule returns \"Rule updated successfully\" response",
+ "_recordingName": "Scorecards/Update an existing rule returns \"Rule updated successfully\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
@@ -61,11 +61,11 @@
"time": 118
},
{
- "_id": "c173c2c3af4ee37c6f4319a3182dd04d",
+ "_id": "14405d8c52a73cea87ac1473d69830e0",
"_order": 0,
"cache": {},
"request": {
- "bodySize": 229,
+ "bodySize": 243,
"cookies": [],
"headers": [
{
@@ -85,7 +85,7 @@
"postData": {
"mimeType": "application/json",
"params": [],
- "text": "{\"data\":{\"attributes\":{\"description\":\"Updated description via test\",\"enabled\":true,\"name\":\"Test-Update_an_existing_rule_returns_Rule_updated_successfully_response-1722307632\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"}}}"
+ "text": "{\"data\":{\"attributes\":{\"description\":\"Updated description via test\",\"enabled\":true,\"name\":\"Test-Update_an_existing_rule_returns_Rule_updated_successfully_response-1722307632\",\"scorecard_name\":\"OpenAPI Spec Test Best Practices\"},\"type\":\"rule\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/scorecard/rules/L2uJseIxQCRLg_2z"
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/frozen.json b/cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/recording.har b/cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/recording.har
similarity index 97%
rename from cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/recording.har
rename to cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/recording.har
index ea3f2dadc903..c3513a8bbaad 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Bad-Request-response_3943964706/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Update an existing scorecard rule returns \"Bad Request\" response",
+ "_recordingName": "Scorecards/Update an existing scorecard rule returns \"Bad Request\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/frozen.json b/cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/frozen.json
similarity index 100%
rename from cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/frozen.json
rename to cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/frozen.json
diff --git a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/recording.har b/cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/recording.har
similarity index 94%
rename from cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/recording.har
rename to cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/recording.har
index 6e6d4ae4ae37..ff478cfc3666 100644
--- a/cassettes/v2/Service-Scorecards_320411317/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/recording.har
+++ b/cassettes/v2/Scorecards_1099427156/Update-an-existing-scorecard-rule-returns-Not-Found-response_955343473/recording.har
@@ -1,6 +1,6 @@
{
"log": {
- "_recordingName": "Service Scorecards/Update an existing scorecard rule returns \"Not Found\" response",
+ "_recordingName": "Scorecards/Update an existing scorecard rule returns \"Not Found\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
diff --git a/examples/v2/scorecards/CreateScorecardCampaign.ts b/examples/v2/scorecards/CreateScorecardCampaign.ts
new file mode 100644
index 000000000000..787e4f3d313f
--- /dev/null
+++ b/examples/v2/scorecards/CreateScorecardCampaign.ts
@@ -0,0 +1,37 @@
+/**
+ * Create a new campaign returns "Created" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+const params: v2.ScorecardsApiCreateScorecardCampaignRequest = {
+ body: {
+ data: {
+ attributes: {
+ description: "Campaign to improve security posture for Q1 2024.",
+ dueDate: new Date(2024, 3, 31, 23, 59, 59, 0),
+ entityScope: "kind:service AND team:platform",
+ guidance: "Please ensure all services pass the security requirements.",
+ key: "q1-security-2024",
+ name: "Q1 Security Campaign",
+ ownerId: "550e8400-e29b-41d4-a716-446655440000",
+ ruleIds: ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"],
+ startDate: new Date(2024, 1, 1, 0, 0, 0, 0),
+ status: "in_progress",
+ },
+ type: "campaign",
+ },
+ },
+};
+
+apiInstance
+ .createScorecardCampaign(params)
+ .then((data: v2.CampaignResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.ts b/examples/v2/scorecards/CreateScorecardOutcomesBatch.ts
similarity index 87%
rename from examples/v2/service-scorecards/CreateScorecardOutcomesBatch.ts
rename to examples/v2/scorecards/CreateScorecardOutcomesBatch.ts
index 716fcea679e6..6ad860aadb37 100644
--- a/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.ts
+++ b/examples/v2/scorecards/CreateScorecardOutcomesBatch.ts
@@ -6,13 +6,13 @@ import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
configuration.unstableOperations["v2.createScorecardOutcomesBatch"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
// there is a valid "create_scorecard_rule" in the system
const CREATE_SCORECARD_RULE_DATA_ID = process.env
.CREATE_SCORECARD_RULE_DATA_ID as string;
-const params: v2.ServiceScorecardsApiCreateScorecardOutcomesBatchRequest = {
+const params: v2.ScorecardsApiCreateScorecardOutcomesBatchRequest = {
body: {
data: {
attributes: {
diff --git a/examples/v2/service-scorecards/CreateScorecardRule.ts b/examples/v2/scorecards/CreateScorecardRule.ts
similarity index 70%
rename from examples/v2/service-scorecards/CreateScorecardRule.ts
rename to examples/v2/scorecards/CreateScorecardRule.ts
index 84569295c9c5..e0acf511185c 100644
--- a/examples/v2/service-scorecards/CreateScorecardRule.ts
+++ b/examples/v2/scorecards/CreateScorecardRule.ts
@@ -5,15 +5,14 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.createScorecardRule"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
-const params: v2.ServiceScorecardsApiCreateScorecardRuleRequest = {
+const params: v2.ScorecardsApiCreateScorecardRuleRequest = {
body: {
data: {
attributes: {
enabled: true,
- name: "Example-Service-Scorecard",
+ name: "Example-Scorecard",
scorecardName: "Observability Best Practices",
},
type: "rule",
diff --git a/examples/v2/scorecards/DeleteScorecardCampaign.ts b/examples/v2/scorecards/DeleteScorecardCampaign.ts
new file mode 100644
index 000000000000..92ae142cfd9c
--- /dev/null
+++ b/examples/v2/scorecards/DeleteScorecardCampaign.ts
@@ -0,0 +1,21 @@
+/**
+ * Delete a campaign returns "No Content" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+const params: v2.ScorecardsApiDeleteScorecardCampaignRequest = {
+ campaignId: "c10ODp0VCrrIpXmz",
+};
+
+apiInstance
+ .deleteScorecardCampaign(params)
+ .then((data: any) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/DeleteScorecardRule.ts b/examples/v2/scorecards/DeleteScorecardRule.ts
similarity index 74%
rename from examples/v2/service-scorecards/DeleteScorecardRule.ts
rename to examples/v2/scorecards/DeleteScorecardRule.ts
index f142d65663f8..c36cc79de7b7 100644
--- a/examples/v2/service-scorecards/DeleteScorecardRule.ts
+++ b/examples/v2/scorecards/DeleteScorecardRule.ts
@@ -5,14 +5,13 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.deleteScorecardRule"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
// there is a valid "create_scorecard_rule" in the system
const CREATE_SCORECARD_RULE_DATA_ID = process.env
.CREATE_SCORECARD_RULE_DATA_ID as string;
-const params: v2.ServiceScorecardsApiDeleteScorecardRuleRequest = {
+const params: v2.ScorecardsApiDeleteScorecardRuleRequest = {
ruleId: CREATE_SCORECARD_RULE_DATA_ID,
};
diff --git a/examples/v2/scorecards/GetScorecardCampaign.ts b/examples/v2/scorecards/GetScorecardCampaign.ts
new file mode 100644
index 000000000000..4370fcede65e
--- /dev/null
+++ b/examples/v2/scorecards/GetScorecardCampaign.ts
@@ -0,0 +1,21 @@
+/**
+ * Get a campaign returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+const params: v2.ScorecardsApiGetScorecardCampaignRequest = {
+ campaignId: "c10ODp0VCrrIpXmz",
+};
+
+apiInstance
+ .getScorecardCampaign(params)
+ .then((data: v2.CampaignResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/scorecards/ListScorecardCampaigns.ts b/examples/v2/scorecards/ListScorecardCampaigns.ts
new file mode 100644
index 000000000000..d65306c858c3
--- /dev/null
+++ b/examples/v2/scorecards/ListScorecardCampaigns.ts
@@ -0,0 +1,17 @@
+/**
+ * List all campaigns returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+apiInstance
+ .listScorecardCampaigns()
+ .then((data: v2.ListCampaignsResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/ListScorecardOutcomes.ts b/examples/v2/scorecards/ListScorecardOutcomes.ts
similarity index 74%
rename from examples/v2/service-scorecards/ListScorecardOutcomes.ts
rename to examples/v2/scorecards/ListScorecardOutcomes.ts
index 73c6c26160b2..81dd95c73b1e 100644
--- a/examples/v2/service-scorecards/ListScorecardOutcomes.ts
+++ b/examples/v2/scorecards/ListScorecardOutcomes.ts
@@ -5,8 +5,7 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardOutcomes"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
apiInstance
.listScorecardOutcomes()
diff --git a/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.ts b/examples/v2/scorecards/ListScorecardOutcomes_2663454275.ts
similarity index 70%
rename from examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.ts
rename to examples/v2/scorecards/ListScorecardOutcomes_2663454275.ts
index a7bca0c77d11..93bcacffdaae 100644
--- a/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.ts
+++ b/examples/v2/scorecards/ListScorecardOutcomes_2663454275.ts
@@ -5,10 +5,9 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardOutcomes"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
-const params: v2.ServiceScorecardsApiListScorecardOutcomesRequest = {
+const params: v2.ScorecardsApiListScorecardOutcomesRequest = {
pageSize: 2,
fieldsOutcome: "state",
filterOutcomeServiceName: "my-service",
diff --git a/examples/v2/service-scorecards/ListScorecardRules.ts b/examples/v2/scorecards/ListScorecardRules.ts
similarity index 74%
rename from examples/v2/service-scorecards/ListScorecardRules.ts
rename to examples/v2/scorecards/ListScorecardRules.ts
index 242cc89ff42d..2adac5694f02 100644
--- a/examples/v2/service-scorecards/ListScorecardRules.ts
+++ b/examples/v2/scorecards/ListScorecardRules.ts
@@ -5,8 +5,7 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardRules"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
apiInstance
.listScorecardRules()
diff --git a/examples/v2/service-scorecards/ListScorecardRules_4057666343.ts b/examples/v2/scorecards/ListScorecardRules_4057666343.ts
similarity index 69%
rename from examples/v2/service-scorecards/ListScorecardRules_4057666343.ts
rename to examples/v2/scorecards/ListScorecardRules_4057666343.ts
index 5bdbf06edfee..a09bf023e3cc 100644
--- a/examples/v2/service-scorecards/ListScorecardRules_4057666343.ts
+++ b/examples/v2/scorecards/ListScorecardRules_4057666343.ts
@@ -5,10 +5,9 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.listScorecardRules"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
-const params: v2.ServiceScorecardsApiListScorecardRulesRequest = {
+const params: v2.ScorecardsApiListScorecardRulesRequest = {
pageSize: 2,
filterRuleCustom: true,
fieldsRule: "name",
diff --git a/examples/v2/scorecards/ListScorecards.ts b/examples/v2/scorecards/ListScorecards.ts
new file mode 100644
index 000000000000..e00bfe18ae95
--- /dev/null
+++ b/examples/v2/scorecards/ListScorecards.ts
@@ -0,0 +1,17 @@
+/**
+ * List all scorecards returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+apiInstance
+ .listScorecards()
+ .then((data: v2.ListScorecardsResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/scorecards/UpdateScorecardCampaign.ts b/examples/v2/scorecards/UpdateScorecardCampaign.ts
new file mode 100644
index 000000000000..05fd3bed52ec
--- /dev/null
+++ b/examples/v2/scorecards/UpdateScorecardCampaign.ts
@@ -0,0 +1,38 @@
+/**
+ * Update a campaign returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+const params: v2.ScorecardsApiUpdateScorecardCampaignRequest = {
+ body: {
+ data: {
+ attributes: {
+ description: "Campaign to improve security posture for Q1 2024.",
+ dueDate: new Date(2024, 3, 31, 23, 59, 59, 0),
+ entityScope: "kind:service AND team:platform",
+ guidance: "Please ensure all services pass the security requirements.",
+ key: "q1-security-2024",
+ name: "Q1 Security Campaign",
+ ownerId: "550e8400-e29b-41d4-a716-446655440000",
+ ruleIds: ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"],
+ startDate: new Date(2024, 1, 1, 0, 0, 0, 0),
+ status: "in_progress",
+ },
+ type: "campaign",
+ },
+ },
+ campaignId: "c10ODp0VCrrIpXmz",
+};
+
+apiInstance
+ .updateScorecardCampaign(params)
+ .then((data: v2.CampaignResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/scorecards/UpdateScorecardOutcomes.ts b/examples/v2/scorecards/UpdateScorecardOutcomes.ts
new file mode 100644
index 000000000000..a41644fabbc9
--- /dev/null
+++ b/examples/v2/scorecards/UpdateScorecardOutcomes.ts
@@ -0,0 +1,35 @@
+/**
+ * Update Scorecard outcomes returns "Accepted" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+const params: v2.ScorecardsApiUpdateScorecardOutcomesRequest = {
+ body: {
+ data: {
+ attributes: {
+ results: [
+ {
+ entityReference: "service:my-service",
+ remarks: `See: Services`,
+ ruleId: "q8MQxk8TCqrHnWkx",
+ state: "pass",
+ },
+ ],
+ },
+ type: "batched-outcome",
+ },
+ },
+};
+
+apiInstance
+ .updateScorecardOutcomes(params)
+ .then((data: any) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/UpdateScorecardOutcomesAsync.ts b/examples/v2/scorecards/UpdateScorecardOutcomes_2262047257.ts
similarity index 77%
rename from examples/v2/service-scorecards/UpdateScorecardOutcomesAsync.ts
rename to examples/v2/scorecards/UpdateScorecardOutcomes_2262047257.ts
index 1e58536127f9..813459e2960a 100644
--- a/examples/v2/service-scorecards/UpdateScorecardOutcomesAsync.ts
+++ b/examples/v2/scorecards/UpdateScorecardOutcomes_2262047257.ts
@@ -5,14 +5,13 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateScorecardOutcomesAsync"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
// there is a valid "create_scorecard_rule" in the system
const CREATE_SCORECARD_RULE_DATA_ID = process.env
.CREATE_SCORECARD_RULE_DATA_ID as string;
-const params: v2.ServiceScorecardsApiUpdateScorecardOutcomesAsyncRequest = {
+const params: v2.ScorecardsApiUpdateScorecardOutcomesRequest = {
body: {
data: {
attributes: {
@@ -31,7 +30,7 @@ const params: v2.ServiceScorecardsApiUpdateScorecardOutcomesAsyncRequest = {
};
apiInstance
- .updateScorecardOutcomesAsync(params)
+ .updateScorecardOutcomes(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
diff --git a/examples/v2/scorecards/UpdateScorecardRule.ts b/examples/v2/scorecards/UpdateScorecardRule.ts
new file mode 100644
index 000000000000..af625827d878
--- /dev/null
+++ b/examples/v2/scorecards/UpdateScorecardRule.ts
@@ -0,0 +1,33 @@
+/**
+ * Update an existing scorecard rule returns "Rule updated successfully" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.ScorecardsApi(configuration);
+
+const params: v2.ScorecardsApiUpdateScorecardRuleRequest = {
+ body: {
+ data: {
+ attributes: {
+ enabled: true,
+ level: 2,
+ name: "Team Defined",
+ scopeQuery: "kind:service",
+ scorecardName: "Deployments automated via Deployment Trains",
+ },
+ type: "rule",
+ },
+ },
+ ruleId: "rule_id",
+};
+
+apiInstance
+ .updateScorecardRule(params)
+ .then((data: v2.UpdateRuleResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/service-scorecards/UpdateScorecardRule.ts b/examples/v2/scorecards/UpdateScorecardRule_1831541184.ts
similarity index 85%
rename from examples/v2/service-scorecards/UpdateScorecardRule.ts
rename to examples/v2/scorecards/UpdateScorecardRule_1831541184.ts
index 484c7282316a..b7d8770ca4b6 100644
--- a/examples/v2/service-scorecards/UpdateScorecardRule.ts
+++ b/examples/v2/scorecards/UpdateScorecardRule_1831541184.ts
@@ -5,8 +5,7 @@
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration();
-configuration.unstableOperations["v2.updateScorecardRule"] = true;
-const apiInstance = new v2.ServiceScorecardsApi(configuration);
+const apiInstance = new v2.ScorecardsApi(configuration);
// there is a valid "create_scorecard_rule" in the system
const CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_NAME = process.env
@@ -16,9 +15,10 @@ const CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_SCORECARD_NAME = process.env
const CREATE_SCORECARD_RULE_DATA_ID = process.env
.CREATE_SCORECARD_RULE_DATA_ID as string;
-const params: v2.ServiceScorecardsApiUpdateScorecardRuleRequest = {
+const params: v2.ScorecardsApiUpdateScorecardRuleRequest = {
body: {
data: {
+ type: "rule",
attributes: {
enabled: true,
name: CREATE_SCORECARD_RULE_DATA_ATTRIBUTES_NAME,
diff --git a/examples/v2/widgets/CreateWidget.ts b/examples/v2/widgets/CreateWidget.ts
new file mode 100644
index 000000000000..fca2cd11e170
--- /dev/null
+++ b/examples/v2/widgets/CreateWidget.ts
@@ -0,0 +1,33 @@
+/**
+ * Create a widget returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.WidgetsApi(configuration);
+
+const params: v2.WidgetsApiCreateWidgetRequest = {
+ body: {
+ data: {
+ attributes: {
+ definition: {
+ title: "My Widget",
+ type: "bar_chart",
+ },
+ tags: [],
+ },
+ type: "widgets",
+ },
+ },
+ experienceType: "ccm_reports",
+};
+
+apiInstance
+ .createWidget(params)
+ .then((data: v2.WidgetResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/widgets/DeleteWidget.ts b/examples/v2/widgets/DeleteWidget.ts
new file mode 100644
index 000000000000..876e8072c8c6
--- /dev/null
+++ b/examples/v2/widgets/DeleteWidget.ts
@@ -0,0 +1,22 @@
+/**
+ * Delete a widget returns "No Content" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.WidgetsApi(configuration);
+
+const params: v2.WidgetsApiDeleteWidgetRequest = {
+ experienceType: "ccm_reports",
+ uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
+};
+
+apiInstance
+ .deleteWidget(params)
+ .then((data: any) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/widgets/GetWidget.ts b/examples/v2/widgets/GetWidget.ts
new file mode 100644
index 000000000000..67ba6df36f7f
--- /dev/null
+++ b/examples/v2/widgets/GetWidget.ts
@@ -0,0 +1,22 @@
+/**
+ * Get a widget returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.WidgetsApi(configuration);
+
+const params: v2.WidgetsApiGetWidgetRequest = {
+ experienceType: "ccm_reports",
+ uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
+};
+
+apiInstance
+ .getWidget(params)
+ .then((data: v2.WidgetResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/widgets/SearchWidgets.ts b/examples/v2/widgets/SearchWidgets.ts
new file mode 100644
index 000000000000..3ef86a402a23
--- /dev/null
+++ b/examples/v2/widgets/SearchWidgets.ts
@@ -0,0 +1,21 @@
+/**
+ * Search widgets returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.WidgetsApi(configuration);
+
+const params: v2.WidgetsApiSearchWidgetsRequest = {
+ experienceType: "ccm_reports",
+};
+
+apiInstance
+ .searchWidgets(params)
+ .then((data: v2.WidgetListResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/examples/v2/widgets/UpdateWidget.ts b/examples/v2/widgets/UpdateWidget.ts
new file mode 100644
index 000000000000..ce47306b0bee
--- /dev/null
+++ b/examples/v2/widgets/UpdateWidget.ts
@@ -0,0 +1,34 @@
+/**
+ * Update a widget returns "OK" response
+ */
+
+import { client, v2 } from "@datadog/datadog-api-client";
+
+const configuration = client.createConfiguration();
+const apiInstance = new v2.WidgetsApi(configuration);
+
+const params: v2.WidgetsApiUpdateWidgetRequest = {
+ body: {
+ data: {
+ attributes: {
+ definition: {
+ title: "My Widget",
+ type: "bar_chart",
+ },
+ tags: [],
+ },
+ type: "widgets",
+ },
+ },
+ experienceType: "ccm_reports",
+ uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
+};
+
+apiInstance
+ .updateWidget(params)
+ .then((data: v2.WidgetResponse) => {
+ console.log(
+ "API called successfully. Returned data: " + JSON.stringify(data)
+ );
+ })
+ .catch((error: any) => console.error(error));
diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts
index 777bb863a27b..de2d87717437 100644
--- a/features/support/scenarios_model_mapping.ts
+++ b/features/support/scenarios_model_mapping.ts
@@ -10099,6 +10099,69 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "ViewershipHistorySessionArray",
},
+ "v2.ListScorecardCampaigns": {
+ "pageLimit": {
+ "type": "number",
+ "format": "int64",
+ },
+ "pageOffset": {
+ "type": "number",
+ "format": "int64",
+ },
+ "filterCampaignName": {
+ "type": "string",
+ "format": "",
+ },
+ "filterCampaignStatus": {
+ "type": "string",
+ "format": "",
+ },
+ "filterCampaignOwner": {
+ "type": "string",
+ "format": "",
+ },
+ "operationResponseType": "ListCampaignsResponse",
+ },
+ "v2.CreateScorecardCampaign": {
+ "body": {
+ "type": "CreateCampaignRequest",
+ "format": "",
+ },
+ "operationResponseType": "CampaignResponse",
+ },
+ "v2.GetScorecardCampaign": {
+ "campaignId": {
+ "type": "string",
+ "format": "",
+ },
+ "include": {
+ "type": "string",
+ "format": "",
+ },
+ "includeMeta": {
+ "type": "boolean",
+ "format": "",
+ },
+ "operationResponseType": "CampaignResponse",
+ },
+ "v2.UpdateScorecardCampaign": {
+ "campaignId": {
+ "type": "string",
+ "format": "",
+ },
+ "body": {
+ "type": "UpdateCampaignRequest",
+ "format": "",
+ },
+ "operationResponseType": "CampaignResponse",
+ },
+ "v2.DeleteScorecardCampaign": {
+ "campaignId": {
+ "type": "string",
+ "format": "",
+ },
+ "operationResponseType": "{}",
+ },
"v2.ListScorecardOutcomes": {
"pageSize": {
"type": "number",
@@ -10142,7 +10205,7 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "OutcomesResponse",
},
- "v2.UpdateScorecardOutcomesAsync": {
+ "v2.UpdateScorecardOutcomes": {
"body": {
"type": "UpdateOutcomesAsyncRequest",
"format": "",
@@ -10224,6 +10287,29 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "{}",
},
+ "v2.ListScorecards": {
+ "pageOffset": {
+ "type": "number",
+ "format": "int64",
+ },
+ "pageSize": {
+ "type": "number",
+ "format": "int64",
+ },
+ "filterScorecardId": {
+ "type": "string",
+ "format": "",
+ },
+ "filterScorecardName": {
+ "type": "string",
+ "format": "",
+ },
+ "filterScorecardDescription": {
+ "type": "string",
+ "format": "",
+ },
+ "operationResponseType": "ListScorecardsResponse",
+ },
"v2.GetSeatsUsers": {
"productCode": {
"type": "string",
@@ -11751,6 +11837,93 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "PermissionsResponse",
},
+ "v2.SearchWidgets": {
+ "experienceType": {
+ "type": "WidgetExperienceType",
+ "format": "",
+ },
+ "filterWidgetType": {
+ "type": "WidgetType",
+ "format": "",
+ },
+ "filterCreatorHandle": {
+ "type": "string",
+ "format": "",
+ },
+ "filterIsFavorited": {
+ "type": "boolean",
+ "format": "",
+ },
+ "filterTitle": {
+ "type": "string",
+ "format": "",
+ },
+ "filterTags": {
+ "type": "string",
+ "format": "",
+ },
+ "sort": {
+ "type": "string",
+ "format": "",
+ },
+ "pageNumber": {
+ "type": "number",
+ "format": "",
+ },
+ "pageSize": {
+ "type": "number",
+ "format": "",
+ },
+ "operationResponseType": "WidgetListResponse",
+ },
+ "v2.CreateWidget": {
+ "experienceType": {
+ "type": "WidgetExperienceType",
+ "format": "",
+ },
+ "body": {
+ "type": "CreateOrUpdateWidgetRequest",
+ "format": "",
+ },
+ "operationResponseType": "WidgetResponse",
+ },
+ "v2.GetWidget": {
+ "experienceType": {
+ "type": "WidgetExperienceType",
+ "format": "",
+ },
+ "uuid": {
+ "type": "string",
+ "format": "uuid",
+ },
+ "operationResponseType": "WidgetResponse",
+ },
+ "v2.UpdateWidget": {
+ "experienceType": {
+ "type": "WidgetExperienceType",
+ "format": "",
+ },
+ "uuid": {
+ "type": "string",
+ "format": "uuid",
+ },
+ "body": {
+ "type": "CreateOrUpdateWidgetRequest",
+ "format": "",
+ },
+ "operationResponseType": "WidgetResponse",
+ },
+ "v2.DeleteWidget": {
+ "experienceType": {
+ "type": "WidgetExperienceType",
+ "format": "",
+ },
+ "uuid": {
+ "type": "string",
+ "format": "uuid",
+ },
+ "operationResponseType": "{}",
+ },
"v2.CreateWorkflow": {
"body": {
"type": "CreateWorkflowRequest",
diff --git a/features/v2/given.json b/features/v2/given.json
index 6c42beffa17f..57ed25bf71ac 100644
--- a/features/v2/given.json
+++ b/features/v2/given.json
@@ -1066,7 +1066,7 @@
],
"step": "there is a valid \"create_scorecard_rule\" in the system",
"key": "create_scorecard_rule",
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"operationId": "CreateScorecardRule"
},
{
diff --git a/features/v2/scorecards.feature b/features/v2/scorecards.feature
new file mode 100644
index 000000000000..750948d89919
--- /dev/null
+++ b/features/v2/scorecards.feature
@@ -0,0 +1,289 @@
+@endpoint(scorecards) @endpoint(scorecards-v2)
+Feature: Scorecards
+ API to create and update scorecard rules and outcomes. See
+ [Scorecards](https://docs.datadoghq.com/service_catalog/scorecards) for
+ more information.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "Scorecards" API
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Create a new campaign returns "Bad Request" response
+ Given new "CreateScorecardCampaign" request
+ And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Create a new campaign returns "Created" response
+ Given new "CreateScorecardCampaign" request
+ And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
+ When the request is sent
+ Then the response status is 201 Created
+
+ @team:DataDog/service-catalog
+ Scenario: Create a new rule returns "Bad Request" response
+ Given new "CreateScorecardRule" request
+ And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/service-catalog
+ Scenario: Create a new rule returns "Created" response
+ Given new "CreateScorecardRule" request
+ And body with value {"data": {"attributes": {"enabled": true, "name": "{{unique}}", "scorecard_name": "Observability Best Practices"}, "type": "rule"}}
+ When the request is sent
+ Then the response status is 201 Created
+ And the response "data.attributes.scorecard_name" is equal to "Observability Best Practices"
+ And the response "data.relationships.scorecard.data" has field "id"
+
+ @team:DataDog/service-catalog
+ Scenario: Create outcomes batch returns "Bad Request" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And operation "CreateScorecardOutcomesBatch" enabled
+ And new "CreateScorecardOutcomesBatch" request
+ And body with value {"data": {"attributes": {"results": [{"remarks": "See: Services", "rule_id": "{{ create_scorecard_rule.data.id }}", "state": "pass", "service_name": ""}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/service-catalog
+ Scenario: Create outcomes batch returns "OK" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And operation "CreateScorecardOutcomesBatch" enabled
+ And new "CreateScorecardOutcomesBatch" request
+ And body with value {"data": {"attributes": {"results": [{"remarks": "See: Services", "rule_id": "{{ create_scorecard_rule.data.id }}", "service_name": "my-service", "state": "pass"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Delete a campaign returns "Bad Request" response
+ Given new "DeleteScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Delete a campaign returns "No Content" response
+ Given new "DeleteScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 204 No Content
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Delete a campaign returns "Not Found" response
+ Given new "DeleteScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Delete a rule returns "Bad Request" response
+ Given new "DeleteScorecardRule" request
+ And request contains "rule_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/service-catalog
+ Scenario: Delete a rule returns "Not Found" response
+ Given new "DeleteScorecardRule" request
+ And request contains "rule_id" parameter with value "2a4f524e-168a-429d-bb75-7b1ffeab0cbb"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/service-catalog
+ Scenario: Delete a rule returns "OK" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And new "DeleteScorecardRule" request
+ And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
+ When the request is sent
+ Then the response status is 204 OK
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Get a campaign returns "Bad Request" response
+ Given new "GetScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Get a campaign returns "Not Found" response
+ Given new "GetScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Get a campaign returns "OK" response
+ Given new "GetScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: List all campaigns returns "Bad Request" response
+ Given new "ListScorecardCampaigns" request
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: List all campaigns returns "OK" response
+ Given new "ListScorecardCampaigns" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: List all rule outcomes returns "Bad Request" response
+ Given new "ListScorecardOutcomes" request
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/service-catalog
+ Scenario: List all rule outcomes returns "OK" response
+ Given new "ListScorecardOutcomes" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination
+ Scenario: List all rule outcomes returns "OK" response with pagination
+ Given new "ListScorecardOutcomes" request
+ And request contains "page[size]" parameter with value 2
+ And request contains "fields[outcome]" parameter with value "state"
+ And request contains "filter[outcome][service_name]" parameter with value "my-service"
+ When the request with pagination is sent
+ Then the response status is 200 OK
+ And the response has 2 items
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: List all rules returns "Bad Request" response
+ Given new "ListScorecardRules" request
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/service-catalog
+ Scenario: List all rules returns "OK" response
+ Given new "ListScorecardRules" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination
+ Scenario: List all rules returns "OK" response with pagination
+ Given new "ListScorecardRules" request
+ And request contains "page[size]" parameter with value 2
+ And request contains "fields[rule]" parameter with value "name"
+ And request contains "filter[rule][custom]" parameter with value true
+ When the request with pagination is sent
+ Then the response status is 200 OK
+ And the response has 4 items
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: List all scorecards returns "OK" response
+ Given new "ListScorecards" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @team:DataDog/service-catalog
+ Scenario: Update Scorecard outcomes asynchronously returns "Accepted" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And new "UpdateScorecardOutcomes" request
+ And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "remarks": "See: Services", "state": "pass"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 202 Accepted
+
+ @team:DataDog/service-catalog
+ Scenario: Update Scorecard outcomes asynchronously returns "Bad Request" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And new "UpdateScorecardOutcomes" request
+ And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "state": "INVALID"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+ And the response "errors" has length 1
+ And the response "errors[0]" has field "detail"
+
+ @team:DataDog/service-catalog
+ Scenario: Update Scorecard outcomes asynchronously returns "Conflict" response
+ Given new "UpdateScorecardOutcomes" request
+ And body with value {"data": {"attributes": {"results": [{"rule_id": "INVALID.RULE_ID", "entity_reference": "service:my-service", "remarks": "See: Services", "state": "pass"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 409 Conflict
+ And the response "errors" has length 1
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update Scorecard outcomes returns "Accepted" response
+ Given new "UpdateScorecardOutcomes" request
+ And body with value {"data": {"attributes": {"results": [{"entity_reference": "service:my-service", "remarks": "See: Services", "rule_id": "q8MQxk8TCqrHnWkx", "state": "pass"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 202 Accepted
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update Scorecard outcomes returns "Bad Request" response
+ Given new "UpdateScorecardOutcomes" request
+ And body with value {"data": {"attributes": {"results": [{"entity_reference": "service:my-service", "remarks": "See: Services", "rule_id": "q8MQxk8TCqrHnWkx", "state": "pass"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update Scorecard outcomes returns "Conflict" response
+ Given new "UpdateScorecardOutcomes" request
+ And body with value {"data": {"attributes": {"results": [{"entity_reference": "service:my-service", "remarks": "See: Services", "rule_id": "q8MQxk8TCqrHnWkx", "state": "pass"}]}, "type": "batched-outcome"}}
+ When the request is sent
+ Then the response status is 409 Conflict
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update a campaign returns "Bad Request" response
+ Given new "UpdateScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update a campaign returns "Not Found" response
+ Given new "UpdateScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update a campaign returns "OK" response
+ Given new "UpdateScorecardCampaign" request
+ And request contains "campaign_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"description": "Campaign to improve security posture for Q1 2024.", "due_date": "2024-03-31T23:59:59Z", "entity_scope": "kind:service AND team:platform", "guidance": "Please ensure all services pass the security requirements.", "key": "q1-security-2024", "name": "Q1 Security Campaign", "owner_id": "550e8400-e29b-41d4-a716-446655440000", "rule_ids": ["q8MQxk8TCqrHnWkx", "r9NRyl9UDrsIoXly"], "start_date": "2024-01-01T00:00:00Z", "status": "in_progress"}, "type": "campaign"}}
+ When the request is sent
+ Then the response status is 200 OK
+
+ @team:DataDog/service-catalog
+ Scenario: Update an existing rule returns "Rule updated successfully" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And new "UpdateScorecardRule" request
+ And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
+ And body with value {"data": {"type": "rule", "attributes": {"enabled": true, "name": "{{create_scorecard_rule.data.attributes.name}}", "scorecard_name": "{{create_scorecard_rule.data.attributes.scorecard_name}}", "description": "Updated description via test"}}}
+ When the request is sent
+ Then the response status is 200 Rule updated successfully
+
+ @team:DataDog/service-catalog
+ Scenario: Update an existing scorecard rule returns "Bad Request" response
+ Given there is a valid "create_scorecard_rule" in the system
+ And new "UpdateScorecardRule" request
+ And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
+ And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/service-catalog
+ Scenario: Update an existing scorecard rule returns "Not Found" response
+ Given new "UpdateScorecardRule" request
+ And request contains "rule_id" parameter with value "REPLACE.ME"
+ And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/service-catalog
+ Scenario: Update an existing scorecard rule returns "Rule updated successfully" response
+ Given new "UpdateScorecardRule" request
+ And request contains "rule_id" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scope_query": "kind:service", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}}
+ When the request is sent
+ Then the response status is 200 Rule updated successfully
diff --git a/features/v2/service_scorecards.feature b/features/v2/service_scorecards.feature
deleted file mode 100644
index 387f04cf7113..000000000000
--- a/features/v2/service_scorecards.feature
+++ /dev/null
@@ -1,189 +0,0 @@
-@endpoint(service-scorecards) @endpoint(service-scorecards-v2)
-Feature: Service Scorecards
- API to create and update scorecard rules and outcomes. See [Service
- Scorecards](https://docs.datadoghq.com/service_catalog/scorecards) for
- more information. This feature is currently in BETA. If you have any
- feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
-
- Background:
- Given a valid "apiKeyAuth" key in the system
- And a valid "appKeyAuth" key in the system
- And an instance of "ServiceScorecards" API
-
- @team:DataDog/service-catalog
- Scenario: Create a new rule returns "Bad Request" response
- Given operation "CreateScorecardRule" enabled
- And new "CreateScorecardRule" request
- And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}}
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: Create a new rule returns "Created" response
- Given operation "CreateScorecardRule" enabled
- And new "CreateScorecardRule" request
- And body with value {"data": {"attributes": {"enabled": true, "name": "{{unique}}", "scorecard_name": "Observability Best Practices"}, "type": "rule"}}
- When the request is sent
- Then the response status is 201 Created
- And the response "data.attributes.scorecard_name" is equal to "Observability Best Practices"
- And the response "data.relationships.scorecard.data" has field "id"
-
- @team:DataDog/service-catalog
- Scenario: Create outcomes batch returns "Bad Request" response
- Given there is a valid "create_scorecard_rule" in the system
- And operation "CreateScorecardOutcomesBatch" enabled
- And new "CreateScorecardOutcomesBatch" request
- And body with value {"data": {"attributes": {"results": [{"remarks": "See: Services", "rule_id": "{{ create_scorecard_rule.data.id }}", "state": "pass", "service_name": ""}]}, "type": "batched-outcome"}}
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: Create outcomes batch returns "OK" response
- Given there is a valid "create_scorecard_rule" in the system
- And operation "CreateScorecardOutcomesBatch" enabled
- And new "CreateScorecardOutcomesBatch" request
- And body with value {"data": {"attributes": {"results": [{"remarks": "See: Services", "rule_id": "{{ create_scorecard_rule.data.id }}", "service_name": "my-service", "state": "pass"}]}, "type": "batched-outcome"}}
- When the request is sent
- Then the response status is 200 OK
-
- @generated @skip @team:DataDog/service-catalog
- Scenario: Delete a rule returns "Bad Request" response
- Given operation "DeleteScorecardRule" enabled
- And new "DeleteScorecardRule" request
- And request contains "rule_id" parameter from "REPLACE.ME"
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: Delete a rule returns "Not Found" response
- Given operation "DeleteScorecardRule" enabled
- And new "DeleteScorecardRule" request
- And request contains "rule_id" parameter with value "2a4f524e-168a-429d-bb75-7b1ffeab0cbb"
- When the request is sent
- Then the response status is 404 Not Found
-
- @team:DataDog/service-catalog
- Scenario: Delete a rule returns "OK" response
- Given operation "DeleteScorecardRule" enabled
- And there is a valid "create_scorecard_rule" in the system
- And new "DeleteScorecardRule" request
- And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
- When the request is sent
- Then the response status is 204 OK
-
- @generated @skip @team:DataDog/service-catalog
- Scenario: List all rule outcomes returns "Bad Request" response
- Given operation "ListScorecardOutcomes" enabled
- And new "ListScorecardOutcomes" request
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: List all rule outcomes returns "OK" response
- Given operation "ListScorecardOutcomes" enabled
- And new "ListScorecardOutcomes" request
- When the request is sent
- Then the response status is 200 OK
-
- @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination
- Scenario: List all rule outcomes returns "OK" response with pagination
- Given operation "ListScorecardOutcomes" enabled
- And new "ListScorecardOutcomes" request
- And request contains "page[size]" parameter with value 2
- And request contains "fields[outcome]" parameter with value "state"
- And request contains "filter[outcome][service_name]" parameter with value "my-service"
- When the request with pagination is sent
- Then the response status is 200 OK
- And the response has 2 items
-
- @generated @skip @team:DataDog/service-catalog
- Scenario: List all rules returns "Bad Request" response
- Given operation "ListScorecardRules" enabled
- And new "ListScorecardRules" request
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: List all rules returns "OK" response
- Given operation "ListScorecardRules" enabled
- And new "ListScorecardRules" request
- When the request is sent
- Then the response status is 200 OK
-
- @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination
- Scenario: List all rules returns "OK" response with pagination
- Given operation "ListScorecardRules" enabled
- And new "ListScorecardRules" request
- And request contains "page[size]" parameter with value 2
- And request contains "fields[rule]" parameter with value "name"
- And request contains "filter[rule][custom]" parameter with value true
- When the request with pagination is sent
- Then the response status is 200 OK
- And the response has 4 items
-
- @team:DataDog/service-catalog
- Scenario: Update Scorecard outcomes asynchronously returns "Accepted" response
- Given operation "UpdateScorecardOutcomesAsync" enabled
- And there is a valid "create_scorecard_rule" in the system
- And new "UpdateScorecardOutcomesAsync" request
- And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "remarks": "See: Services", "state": "pass"}]}, "type": "batched-outcome"}}
- When the request is sent
- Then the response status is 202 Accepted
-
- @team:DataDog/service-catalog
- Scenario: Update Scorecard outcomes asynchronously returns "Bad Request" response
- Given operation "UpdateScorecardOutcomesAsync" enabled
- And there is a valid "create_scorecard_rule" in the system
- And new "UpdateScorecardOutcomesAsync" request
- And body with value {"data": {"attributes": {"results": [{"rule_id": "{{create_scorecard_rule.data.id}}", "entity_reference": "service:my-service", "state": "INVALID"}]}, "type": "batched-outcome"}}
- When the request is sent
- Then the response status is 400 Bad Request
- And the response "errors" has length 1
- And the response "errors[0]" has field "detail"
-
- @team:DataDog/service-catalog
- Scenario: Update Scorecard outcomes asynchronously returns "Conflict" response
- Given operation "UpdateScorecardOutcomesAsync" enabled
- And new "UpdateScorecardOutcomesAsync" request
- And body with value {"data": {"attributes": {"results": [{"rule_id": "INVALID.RULE_ID", "entity_reference": "service:my-service", "remarks": "See: Services", "state": "pass"}]}, "type": "batched-outcome"}}
- When the request is sent
- Then the response status is 409 Conflict
- And the response "errors" has length 1
-
- @generated @skip @team:DataDog/service-catalog
- Scenario: Update an existing rule returns "Bad Request" response
- Given operation "UpdateScorecardRule" enabled
- And new "UpdateScorecardRule" request
- And request contains "rule_id" parameter from "REPLACE.ME"
- And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}}
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: Update an existing rule returns "Rule updated successfully" response
- Given operation "UpdateScorecardRule" enabled
- And there is a valid "create_scorecard_rule" in the system
- And new "UpdateScorecardRule" request
- And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
- And body with value {"data": { "attributes" : {"enabled": true, "name": "{{create_scorecard_rule.data.attributes.name}}", "scorecard_name": "{{create_scorecard_rule.data.attributes.scorecard_name}}", "description": "Updated description via test"}}}
- When the request is sent
- Then the response status is 200 Rule updated successfully
-
- @team:DataDog/service-catalog
- Scenario: Update an existing scorecard rule returns "Bad Request" response
- Given operation "UpdateScorecardRule" enabled
- And there is a valid "create_scorecard_rule" in the system
- And new "UpdateScorecardRule" request
- And request contains "rule_id" parameter from "create_scorecard_rule.data.id"
- And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_id": "NOT.FOUND"}, "type": "rule"}}
- When the request is sent
- Then the response status is 400 Bad Request
-
- @team:DataDog/service-catalog
- Scenario: Update an existing scorecard rule returns "Not Found" response
- Given operation "UpdateScorecardRule" enabled
- And new "UpdateScorecardRule" request
- And request contains "rule_id" parameter with value "REPLACE.ME"
- And body with value {"data": {"attributes": {"enabled": true, "level": 2, "name": "Team Defined", "scorecard_name": "Deployments automated via Deployment Trains"}, "type": "rule"}}
- When the request is sent
- Then the response status is 404 Not Found
diff --git a/features/v2/undo.json b/features/v2/undo.json
index 67596e3589cb..2783f30f9e8e 100644
--- a/features/v2/undo.json
+++ b/features/v2/undo.json
@@ -4702,32 +4702,62 @@
"type": "idempotent"
}
},
+ "ListScorecardCampaigns": {
+ "tag": "Scorecards",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "CreateScorecardCampaign": {
+ "tag": "Scorecards",
+ "undo": {
+ "type": "unsafe"
+ }
+ },
+ "DeleteScorecardCampaign": {
+ "tag": "Scorecards",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "GetScorecardCampaign": {
+ "tag": "Scorecards",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "UpdateScorecardCampaign": {
+ "tag": "Scorecards",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
"ListScorecardOutcomes": {
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"undo": {
"type": "safe"
}
},
- "UpdateScorecardOutcomesAsync": {
- "tag": "Service Scorecards",
+ "UpdateScorecardOutcomes": {
+ "tag": "Scorecards",
"undo": {
"type": "idempotent"
}
},
"CreateScorecardOutcomesBatch": {
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"undo": {
"type": "idempotent"
}
},
"ListScorecardRules": {
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"undo": {
"type": "safe"
}
},
"CreateScorecardRule": {
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"undo": {
"operationId": "DeleteScorecardRule",
"parameters": [
@@ -4740,17 +4770,23 @@
}
},
"DeleteScorecardRule": {
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"undo": {
"type": "idempotent"
}
},
"UpdateScorecardRule": {
- "tag": "Service Scorecards",
+ "tag": "Scorecards",
"undo": {
"type": "idempotent"
}
},
+ "ListScorecards": {
+ "tag": "Scorecards",
+ "undo": {
+ "type": "safe"
+ }
+ },
"UnassignSeatsUser": {
"tag": "Seats",
"undo": {
@@ -6356,6 +6392,47 @@
"type": "safe"
}
},
+ "SearchWidgets": {
+ "tag": "Widgets",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "CreateWidget": {
+ "tag": "Widgets",
+ "undo": {
+ "operationId": "DeleteWidget",
+ "parameters": [
+ {
+ "name": "experience_type",
+ "source": "experience_type"
+ },
+ {
+ "name": "uuid",
+ "source": "data.id"
+ }
+ ],
+ "type": "unsafe"
+ }
+ },
+ "DeleteWidget": {
+ "tag": "Widgets",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "GetWidget": {
+ "tag": "Widgets",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "UpdateWidget": {
+ "tag": "Widgets",
+ "undo": {
+ "type": "safe"
+ }
+ },
"CreateWorkflow": {
"tag": "Workflow Automation",
"undo": {
diff --git a/features/v2/widgets.feature b/features/v2/widgets.feature
new file mode 100644
index 000000000000..54b015711565
--- /dev/null
+++ b/features/v2/widgets.feature
@@ -0,0 +1,115 @@
+@endpoint(widgets) @endpoint(widgets-v2)
+Feature: Widgets
+ Create, read, update, and delete saved widgets. Widgets are reusable
+ visualization components stored independently from any dashboard or
+ notebook, partitioned by experience type and identified by a UUID.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "Widgets" API
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Create a widget returns "Bad Request" response
+ Given new "CreateWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Create a widget returns "OK" response
+ Given new "CreateWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}}
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Delete a widget returns "Bad Request" response
+ Given new "DeleteWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Delete a widget returns "No Content" response
+ Given new "DeleteWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 204 No Content
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Delete a widget returns "Not Found" response
+ Given new "DeleteWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Get a widget returns "Bad Request" response
+ Given new "GetWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Get a widget returns "Not Found" response
+ Given new "GetWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Get a widget returns "OK" response
+ Given new "GetWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Search widgets returns "Bad Request" response
+ Given new "SearchWidgets" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Search widgets returns "OK" response
+ Given new "SearchWidgets" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ When the request is sent
+ Then the response status is 200 OK
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Update a widget returns "Bad Request" response
+ Given new "UpdateWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Update a widget returns "Not Found" response
+ Given new "UpdateWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @generated @skip @team:DataDog/reporting-and-sharing
+ Scenario: Update a widget returns "OK" response
+ Given new "UpdateWidget" request
+ And request contains "experience_type" parameter from "REPLACE.ME"
+ And request contains "uuid" parameter from "REPLACE.ME"
+ And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}}
+ When the request is sent
+ Then the response status is 200 OK
diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts
index e1a9ff1d538b..4d3225489179 100644
--- a/packages/datadog-api-client-common/configuration.ts
+++ b/packages/datadog-api-client-common/configuration.ts
@@ -417,12 +417,6 @@ export function createConfiguration(
"v2.queryUsers": false,
"v2.updateConnection": false,
"v2.createScorecardOutcomesBatch": false,
- "v2.createScorecardRule": false,
- "v2.deleteScorecardRule": false,
- "v2.listScorecardOutcomes": false,
- "v2.listScorecardRules": false,
- "v2.updateScorecardOutcomesAsync": false,
- "v2.updateScorecardRule": false,
"v2.listEntityRiskScores": false,
"v2.createIncidentService": false,
"v2.deleteIncidentService": false,
diff --git a/packages/datadog-api-client-v2/apis/ServiceScorecardsApi.ts b/packages/datadog-api-client-v2/apis/ScorecardsApi.ts
similarity index 52%
rename from packages/datadog-api-client-v2/apis/ServiceScorecardsApi.ts
rename to packages/datadog-api-client-v2/apis/ScorecardsApi.ts
index 2b6f0e7ff1eb..61ee6a5e070c 100644
--- a/packages/datadog-api-client-v2/apis/ServiceScorecardsApi.ts
+++ b/packages/datadog-api-client-v2/apis/ScorecardsApi.ts
@@ -17,19 +17,67 @@ import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";
import { APIErrorResponse } from "../models/APIErrorResponse";
+import { CampaignResponse } from "../models/CampaignResponse";
+import { CreateCampaignRequest } from "../models/CreateCampaignRequest";
import { CreateRuleRequest } from "../models/CreateRuleRequest";
import { CreateRuleResponse } from "../models/CreateRuleResponse";
+import { JSONAPIErrorResponse } from "../models/JSONAPIErrorResponse";
+import { ListCampaignsResponse } from "../models/ListCampaignsResponse";
import { ListRulesResponse } from "../models/ListRulesResponse";
import { ListRulesResponseDataItem } from "../models/ListRulesResponseDataItem";
+import { ListScorecardsResponse } from "../models/ListScorecardsResponse";
import { OutcomesBatchRequest } from "../models/OutcomesBatchRequest";
import { OutcomesBatchResponse } from "../models/OutcomesBatchResponse";
import { OutcomesResponse } from "../models/OutcomesResponse";
import { OutcomesResponseDataItem } from "../models/OutcomesResponseDataItem";
+import { UpdateCampaignRequest } from "../models/UpdateCampaignRequest";
import { UpdateOutcomesAsyncRequest } from "../models/UpdateOutcomesAsyncRequest";
import { UpdateRuleRequest } from "../models/UpdateRuleRequest";
import { UpdateRuleResponse } from "../models/UpdateRuleResponse";
-export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
+export class ScorecardsApiRequestFactory extends BaseAPIRequestFactory {
+ public async createScorecardCampaign(
+ body: CreateCampaignRequest,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'body' is not null or undefined
+ if (body === null || body === undefined) {
+ throw new RequiredError("body", "createScorecardCampaign");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/scorecard/campaigns";
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.ScorecardsApi.createScorecardCampaign")
+ .makeRequestContext(localVarPath, HttpMethod.POST);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Body Params
+ const contentType = ObjectSerializer.getPreferredMediaType([
+ "application/json",
+ ]);
+ requestContext.setHeaderParam("Content-Type", contentType);
+ const serializedBody = ObjectSerializer.stringify(
+ ObjectSerializer.serialize(body, "CreateCampaignRequest", ""),
+ contentType
+ );
+ requestContext.setBody(serializedBody);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ "AuthZ",
+ ]);
+
+ return requestContext;
+ }
+
public async createScorecardOutcomesBatch(
body: OutcomesBatchRequest,
_options?: Configuration
@@ -53,7 +101,7 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.createScorecardOutcomesBatch")
+ .getServer("v2.ScorecardsApi.createScorecardOutcomesBatch")
.makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
@@ -85,11 +133,6 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
): Promise {
const _config = _options || this.configuration;
- logger.warn("Using unstable operation 'createScorecardRule'");
- if (!_config.unstableOperations["v2.createScorecardRule"]) {
- throw new Error("Unstable operation 'createScorecardRule' is disabled");
- }
-
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new RequiredError("body", "createScorecardRule");
@@ -100,7 +143,7 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.createScorecardRule")
+ .getServer("v2.ScorecardsApi.createScorecardRule")
.makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
@@ -126,17 +169,46 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
return requestContext;
}
- public async deleteScorecardRule(
- ruleId: string,
+ public async deleteScorecardCampaign(
+ campaignId: string,
_options?: Configuration
): Promise {
const _config = _options || this.configuration;
- logger.warn("Using unstable operation 'deleteScorecardRule'");
- if (!_config.unstableOperations["v2.deleteScorecardRule"]) {
- throw new Error("Unstable operation 'deleteScorecardRule' is disabled");
+ // verify required parameter 'campaignId' is not null or undefined
+ if (campaignId === null || campaignId === undefined) {
+ throw new RequiredError("campaignId", "deleteScorecardCampaign");
}
+ // Path Params
+ const localVarPath = "/api/v2/scorecard/campaigns/{campaign_id}".replace(
+ "{campaign_id}",
+ encodeURIComponent(String(campaignId))
+ );
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.ScorecardsApi.deleteScorecardCampaign")
+ .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ requestContext.setHeaderParam("Accept", "*/*");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ "AuthZ",
+ ]);
+
+ return requestContext;
+ }
+
+ public async deleteScorecardRule(
+ ruleId: string,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
// verify required parameter 'ruleId' is not null or undefined
if (ruleId === null || ruleId === undefined) {
throw new RequiredError("ruleId", "deleteScorecardRule");
@@ -150,7 +222,7 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.deleteScorecardRule")
+ .getServer("v2.ScorecardsApi.deleteScorecardRule")
.makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "*/*");
requestContext.setHttpConfig(_config.httpConfig);
@@ -165,6 +237,125 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
return requestContext;
}
+ public async getScorecardCampaign(
+ campaignId: string,
+ include?: string,
+ includeMeta?: boolean,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'campaignId' is not null or undefined
+ if (campaignId === null || campaignId === undefined) {
+ throw new RequiredError("campaignId", "getScorecardCampaign");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/scorecard/campaigns/{campaign_id}".replace(
+ "{campaign_id}",
+ encodeURIComponent(String(campaignId))
+ );
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.ScorecardsApi.getScorecardCampaign")
+ .makeRequestContext(localVarPath, HttpMethod.GET);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Query Params
+ if (include !== undefined) {
+ requestContext.setQueryParam(
+ "include",
+ ObjectSerializer.serialize(include, "string", ""),
+ ""
+ );
+ }
+ if (includeMeta !== undefined) {
+ requestContext.setQueryParam(
+ "include_meta",
+ ObjectSerializer.serialize(includeMeta, "boolean", ""),
+ ""
+ );
+ }
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ "AuthZ",
+ ]);
+
+ return requestContext;
+ }
+
+ public async listScorecardCampaigns(
+ pageLimit?: number,
+ pageOffset?: number,
+ filterCampaignName?: string,
+ filterCampaignStatus?: string,
+ filterCampaignOwner?: string,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // Path Params
+ const localVarPath = "/api/v2/scorecard/campaigns";
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.ScorecardsApi.listScorecardCampaigns")
+ .makeRequestContext(localVarPath, HttpMethod.GET);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Query Params
+ if (pageLimit !== undefined) {
+ requestContext.setQueryParam(
+ "page[limit]",
+ ObjectSerializer.serialize(pageLimit, "number", "int64"),
+ ""
+ );
+ }
+ if (pageOffset !== undefined) {
+ requestContext.setQueryParam(
+ "page[offset]",
+ ObjectSerializer.serialize(pageOffset, "number", "int64"),
+ ""
+ );
+ }
+ if (filterCampaignName !== undefined) {
+ requestContext.setQueryParam(
+ "filter[campaign][name]",
+ ObjectSerializer.serialize(filterCampaignName, "string", ""),
+ ""
+ );
+ }
+ if (filterCampaignStatus !== undefined) {
+ requestContext.setQueryParam(
+ "filter[campaign][status]",
+ ObjectSerializer.serialize(filterCampaignStatus, "string", ""),
+ ""
+ );
+ }
+ if (filterCampaignOwner !== undefined) {
+ requestContext.setQueryParam(
+ "filter[campaign][owner]",
+ ObjectSerializer.serialize(filterCampaignOwner, "string", ""),
+ ""
+ );
+ }
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ "AuthZ",
+ ]);
+
+ return requestContext;
+ }
+
public async listScorecardOutcomes(
pageSize?: number,
pageOffset?: number,
@@ -180,17 +371,12 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
): Promise {
const _config = _options || this.configuration;
- logger.warn("Using unstable operation 'listScorecardOutcomes'");
- if (!_config.unstableOperations["v2.listScorecardOutcomes"]) {
- throw new Error("Unstable operation 'listScorecardOutcomes' is disabled");
- }
-
// Path Params
const localVarPath = "/api/v2/scorecard/outcomes";
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.listScorecardOutcomes")
+ .getServer("v2.ScorecardsApi.listScorecardOutcomes")
.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
@@ -292,17 +478,12 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
): Promise {
const _config = _options || this.configuration;
- logger.warn("Using unstable operation 'listScorecardRules'");
- if (!_config.unstableOperations["v2.listScorecardRules"]) {
- throw new Error("Unstable operation 'listScorecardRules' is disabled");
- }
-
// Path Params
const localVarPath = "/api/v2/scorecard/rules";
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.listScorecardRules")
+ .getServer("v2.ScorecardsApi.listScorecardRules")
.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
@@ -389,22 +570,133 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
return requestContext;
}
- public async updateScorecardOutcomesAsync(
- body: UpdateOutcomesAsyncRequest,
+ public async listScorecards(
+ pageOffset?: number,
+ pageSize?: number,
+ filterScorecardId?: string,
+ filterScorecardName?: string,
+ filterScorecardDescription?: string,
_options?: Configuration
): Promise {
const _config = _options || this.configuration;
- logger.warn("Using unstable operation 'updateScorecardOutcomesAsync'");
- if (!_config.unstableOperations["v2.updateScorecardOutcomesAsync"]) {
- throw new Error(
- "Unstable operation 'updateScorecardOutcomesAsync' is disabled"
+ // Path Params
+ const localVarPath = "/api/v2/scorecard/scorecards";
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.ScorecardsApi.listScorecards")
+ .makeRequestContext(localVarPath, HttpMethod.GET);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Query Params
+ if (pageOffset !== undefined) {
+ requestContext.setQueryParam(
+ "page[offset]",
+ ObjectSerializer.serialize(pageOffset, "number", "int64"),
+ ""
+ );
+ }
+ if (pageSize !== undefined) {
+ requestContext.setQueryParam(
+ "page[size]",
+ ObjectSerializer.serialize(pageSize, "number", "int64"),
+ ""
+ );
+ }
+ if (filterScorecardId !== undefined) {
+ requestContext.setQueryParam(
+ "filter[scorecard][id]",
+ ObjectSerializer.serialize(filterScorecardId, "string", ""),
+ ""
+ );
+ }
+ if (filterScorecardName !== undefined) {
+ requestContext.setQueryParam(
+ "filter[scorecard][name]",
+ ObjectSerializer.serialize(filterScorecardName, "string", ""),
+ ""
+ );
+ }
+ if (filterScorecardDescription !== undefined) {
+ requestContext.setQueryParam(
+ "filter[scorecard][description]",
+ ObjectSerializer.serialize(filterScorecardDescription, "string", ""),
+ ""
);
}
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ "AuthZ",
+ ]);
+
+ return requestContext;
+ }
+
+ public async updateScorecardCampaign(
+ campaignId: string,
+ body: UpdateCampaignRequest,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'campaignId' is not null or undefined
+ if (campaignId === null || campaignId === undefined) {
+ throw new RequiredError("campaignId", "updateScorecardCampaign");
+ }
+
+ // verify required parameter 'body' is not null or undefined
+ if (body === null || body === undefined) {
+ throw new RequiredError("body", "updateScorecardCampaign");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/scorecard/campaigns/{campaign_id}".replace(
+ "{campaign_id}",
+ encodeURIComponent(String(campaignId))
+ );
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.ScorecardsApi.updateScorecardCampaign")
+ .makeRequestContext(localVarPath, HttpMethod.PUT);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Body Params
+ const contentType = ObjectSerializer.getPreferredMediaType([
+ "application/json",
+ ]);
+ requestContext.setHeaderParam("Content-Type", contentType);
+ const serializedBody = ObjectSerializer.stringify(
+ ObjectSerializer.serialize(body, "UpdateCampaignRequest", ""),
+ contentType
+ );
+ requestContext.setBody(serializedBody);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ "AuthZ",
+ ]);
+
+ return requestContext;
+ }
+
+ public async updateScorecardOutcomes(
+ body: UpdateOutcomesAsyncRequest,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
- throw new RequiredError("body", "updateScorecardOutcomesAsync");
+ throw new RequiredError("body", "updateScorecardOutcomes");
}
// Path Params
@@ -412,7 +704,7 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.updateScorecardOutcomesAsync")
+ .getServer("v2.ScorecardsApi.updateScorecardOutcomes")
.makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "*/*");
requestContext.setHttpConfig(_config.httpConfig);
@@ -445,11 +737,6 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
): Promise {
const _config = _options || this.configuration;
- logger.warn("Using unstable operation 'updateScorecardRule'");
- if (!_config.unstableOperations["v2.updateScorecardRule"]) {
- throw new Error("Unstable operation 'updateScorecardRule' is disabled");
- }
-
// verify required parameter 'ruleId' is not null or undefined
if (ruleId === null || ruleId === undefined) {
throw new RequiredError("ruleId", "updateScorecardRule");
@@ -468,7 +755,7 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
// Make Request Context
const requestContext = _config
- .getServer("v2.ServiceScorecardsApi.updateScorecardRule")
+ .getServer("v2.ScorecardsApi.updateScorecardRule")
.makeRequestContext(localVarPath, HttpMethod.PUT);
requestContext.setHeaderParam("Accept", "application/json");
requestContext.setHttpConfig(_config.httpConfig);
@@ -495,24 +782,105 @@ export class ServiceScorecardsApiRequestFactory extends BaseAPIRequestFactory {
}
}
-export class ServiceScorecardsApiResponseProcessor {
+export class ScorecardsApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
- * @params response Response returned by the server for a request to createScorecardOutcomesBatch
+ * @params response Response returned by the server for a request to createScorecardCampaign
* @throws ApiException if the response code was not in [200, 299]
*/
- public async createScorecardOutcomesBatch(
+ public async createScorecardCampaign(
response: ResponseContext
- ): Promise {
+ ): Promise {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
- if (response.httpStatusCode === 200) {
- const body: OutcomesBatchResponse = ObjectSerializer.deserialize(
+ if (response.httpStatusCode === 201) {
+ const body: CampaignResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "OutcomesBatchResponse"
+ "CampaignResponse"
+ ) as CampaignResponse;
+ return body;
+ }
+ if (response.httpStatusCode === 400 || response.httpStatusCode === 403) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: JSONAPIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "JSONAPIErrorResponse"
+ ) as JSONAPIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(
+ response.httpStatusCode,
+ body
+ );
+ }
+ if (response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: CampaignResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "CampaignResponse",
+ ""
+ ) as CampaignResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to createScorecardOutcomesBatch
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async createScorecardOutcomesBatch(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: OutcomesBatchResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "OutcomesBatchResponse"
) as OutcomesBatchResponse;
return body;
}
@@ -571,11 +939,367 @@ export class ServiceScorecardsApiResponseProcessor {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
- if (response.httpStatusCode === 201) {
- const body: CreateRuleResponse = ObjectSerializer.deserialize(
+ if (response.httpStatusCode === 201) {
+ const body: CreateRuleResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "CreateRuleResponse"
+ ) as CreateRuleResponse;
+ return body;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: CreateRuleResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "CreateRuleResponse",
+ ""
+ ) as CreateRuleResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to deleteScorecardCampaign
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async deleteScorecardCampaign(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 204) {
+ return;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 404
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: JSONAPIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "JSONAPIErrorResponse"
+ ) as JSONAPIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(
+ response.httpStatusCode,
+ body
+ );
+ }
+ if (response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ return;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to deleteScorecardRule
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async deleteScorecardRule(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 204) {
+ return;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 404 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ return;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to getScorecardCampaign
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async getScorecardCampaign(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: CampaignResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "CampaignResponse"
+ ) as CampaignResponse;
+ return body;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 404
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: JSONAPIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "JSONAPIErrorResponse"
+ ) as JSONAPIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(
+ response.httpStatusCode,
+ body
+ );
+ }
+ if (response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: CampaignResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "CampaignResponse",
+ ""
+ ) as CampaignResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to listScorecardCampaigns
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async listScorecardCampaigns(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: ListCampaignsResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "ListCampaignsResponse"
+ ) as ListCampaignsResponse;
+ return body;
+ }
+ if (response.httpStatusCode === 400 || response.httpStatusCode === 403) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: JSONAPIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "JSONAPIErrorResponse"
+ ) as JSONAPIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(
+ response.httpStatusCode,
+ body
+ );
+ }
+ if (response.httpStatusCode === 429) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: ListCampaignsResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "ListCampaignsResponse",
+ ""
+ ) as ListCampaignsResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to listScorecardOutcomes
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async listScorecardOutcomes(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: OutcomesResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "CreateRuleResponse"
- ) as CreateRuleResponse;
+ "OutcomesResponse"
+ ) as OutcomesResponse;
return body;
}
if (
@@ -605,11 +1329,11 @@ export class ServiceScorecardsApiResponseProcessor {
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
- const body: CreateRuleResponse = ObjectSerializer.deserialize(
+ const body: OutcomesResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "CreateRuleResponse",
+ "OutcomesResponse",
""
- ) as CreateRuleResponse;
+ ) as OutcomesResponse;
return body;
}
@@ -624,20 +1348,25 @@ export class ServiceScorecardsApiResponseProcessor {
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
- * @params response Response returned by the server for a request to deleteScorecardRule
+ * @params response Response returned by the server for a request to listScorecardRules
* @throws ApiException if the response code was not in [200, 299]
*/
- public async deleteScorecardRule(response: ResponseContext): Promise {
+ public async listScorecardRules(
+ response: ResponseContext
+ ): Promise {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
- if (response.httpStatusCode === 204) {
- return;
+ if (response.httpStatusCode === 200) {
+ const body: ListRulesResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "ListRulesResponse"
+ ) as ListRulesResponse;
+ return body;
}
if (
response.httpStatusCode === 400 ||
response.httpStatusCode === 403 ||
- response.httpStatusCode === 404 ||
response.httpStatusCode === 429
) {
const bodyText = ObjectSerializer.parse(
@@ -662,7 +1391,12 @@ export class ServiceScorecardsApiResponseProcessor {
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
- return;
+ const body: ListRulesResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "ListRulesResponse",
+ ""
+ ) as ListRulesResponse;
+ return body;
}
const body = (await response.body.text()) || "";
@@ -676,27 +1410,46 @@ export class ServiceScorecardsApiResponseProcessor {
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
- * @params response Response returned by the server for a request to listScorecardOutcomes
+ * @params response Response returned by the server for a request to listScorecards
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listScorecardOutcomes(
+ public async listScorecards(
response: ResponseContext
- ): Promise {
+ ): Promise {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
if (response.httpStatusCode === 200) {
- const body: OutcomesResponse = ObjectSerializer.deserialize(
+ const body: ListScorecardsResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "OutcomesResponse"
- ) as OutcomesResponse;
+ "ListScorecardsResponse"
+ ) as ListScorecardsResponse;
return body;
}
- if (
- response.httpStatusCode === 400 ||
- response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
- ) {
+ if (response.httpStatusCode === 403) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: JSONAPIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "JSONAPIErrorResponse"
+ ) as JSONAPIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(
+ response.httpStatusCode,
+ body
+ );
+ }
+ if (response.httpStatusCode === 429) {
const bodyText = ObjectSerializer.parse(
await response.body.text(),
contentType
@@ -719,11 +1472,11 @@ export class ServiceScorecardsApiResponseProcessor {
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
- const body: OutcomesResponse = ObjectSerializer.deserialize(
+ const body: ListScorecardsResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "OutcomesResponse",
+ "ListScorecardsResponse",
""
- ) as OutcomesResponse;
+ ) as ListScorecardsResponse;
return body;
}
@@ -738,27 +1491,50 @@ export class ServiceScorecardsApiResponseProcessor {
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
- * @params response Response returned by the server for a request to listScorecardRules
+ * @params response Response returned by the server for a request to updateScorecardCampaign
* @throws ApiException if the response code was not in [200, 299]
*/
- public async listScorecardRules(
+ public async updateScorecardCampaign(
response: ResponseContext
- ): Promise {
+ ): Promise {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
if (response.httpStatusCode === 200) {
- const body: ListRulesResponse = ObjectSerializer.deserialize(
+ const body: CampaignResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "ListRulesResponse"
- ) as ListRulesResponse;
+ "CampaignResponse"
+ ) as CampaignResponse;
return body;
}
if (
response.httpStatusCode === 400 ||
response.httpStatusCode === 403 ||
- response.httpStatusCode === 429
+ response.httpStatusCode === 404
) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: JSONAPIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "JSONAPIErrorResponse"
+ ) as JSONAPIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(
+ response.httpStatusCode,
+ body
+ );
+ }
+ if (response.httpStatusCode === 429) {
const bodyText = ObjectSerializer.parse(
await response.body.text(),
contentType
@@ -781,11 +1557,11 @@ export class ServiceScorecardsApiResponseProcessor {
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
- const body: ListRulesResponse = ObjectSerializer.deserialize(
+ const body: CampaignResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
- "ListRulesResponse",
+ "CampaignResponse",
""
- ) as ListRulesResponse;
+ ) as CampaignResponse;
return body;
}
@@ -800,10 +1576,10 @@ export class ServiceScorecardsApiResponseProcessor {
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
- * @params response Response returned by the server for a request to updateScorecardOutcomesAsync
+ * @params response Response returned by the server for a request to updateScorecardOutcomes
* @throws ApiException if the response code was not in [200, 299]
*/
- public async updateScorecardOutcomesAsync(
+ public async updateScorecardOutcomes(
response: ResponseContext
): Promise {
const contentType = ObjectSerializer.normalizeMediaType(
@@ -913,7 +1689,15 @@ export class ServiceScorecardsApiResponseProcessor {
}
}
-export interface ServiceScorecardsApiCreateScorecardOutcomesBatchRequest {
+export interface ScorecardsApiCreateScorecardCampaignRequest {
+ /**
+ * Campaign data.
+ * @type CreateCampaignRequest
+ */
+ body: CreateCampaignRequest;
+}
+
+export interface ScorecardsApiCreateScorecardOutcomesBatchRequest {
/**
* Set of scorecard outcomes.
* @type OutcomesBatchRequest
@@ -921,7 +1705,7 @@ export interface ServiceScorecardsApiCreateScorecardOutcomesBatchRequest {
body: OutcomesBatchRequest;
}
-export interface ServiceScorecardsApiCreateScorecardRuleRequest {
+export interface ScorecardsApiCreateScorecardRuleRequest {
/**
* Rule attributes.
* @type CreateRuleRequest
@@ -929,7 +1713,15 @@ export interface ServiceScorecardsApiCreateScorecardRuleRequest {
body: CreateRuleRequest;
}
-export interface ServiceScorecardsApiDeleteScorecardRuleRequest {
+export interface ScorecardsApiDeleteScorecardCampaignRequest {
+ /**
+ * Campaign ID or key.
+ * @type string
+ */
+ campaignId: string;
+}
+
+export interface ScorecardsApiDeleteScorecardRuleRequest {
/**
* The ID of the rule.
* @type string
@@ -937,7 +1729,53 @@ export interface ServiceScorecardsApiDeleteScorecardRuleRequest {
ruleId: string;
}
-export interface ServiceScorecardsApiListScorecardOutcomesRequest {
+export interface ScorecardsApiGetScorecardCampaignRequest {
+ /**
+ * Campaign ID or key.
+ * @type string
+ */
+ campaignId: string;
+ /**
+ * Include related data (for example, scores).
+ * @type string
+ */
+ include?: string;
+ /**
+ * Include metadata (entity and rule counts).
+ * @type boolean
+ */
+ includeMeta?: boolean;
+}
+
+export interface ScorecardsApiListScorecardCampaignsRequest {
+ /**
+ * Maximum number of campaigns to return.
+ * @type number
+ */
+ pageLimit?: number;
+ /**
+ * Offset for pagination.
+ * @type number
+ */
+ pageOffset?: number;
+ /**
+ * Filter campaigns by name (full-text search).
+ * @type string
+ */
+ filterCampaignName?: string;
+ /**
+ * Filter campaigns by status.
+ * @type string
+ */
+ filterCampaignStatus?: string;
+ /**
+ * Filter campaigns by owner UUID.
+ * @type string
+ */
+ filterCampaignOwner?: string;
+}
+
+export interface ScorecardsApiListScorecardOutcomesRequest {
/**
* Size for a given page. The maximum allowed value is 100.
* @type number
@@ -964,17 +1802,17 @@ export interface ServiceScorecardsApiListScorecardOutcomesRequest {
*/
fieldsRule?: string;
/**
- * Filter the outcomes on a specific service name.
+ * Filter outcomes on a specific service name.
* @type string
*/
filterOutcomeServiceName?: string;
/**
- * Filter the outcomes by a specific state.
+ * Filter outcomes by a specific state.
* @type string
*/
filterOutcomeState?: string;
/**
- * Filter outcomes on whether a rule is enabled/disabled.
+ * Filter outcomes based on whether a rule is enabled or disabled.
* @type boolean
*/
filterRuleEnabled?: boolean;
@@ -990,7 +1828,7 @@ export interface ServiceScorecardsApiListScorecardOutcomesRequest {
filterRuleName?: string;
}
-export interface ServiceScorecardsApiListScorecardRulesRequest {
+export interface ScorecardsApiListScorecardRulesRequest {
/**
* Size for a given page. The maximum allowed value is 100.
* @type number
@@ -1043,7 +1881,48 @@ export interface ServiceScorecardsApiListScorecardRulesRequest {
fieldsScorecard?: string;
}
-export interface ServiceScorecardsApiUpdateScorecardOutcomesAsyncRequest {
+export interface ScorecardsApiListScorecardsRequest {
+ /**
+ * Offset for pagination.
+ * @type number
+ */
+ pageOffset?: number;
+ /**
+ * Maximum number of scorecards to return.
+ * @type number
+ */
+ pageSize?: number;
+ /**
+ * Filter by scorecard ID.
+ * @type string
+ */
+ filterScorecardId?: string;
+ /**
+ * Filter by scorecard name (partial match).
+ * @type string
+ */
+ filterScorecardName?: string;
+ /**
+ * Filter by scorecard description (partial match).
+ * @type string
+ */
+ filterScorecardDescription?: string;
+}
+
+export interface ScorecardsApiUpdateScorecardCampaignRequest {
+ /**
+ * Campaign ID or key.
+ * @type string
+ */
+ campaignId: string;
+ /**
+ * Campaign data.
+ * @type UpdateCampaignRequest
+ */
+ body: UpdateCampaignRequest;
+}
+
+export interface ScorecardsApiUpdateScorecardOutcomesRequest {
/**
* Set of scorecard outcomes.
* @type UpdateOutcomesAsyncRequest
@@ -1051,7 +1930,7 @@ export interface ServiceScorecardsApiUpdateScorecardOutcomesAsyncRequest {
body: UpdateOutcomesAsyncRequest;
}
-export interface ServiceScorecardsApiUpdateScorecardRuleRequest {
+export interface ScorecardsApiUpdateScorecardRuleRequest {
/**
* The ID of the rule.
* @type string
@@ -1064,21 +1943,44 @@ export interface ServiceScorecardsApiUpdateScorecardRuleRequest {
body: UpdateRuleRequest;
}
-export class ServiceScorecardsApi {
- private requestFactory: ServiceScorecardsApiRequestFactory;
- private responseProcessor: ServiceScorecardsApiResponseProcessor;
+export class ScorecardsApi {
+ private requestFactory: ScorecardsApiRequestFactory;
+ private responseProcessor: ScorecardsApiResponseProcessor;
private configuration: Configuration;
public constructor(
configuration: Configuration,
- requestFactory?: ServiceScorecardsApiRequestFactory,
- responseProcessor?: ServiceScorecardsApiResponseProcessor
+ requestFactory?: ScorecardsApiRequestFactory,
+ responseProcessor?: ScorecardsApiResponseProcessor
) {
this.configuration = configuration;
this.requestFactory =
- requestFactory || new ServiceScorecardsApiRequestFactory(configuration);
+ requestFactory || new ScorecardsApiRequestFactory(configuration);
this.responseProcessor =
- responseProcessor || new ServiceScorecardsApiResponseProcessor();
+ responseProcessor || new ScorecardsApiResponseProcessor();
+ }
+
+ /**
+ * Creates a new scorecard campaign.
+ * @param param The request object
+ */
+ public createScorecardCampaign(
+ param: ScorecardsApiCreateScorecardCampaignRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.createScorecardCampaign(
+ param.body,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.createScorecardCampaign(
+ responseContext
+ );
+ });
+ });
}
/**
@@ -1086,7 +1988,7 @@ export class ServiceScorecardsApi {
* @param param The request object
*/
public createScorecardOutcomesBatch(
- param: ServiceScorecardsApiCreateScorecardOutcomesBatchRequest,
+ param: ScorecardsApiCreateScorecardOutcomesBatchRequest,
options?: Configuration
): Promise {
const requestContextPromise =
@@ -1107,7 +2009,7 @@ export class ServiceScorecardsApi {
* @param param The request object
*/
public createScorecardRule(
- param: ServiceScorecardsApiCreateScorecardRuleRequest,
+ param: ScorecardsApiCreateScorecardRuleRequest,
options?: Configuration
): Promise {
const requestContextPromise = this.requestFactory.createScorecardRule(
@@ -1123,12 +2025,35 @@ export class ServiceScorecardsApi {
});
}
+ /**
+ * Deletes a single campaign by ID or key.
+ * @param param The request object
+ */
+ public deleteScorecardCampaign(
+ param: ScorecardsApiDeleteScorecardCampaignRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.deleteScorecardCampaign(
+ param.campaignId,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.deleteScorecardCampaign(
+ responseContext
+ );
+ });
+ });
+ }
+
/**
* Deletes a single rule.
* @param param The request object
*/
public deleteScorecardRule(
- param: ServiceScorecardsApiDeleteScorecardRuleRequest,
+ param: ScorecardsApiDeleteScorecardRuleRequest,
options?: Configuration
): Promise {
const requestContextPromise = this.requestFactory.deleteScorecardRule(
@@ -1144,12 +2069,60 @@ export class ServiceScorecardsApi {
});
}
+ /**
+ * Fetches a single campaign by ID or key.
+ * @param param The request object
+ */
+ public getScorecardCampaign(
+ param: ScorecardsApiGetScorecardCampaignRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.getScorecardCampaign(
+ param.campaignId,
+ param.include,
+ param.includeMeta,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.getScorecardCampaign(responseContext);
+ });
+ });
+ }
+
+ /**
+ * Fetches all scorecard campaigns.
+ * @param param The request object
+ */
+ public listScorecardCampaigns(
+ param: ScorecardsApiListScorecardCampaignsRequest = {},
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.listScorecardCampaigns(
+ param.pageLimit,
+ param.pageOffset,
+ param.filterCampaignName,
+ param.filterCampaignStatus,
+ param.filterCampaignOwner,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.listScorecardCampaigns(responseContext);
+ });
+ });
+ }
+
/**
* Fetches all rule outcomes.
* @param param The request object
*/
public listScorecardOutcomes(
- param: ServiceScorecardsApiListScorecardOutcomesRequest = {},
+ param: ScorecardsApiListScorecardOutcomesRequest = {},
options?: Configuration
): Promise {
const requestContextPromise = this.requestFactory.listScorecardOutcomes(
@@ -1178,7 +2151,7 @@ export class ServiceScorecardsApi {
* Provide a paginated version of listScorecardOutcomes returning a generator with all the items.
*/
public async *listScorecardOutcomesWithPagination(
- param: ServiceScorecardsApiListScorecardOutcomesRequest = {},
+ param: ScorecardsApiListScorecardOutcomesRequest = {},
options?: Configuration
): AsyncGenerator {
let pageSize = 10;
@@ -1231,7 +2204,7 @@ export class ServiceScorecardsApi {
* @param param The request object
*/
public listScorecardRules(
- param: ServiceScorecardsApiListScorecardRulesRequest = {},
+ param: ScorecardsApiListScorecardRulesRequest = {},
options?: Configuration
): Promise {
const requestContextPromise = this.requestFactory.listScorecardRules(
@@ -1260,7 +2233,7 @@ export class ServiceScorecardsApi {
* Provide a paginated version of listScorecardRules returning a generator with all the items.
*/
public async *listScorecardRulesWithPagination(
- param: ServiceScorecardsApiListScorecardRulesRequest = {},
+ param: ScorecardsApiListScorecardRulesRequest = {},
options?: Configuration
): AsyncGenerator {
let pageSize = 10;
@@ -1308,21 +2281,72 @@ export class ServiceScorecardsApi {
}
}
+ /**
+ * Fetches all scorecards.
+ * @param param The request object
+ */
+ public listScorecards(
+ param: ScorecardsApiListScorecardsRequest = {},
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.listScorecards(
+ param.pageOffset,
+ param.pageSize,
+ param.filterScorecardId,
+ param.filterScorecardName,
+ param.filterScorecardDescription,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.listScorecards(responseContext);
+ });
+ });
+ }
+
+ /**
+ * Updates an existing campaign.
+ * @param param The request object
+ */
+ public updateScorecardCampaign(
+ param: ScorecardsApiUpdateScorecardCampaignRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.updateScorecardCampaign(
+ param.campaignId,
+ param.body,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.updateScorecardCampaign(
+ responseContext
+ );
+ });
+ });
+ }
+
/**
* Updates multiple scorecard rule outcomes in a single batched request.
* @param param The request object
*/
- public updateScorecardOutcomesAsync(
- param: ServiceScorecardsApiUpdateScorecardOutcomesAsyncRequest,
+ public updateScorecardOutcomes(
+ param: ScorecardsApiUpdateScorecardOutcomesRequest,
options?: Configuration
): Promise {
- const requestContextPromise =
- this.requestFactory.updateScorecardOutcomesAsync(param.body, options);
+ const requestContextPromise = this.requestFactory.updateScorecardOutcomes(
+ param.body,
+ options
+ );
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
.send(requestContext)
.then((responseContext) => {
- return this.responseProcessor.updateScorecardOutcomesAsync(
+ return this.responseProcessor.updateScorecardOutcomes(
responseContext
);
});
@@ -1334,7 +2358,7 @@ export class ServiceScorecardsApi {
* @param param The request object
*/
public updateScorecardRule(
- param: ServiceScorecardsApiUpdateScorecardRuleRequest,
+ param: ScorecardsApiUpdateScorecardRuleRequest,
options?: Configuration
): Promise {
const requestContextPromise = this.requestFactory.updateScorecardRule(
diff --git a/packages/datadog-api-client-v2/apis/WidgetsApi.ts b/packages/datadog-api-client-v2/apis/WidgetsApi.ts
new file mode 100644
index 000000000000..4693abbd9a60
--- /dev/null
+++ b/packages/datadog-api-client-v2/apis/WidgetsApi.ts
@@ -0,0 +1,850 @@
+import {
+ BaseAPIRequestFactory,
+ RequiredError,
+} from "../../datadog-api-client-common/baseapi";
+import {
+ Configuration,
+ applySecurityAuthentication,
+} from "../../datadog-api-client-common/configuration";
+import {
+ RequestContext,
+ HttpMethod,
+ ResponseContext,
+} from "../../datadog-api-client-common/http/http";
+
+import { logger } from "../../../logger";
+import { ObjectSerializer } from "../models/ObjectSerializer";
+import { ApiException } from "../../datadog-api-client-common/exception";
+
+import { APIErrorResponse } from "../models/APIErrorResponse";
+import { CreateOrUpdateWidgetRequest } from "../models/CreateOrUpdateWidgetRequest";
+import { WidgetExperienceType } from "../models/WidgetExperienceType";
+import { WidgetListResponse } from "../models/WidgetListResponse";
+import { WidgetResponse } from "../models/WidgetResponse";
+import { WidgetType } from "../models/WidgetType";
+
+export class WidgetsApiRequestFactory extends BaseAPIRequestFactory {
+ public async createWidget(
+ experienceType: WidgetExperienceType,
+ body: CreateOrUpdateWidgetRequest,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'experienceType' is not null or undefined
+ if (experienceType === null || experienceType === undefined) {
+ throw new RequiredError("experienceType", "createWidget");
+ }
+
+ // verify required parameter 'body' is not null or undefined
+ if (body === null || body === undefined) {
+ throw new RequiredError("body", "createWidget");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/widgets/{experience_type}".replace(
+ "{experience_type}",
+ encodeURIComponent(String(experienceType))
+ );
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.WidgetsApi.createWidget")
+ .makeRequestContext(localVarPath, HttpMethod.POST);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Body Params
+ const contentType = ObjectSerializer.getPreferredMediaType([
+ "application/json",
+ ]);
+ requestContext.setHeaderParam("Content-Type", contentType);
+ const serializedBody = ObjectSerializer.stringify(
+ ObjectSerializer.serialize(body, "CreateOrUpdateWidgetRequest", ""),
+ contentType
+ );
+ requestContext.setBody(serializedBody);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ ]);
+
+ return requestContext;
+ }
+
+ public async deleteWidget(
+ experienceType: WidgetExperienceType,
+ uuid: string,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'experienceType' is not null or undefined
+ if (experienceType === null || experienceType === undefined) {
+ throw new RequiredError("experienceType", "deleteWidget");
+ }
+
+ // verify required parameter 'uuid' is not null or undefined
+ if (uuid === null || uuid === undefined) {
+ throw new RequiredError("uuid", "deleteWidget");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/widgets/{experience_type}/{uuid}"
+ .replace("{experience_type}", encodeURIComponent(String(experienceType)))
+ .replace("{uuid}", encodeURIComponent(String(uuid)));
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.WidgetsApi.deleteWidget")
+ .makeRequestContext(localVarPath, HttpMethod.DELETE);
+ requestContext.setHeaderParam("Accept", "*/*");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ ]);
+
+ return requestContext;
+ }
+
+ public async getWidget(
+ experienceType: WidgetExperienceType,
+ uuid: string,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'experienceType' is not null or undefined
+ if (experienceType === null || experienceType === undefined) {
+ throw new RequiredError("experienceType", "getWidget");
+ }
+
+ // verify required parameter 'uuid' is not null or undefined
+ if (uuid === null || uuid === undefined) {
+ throw new RequiredError("uuid", "getWidget");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/widgets/{experience_type}/{uuid}"
+ .replace("{experience_type}", encodeURIComponent(String(experienceType)))
+ .replace("{uuid}", encodeURIComponent(String(uuid)));
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.WidgetsApi.getWidget")
+ .makeRequestContext(localVarPath, HttpMethod.GET);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ ]);
+
+ return requestContext;
+ }
+
+ public async searchWidgets(
+ experienceType: WidgetExperienceType,
+ filterWidgetType?: WidgetType,
+ filterCreatorHandle?: string,
+ filterIsFavorited?: boolean,
+ filterTitle?: string,
+ filterTags?: string,
+ sort?: string,
+ pageNumber?: number,
+ pageSize?: number,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'experienceType' is not null or undefined
+ if (experienceType === null || experienceType === undefined) {
+ throw new RequiredError("experienceType", "searchWidgets");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/widgets/{experience_type}".replace(
+ "{experience_type}",
+ encodeURIComponent(String(experienceType))
+ );
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.WidgetsApi.searchWidgets")
+ .makeRequestContext(localVarPath, HttpMethod.GET);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Query Params
+ if (filterWidgetType !== undefined) {
+ requestContext.setQueryParam(
+ "filter[widgetType]",
+ ObjectSerializer.serialize(filterWidgetType, "WidgetType", ""),
+ ""
+ );
+ }
+ if (filterCreatorHandle !== undefined) {
+ requestContext.setQueryParam(
+ "filter[creatorHandle]",
+ ObjectSerializer.serialize(filterCreatorHandle, "string", ""),
+ ""
+ );
+ }
+ if (filterIsFavorited !== undefined) {
+ requestContext.setQueryParam(
+ "filter[isFavorited]",
+ ObjectSerializer.serialize(filterIsFavorited, "boolean", ""),
+ ""
+ );
+ }
+ if (filterTitle !== undefined) {
+ requestContext.setQueryParam(
+ "filter[title]",
+ ObjectSerializer.serialize(filterTitle, "string", ""),
+ ""
+ );
+ }
+ if (filterTags !== undefined) {
+ requestContext.setQueryParam(
+ "filter[tags]",
+ ObjectSerializer.serialize(filterTags, "string", ""),
+ ""
+ );
+ }
+ if (sort !== undefined) {
+ requestContext.setQueryParam(
+ "sort",
+ ObjectSerializer.serialize(sort, "string", ""),
+ ""
+ );
+ }
+ if (pageNumber !== undefined) {
+ requestContext.setQueryParam(
+ "page[number]",
+ ObjectSerializer.serialize(pageNumber, "number", ""),
+ ""
+ );
+ }
+ if (pageSize !== undefined) {
+ requestContext.setQueryParam(
+ "page[size]",
+ ObjectSerializer.serialize(pageSize, "number", ""),
+ ""
+ );
+ }
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ ]);
+
+ return requestContext;
+ }
+
+ public async updateWidget(
+ experienceType: WidgetExperienceType,
+ uuid: string,
+ body: CreateOrUpdateWidgetRequest,
+ _options?: Configuration
+ ): Promise {
+ const _config = _options || this.configuration;
+
+ // verify required parameter 'experienceType' is not null or undefined
+ if (experienceType === null || experienceType === undefined) {
+ throw new RequiredError("experienceType", "updateWidget");
+ }
+
+ // verify required parameter 'uuid' is not null or undefined
+ if (uuid === null || uuid === undefined) {
+ throw new RequiredError("uuid", "updateWidget");
+ }
+
+ // verify required parameter 'body' is not null or undefined
+ if (body === null || body === undefined) {
+ throw new RequiredError("body", "updateWidget");
+ }
+
+ // Path Params
+ const localVarPath = "/api/v2/widgets/{experience_type}/{uuid}"
+ .replace("{experience_type}", encodeURIComponent(String(experienceType)))
+ .replace("{uuid}", encodeURIComponent(String(uuid)));
+
+ // Make Request Context
+ const requestContext = _config
+ .getServer("v2.WidgetsApi.updateWidget")
+ .makeRequestContext(localVarPath, HttpMethod.PUT);
+ requestContext.setHeaderParam("Accept", "application/json");
+ requestContext.setHttpConfig(_config.httpConfig);
+
+ // Body Params
+ const contentType = ObjectSerializer.getPreferredMediaType([
+ "application/json",
+ ]);
+ requestContext.setHeaderParam("Content-Type", contentType);
+ const serializedBody = ObjectSerializer.stringify(
+ ObjectSerializer.serialize(body, "CreateOrUpdateWidgetRequest", ""),
+ contentType
+ );
+ requestContext.setBody(serializedBody);
+
+ // Apply auth methods
+ applySecurityAuthentication(_config, requestContext, [
+ "apiKeyAuth",
+ "appKeyAuth",
+ ]);
+
+ return requestContext;
+ }
+}
+
+export class WidgetsApiResponseProcessor {
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to createWidget
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async createWidget(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: WidgetResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetResponse"
+ ) as WidgetResponse;
+ return body;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: WidgetResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetResponse",
+ ""
+ ) as WidgetResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to deleteWidget
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async deleteWidget(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 204) {
+ return;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 404 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ return;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to getWidget
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async getWidget(response: ResponseContext): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: WidgetResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetResponse"
+ ) as WidgetResponse;
+ return body;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 404 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: WidgetResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetResponse",
+ ""
+ ) as WidgetResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to searchWidgets
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async searchWidgets(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: WidgetListResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetListResponse"
+ ) as WidgetListResponse;
+ return body;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: WidgetListResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetListResponse",
+ ""
+ ) as WidgetListResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+
+ /**
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
+ * to the expected objects
+ *
+ * @params response Response returned by the server for a request to updateWidget
+ * @throws ApiException if the response code was not in [200, 299]
+ */
+ public async updateWidget(
+ response: ResponseContext
+ ): Promise {
+ const contentType = ObjectSerializer.normalizeMediaType(
+ response.headers["content-type"]
+ );
+ if (response.httpStatusCode === 200) {
+ const body: WidgetResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetResponse"
+ ) as WidgetResponse;
+ return body;
+ }
+ if (
+ response.httpStatusCode === 400 ||
+ response.httpStatusCode === 403 ||
+ response.httpStatusCode === 404 ||
+ response.httpStatusCode === 429
+ ) {
+ const bodyText = ObjectSerializer.parse(
+ await response.body.text(),
+ contentType
+ );
+ let body: APIErrorResponse;
+ try {
+ body = ObjectSerializer.deserialize(
+ bodyText,
+ "APIErrorResponse"
+ ) as APIErrorResponse;
+ } catch (error) {
+ logger.debug(`Got error deserializing error: ${error}`);
+ throw new ApiException(
+ response.httpStatusCode,
+ bodyText
+ );
+ }
+ throw new ApiException(response.httpStatusCode, body);
+ }
+
+ // Work around for missing responses in specification, e.g. for petstore.yaml
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
+ const body: WidgetResponse = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(await response.body.text(), contentType),
+ "WidgetResponse",
+ ""
+ ) as WidgetResponse;
+ return body;
+ }
+
+ const body = (await response.body.text()) || "";
+ throw new ApiException(
+ response.httpStatusCode,
+ 'Unknown API Status Code!\nBody: "' + body + '"'
+ );
+ }
+}
+
+export interface WidgetsApiCreateWidgetRequest {
+ /**
+ * The experience type for the widget.
+ * @type WidgetExperienceType
+ */
+ experienceType: WidgetExperienceType;
+ /**
+ * Widget request body.
+ * @type CreateOrUpdateWidgetRequest
+ */
+ body: CreateOrUpdateWidgetRequest;
+}
+
+export interface WidgetsApiDeleteWidgetRequest {
+ /**
+ * The experience type for the widget.
+ * @type WidgetExperienceType
+ */
+ experienceType: WidgetExperienceType;
+ /**
+ * The UUID of the widget.
+ * @type string
+ */
+ uuid: string;
+}
+
+export interface WidgetsApiGetWidgetRequest {
+ /**
+ * The experience type for the widget.
+ * @type WidgetExperienceType
+ */
+ experienceType: WidgetExperienceType;
+ /**
+ * The UUID of the widget.
+ * @type string
+ */
+ uuid: string;
+}
+
+export interface WidgetsApiSearchWidgetsRequest {
+ /**
+ * The experience type for the widget.
+ * @type WidgetExperienceType
+ */
+ experienceType: WidgetExperienceType;
+ /**
+ * Filter widgets by widget type.
+ * @type WidgetType
+ */
+ filterWidgetType?: WidgetType;
+ /**
+ * Filter widgets by the email handle of the creator.
+ * @type string
+ */
+ filterCreatorHandle?: string;
+ /**
+ * Filter to only widgets favorited by the current user.
+ * @type boolean
+ */
+ filterIsFavorited?: boolean;
+ /**
+ * Filter widgets by title (substring match).
+ * @type string
+ */
+ filterTitle?: string;
+ /**
+ * Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`.
+ * @type string
+ */
+ filterTags?: string;
+ /**
+ * Sort field for the results. Prefix with `-` for descending order.
+ * Allowed values: `title`, `created_at`, `modified_at`.
+ * @type string
+ */
+ sort?: string;
+ /**
+ * Page number for pagination (0-indexed).
+ * @type number
+ */
+ pageNumber?: number;
+ /**
+ * Number of widgets per page.
+ * @type number
+ */
+ pageSize?: number;
+}
+
+export interface WidgetsApiUpdateWidgetRequest {
+ /**
+ * The experience type for the widget.
+ * @type WidgetExperienceType
+ */
+ experienceType: WidgetExperienceType;
+ /**
+ * The UUID of the widget.
+ * @type string
+ */
+ uuid: string;
+ /**
+ * Widget request body.
+ * @type CreateOrUpdateWidgetRequest
+ */
+ body: CreateOrUpdateWidgetRequest;
+}
+
+export class WidgetsApi {
+ private requestFactory: WidgetsApiRequestFactory;
+ private responseProcessor: WidgetsApiResponseProcessor;
+ private configuration: Configuration;
+
+ public constructor(
+ configuration: Configuration,
+ requestFactory?: WidgetsApiRequestFactory,
+ responseProcessor?: WidgetsApiResponseProcessor
+ ) {
+ this.configuration = configuration;
+ this.requestFactory =
+ requestFactory || new WidgetsApiRequestFactory(configuration);
+ this.responseProcessor =
+ responseProcessor || new WidgetsApiResponseProcessor();
+ }
+
+ /**
+ * Create a new widget for a given experience type.
+ * @param param The request object
+ */
+ public createWidget(
+ param: WidgetsApiCreateWidgetRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.createWidget(
+ param.experienceType,
+ param.body,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.createWidget(responseContext);
+ });
+ });
+ }
+
+ /**
+ * Soft-delete a widget by its UUID for a given experience type.
+ * @param param The request object
+ */
+ public deleteWidget(
+ param: WidgetsApiDeleteWidgetRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.deleteWidget(
+ param.experienceType,
+ param.uuid,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.deleteWidget(responseContext);
+ });
+ });
+ }
+
+ /**
+ * Retrieve a widget by its UUID for a given experience type.
+ * @param param The request object
+ */
+ public getWidget(
+ param: WidgetsApiGetWidgetRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.getWidget(
+ param.experienceType,
+ param.uuid,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.getWidget(responseContext);
+ });
+ });
+ }
+
+ /**
+ * Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination.
+ * @param param The request object
+ */
+ public searchWidgets(
+ param: WidgetsApiSearchWidgetsRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.searchWidgets(
+ param.experienceType,
+ param.filterWidgetType,
+ param.filterCreatorHandle,
+ param.filterIsFavorited,
+ param.filterTitle,
+ param.filterTags,
+ param.sort,
+ param.pageNumber,
+ param.pageSize,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.searchWidgets(responseContext);
+ });
+ });
+ }
+
+ /**
+ * Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition.
+ * @param param The request object
+ */
+ public updateWidget(
+ param: WidgetsApiUpdateWidgetRequest,
+ options?: Configuration
+ ): Promise {
+ const requestContextPromise = this.requestFactory.updateWidget(
+ param.experienceType,
+ param.uuid,
+ param.body,
+ options
+ );
+ return requestContextPromise.then((requestContext) => {
+ return this.configuration.httpApi
+ .send(requestContext)
+ .then((responseContext) => {
+ return this.responseProcessor.updateWidget(responseContext);
+ });
+ });
+ }
+}
diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts
index 5f7dc60a3853..f8f4bcdafea4 100644
--- a/packages/datadog-api-client-v2/index.ts
+++ b/packages/datadog-api-client-v2/index.ts
@@ -918,6 +918,23 @@ export {
RumRetentionFiltersApi,
} from "./apis/RumRetentionFiltersApi";
+export {
+ ScorecardsApiCreateScorecardCampaignRequest,
+ ScorecardsApiCreateScorecardOutcomesBatchRequest,
+ ScorecardsApiCreateScorecardRuleRequest,
+ ScorecardsApiDeleteScorecardCampaignRequest,
+ ScorecardsApiDeleteScorecardRuleRequest,
+ ScorecardsApiGetScorecardCampaignRequest,
+ ScorecardsApiListScorecardCampaignsRequest,
+ ScorecardsApiListScorecardOutcomesRequest,
+ ScorecardsApiListScorecardRulesRequest,
+ ScorecardsApiListScorecardsRequest,
+ ScorecardsApiUpdateScorecardCampaignRequest,
+ ScorecardsApiUpdateScorecardOutcomesRequest,
+ ScorecardsApiUpdateScorecardRuleRequest,
+ ScorecardsApi,
+} from "./apis/ScorecardsApi";
+
export {
SeatsApiAssignSeatsUserRequest,
SeatsApiGetSeatsUsersRequest,
@@ -1044,17 +1061,6 @@ export {
ServiceLevelObjectivesApi,
} from "./apis/ServiceLevelObjectivesApi";
-export {
- ServiceScorecardsApiCreateScorecardOutcomesBatchRequest,
- ServiceScorecardsApiCreateScorecardRuleRequest,
- ServiceScorecardsApiDeleteScorecardRuleRequest,
- ServiceScorecardsApiListScorecardOutcomesRequest,
- ServiceScorecardsApiListScorecardRulesRequest,
- ServiceScorecardsApiUpdateScorecardOutcomesAsyncRequest,
- ServiceScorecardsApiUpdateScorecardRuleRequest,
- ServiceScorecardsApi,
-} from "./apis/ServiceScorecardsApi";
-
export {
ServiceNowIntegrationApiCreateServiceNowTemplateRequest,
ServiceNowIntegrationApiDeleteServiceNowTemplateRequest,
@@ -1227,6 +1233,15 @@ export {
UsersApi,
} from "./apis/UsersApi";
+export {
+ WidgetsApiCreateWidgetRequest,
+ WidgetsApiDeleteWidgetRequest,
+ WidgetsApiGetWidgetRequest,
+ WidgetsApiSearchWidgetsRequest,
+ WidgetsApiUpdateWidgetRequest,
+ WidgetsApi,
+} from "./apis/WidgetsApi";
+
export {
WorkflowAutomationApiCancelWorkflowInstanceRequest,
WorkflowAutomationApiCreateWorkflowRequest,
@@ -1685,6 +1700,11 @@ export { BulkPutAppsDatastoreItemsRequest } from "./models/BulkPutAppsDatastoreI
export { BulkPutAppsDatastoreItemsRequestData } from "./models/BulkPutAppsDatastoreItemsRequestData";
export { BulkPutAppsDatastoreItemsRequestDataAttributes } from "./models/BulkPutAppsDatastoreItemsRequestDataAttributes";
export { CalculatedField } from "./models/CalculatedField";
+export { CampaignResponse } from "./models/CampaignResponse";
+export { CampaignResponseAttributes } from "./models/CampaignResponseAttributes";
+export { CampaignResponseData } from "./models/CampaignResponseData";
+export { CampaignStatus } from "./models/CampaignStatus";
+export { CampaignType } from "./models/CampaignType";
export { CancelDataDeletionResponseBody } from "./models/CancelDataDeletionResponseBody";
export { Case } from "./models/Case";
export { Case3rdPartyTicketStatus } from "./models/Case3rdPartyTicketStatus";
@@ -2088,6 +2108,9 @@ export { CreateAttachmentRequest } from "./models/CreateAttachmentRequest";
export { CreateAttachmentRequestData } from "./models/CreateAttachmentRequestData";
export { CreateAttachmentRequestDataAttributes } from "./models/CreateAttachmentRequestDataAttributes";
export { CreateAttachmentRequestDataAttributesAttachment } from "./models/CreateAttachmentRequestDataAttributesAttachment";
+export { CreateCampaignRequest } from "./models/CreateCampaignRequest";
+export { CreateCampaignRequestAttributes } from "./models/CreateCampaignRequestAttributes";
+export { CreateCampaignRequestData } from "./models/CreateCampaignRequestData";
export { CreateCaseRequestArray } from "./models/CreateCaseRequestArray";
export { CreateCaseRequestData } from "./models/CreateCaseRequestData";
export { CreateCaseRequestDataAttributes } from "./models/CreateCaseRequestDataAttributes";
@@ -2152,6 +2175,9 @@ export { CreateOnCallNotificationRuleRequestData } from "./models/CreateOnCallNo
export { CreateOpenAPIResponse } from "./models/CreateOpenAPIResponse";
export { CreateOpenAPIResponseAttributes } from "./models/CreateOpenAPIResponseAttributes";
export { CreateOpenAPIResponseData } from "./models/CreateOpenAPIResponseData";
+export { CreateOrUpdateWidgetRequest } from "./models/CreateOrUpdateWidgetRequest";
+export { CreateOrUpdateWidgetRequestAttributes } from "./models/CreateOrUpdateWidgetRequestAttributes";
+export { CreateOrUpdateWidgetRequestData } from "./models/CreateOrUpdateWidgetRequestData";
export { CreatePageRequest } from "./models/CreatePageRequest";
export { CreatePageRequestData } from "./models/CreatePageRequestData";
export { CreatePageRequestDataAttributes } from "./models/CreatePageRequestDataAttributes";
@@ -3446,6 +3472,7 @@ export { ListAppsResponseDataItemsRelationships } from "./models/ListAppsRespons
export { ListAppsResponseMeta } from "./models/ListAppsResponseMeta";
export { ListAppsResponseMetaPage } from "./models/ListAppsResponseMetaPage";
export { ListAssetsSBOMsResponse } from "./models/ListAssetsSBOMsResponse";
+export { ListCampaignsResponse } from "./models/ListCampaignsResponse";
export { ListConnectionsResponse } from "./models/ListConnectionsResponse";
export { ListConnectionsResponseData } from "./models/ListConnectionsResponseData";
export { ListConnectionsResponseDataAttributes } from "./models/ListConnectionsResponseDataAttributes";
@@ -3481,6 +3508,7 @@ export { ListRelationCatalogResponseLinks } from "./models/ListRelationCatalogRe
export { ListRulesResponse } from "./models/ListRulesResponse";
export { ListRulesResponseDataItem } from "./models/ListRulesResponseDataItem";
export { ListRulesResponseLinks } from "./models/ListRulesResponseLinks";
+export { ListScorecardsResponse } from "./models/ListScorecardsResponse";
export { ListSecurityFindingsResponse } from "./models/ListSecurityFindingsResponse";
export { ListTagsResponse } from "./models/ListTagsResponse";
export { ListTagsResponseData } from "./models/ListTagsResponseData";
@@ -4272,6 +4300,7 @@ export { OutputSchema } from "./models/OutputSchema";
export { OutputSchemaParameters } from "./models/OutputSchemaParameters";
export { OutputSchemaParametersType } from "./models/OutputSchemaParametersType";
export { PageUrgency } from "./models/PageUrgency";
+export { PaginatedResponseMeta } from "./models/PaginatedResponseMeta";
export { Pagination } from "./models/Pagination";
export { PaginationMeta } from "./models/PaginationMeta";
export { PaginationMetaPage } from "./models/PaginationMetaPage";
@@ -4639,6 +4668,7 @@ export { RoutingRuleRelationshipsPolicyData } from "./models/RoutingRuleRelation
export { RoutingRuleRelationshipsPolicyDataType } from "./models/RoutingRuleRelationshipsPolicyDataType";
export { RoutingRuleType } from "./models/RoutingRuleType";
export { RuleAttributes } from "./models/RuleAttributes";
+export { RuleAttributesRequest } from "./models/RuleAttributesRequest";
export { RuleOutcomeRelationships } from "./models/RuleOutcomeRelationships";
export { RulesetResp } from "./models/RulesetResp";
export { RulesetRespArray } from "./models/RulesetRespArray";
@@ -4850,6 +4880,9 @@ export { ScheduleUpdateRequestDataType } from "./models/ScheduleUpdateRequestDat
export { ScheduleUser } from "./models/ScheduleUser";
export { ScheduleUserAttributes } from "./models/ScheduleUserAttributes";
export { ScheduleUserType } from "./models/ScheduleUserType";
+export { ScorecardListResponseAttributes } from "./models/ScorecardListResponseAttributes";
+export { ScorecardListResponseData } from "./models/ScorecardListResponseData";
+export { ScorecardListType } from "./models/ScorecardListType";
export { ScorecardType } from "./models/ScorecardType";
export { SearchIssuesIncludeQueryParameterItem } from "./models/SearchIssuesIncludeQueryParameterItem";
export { SeatAssignmentsDataType } from "./models/SeatAssignmentsDataType";
@@ -5688,6 +5721,9 @@ export { UpdateAppsDatastoreItemRequestDataType } from "./models/UpdateAppsDatas
export { UpdateAppsDatastoreRequest } from "./models/UpdateAppsDatastoreRequest";
export { UpdateAppsDatastoreRequestData } from "./models/UpdateAppsDatastoreRequestData";
export { UpdateAppsDatastoreRequestDataAttributes } from "./models/UpdateAppsDatastoreRequestDataAttributes";
+export { UpdateCampaignRequest } from "./models/UpdateCampaignRequest";
+export { UpdateCampaignRequestAttributes } from "./models/UpdateCampaignRequestAttributes";
+export { UpdateCampaignRequestData } from "./models/UpdateCampaignRequestData";
export { UpdateConnectionRequest } from "./models/UpdateConnectionRequest";
export { UpdateConnectionRequestData } from "./models/UpdateConnectionRequestData";
export { UpdateConnectionRequestDataAttributes } from "./models/UpdateConnectionRequestDataAttributes";
@@ -5869,7 +5905,20 @@ export { WatcherData } from "./models/WatcherData";
export { WatcherDataAttributes } from "./models/WatcherDataAttributes";
export { WatcherDataType } from "./models/WatcherDataType";
export { Weekday } from "./models/Weekday";
+export { WidgetAttributes } from "./models/WidgetAttributes";
+export { WidgetData } from "./models/WidgetData";
+export { WidgetDefinition } from "./models/WidgetDefinition";
+export { WidgetExperienceType } from "./models/WidgetExperienceType";
+export { WidgetIncludedUser } from "./models/WidgetIncludedUser";
+export { WidgetIncludedUserAttributes } from "./models/WidgetIncludedUserAttributes";
+export { WidgetListResponse } from "./models/WidgetListResponse";
export { WidgetLiveSpan } from "./models/WidgetLiveSpan";
+export { WidgetRelationshipData } from "./models/WidgetRelationshipData";
+export { WidgetRelationshipItem } from "./models/WidgetRelationshipItem";
+export { WidgetRelationships } from "./models/WidgetRelationships";
+export { WidgetResponse } from "./models/WidgetResponse";
+export { WidgetSearchMeta } from "./models/WidgetSearchMeta";
+export { WidgetType } from "./models/WidgetType";
export { WorkflowData } from "./models/WorkflowData";
export { WorkflowDataAttributes } from "./models/WorkflowDataAttributes";
export { WorkflowDataRelationships } from "./models/WorkflowDataRelationships";
diff --git a/packages/datadog-api-client-v2/models/CampaignResponse.ts b/packages/datadog-api-client-v2/models/CampaignResponse.ts
new file mode 100644
index 000000000000..75fa7418f3b3
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CampaignResponse.ts
@@ -0,0 +1,54 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CampaignResponseData } from "./CampaignResponseData";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Response containing campaign data.
+ */
+export class CampaignResponse {
+ /**
+ * Campaign data.
+ */
+ "data": CampaignResponseData;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "CampaignResponseData",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CampaignResponse.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CampaignResponseAttributes.ts b/packages/datadog-api-client-v2/models/CampaignResponseAttributes.ts
new file mode 100644
index 000000000000..a26d7676d687
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CampaignResponseAttributes.ts
@@ -0,0 +1,143 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Campaign attributes.
+ */
+export class CampaignResponseAttributes {
+ /**
+ * Creation time of the campaign.
+ */
+ "createdAt": Date;
+ /**
+ * The description of the campaign.
+ */
+ "description"?: string;
+ /**
+ * The due date of the campaign.
+ */
+ "dueDate"?: Date;
+ /**
+ * Entity scope query to filter entities for this campaign.
+ */
+ "entityScope"?: string;
+ /**
+ * Guidance for the campaign.
+ */
+ "guidance"?: string;
+ /**
+ * The unique key for the campaign.
+ */
+ "key": string;
+ /**
+ * Time of last campaign modification.
+ */
+ "modifiedAt": Date;
+ /**
+ * The name of the campaign.
+ */
+ "name": string;
+ /**
+ * The UUID of the campaign owner.
+ */
+ "owner": string;
+ /**
+ * The start date of the campaign.
+ */
+ "startDate": Date;
+ /**
+ * The status of the campaign.
+ */
+ "status": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ createdAt: {
+ baseName: "created_at",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ description: {
+ baseName: "description",
+ type: "string",
+ },
+ dueDate: {
+ baseName: "due_date",
+ type: "Date",
+ format: "date-time",
+ },
+ entityScope: {
+ baseName: "entity_scope",
+ type: "string",
+ },
+ guidance: {
+ baseName: "guidance",
+ type: "string",
+ },
+ key: {
+ baseName: "key",
+ type: "string",
+ required: true,
+ },
+ modifiedAt: {
+ baseName: "modified_at",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ name: {
+ baseName: "name",
+ type: "string",
+ required: true,
+ },
+ owner: {
+ baseName: "owner",
+ type: "string",
+ required: true,
+ },
+ startDate: {
+ baseName: "start_date",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ status: {
+ baseName: "status",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CampaignResponseAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CampaignResponseData.ts b/packages/datadog-api-client-v2/models/CampaignResponseData.ts
new file mode 100644
index 000000000000..3f509a7eb950
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CampaignResponseData.ts
@@ -0,0 +1,73 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CampaignResponseAttributes } from "./CampaignResponseAttributes";
+import { CampaignType } from "./CampaignType";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Campaign data.
+ */
+export class CampaignResponseData {
+ /**
+ * Campaign attributes.
+ */
+ "attributes": CampaignResponseAttributes;
+ /**
+ * The unique ID of the campaign.
+ */
+ "id": string;
+ /**
+ * The JSON:API type for campaigns.
+ */
+ "type": CampaignType;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "CampaignResponseAttributes",
+ required: true,
+ },
+ id: {
+ baseName: "id",
+ type: "string",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "CampaignType",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CampaignResponseData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CampaignStatus.ts b/packages/datadog-api-client-v2/models/CampaignStatus.ts
new file mode 100644
index 000000000000..c55d1eecd538
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CampaignStatus.ts
@@ -0,0 +1,20 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { UnparsedObject } from "../../datadog-api-client-common/util";
+
+/**
+ * The status of the campaign.
+ */
+
+export type CampaignStatus =
+ | typeof IN_PROGRESS
+ | typeof NOT_STARTED
+ | typeof COMPLETED
+ | UnparsedObject;
+export const IN_PROGRESS = "in_progress";
+export const NOT_STARTED = "not_started";
+export const COMPLETED = "completed";
diff --git a/packages/datadog-api-client-v2/models/CampaignType.ts b/packages/datadog-api-client-v2/models/CampaignType.ts
new file mode 100644
index 000000000000..cb1ae0a67cd6
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CampaignType.ts
@@ -0,0 +1,14 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { UnparsedObject } from "../../datadog-api-client-common/util";
+
+/**
+ * The JSON:API type for campaigns.
+ */
+
+export type CampaignType = typeof CAMPAIGN | UnparsedObject;
+export const CAMPAIGN = "campaign";
diff --git a/packages/datadog-api-client-v2/models/CreateCampaignRequest.ts b/packages/datadog-api-client-v2/models/CreateCampaignRequest.ts
new file mode 100644
index 000000000000..2a34d7acc230
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CreateCampaignRequest.ts
@@ -0,0 +1,54 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CreateCampaignRequestData } from "./CreateCampaignRequestData";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Request to create a new campaign.
+ */
+export class CreateCampaignRequest {
+ /**
+ * Data for creating a new campaign.
+ */
+ "data": CreateCampaignRequestData;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "CreateCampaignRequestData",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CreateCampaignRequest.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CreateCampaignRequestAttributes.ts b/packages/datadog-api-client-v2/models/CreateCampaignRequestAttributes.ts
new file mode 100644
index 000000000000..1a4e0b43a288
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CreateCampaignRequestAttributes.ts
@@ -0,0 +1,132 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CampaignStatus } from "./CampaignStatus";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Attributes for creating a new campaign.
+ */
+export class CreateCampaignRequestAttributes {
+ /**
+ * The description of the campaign.
+ */
+ "description"?: string;
+ /**
+ * The due date of the campaign.
+ */
+ "dueDate"?: Date;
+ /**
+ * Entity scope query to filter entities for this campaign.
+ */
+ "entityScope"?: string;
+ /**
+ * Guidance for the campaign.
+ */
+ "guidance"?: string;
+ /**
+ * The unique key for the campaign.
+ */
+ "key": string;
+ /**
+ * The name of the campaign.
+ */
+ "name": string;
+ /**
+ * The UUID of the campaign owner.
+ */
+ "ownerId": string;
+ /**
+ * Array of rule IDs associated with this campaign.
+ */
+ "ruleIds": Array;
+ /**
+ * The start date of the campaign.
+ */
+ "startDate": Date;
+ /**
+ * The status of the campaign.
+ */
+ "status"?: CampaignStatus;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ description: {
+ baseName: "description",
+ type: "string",
+ },
+ dueDate: {
+ baseName: "due_date",
+ type: "Date",
+ format: "date-time",
+ },
+ entityScope: {
+ baseName: "entity_scope",
+ type: "string",
+ },
+ guidance: {
+ baseName: "guidance",
+ type: "string",
+ },
+ key: {
+ baseName: "key",
+ type: "string",
+ required: true,
+ },
+ name: {
+ baseName: "name",
+ type: "string",
+ required: true,
+ },
+ ownerId: {
+ baseName: "owner_id",
+ type: "string",
+ required: true,
+ },
+ ruleIds: {
+ baseName: "rule_ids",
+ type: "Array",
+ required: true,
+ },
+ startDate: {
+ baseName: "start_date",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ status: {
+ baseName: "status",
+ type: "CampaignStatus",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CreateCampaignRequestAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CreateCampaignRequestData.ts b/packages/datadog-api-client-v2/models/CreateCampaignRequestData.ts
new file mode 100644
index 000000000000..69929c4de2e5
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CreateCampaignRequestData.ts
@@ -0,0 +1,64 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CampaignType } from "./CampaignType";
+import { CreateCampaignRequestAttributes } from "./CreateCampaignRequestAttributes";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Data for creating a new campaign.
+ */
+export class CreateCampaignRequestData {
+ /**
+ * Attributes for creating a new campaign.
+ */
+ "attributes": CreateCampaignRequestAttributes;
+ /**
+ * The JSON:API type for campaigns.
+ */
+ "type": CampaignType;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "CreateCampaignRequestAttributes",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "CampaignType",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CreateCampaignRequestData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts
new file mode 100644
index 000000000000..10d20619deeb
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts
@@ -0,0 +1,54 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CreateOrUpdateWidgetRequestData } from "./CreateOrUpdateWidgetRequestData";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Request body for creating or updating a widget.
+ */
+export class CreateOrUpdateWidgetRequest {
+ /**
+ * Data for creating or updating a widget.
+ */
+ "data": CreateOrUpdateWidgetRequestData;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "CreateOrUpdateWidgetRequestData",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CreateOrUpdateWidgetRequest.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts
new file mode 100644
index 000000000000..706ce73aeb32
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts
@@ -0,0 +1,62 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetDefinition } from "./WidgetDefinition";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Attributes for creating or updating a widget.
+ */
+export class CreateOrUpdateWidgetRequestAttributes {
+ /**
+ * The definition of a widget, including its type and configuration.
+ */
+ "definition": WidgetDefinition;
+ /**
+ * User-defined tags for organizing the widget.
+ */
+ "tags"?: Array;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ definition: {
+ baseName: "definition",
+ type: "WidgetDefinition",
+ required: true,
+ },
+ tags: {
+ baseName: "tags",
+ type: "Array",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CreateOrUpdateWidgetRequestAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts
new file mode 100644
index 000000000000..285f08562178
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts
@@ -0,0 +1,63 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CreateOrUpdateWidgetRequestAttributes } from "./CreateOrUpdateWidgetRequestAttributes";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Data for creating or updating a widget.
+ */
+export class CreateOrUpdateWidgetRequestData {
+ /**
+ * Attributes for creating or updating a widget.
+ */
+ "attributes": CreateOrUpdateWidgetRequestAttributes;
+ /**
+ * Widgets resource type.
+ */
+ "type": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "CreateOrUpdateWidgetRequestAttributes",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return CreateOrUpdateWidgetRequestData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/CreateRuleRequestData.ts b/packages/datadog-api-client-v2/models/CreateRuleRequestData.ts
index 526a66e70dce..b9a7bfcb45d2 100644
--- a/packages/datadog-api-client-v2/models/CreateRuleRequestData.ts
+++ b/packages/datadog-api-client-v2/models/CreateRuleRequestData.ts
@@ -3,7 +3,7 @@
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
-import { RuleAttributes } from "./RuleAttributes";
+import { RuleAttributesRequest } from "./RuleAttributesRequest";
import { RuleType } from "./RuleType";
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
@@ -13,9 +13,9 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
*/
export class CreateRuleRequestData {
/**
- * Details of a rule.
+ * Attributes for creating or updating a rule. Server-managed fields (created_at, modified_at, custom) are excluded.
*/
- "attributes"?: RuleAttributes;
+ "attributes"?: RuleAttributesRequest;
/**
* The JSON:API type for scorecard rules.
*/
@@ -39,7 +39,7 @@ export class CreateRuleRequestData {
static readonly attributeTypeMap: AttributeTypeMap = {
attributes: {
baseName: "attributes",
- type: "RuleAttributes",
+ type: "RuleAttributesRequest",
},
type: {
baseName: "type",
diff --git a/packages/datadog-api-client-v2/models/ListCampaignsResponse.ts b/packages/datadog-api-client-v2/models/ListCampaignsResponse.ts
new file mode 100644
index 000000000000..8adce84a5033
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/ListCampaignsResponse.ts
@@ -0,0 +1,64 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CampaignResponseData } from "./CampaignResponseData";
+import { PaginatedResponseMeta } from "./PaginatedResponseMeta";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Response containing a list of campaigns.
+ */
+export class ListCampaignsResponse {
+ /**
+ * Array of campaigns.
+ */
+ "data": Array;
+ /**
+ * Metadata for scores response.
+ */
+ "meta": PaginatedResponseMeta;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "Array",
+ required: true,
+ },
+ meta: {
+ baseName: "meta",
+ type: "PaginatedResponseMeta",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return ListCampaignsResponse.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/ListScorecardsResponse.ts b/packages/datadog-api-client-v2/models/ListScorecardsResponse.ts
new file mode 100644
index 000000000000..074e6298a715
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/ListScorecardsResponse.ts
@@ -0,0 +1,54 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { ScorecardListResponseData } from "./ScorecardListResponseData";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Response containing a list of scorecards.
+ */
+export class ListScorecardsResponse {
+ /**
+ * Array of scorecards.
+ */
+ "data": Array;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "Array",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return ListScorecardsResponse.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts
index c092ffd784f2..dfb596346dd9 100644
--- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts
+++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts
@@ -383,6 +383,9 @@ import { CIAppWarning } from "./CIAppWarning";
import { CSMAgentsMetadata } from "./CSMAgentsMetadata";
import { CVSS } from "./CVSS";
import { CalculatedField } from "./CalculatedField";
+import { CampaignResponse } from "./CampaignResponse";
+import { CampaignResponseAttributes } from "./CampaignResponseAttributes";
+import { CampaignResponseData } from "./CampaignResponseData";
import { CancelDataDeletionResponseBody } from "./CancelDataDeletionResponseBody";
import { Case } from "./Case";
import { CaseAssign } from "./CaseAssign";
@@ -642,6 +645,9 @@ import { CreateAttachmentRequest } from "./CreateAttachmentRequest";
import { CreateAttachmentRequestData } from "./CreateAttachmentRequestData";
import { CreateAttachmentRequestDataAttributes } from "./CreateAttachmentRequestDataAttributes";
import { CreateAttachmentRequestDataAttributesAttachment } from "./CreateAttachmentRequestDataAttributesAttachment";
+import { CreateCampaignRequest } from "./CreateCampaignRequest";
+import { CreateCampaignRequestAttributes } from "./CreateCampaignRequestAttributes";
+import { CreateCampaignRequestData } from "./CreateCampaignRequestData";
import { CreateCaseRequestArray } from "./CreateCaseRequestArray";
import { CreateCaseRequestData } from "./CreateCaseRequestData";
import { CreateCaseRequestDataAttributes } from "./CreateCaseRequestDataAttributes";
@@ -700,6 +706,9 @@ import { CreateOnCallNotificationRuleRequestData } from "./CreateOnCallNotificat
import { CreateOpenAPIResponse } from "./CreateOpenAPIResponse";
import { CreateOpenAPIResponseAttributes } from "./CreateOpenAPIResponseAttributes";
import { CreateOpenAPIResponseData } from "./CreateOpenAPIResponseData";
+import { CreateOrUpdateWidgetRequest } from "./CreateOrUpdateWidgetRequest";
+import { CreateOrUpdateWidgetRequestAttributes } from "./CreateOrUpdateWidgetRequestAttributes";
+import { CreateOrUpdateWidgetRequestData } from "./CreateOrUpdateWidgetRequestData";
import { CreatePageRequest } from "./CreatePageRequest";
import { CreatePageRequestData } from "./CreatePageRequestData";
import { CreatePageRequestDataAttributes } from "./CreatePageRequestDataAttributes";
@@ -1775,6 +1784,7 @@ import { ListAppsResponseDataItemsRelationships } from "./ListAppsResponseDataIt
import { ListAppsResponseMeta } from "./ListAppsResponseMeta";
import { ListAppsResponseMetaPage } from "./ListAppsResponseMetaPage";
import { ListAssetsSBOMsResponse } from "./ListAssetsSBOMsResponse";
+import { ListCampaignsResponse } from "./ListCampaignsResponse";
import { ListConnectionsResponse } from "./ListConnectionsResponse";
import { ListConnectionsResponseData } from "./ListConnectionsResponseData";
import { ListConnectionsResponseDataAttributes } from "./ListConnectionsResponseDataAttributes";
@@ -1807,6 +1817,7 @@ import { ListRelationCatalogResponseLinks } from "./ListRelationCatalogResponseL
import { ListRulesResponse } from "./ListRulesResponse";
import { ListRulesResponseDataItem } from "./ListRulesResponseDataItem";
import { ListRulesResponseLinks } from "./ListRulesResponseLinks";
+import { ListScorecardsResponse } from "./ListScorecardsResponse";
import { ListSecurityFindingsResponse } from "./ListSecurityFindingsResponse";
import { ListTagsResponse } from "./ListTagsResponse";
import { ListTagsResponseData } from "./ListTagsResponseData";
@@ -2279,6 +2290,7 @@ import { OutcomesResponseIncludedRuleAttributes } from "./OutcomesResponseInclud
import { OutcomesResponseLinks } from "./OutcomesResponseLinks";
import { OutputSchema } from "./OutputSchema";
import { OutputSchemaParameters } from "./OutputSchemaParameters";
+import { PaginatedResponseMeta } from "./PaginatedResponseMeta";
import { Pagination } from "./Pagination";
import { PaginationMeta } from "./PaginationMeta";
import { PaginationMetaPage } from "./PaginationMetaPage";
@@ -2625,6 +2637,7 @@ import { RoutingRuleRelationships } from "./RoutingRuleRelationships";
import { RoutingRuleRelationshipsPolicy } from "./RoutingRuleRelationshipsPolicy";
import { RoutingRuleRelationshipsPolicyData } from "./RoutingRuleRelationshipsPolicyData";
import { RuleAttributes } from "./RuleAttributes";
+import { RuleAttributesRequest } from "./RuleAttributesRequest";
import { RuleOutcomeRelationships } from "./RuleOutcomeRelationships";
import { RuleUser } from "./RuleUser";
import { RuleVersionHistory } from "./RuleVersionHistory";
@@ -2755,6 +2768,8 @@ import { ScheduleUpdateRequestDataAttributesLayersItems } from "./ScheduleUpdate
import { ScheduleUpdateRequestDataRelationships } from "./ScheduleUpdateRequestDataRelationships";
import { ScheduleUser } from "./ScheduleUser";
import { ScheduleUserAttributes } from "./ScheduleUserAttributes";
+import { ScorecardListResponseAttributes } from "./ScorecardListResponseAttributes";
+import { ScorecardListResponseData } from "./ScorecardListResponseData";
import { SeatUserData } from "./SeatUserData";
import { SeatUserDataArray } from "./SeatUserDataArray";
import { SeatUserDataAttributes } from "./SeatUserDataAttributes";
@@ -3375,6 +3390,9 @@ import { UpdateAppsDatastoreItemRequestDataAttributesItemChanges } from "./Updat
import { UpdateAppsDatastoreRequest } from "./UpdateAppsDatastoreRequest";
import { UpdateAppsDatastoreRequestData } from "./UpdateAppsDatastoreRequestData";
import { UpdateAppsDatastoreRequestDataAttributes } from "./UpdateAppsDatastoreRequestDataAttributes";
+import { UpdateCampaignRequest } from "./UpdateCampaignRequest";
+import { UpdateCampaignRequestAttributes } from "./UpdateCampaignRequestAttributes";
+import { UpdateCampaignRequestData } from "./UpdateCampaignRequestData";
import { UpdateConnectionRequest } from "./UpdateConnectionRequest";
import { UpdateConnectionRequestData } from "./UpdateConnectionRequestData";
import { UpdateConnectionRequestDataAttributes } from "./UpdateConnectionRequestDataAttributes";
@@ -3512,6 +3530,17 @@ import { WatchDataAttributes } from "./WatchDataAttributes";
import { WatcherArray } from "./WatcherArray";
import { WatcherData } from "./WatcherData";
import { WatcherDataAttributes } from "./WatcherDataAttributes";
+import { WidgetAttributes } from "./WidgetAttributes";
+import { WidgetData } from "./WidgetData";
+import { WidgetDefinition } from "./WidgetDefinition";
+import { WidgetIncludedUser } from "./WidgetIncludedUser";
+import { WidgetIncludedUserAttributes } from "./WidgetIncludedUserAttributes";
+import { WidgetListResponse } from "./WidgetListResponse";
+import { WidgetRelationshipData } from "./WidgetRelationshipData";
+import { WidgetRelationshipItem } from "./WidgetRelationshipItem";
+import { WidgetRelationships } from "./WidgetRelationships";
+import { WidgetResponse } from "./WidgetResponse";
+import { WidgetSearchMeta } from "./WidgetSearchMeta";
import { WorkflowData } from "./WorkflowData";
import { WorkflowDataAttributes } from "./WorkflowDataAttributes";
import { WorkflowDataRelationships } from "./WorkflowDataRelationships";
@@ -3806,6 +3835,8 @@ const enumsMap: { [key: string]: any[] } = {
CIAppTestEventTypeName: ["citest"],
CIAppTestLevel: ["session", "module", "suite", "test"],
CSMAgentsType: ["datadog_agent"],
+ CampaignStatus: ["in_progress", "not_started", "completed"],
+ CampaignType: ["campaign"],
Case3rdPartyTicketStatus: ["IN_PROGRESS", "COMPLETED", "FAILED"],
CaseDataType: ["cases"],
CaseManagementProjectDataType: ["projects"],
@@ -5006,6 +5037,7 @@ const enumsMap: { [key: string]: any[] } = {
ScheduleTargetType: ["schedules"],
ScheduleUpdateRequestDataType: ["schedules"],
ScheduleUserType: ["users"],
+ ScorecardListType: ["scorecard"],
ScorecardType: ["scorecard"],
SearchIssuesIncludeQueryParameterItem: [
"issue",
@@ -5587,6 +5619,12 @@ const enumsMap: { [key: string]: any[] } = {
"saturday",
"sunday",
],
+ WidgetExperienceType: [
+ "ccm_reports",
+ "logs_reports",
+ "csv_reports",
+ "product_analytics",
+ ],
WidgetLiveSpan: [
"1m",
"5m",
@@ -5604,6 +5642,23 @@ const enumsMap: { [key: string]: any[] } = {
"1y",
"alert",
],
+ WidgetType: [
+ "bar_chart",
+ "change",
+ "cloud_cost_summary",
+ "cohort",
+ "funnel",
+ "geomap",
+ "list_stream",
+ "query_table",
+ "query_value",
+ "retention_curve",
+ "sankey",
+ "sunburst",
+ "timeseries",
+ "toplist",
+ "treemap",
+ ],
WorkflowDataType: ["workflows"],
WorkflowUserRelationshipType: ["users"],
};
@@ -6066,6 +6121,9 @@ const typeMap: { [index: string]: any } = {
CSMAgentsMetadata: CSMAgentsMetadata,
CVSS: CVSS,
CalculatedField: CalculatedField,
+ CampaignResponse: CampaignResponse,
+ CampaignResponseAttributes: CampaignResponseAttributes,
+ CampaignResponseData: CampaignResponseData,
CancelDataDeletionResponseBody: CancelDataDeletionResponseBody,
Case: Case,
CaseAssign: CaseAssign,
@@ -6368,6 +6426,9 @@ const typeMap: { [index: string]: any } = {
CreateAttachmentRequestDataAttributes: CreateAttachmentRequestDataAttributes,
CreateAttachmentRequestDataAttributesAttachment:
CreateAttachmentRequestDataAttributesAttachment,
+ CreateCampaignRequest: CreateCampaignRequest,
+ CreateCampaignRequestAttributes: CreateCampaignRequestAttributes,
+ CreateCampaignRequestData: CreateCampaignRequestData,
CreateCaseRequestArray: CreateCaseRequestArray,
CreateCaseRequestData: CreateCaseRequestData,
CreateCaseRequestDataAttributes: CreateCaseRequestDataAttributes,
@@ -6442,6 +6503,9 @@ const typeMap: { [index: string]: any } = {
CreateOpenAPIResponse: CreateOpenAPIResponse,
CreateOpenAPIResponseAttributes: CreateOpenAPIResponseAttributes,
CreateOpenAPIResponseData: CreateOpenAPIResponseData,
+ CreateOrUpdateWidgetRequest: CreateOrUpdateWidgetRequest,
+ CreateOrUpdateWidgetRequestAttributes: CreateOrUpdateWidgetRequestAttributes,
+ CreateOrUpdateWidgetRequestData: CreateOrUpdateWidgetRequestData,
CreatePageRequest: CreatePageRequest,
CreatePageRequestData: CreatePageRequestData,
CreatePageRequestDataAttributes: CreatePageRequestDataAttributes,
@@ -7687,6 +7751,7 @@ const typeMap: { [index: string]: any } = {
ListAppsResponseMeta: ListAppsResponseMeta,
ListAppsResponseMetaPage: ListAppsResponseMetaPage,
ListAssetsSBOMsResponse: ListAssetsSBOMsResponse,
+ ListCampaignsResponse: ListCampaignsResponse,
ListConnectionsResponse: ListConnectionsResponse,
ListConnectionsResponseData: ListConnectionsResponseData,
ListConnectionsResponseDataAttributes: ListConnectionsResponseDataAttributes,
@@ -7722,6 +7787,7 @@ const typeMap: { [index: string]: any } = {
ListRulesResponse: ListRulesResponse,
ListRulesResponseDataItem: ListRulesResponseDataItem,
ListRulesResponseLinks: ListRulesResponseLinks,
+ ListScorecardsResponse: ListScorecardsResponse,
ListSecurityFindingsResponse: ListSecurityFindingsResponse,
ListTagsResponse: ListTagsResponse,
ListTagsResponseData: ListTagsResponseData,
@@ -8356,6 +8422,7 @@ const typeMap: { [index: string]: any } = {
OutcomesResponseLinks: OutcomesResponseLinks,
OutputSchema: OutputSchema,
OutputSchemaParameters: OutputSchemaParameters,
+ PaginatedResponseMeta: PaginatedResponseMeta,
Pagination: Pagination,
PaginationMeta: PaginationMeta,
PaginationMetaPage: PaginationMetaPage,
@@ -8744,6 +8811,7 @@ const typeMap: { [index: string]: any } = {
RoutingRuleRelationshipsPolicy: RoutingRuleRelationshipsPolicy,
RoutingRuleRelationshipsPolicyData: RoutingRuleRelationshipsPolicyData,
RuleAttributes: RuleAttributes,
+ RuleAttributesRequest: RuleAttributesRequest,
RuleOutcomeRelationships: RuleOutcomeRelationships,
RuleUser: RuleUser,
RuleVersionHistory: RuleVersionHistory,
@@ -8895,6 +8963,8 @@ const typeMap: { [index: string]: any } = {
ScheduleUpdateRequestDataRelationships,
ScheduleUser: ScheduleUser,
ScheduleUserAttributes: ScheduleUserAttributes,
+ ScorecardListResponseAttributes: ScorecardListResponseAttributes,
+ ScorecardListResponseData: ScorecardListResponseData,
SeatUserData: SeatUserData,
SeatUserDataArray: SeatUserDataArray,
SeatUserDataAttributes: SeatUserDataAttributes,
@@ -9673,6 +9743,9 @@ const typeMap: { [index: string]: any } = {
UpdateAppsDatastoreRequestData: UpdateAppsDatastoreRequestData,
UpdateAppsDatastoreRequestDataAttributes:
UpdateAppsDatastoreRequestDataAttributes,
+ UpdateCampaignRequest: UpdateCampaignRequest,
+ UpdateCampaignRequestAttributes: UpdateCampaignRequestAttributes,
+ UpdateCampaignRequestData: UpdateCampaignRequestData,
UpdateConnectionRequest: UpdateConnectionRequest,
UpdateConnectionRequestData: UpdateConnectionRequestData,
UpdateConnectionRequestDataAttributes: UpdateConnectionRequestDataAttributes,
@@ -9830,6 +9903,17 @@ const typeMap: { [index: string]: any } = {
WatcherArray: WatcherArray,
WatcherData: WatcherData,
WatcherDataAttributes: WatcherDataAttributes,
+ WidgetAttributes: WidgetAttributes,
+ WidgetData: WidgetData,
+ WidgetDefinition: WidgetDefinition,
+ WidgetIncludedUser: WidgetIncludedUser,
+ WidgetIncludedUserAttributes: WidgetIncludedUserAttributes,
+ WidgetListResponse: WidgetListResponse,
+ WidgetRelationshipData: WidgetRelationshipData,
+ WidgetRelationshipItem: WidgetRelationshipItem,
+ WidgetRelationships: WidgetRelationships,
+ WidgetResponse: WidgetResponse,
+ WidgetSearchMeta: WidgetSearchMeta,
WorkflowData: WorkflowData,
WorkflowDataAttributes: WorkflowDataAttributes,
WorkflowDataRelationships: WorkflowDataRelationships,
diff --git a/packages/datadog-api-client-v2/models/PaginatedResponseMeta.ts b/packages/datadog-api-client-v2/models/PaginatedResponseMeta.ts
new file mode 100644
index 000000000000..a4f53aad4dba
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/PaginatedResponseMeta.ts
@@ -0,0 +1,84 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Metadata for scores response.
+ */
+export class PaginatedResponseMeta {
+ /**
+ * Number of entities in this response.
+ */
+ "count": number;
+ /**
+ * Pagination limit.
+ */
+ "limit": number;
+ /**
+ * Pagination offset.
+ */
+ "offset": number;
+ /**
+ * Total number of entities available.
+ */
+ "total": number;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ count: {
+ baseName: "count",
+ type: "number",
+ required: true,
+ format: "int64",
+ },
+ limit: {
+ baseName: "limit",
+ type: "number",
+ required: true,
+ format: "int64",
+ },
+ offset: {
+ baseName: "offset",
+ type: "number",
+ required: true,
+ format: "int64",
+ },
+ total: {
+ baseName: "total",
+ type: "number",
+ required: true,
+ format: "int64",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return PaginatedResponseMeta.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/RuleAttributes.ts b/packages/datadog-api-client-v2/models/RuleAttributes.ts
index 4b611d40cd87..d28bd230001c 100644
--- a/packages/datadog-api-client-v2/models/RuleAttributes.ts
+++ b/packages/datadog-api-client-v2/models/RuleAttributes.ts
@@ -46,6 +46,10 @@ export class RuleAttributes {
* Owner of the rule.
*/
"owner"?: string;
+ /**
+ * A query to filter which entities this rule applies to.
+ */
+ "scopeQuery"?: string;
/**
* The scorecard name to which this rule must belong.
*/
@@ -105,6 +109,10 @@ export class RuleAttributes {
baseName: "owner",
type: "string",
},
+ scopeQuery: {
+ baseName: "scope_query",
+ type: "string",
+ },
scorecardName: {
baseName: "scorecard_name",
type: "string",
diff --git a/packages/datadog-api-client-v2/models/RuleAttributesRequest.ts b/packages/datadog-api-client-v2/models/RuleAttributesRequest.ts
new file mode 100644
index 000000000000..1aaa8554af91
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/RuleAttributesRequest.ts
@@ -0,0 +1,100 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Attributes for creating or updating a rule. Server-managed fields (created_at, modified_at, custom) are excluded.
+ */
+export class RuleAttributesRequest {
+ /**
+ * Explanation of the rule.
+ */
+ "description"?: string;
+ /**
+ * If enabled, the rule is calculated as part of the score.
+ */
+ "enabled"?: boolean;
+ /**
+ * The maturity level of the rule (1, 2, or 3).
+ */
+ "level"?: number;
+ /**
+ * Name of the rule.
+ */
+ "name"?: string;
+ /**
+ * Owner of the rule.
+ */
+ "owner"?: string;
+ /**
+ * A query to filter which entities this rule applies to.
+ */
+ "scopeQuery"?: string;
+ /**
+ * The scorecard name to which this rule must belong.
+ */
+ "scorecardName"?: string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ description: {
+ baseName: "description",
+ type: "string",
+ },
+ enabled: {
+ baseName: "enabled",
+ type: "boolean",
+ },
+ level: {
+ baseName: "level",
+ type: "number",
+ },
+ name: {
+ baseName: "name",
+ type: "string",
+ },
+ owner: {
+ baseName: "owner",
+ type: "string",
+ },
+ scopeQuery: {
+ baseName: "scope_query",
+ type: "string",
+ },
+ scorecardName: {
+ baseName: "scorecard_name",
+ type: "string",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return RuleAttributesRequest.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/ScorecardListResponseAttributes.ts b/packages/datadog-api-client-v2/models/ScorecardListResponseAttributes.ts
new file mode 100644
index 000000000000..89ca061e83e4
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/ScorecardListResponseAttributes.ts
@@ -0,0 +1,81 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Scorecard attributes.
+ */
+export class ScorecardListResponseAttributes {
+ /**
+ * Creation time of the scorecard.
+ */
+ "createdAt": Date;
+ /**
+ * The description of the scorecard.
+ */
+ "description"?: string;
+ /**
+ * Time of last scorecard modification.
+ */
+ "modifiedAt": Date;
+ /**
+ * The name of the scorecard.
+ */
+ "name": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ createdAt: {
+ baseName: "created_at",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ description: {
+ baseName: "description",
+ type: "string",
+ },
+ modifiedAt: {
+ baseName: "modified_at",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ name: {
+ baseName: "name",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return ScorecardListResponseAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/ScorecardListResponseData.ts b/packages/datadog-api-client-v2/models/ScorecardListResponseData.ts
new file mode 100644
index 000000000000..25e7cc29c741
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/ScorecardListResponseData.ts
@@ -0,0 +1,73 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { ScorecardListResponseAttributes } from "./ScorecardListResponseAttributes";
+import { ScorecardListType } from "./ScorecardListType";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Scorecard data.
+ */
+export class ScorecardListResponseData {
+ /**
+ * Scorecard attributes.
+ */
+ "attributes": ScorecardListResponseAttributes;
+ /**
+ * The unique ID of the scorecard.
+ */
+ "id": string;
+ /**
+ * The JSON:API type for scorecard list.
+ */
+ "type": ScorecardListType;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "ScorecardListResponseAttributes",
+ required: true,
+ },
+ id: {
+ baseName: "id",
+ type: "string",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "ScorecardListType",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return ScorecardListResponseData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/ScorecardListType.ts b/packages/datadog-api-client-v2/models/ScorecardListType.ts
new file mode 100644
index 000000000000..677fe81eadb8
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/ScorecardListType.ts
@@ -0,0 +1,14 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { UnparsedObject } from "../../datadog-api-client-common/util";
+
+/**
+ * The JSON:API type for scorecard list.
+ */
+
+export type ScorecardListType = typeof SCORECARD | UnparsedObject;
+export const SCORECARD = "scorecard";
diff --git a/packages/datadog-api-client-v2/models/UpdateCampaignRequest.ts b/packages/datadog-api-client-v2/models/UpdateCampaignRequest.ts
new file mode 100644
index 000000000000..91a248082813
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/UpdateCampaignRequest.ts
@@ -0,0 +1,54 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { UpdateCampaignRequestData } from "./UpdateCampaignRequestData";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Request to update a campaign.
+ */
+export class UpdateCampaignRequest {
+ /**
+ * Data for updating a campaign.
+ */
+ "data": UpdateCampaignRequestData;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "UpdateCampaignRequestData",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return UpdateCampaignRequest.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/UpdateCampaignRequestAttributes.ts b/packages/datadog-api-client-v2/models/UpdateCampaignRequestAttributes.ts
new file mode 100644
index 000000000000..fef560d696be
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/UpdateCampaignRequestAttributes.ts
@@ -0,0 +1,131 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Attributes for updating a campaign.
+ */
+export class UpdateCampaignRequestAttributes {
+ /**
+ * The description of the campaign.
+ */
+ "description"?: string;
+ /**
+ * The due date of the campaign.
+ */
+ "dueDate"?: Date;
+ /**
+ * Entity scope query to filter entities for this campaign.
+ */
+ "entityScope"?: string;
+ /**
+ * Guidance for the campaign.
+ */
+ "guidance"?: string;
+ /**
+ * The unique key for the campaign.
+ */
+ "key"?: string;
+ /**
+ * The name of the campaign.
+ */
+ "name": string;
+ /**
+ * The UUID of the campaign owner.
+ */
+ "ownerId": string;
+ /**
+ * Array of rule IDs associated with this campaign.
+ */
+ "ruleIds": Array;
+ /**
+ * The start date of the campaign.
+ */
+ "startDate": Date;
+ /**
+ * The status of the campaign.
+ */
+ "status": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ description: {
+ baseName: "description",
+ type: "string",
+ },
+ dueDate: {
+ baseName: "due_date",
+ type: "Date",
+ format: "date-time",
+ },
+ entityScope: {
+ baseName: "entity_scope",
+ type: "string",
+ },
+ guidance: {
+ baseName: "guidance",
+ type: "string",
+ },
+ key: {
+ baseName: "key",
+ type: "string",
+ },
+ name: {
+ baseName: "name",
+ type: "string",
+ required: true,
+ },
+ ownerId: {
+ baseName: "owner_id",
+ type: "string",
+ required: true,
+ },
+ ruleIds: {
+ baseName: "rule_ids",
+ type: "Array",
+ required: true,
+ },
+ startDate: {
+ baseName: "start_date",
+ type: "Date",
+ required: true,
+ format: "date-time",
+ },
+ status: {
+ baseName: "status",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return UpdateCampaignRequestAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/UpdateCampaignRequestData.ts b/packages/datadog-api-client-v2/models/UpdateCampaignRequestData.ts
new file mode 100644
index 000000000000..d346498528d4
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/UpdateCampaignRequestData.ts
@@ -0,0 +1,64 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { CampaignType } from "./CampaignType";
+import { UpdateCampaignRequestAttributes } from "./UpdateCampaignRequestAttributes";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Data for updating a campaign.
+ */
+export class UpdateCampaignRequestData {
+ /**
+ * Attributes for updating a campaign.
+ */
+ "attributes": UpdateCampaignRequestAttributes;
+ /**
+ * The JSON:API type for campaigns.
+ */
+ "type": CampaignType;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "UpdateCampaignRequestAttributes",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "CampaignType",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return UpdateCampaignRequestData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/UpdateRuleRequestData.ts b/packages/datadog-api-client-v2/models/UpdateRuleRequestData.ts
index 4507668a7ac8..9a0dd9c64054 100644
--- a/packages/datadog-api-client-v2/models/UpdateRuleRequestData.ts
+++ b/packages/datadog-api-client-v2/models/UpdateRuleRequestData.ts
@@ -3,7 +3,7 @@
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
-import { RuleAttributes } from "./RuleAttributes";
+import { RuleAttributesRequest } from "./RuleAttributesRequest";
import { RuleType } from "./RuleType";
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
@@ -13,9 +13,9 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
*/
export class UpdateRuleRequestData {
/**
- * Details of a rule.
+ * Attributes for creating or updating a rule. Server-managed fields (created_at, modified_at, custom) are excluded.
*/
- "attributes"?: RuleAttributes;
+ "attributes"?: RuleAttributesRequest;
/**
* The JSON:API type for scorecard rules.
*/
@@ -39,7 +39,7 @@ export class UpdateRuleRequestData {
static readonly attributeTypeMap: AttributeTypeMap = {
attributes: {
baseName: "attributes",
- type: "RuleAttributes",
+ type: "RuleAttributesRequest",
},
type: {
baseName: "type",
diff --git a/packages/datadog-api-client-v2/models/WidgetAttributes.ts b/packages/datadog-api-client-v2/models/WidgetAttributes.ts
new file mode 100644
index 000000000000..08c7a665c241
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetAttributes.ts
@@ -0,0 +1,90 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetDefinition } from "./WidgetDefinition";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Attributes of a widget resource.
+ */
+export class WidgetAttributes {
+ /**
+ * ISO 8601 timestamp of when the widget was created.
+ */
+ "createdAt": string;
+ /**
+ * The definition of a widget, including its type and configuration.
+ */
+ "definition": WidgetDefinition;
+ /**
+ * Will be implemented soon. Currently always returns false.
+ */
+ "isFavorited": boolean;
+ /**
+ * ISO 8601 timestamp of when the widget was last modified.
+ */
+ "modifiedAt": string;
+ /**
+ * User-defined tags for organizing widgets.
+ */
+ "tags": Array | null;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ createdAt: {
+ baseName: "created_at",
+ type: "string",
+ required: true,
+ },
+ definition: {
+ baseName: "definition",
+ type: "WidgetDefinition",
+ required: true,
+ },
+ isFavorited: {
+ baseName: "is_favorited",
+ type: "boolean",
+ required: true,
+ },
+ modifiedAt: {
+ baseName: "modified_at",
+ type: "string",
+ required: true,
+ },
+ tags: {
+ baseName: "tags",
+ type: "Array",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetData.ts b/packages/datadog-api-client-v2/models/WidgetData.ts
new file mode 100644
index 000000000000..1383f5d356b1
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetData.ts
@@ -0,0 +1,81 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetAttributes } from "./WidgetAttributes";
+import { WidgetRelationships } from "./WidgetRelationships";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * A widget resource object.
+ */
+export class WidgetData {
+ /**
+ * Attributes of a widget resource.
+ */
+ "attributes": WidgetAttributes;
+ /**
+ * The unique identifier of the widget.
+ */
+ "id": string;
+ /**
+ * Relationships of the widget resource.
+ */
+ "relationships"?: WidgetRelationships;
+ /**
+ * Widgets resource type.
+ */
+ "type": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "WidgetAttributes",
+ required: true,
+ },
+ id: {
+ baseName: "id",
+ type: "string",
+ required: true,
+ },
+ relationships: {
+ baseName: "relationships",
+ type: "WidgetRelationships",
+ },
+ type: {
+ baseName: "type",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetDefinition.ts b/packages/datadog-api-client-v2/models/WidgetDefinition.ts
new file mode 100644
index 000000000000..f10dd2de3bf4
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetDefinition.ts
@@ -0,0 +1,64 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetType } from "./WidgetType";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * The definition of a widget, including its type and configuration.
+ */
+export class WidgetDefinition {
+ /**
+ * The display title of the widget.
+ */
+ "title": string;
+ /**
+ * Widget types that are allowed to be stored as individual records.
+ * This is not a complete list of dashboard and notebook widget types.
+ */
+ "type": WidgetType;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ title: {
+ baseName: "title",
+ type: "string",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "WidgetType",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetDefinition.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetExperienceType.ts b/packages/datadog-api-client-v2/models/WidgetExperienceType.ts
new file mode 100644
index 000000000000..17088146941d
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetExperienceType.ts
@@ -0,0 +1,22 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { UnparsedObject } from "../../datadog-api-client-common/util";
+
+/**
+ * Widget experience types that differentiate between the products using the specific widget.
+ */
+
+export type WidgetExperienceType =
+ | typeof CCM_REPORTS
+ | typeof LOGS_REPORTS
+ | typeof CSV_REPORTS
+ | typeof PRODUCT_ANALYTICS
+ | UnparsedObject;
+export const CCM_REPORTS = "ccm_reports";
+export const LOGS_REPORTS = "logs_reports";
+export const CSV_REPORTS = "csv_reports";
+export const PRODUCT_ANALYTICS = "product_analytics";
diff --git a/packages/datadog-api-client-v2/models/WidgetIncludedUser.ts b/packages/datadog-api-client-v2/models/WidgetIncludedUser.ts
new file mode 100644
index 000000000000..5f656542b387
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetIncludedUser.ts
@@ -0,0 +1,71 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetIncludedUserAttributes } from "./WidgetIncludedUserAttributes";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * A user resource included in the response.
+ */
+export class WidgetIncludedUser {
+ /**
+ * Attributes of an included user resource.
+ */
+ "attributes"?: WidgetIncludedUserAttributes;
+ /**
+ * The unique identifier of the user.
+ */
+ "id": string;
+ /**
+ * Users resource type.
+ */
+ "type": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ attributes: {
+ baseName: "attributes",
+ type: "WidgetIncludedUserAttributes",
+ },
+ id: {
+ baseName: "id",
+ type: "string",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetIncludedUser.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts b/packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts
new file mode 100644
index 000000000000..49d4a59a5e9a
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts
@@ -0,0 +1,60 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Attributes of an included user resource.
+ */
+export class WidgetIncludedUserAttributes {
+ /**
+ * The email handle of the user.
+ */
+ "handle"?: string;
+ /**
+ * The display name of the user.
+ */
+ "name"?: string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ handle: {
+ baseName: "handle",
+ type: "string",
+ },
+ name: {
+ baseName: "name",
+ type: "string",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetIncludedUserAttributes.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetListResponse.ts b/packages/datadog-api-client-v2/models/WidgetListResponse.ts
new file mode 100644
index 000000000000..c89ae4abc862
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetListResponse.ts
@@ -0,0 +1,72 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetData } from "./WidgetData";
+import { WidgetIncludedUser } from "./WidgetIncludedUser";
+import { WidgetSearchMeta } from "./WidgetSearchMeta";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Response containing a list of widgets.
+ */
+export class WidgetListResponse {
+ /**
+ * List of widget resources.
+ */
+ "data": Array;
+ /**
+ * Array of user resources related to the widgets.
+ */
+ "included"?: Array;
+ /**
+ * Metadata about the search results.
+ */
+ "meta"?: WidgetSearchMeta;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "Array",
+ required: true,
+ },
+ included: {
+ baseName: "included",
+ type: "Array",
+ },
+ meta: {
+ baseName: "meta",
+ type: "WidgetSearchMeta",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetListResponse.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetRelationshipData.ts b/packages/datadog-api-client-v2/models/WidgetRelationshipData.ts
new file mode 100644
index 000000000000..ad69f3704eb8
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetRelationshipData.ts
@@ -0,0 +1,62 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Relationship data referencing a user resource.
+ */
+export class WidgetRelationshipData {
+ /**
+ * The unique identifier of the user.
+ */
+ "id": string;
+ /**
+ * Users resource type.
+ */
+ "type": string;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ id: {
+ baseName: "id",
+ type: "string",
+ required: true,
+ },
+ type: {
+ baseName: "type",
+ type: "string",
+ required: true,
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetRelationshipData.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts b/packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts
new file mode 100644
index 000000000000..7f20e80c3786
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts
@@ -0,0 +1,53 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetRelationshipData } from "./WidgetRelationshipData";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * A JSON:API relationship to a user.
+ */
+export class WidgetRelationshipItem {
+ /**
+ * Relationship data referencing a user resource.
+ */
+ "data"?: WidgetRelationshipData;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "WidgetRelationshipData",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetRelationshipItem.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetRelationships.ts b/packages/datadog-api-client-v2/models/WidgetRelationships.ts
new file mode 100644
index 000000000000..a8f4b23072f1
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetRelationships.ts
@@ -0,0 +1,61 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetRelationshipItem } from "./WidgetRelationshipItem";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Relationships of the widget resource.
+ */
+export class WidgetRelationships {
+ /**
+ * A JSON:API relationship to a user.
+ */
+ "createdBy"?: WidgetRelationshipItem;
+ /**
+ * A JSON:API relationship to a user.
+ */
+ "modifiedBy"?: WidgetRelationshipItem;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ createdBy: {
+ baseName: "created_by",
+ type: "WidgetRelationshipItem",
+ },
+ modifiedBy: {
+ baseName: "modified_by",
+ type: "WidgetRelationshipItem",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetRelationships.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetResponse.ts b/packages/datadog-api-client-v2/models/WidgetResponse.ts
new file mode 100644
index 000000000000..b8feacaad577
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetResponse.ts
@@ -0,0 +1,63 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+import { WidgetData } from "./WidgetData";
+import { WidgetIncludedUser } from "./WidgetIncludedUser";
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Response containing a single widget.
+ */
+export class WidgetResponse {
+ /**
+ * A widget resource object.
+ */
+ "data": WidgetData;
+ /**
+ * Array of user resources related to the widget.
+ */
+ "included"?: Array;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ data: {
+ baseName: "data",
+ type: "WidgetData",
+ required: true,
+ },
+ included: {
+ baseName: "included",
+ type: "Array",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetResponse.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetSearchMeta.ts b/packages/datadog-api-client-v2/models/WidgetSearchMeta.ts
new file mode 100644
index 000000000000..92b1d4f18cf2
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetSearchMeta.ts
@@ -0,0 +1,80 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { AttributeTypeMap } from "../../datadog-api-client-common/util";
+
+/**
+ * Metadata about the search results.
+ */
+export class WidgetSearchMeta {
+ /**
+ * Total number of widgets created by anyone.
+ */
+ "createdByAnyoneTotal"?: number;
+ /**
+ * Total number of widgets created by the current user.
+ */
+ "createdByYouTotal"?: number;
+ /**
+ * Total number of widgets favorited by the current user.
+ */
+ "favoritedByYouTotal"?: number;
+ /**
+ * Total number of widgets matching the current filter criteria.
+ */
+ "filteredTotal"?: number;
+
+ /**
+ * A container for additional, undeclared properties.
+ * This is a holder for any undeclared properties as specified with
+ * the 'additionalProperties' keyword in the OAS document.
+ */
+ "additionalProperties"?: { [key: string]: any };
+
+ /**
+ * @ignore
+ */
+ "_unparsed"?: boolean;
+
+ /**
+ * @ignore
+ */
+ static readonly attributeTypeMap: AttributeTypeMap = {
+ createdByAnyoneTotal: {
+ baseName: "created_by_anyone_total",
+ type: "number",
+ format: "int64",
+ },
+ createdByYouTotal: {
+ baseName: "created_by_you_total",
+ type: "number",
+ format: "int64",
+ },
+ favoritedByYouTotal: {
+ baseName: "favorited_by_you_total",
+ type: "number",
+ format: "int64",
+ },
+ filteredTotal: {
+ baseName: "filtered_total",
+ type: "number",
+ format: "int64",
+ },
+ additionalProperties: {
+ baseName: "additionalProperties",
+ type: "{ [key: string]: any; }",
+ },
+ };
+
+ /**
+ * @ignore
+ */
+ static getAttributeTypeMap(): AttributeTypeMap {
+ return WidgetSearchMeta.attributeTypeMap;
+ }
+
+ public constructor() {}
+}
diff --git a/packages/datadog-api-client-v2/models/WidgetType.ts b/packages/datadog-api-client-v2/models/WidgetType.ts
new file mode 100644
index 000000000000..68e9064755c1
--- /dev/null
+++ b/packages/datadog-api-client-v2/models/WidgetType.ts
@@ -0,0 +1,45 @@
+/**
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2020-Present Datadog, Inc.
+ */
+
+import { UnparsedObject } from "../../datadog-api-client-common/util";
+
+/**
+ * Widget types that are allowed to be stored as individual records.
+ * This is not a complete list of dashboard and notebook widget types.
+ */
+
+export type WidgetType =
+ | typeof BAR_CHART
+ | typeof CHANGE
+ | typeof CLOUD_COST_SUMMARY
+ | typeof COHORT
+ | typeof FUNNEL
+ | typeof GEOMAP
+ | typeof LIST_STREAM
+ | typeof QUERY_TABLE
+ | typeof QUERY_VALUE
+ | typeof RETENTION_CURVE
+ | typeof SANKEY
+ | typeof SUNBURST
+ | typeof TIMESERIES
+ | typeof TOPLIST
+ | typeof TREEMAP
+ | UnparsedObject;
+export const BAR_CHART = "bar_chart";
+export const CHANGE = "change";
+export const CLOUD_COST_SUMMARY = "cloud_cost_summary";
+export const COHORT = "cohort";
+export const FUNNEL = "funnel";
+export const GEOMAP = "geomap";
+export const LIST_STREAM = "list_stream";
+export const QUERY_TABLE = "query_table";
+export const QUERY_VALUE = "query_value";
+export const RETENTION_CURVE = "retention_curve";
+export const SANKEY = "sankey";
+export const SUNBURST = "sunburst";
+export const TIMESERIES = "timeseries";
+export const TOPLIST = "toplist";
+export const TREEMAP = "treemap";