"
+ }
+ },
+ "request": {
+ "json_curl": {},
+ "json": {},
+ "html": ""
+ }
}
}
\ No newline at end of file
diff --git a/content/en/api/v2/deployment-gates/request.TriggerDeploymentGatesEvaluation_691804290.json b/content/en/api/v2/deployment-gates/request.TriggerDeploymentGatesEvaluation_691804290.json
new file mode 100644
index 00000000000..08d7584b554
--- /dev/null
+++ b/content/en/api/v2/deployment-gates/request.TriggerDeploymentGatesEvaluation_691804290.json
@@ -0,0 +1,10 @@
+{
+ "data": {
+ "attributes": {
+ "env": "production",
+ "identifier": "pre",
+ "service": "my-service"
+ },
+ "type": "deployment_gates_evaluation_request"
+ }
+}
\ No newline at end of file
diff --git a/data/api/v2/CodeExamples.json b/data/api/v2/CodeExamples.json
index 44b940a0c41..dda9b8fcb1e 100644
--- a/data/api/v2/CodeExamples.json
+++ b/data/api/v2/CodeExamples.json
@@ -613,6 +613,13 @@
"description": "Create deployment rule returns \"OK\" response"
}
],
+ "TriggerDeploymentGatesEvaluation": [
+ {
+ "group": "deployment_gates",
+ "suffix": "_691804290",
+ "description": "Trigger a deployment gates evaluation returns \"Accepted\" response"
+ }
+ ],
"UpdateDeploymentGate": [
{
"group": "deployment_gates",
diff --git a/data/api/v2/full_spec.yaml b/data/api/v2/full_spec.yaml
index b016b25e1ad..949f5e43bc4 100644
--- a/data/api/v2/full_spec.yaml
+++ b/data/api/v2/full_spec.yaml
@@ -20170,6 +20170,238 @@ components:
data:
$ref: "#/components/schemas/ListDeploymentRuleResponseData"
type: object
+ DeploymentGatesEvaluationRequest:
+ description: Request body for triggering a deployment gate evaluation.
+ properties:
+ data:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationRequestData"
+ required:
+ - data
+ type: object
+ DeploymentGatesEvaluationRequestAttributes:
+ description: Attributes for a deployment gate evaluation request.
+ properties:
+ env:
+ description: The environment of the deployment.
+ example: "staging"
+ type: string
+ identifier:
+ default: default
+ description: The identifier of the deployment gate. Defaults to "default".
+ example: "pre-deploy"
+ type: string
+ primary_tag:
+ description: A primary tag to scope APM Faulty Deployment Detection rules.
+ example: "region:us-east-1"
+ type: string
+ service:
+ description: The service being deployed.
+ example: "transaction-backend"
+ type: string
+ version:
+ description: The version of the deployment. Required for APM Faulty Deployment Detection rules.
+ example: "v1.2.3"
+ type: string
+ required:
+ - env
+ - service
+ type: object
+ DeploymentGatesEvaluationRequestData:
+ description: Data for a deployment gate evaluation request.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationRequestAttributes"
+ type:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationRequestDataType"
+ required:
+ - type
+ - attributes
+ type: object
+ DeploymentGatesEvaluationRequestDataType:
+ default: deployment_gates_evaluation_request
+ description: JSON:API type for a deployment gate evaluation request.
+ enum:
+ - deployment_gates_evaluation_request
+ example: deployment_gates_evaluation_request
+ type: string
+ x-enum-varnames:
+ - DEPLOYMENT_GATES_EVALUATION_REQUEST
+ DeploymentGatesEvaluationResponse:
+ description: Response for a deployment gate evaluation request.
+ properties:
+ data:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResponseData"
+ type: object
+ DeploymentGatesEvaluationResponseAttributes:
+ description: Attributes for a deployment gate evaluation response.
+ properties:
+ evaluation_id:
+ description: The unique identifier of the gate evaluation.
+ example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9"
+ type: string
+ required:
+ - evaluation_id
+ type: object
+ DeploymentGatesEvaluationResponseData:
+ description: Data for a deployment gate evaluation response.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResponseAttributes"
+ id:
+ description: The unique identifier of the evaluation response.
+ example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9"
+ format: uuid
+ type: string
+ type:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResponseDataType"
+ required:
+ - type
+ - attributes
+ - id
+ type: object
+ DeploymentGatesEvaluationResponseDataType:
+ default: deployment_gates_evaluation_response
+ description: JSON:API type for a deployment gate evaluation response.
+ enum:
+ - deployment_gates_evaluation_response
+ example: deployment_gates_evaluation_response
+ type: string
+ x-enum-varnames:
+ - DEPLOYMENT_GATES_EVALUATION_RESPONSE
+ DeploymentGatesEvaluationResultResponse:
+ description: Response containing the result of a deployment gate evaluation.
+ properties:
+ data:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseData"
+ type: object
+ DeploymentGatesEvaluationResultResponseAttributes:
+ description: Attributes for a deployment gate evaluation result response.
+ properties:
+ dry_run:
+ description: Whether the gate was evaluated in dry-run mode.
+ example: false
+ type: boolean
+ evaluation_id:
+ description: The unique identifier of the gate evaluation.
+ example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9"
+ type: string
+ evaluation_url:
+ description: A URL to view the evaluation details in the Datadog UI.
+ example: "https://app.datadoghq.com/ci/deployment-gates/evaluations?index=cdgates&query=level%3Agate+%40evaluation_id%3Ae9d2f04f-4f4b-494b-86e5-52f03e10c8e9"
+ type: string
+ gate_id:
+ description: The unique identifier of the deployment gate.
+ example: "e140302e-0cba-40d2-978c-6780647f8f1c"
+ format: uuid
+ type: string
+ gate_status:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseAttributesGateStatus"
+ rules:
+ description: The results of individual rule evaluations.
+ items:
+ $ref: "#/components/schemas/DeploymentGatesRuleResponse"
+ type: array
+ required:
+ - dry_run
+ - evaluation_id
+ - evaluation_url
+ - gate_id
+ - gate_status
+ - rules
+ type: object
+ DeploymentGatesEvaluationResultResponseAttributesGateStatus:
+ description: |-
+ The overall status of the gate evaluation.
+ - `in_progress`: The evaluation is still running.
+ - `pass`: All rules passed successfully and the deployment is allowed to proceed.
+ - `fail`: One or more rules did not pass; the deployment should not proceed.
+ enum:
+ - in_progress
+ - pass
+ - fail
+ example: "pass"
+ type: string
+ x-enum-varnames:
+ - IN_PROGRESS
+ - PASS
+ - FAIL
+ DeploymentGatesEvaluationResultResponseData:
+ description: Data for a deployment gate evaluation result response.
+ properties:
+ attributes:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseAttributes"
+ id:
+ description: The unique identifier of the evaluation.
+ example: "e9d2f04f-4f4b-494b-86e5-52f03e10c8e9"
+ type: string
+ type:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseDataType"
+ required:
+ - type
+ - attributes
+ - id
+ type: object
+ DeploymentGatesEvaluationResultResponseDataType:
+ default: deployment_gates_evaluation_result_response
+ description: JSON:API type for a deployment gate evaluation result response.
+ enum:
+ - deployment_gates_evaluation_result_response
+ example: deployment_gates_evaluation_result_response
+ type: string
+ x-enum-varnames:
+ - DEPLOYMENT_GATES_EVALUATION_RESULT_RESPONSE
+ DeploymentGatesListResponse:
+ description: Response containing a paginated list of deployment gates.
+ properties:
+ data:
+ description: Array of deployment gates.
+ items:
+ $ref: "#/components/schemas/DeploymentGateResponseData"
+ type: array
+ meta:
+ $ref: "#/components/schemas/DeploymentGatesListResponseMeta"
+ type: object
+ DeploymentGatesListResponseMeta:
+ description: Metadata for a list of deployment gates response.
+ properties:
+ page:
+ $ref: "#/components/schemas/DeploymentGatesListResponseMetaPage"
+ type: object
+ DeploymentGatesListResponseMetaPage:
+ description: Pagination information for a list of deployment gates.
+ properties:
+ cursor:
+ description: The cursor used for the current page.
+ type: string
+ next_cursor:
+ description: The cursor to use to fetch the next page. This is absent when there are no more pages.
+ type: string
+ size:
+ default: 50
+ description: The number of results per page.
+ format: int64
+ maximum: 1000
+ minimum: 1
+ type: integer
+ type: object
+ DeploymentGatesRuleResponse:
+ description: The result of a single rule evaluation.
+ properties:
+ dry_run:
+ description: Whether this rule was evaluated in dry-run mode.
+ example: false
+ type: boolean
+ name:
+ description: The name of the rule.
+ example: "Check service monitors"
+ type: string
+ reason:
+ description: The reason for the rule result, if applicable.
+ example: "One or more monitors in ALERT state"
+ type: string
+ status:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponseAttributesGateStatus"
+ type: object
DeploymentMetadata:
description: Metadata object containing the publication creation information.
properties:
@@ -79608,6 +79840,62 @@ paths:
**Note: Data Access is in preview. If you have any feedback,
contact [Datadog support](https://docs.datadoghq.com/help/).**
/api/v2/deployment_gates:
+ get:
+ description: |-
+ Returns a paginated list of all deployment gates for the organization.
+ Use `page[cursor]` and `page[size]` query parameters to paginate through results.
+ operationId: ListDeploymentGates
+ parameters:
+ - description: Cursor for pagination. Use the `meta.page.next_cursor` value from the previous response.
+ in: query
+ name: page[cursor]
+ required: false
+ schema:
+ type: string
+ - description: Number of results per page. Defaults to 50. Must be between 1 and 1000.
+ in: query
+ name: page[size]
+ required: false
+ schema:
+ default: 50
+ format: int64
+ maximum: 1000
+ minimum: 1
+ type: integer
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/DeploymentGatesListResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/HTTPCDGatesBadRequestResponse"
+ "401":
+ $ref: "#/components/responses/UnauthorizedResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ "500":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPCIAppErrors"
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Get all deployment gates
+ tags: ["Deployment Gates"]
+ x-menu-order: 8
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_read
+ x-unstable: |-
+ **Note**: This endpoint is in preview and may be subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: |-
Endpoint to create a deployment gate.
@@ -80055,6 +80343,108 @@ paths:
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ /api/v2/deployments/gates/evaluation:
+ post:
+ description: |-
+ Triggers an asynchronous deployment gate evaluation for the given service and environment.
+ Returns an evaluation ID that can be used to poll for the result via the
+ `GET /api/v2/deployments/gates/evaluation/{id}` endpoint.
+ operationId: TriggerDeploymentGatesEvaluation
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationRequest"
+ required: true
+ responses:
+ "202":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResponse"
+ description: Accepted
+ "400":
+ $ref: "#/components/responses/HTTPCDGatesBadRequestResponse"
+ "401":
+ $ref: "#/components/responses/UnauthorizedResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/HTTPCDGatesNotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ "500":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPCIAppErrors"
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Trigger a deployment gate evaluation
+ tags: ["Deployment Gates"]
+ x-menu-order: 10
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_evaluate
+ x-unstable: |-
+ **Note**: This endpoint is in preview and may be subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
+ /api/v2/deployments/gates/evaluation/{id}:
+ get:
+ description: |-
+ Retrieves the result of a deployment gate evaluation by its evaluation ID.
+ If the evaluation is still in progress, `data.attributes.gate_status` will be `in_progress`;
+ continue polling until it returns `pass` or `fail`.
+ Polling every 10-20 seconds is recommended.
+ The endpoint may return a 404 if called too soon after triggering; retry after a few seconds.
+ operationId: GetDeploymentGatesEvaluationResult
+ parameters:
+ - description: The evaluation ID returned by the trigger endpoint.
+ in: path
+ name: id
+ required: true
+ schema:
+ format: uuid
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/DeploymentGatesEvaluationResultResponse"
+ description: OK
+ "400":
+ $ref: "#/components/responses/HTTPCDGatesBadRequestResponse"
+ "401":
+ $ref: "#/components/responses/UnauthorizedResponse"
+ "403":
+ $ref: "#/components/responses/ForbiddenResponse"
+ "404":
+ $ref: "#/components/responses/HTTPCDGatesNotFoundResponse"
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ "500":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HTTPCIAppErrors"
+ description: Internal Server Error
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ summary: Get a deployment gate evaluation result
+ tags: ["Deployment Gates"]
+ x-menu-order: 11
+ x-permission:
+ operator: OR
+ permissions:
+ - deployment_gates_evaluate
+ x-unstable: |-
+ **Note**: This endpoint is in preview and may be subject to change.
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/domain_allowlist:
get:
description: Get the domain allowlist for an organization.
diff --git a/data/api/v2/translate_actions.json b/data/api/v2/translate_actions.json
index 00df8531b1a..340d72d6575 100644
--- a/data/api/v2/translate_actions.json
+++ b/data/api/v2/translate_actions.json
@@ -1054,6 +1054,10 @@
"request_description": "Dataset payload",
"request_schema_description": "Edit request for a dataset."
},
+ "ListDeploymentGates": {
+ "description": "Returns a paginated list of all deployment gates for the organization.\nUse `page[cursor]` and `page[size]` query parameters to paginate through results.",
+ "summary": "Get all deployment gates"
+ },
"CreateDeploymentGate": {
"description": "Endpoint to create a deployment gate.",
"summary": "Create deployment gate",
@@ -1098,6 +1102,16 @@
"request_description": "",
"request_schema_description": "Parameters for updating a deployment gate."
},
+ "TriggerDeploymentGatesEvaluation": {
+ "description": "Triggers an asynchronous deployment gate evaluation for the given service and environment.\nReturns an evaluation ID that can be used to poll for the result via the\n`GET /api/v2/deployments/gates/evaluation/{id}` endpoint.",
+ "summary": "Trigger a deployment gate evaluation",
+ "request_description": "",
+ "request_schema_description": "Request body for triggering a deployment gate evaluation."
+ },
+ "GetDeploymentGatesEvaluationResult": {
+ "description": "Retrieves the result of a deployment gate evaluation by its evaluation ID.\nIf the evaluation is still in progress, `data.attributes.gate_status` will be `in_progress`;\ncontinue polling until it returns `pass` or `fail`.\nPolling every 10-20 seconds is recommended.\nThe endpoint may return a 404 if called too soon after triggering; retry after a few seconds.",
+ "summary": "Get a deployment gate evaluation result"
+ },
"GetDomainAllowlist": {
"description": "Get the domain allowlist for an organization.",
"summary": "Get Domain Allowlist"