Use this API to interact with deployment freeze periods.

List all freeze periods

GET /api/v4/projects/{id}/freeze_periods

Lists all freeze periods for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesFreezePeriod
400Bad Request—
401Unauthorized—
404Not found—

Create a freeze period

POST /api/v4/projects/{id}/freeze_periods

Creates a freeze period for a specified project. You must have the Maintainer or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project

Request body (application/json)

PropertyTypeDescription
cron_timezoneStringThe time zone for the cron fields, defaults to UTC if not provided
freeze_end
Required
StringEnd of the freeze period in cron format
freeze_start
Required
StringStart of the freeze period in cron format

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesFreezePeriod
400Bad request—
401Unauthorized—
404Not Found—

Retrieve a freeze period

GET /api/v4/projects/{id}/freeze_periods/{freeze_period_id}

Retrieves a freeze period for a specified freeze_period_id. You must have the Reporter, Developer, Maintainer, or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
freeze_period_id
Path, required
IntegerThe ID of the freeze period

Responses

CodeDescriptionSchema
200OKAPIEntitiesFreezePeriod
400Bad Request—
401Unauthorized—
404Not found—

Update a freeze period

PUT /api/v4/projects/{id}/freeze_periods/{freeze_period_id}

Updates a freeze period for a specified freeze_period_id. You must have the Maintainer or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
freeze_period_id
Path, required
IntegerThe ID of the freeze period

Request body (application/json)

PropertyTypeDescription
cron_timezoneStringThe time zone for the cron fields
freeze_endStringEnd of the freeze period in cron format
freeze_startStringStart of the freeze period in cron format

Responses

CodeDescriptionSchema
200OKAPIEntitiesFreezePeriod
400Bad request—
401Unauthorized—
404Not Found—

Delete a freeze period

DELETE /api/v4/projects/{id}/freeze_periods/{freeze_period_id}

Deletes a freeze period for a specified freeze_period_id. You must have the Maintainer or Owner role for the project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project
freeze_period_id
Path, required
IntegerThe ID of the freeze period

Responses

CodeDescriptionSchema
200OKAPIEntitiesFreezePeriod
400Bad Request—
401Unauthorized—
404Not Found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesFreezePeriod

PropertyTypeDescription
created_atString (date-time)Example: 2020-05-15T17:03:35.702Z
cron_timezoneStringExample: UTC
freeze_endStringExample: 0 8 * * 1
freeze_startStringExample: 0 23 * * 5
idInteger (int64)Example: 1
updated_atString (date-time)Example: 2020-05-15T17:03:35.702Z