Skip to main content
POST
/
project
/
{projectId}
/
deploymentRule
Create a deployment rule
curl --request POST \
  --url https://api.qovery.com/project/{projectId}/deploymentRule \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "project-rule",
  "description": "description project rule",
  "mode": "PRODUCTION",
  "cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "auto_stop": false,
  "timezone": "UTC",
  "start_time": "1970-01-01T08:00:00.000Z",
  "stop_time": "1970-01-01T19:00:00.000Z",
  "weekdays": [
    "MONDAY"
  ],
  "wildcard": ""
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "project-rule",
  "description": "description project rule",
  "mode": "PRODUCTION",
  "cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "auto_stop": false,
  "timezone": "UTC",
  "start_time": "1970-01-01T08:00:00.000Z",
  "stop_time": "1970-01-01T19:00:00.000Z",
  "weekdays": [
    "MONDAY"
  ],
  "wildcard": "",
  "priority_index": 123
}

Authorizations

Authorization
string
header
required

Token API are generated by Qovery to manage machine to machine interaction and do not have a TTL. Prefix your token with "Token ". Curl Example: curl https://console.qovery.com/organization -H "Authorization: Token $qovery_token"

Path Parameters

projectId
string<uuid>
required

Project ID

Body

application/json
name
string
required

name is case insensitive

Example:

"project-rule"

mode
enum<string>
required
Available options:
DEVELOPMENT,
PREVIEW,
PRODUCTION,
STAGING
Example:

"PRODUCTION"

cluster_id
string<uuid>
required
timezone
string
required
Example:

"UTC"

start_time
string<date-time>
required
Example:

"1970-01-01T08:00:00.000Z"

stop_time
string<date-time>
required
Example:

"1970-01-01T19:00:00.000Z"

weekdays
enum<string>[]
required
wildcard
string
default:""
required

wildcard pattern composed of '?' and/or '*' used to target new created environments

description
string | null
Example:

"description project rule"

auto_stop
boolean
default:false

Response

Create deployment rule

id
string<uuid>
required
created_at
string<date-time>
required
name
string
required

name is case insensitive

Example:

"project-rule"

mode
enum<string>
required
Available options:
DEVELOPMENT,
PREVIEW,
PRODUCTION,
STAGING
Example:

"PRODUCTION"

cluster_id
string<uuid>
required
timezone
string
required
Example:

"UTC"

start_time
string<date-time>
required
Example:

"1970-01-01T08:00:00.000Z"

stop_time
string<date-time>
required
Example:

"1970-01-01T19:00:00.000Z"

weekdays
enum<string>[]
required
wildcard
string
default:""
required

wildcard pattern composed of '?' and/or '*' used to target new created environments

updated_at
string<date-time>
description
string | null
Example:

"description project rule"

auto_stop
boolean
default:false
priority_index
integer

used to select the first deployment rule to match new created environments