latestOpenAPI 3.0.32026-08-192,281012.1 MB

30e2bf535135

Secret Validation Rules

Create Secret Validation Rule

post/api/v1/projects/{projectId}/secret-validation-rules

Path parameters

projectIdstring required

The ID of the project to create the secret validation rule in.

Request body

namestring required

The name of the secret validation rule.

descriptionstring nullable

An optional description of the secret validation rule.

environmentSlugstring

The slug of the environment this rule is scoped to. Omit to apply the rule to every environment in the project.

secretPathstring required

The secret path this rule is scoped to.

Example request

{
  "rule": {
    "constraints": [
      {
        "type": "min-length",
        "appliesTo": "value",
        "value": "8"
      }
    ]
  }
}

Response

Default Response

Example response

{
  "rule": {
    "constraints": [
      {
        "type": "min-length",
        "appliesTo": "value",
        "value": "8"
      }
    ]
  }
}