Delete a policy by ID

Changed on
delete/v1/workspaces/{workspaceId}/policies/{policyId}

Request

  • Base URL
    http://localhost:3001/api
  • URL
    http://localhost:3001/api/v1/workspaces/{workspaceId}/policies/{policyId}
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Path parameters

workspaceIdstring required

ID of the workspace

policyIdstring required

ID of the policy

Response

Policy deleted

createdAtstring required
descriptionstring
enabledboolean required
idstring required
metadataobject required

Arbitrary metadata for the policy (record<string, string>)

namestring required
priorityinteger required
selectorstring required

CEL expression for matching release targets. Use "true" to match all targets.

workspaceIdstring required

Example response

{
  "rules": [
    {
      "verification": {
        "metrics": [
          {
            "failureCondition": "result.statusCode == 500",
            "intervalSeconds": 30,
            "provider": {
              "url": "http://{{ .resource.name }}.{{ .environment.name }}/health"
            },
            "successCondition": "result.statusCode == 200"
          }
        ]
      }
    }
  ]
}

Changes

    • warning

      added the new queued enum value to the //// response property for the response status

    • warning

      added the new queued enum value to the //// response property for the response status

    • info

      the response's property default value 100 was removed for the status