Skip to content

Create criterion

POST
/api/v1/criteria
curl --request POST \
--url 'https://example.com/api/v1/criteria?projectId=00000000-0000-0000-0000-000000000000' \
--header 'Content-Type: application/json' \
--data '{ "id": "example", "prompt": "example", "dependsOn": [ "example" ], "gates": [ "select" ] }'
projectId
required

Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.

string
>= 1 characters
Example
00000000-0000-0000-0000-000000000000

Project scope. Required on scoped list and root-create operations; requests without a resolvable project are rejected with 400. There is no default project.

Media type application/json
object
id
required
string
/^[a-z][a-z0-9_]*$/
prompt
required
string
dependsOn
Array<string>
gates
Array<string>
Allowed values: select build test run deploy

Success

Media type application/json
object
id
required
string
prompt
required
string
dependsOn
Array<string>
gates
Array<string>
Allowed values: select build test run deploy
createdAt
required
string | null format: date-time
updatedAt
string | null format: date-time
deletedAt
string | null format: date-time
projectId
required
string
Example
{
"gates": [
"select"
]
}

Criterion already exists