swagger: '2.0' info: title: GitLab access_requests pipeline_schedules API version: v4 description: Operations related to access requests host: gitlab.com produces: - application/json tags: - name: pipeline_schedules description: Operations about pipeline_schedules paths: /api/v4/projects/{id}/pipeline_schedules: get: description: Get all pipeline schedules produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: query name: page description: Current page number type: integer format: int32 default: 1 required: false example: 1 - in: query name: per_page description: Number of items per page type: integer format: int32 default: 20 required: false example: 20 - in: query name: scope description: The scope of pipeline schedules type: string enum: - active - inactive required: false example: active responses: '200': description: Get all pipeline schedules schema: type: array items: $ref: '#/definitions/API_Entities_Ci_PipelineSchedule' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: getApiV4ProjectsIdPipelineSchedules post: description: Create a new pipeline schedule produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - name: postApiV4ProjectsIdPipelineSchedules in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdPipelineSchedules' responses: '201': description: Create a new pipeline schedule schema: $ref: '#/definitions/API_Entities_Ci_PipelineScheduleDetails' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: postApiV4ProjectsIdPipelineSchedules /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}: get: description: Get a single pipeline schedule produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 responses: '200': description: Get a single pipeline schedule schema: $ref: '#/definitions/API_Entities_Ci_PipelineScheduleDetails' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: getApiV4ProjectsIdPipelineSchedulesPipelineScheduleId put: description: Edit a pipeline schedule produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 - name: putApiV4ProjectsIdPipelineSchedulesPipelineScheduleId in: body required: true schema: $ref: '#/definitions/putApiV4ProjectsIdPipelineSchedulesPipelineScheduleId' responses: '200': description: Edit a pipeline schedule schema: $ref: '#/definitions/API_Entities_Ci_PipelineScheduleDetails' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: putApiV4ProjectsIdPipelineSchedulesPipelineScheduleId delete: description: Delete a pipeline schedule produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 responses: '204': description: Delete a pipeline schedule '401': description: Unauthorized '403': description: Forbidden '404': description: Not found '412': description: Precondition Failed tags: - pipeline_schedules operationId: deleteApiV4ProjectsIdPipelineSchedulesPipelineScheduleId /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/pipelines: get: description: Get all pipelines triggered from a pipeline schedule produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: query name: page description: Current page number type: integer format: int32 default: 1 required: false example: 1 - in: query name: per_page description: Number of items per page type: integer format: int32 default: 20 required: false example: 20 - in: path name: pipeline_schedule_id description: The pipeline schedule ID type: integer format: int32 required: true example: 13 - in: query name: scope description: The scope of pipelines type: string enum: - running - pending - finished - branches - tags required: false example: pending - in: query name: status description: The status of pipelines type: string enum: - created - waiting_for_resource - preparing - waiting_for_callback - pending - running - success - failed - canceling - canceled - skipped - manual - scheduled required: false example: pending - in: query name: updated_before description: 'Return pipelines updated before the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ' type: string format: date-time required: false example: '2015-12-24T15:51:21.880Z' - in: query name: updated_after description: 'Return pipelines updated after the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ' type: string format: date-time required: false example: '2015-12-24T15:51:21.880Z' - in: query name: created_before description: 'Return pipelines created before the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ' type: string format: date-time required: false example: '2015-12-24T15:51:21.880Z' - in: query name: created_after description: 'Return pipelines created after the specified datetime. Format: ISO 8601 YYYY-MM-DDTHH:MM:SSZ' type: string format: date-time required: false example: '2015-12-24T15:51:21.880Z' - in: query name: sort description: Sort pipelines type: string default: asc enum: - asc - desc required: false example: desc responses: '200': description: Get all pipelines triggered from a pipeline schedule schema: type: array items: $ref: '#/definitions/API_Entities_Ci_PipelineBasic' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: getApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdPipelines /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/take_ownership: post: description: Take ownership of a pipeline schedule produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 responses: '201': description: Take ownership of a pipeline schedule schema: $ref: '#/definitions/API_Entities_Ci_PipelineScheduleDetails' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdTakeOwnership /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/play: post: summary: Play a scheduled pipeline immediately description: This feature was added in GitLab 12.8 produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 responses: '201': description: Play a scheduled pipeline immediately '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdPlay /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/variables: post: description: Create a new pipeline schedule variable produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 - name: postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariables in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariables' responses: '201': description: Create a new pipeline schedule variable schema: $ref: '#/definitions/API_Entities_Ci_Variable' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariables /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/variables/{key}: get: description: Get a single pipeline schedule variable produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 - in: path name: key description: The key of the variable type: string required: true example: NEW_VARIABLE responses: '200': description: Get a single pipeline schedule variable schema: $ref: '#/definitions/API_Entities_Ci_Variable' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: getApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariablesKey put: description: Edit a pipeline schedule variable produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 - in: path name: key description: The key of the variable type: string required: true example: NEW_VARIABLE - name: putApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariablesKey in: body required: true schema: $ref: '#/definitions/putApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariablesKey' responses: '200': description: Edit a pipeline schedule variable schema: $ref: '#/definitions/API_Entities_Ci_Variable' '400': description: Bad request '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: putApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariablesKey delete: description: Delete a pipeline schedule variable produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true example: 18 - in: path name: pipeline_schedule_id description: The pipeline schedule id type: integer format: int32 required: true example: 13 - in: path name: key description: The key of the variable type: string required: true example: NEW_VARIABLE responses: '202': description: Delete a pipeline schedule variable schema: $ref: '#/definitions/API_Entities_Ci_Variable' '401': description: Unauthorized '403': description: Forbidden '404': description: Not found tags: - pipeline_schedules operationId: deleteApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariablesKey definitions: postApiV4ProjectsIdPipelineSchedules: type: object properties: description: type: string description: The description of pipeline schedule example: Test schedule pipeline ref: type: string description: The branch/tag name will be triggered example: develop cron: type: string description: The cron example: '* * * * *' cron_timezone: type: string description: The timezone default: UTC example: Asia/Tokyo active: type: boolean description: The activation of pipeline schedule default: true example: true inputs: type: array description: Inputs for the pipeline schedule example: - name: array_input value: - 1 - 2 - name: boolean_input value: true items: type: object properties: name: type: string description: The name of the input example: deploy_strategy value: type: string description: The value of the input example: blue-green required: - name - value required: - description - ref - cron description: Create a new pipeline schedule API_Entities_CustomAttribute: type: object properties: key: type: string example: foo value: type: string example: bar required: - key - value description: API_Entities_CustomAttribute model putApiV4ProjectsIdPipelineSchedulesPipelineScheduleId: type: object properties: description: type: string description: The description of pipeline schedule example: Test schedule pipeline ref: type: string description: The branch/tag name will be triggered example: develop cron: type: string description: The cron example: '* * * * *' cron_timezone: type: string description: The timezone example: Asia/Tokyo active: type: boolean description: The activation of pipeline schedule example: true inputs: type: array description: Inputs for the pipeline schedule example: - name: deploy_strategy value: blue-green items: type: object properties: name: type: string description: The name of the input example: deploy_strategy destroy: type: boolean description: Whether to delete the input default: false value: type: string description: The value of the input example: blue-green required: - name - value description: Edit a pipeline schedule API_Entities_Ci_PipelineBasic: type: object properties: id: type: integer format: int32 example: 1 iid: type: integer format: int32 example: 2 project_id: type: integer format: int32 example: 3 sha: type: string example: 0ec9e58fdfca6cdd6652c083c9edb53abc0bad52 ref: type: string example: feature-branch status: type: string example: success source: type: string example: push created_at: type: string format: date-time example: '2022-10-21T16:49:48.000+02:00' updated_at: type: string format: date-time example: '2022-10-21T16:49:48.000+02:00' web_url: type: string example: https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61 required: - id - iid - project_id - sha - ref - status - source - created_at - updated_at - web_url description: API_Entities_Ci_PipelineBasic model API_Entities_Ci_Input: type: object properties: name: type: string value: type: string required: - name - value API_Entities_Ci_PipelineSchedule: type: object properties: id: type: integer format: int32 example: 13 description: type: string example: Test schedule pipeline ref: type: string example: develop cron: type: string example: '* * * * *' cron_timezone: type: string example: Asia/Tokyo next_run_at: type: string format: date-time example: '2017-05-19T13:41:00.000Z' active: type: boolean example: true created_at: type: string format: date-time example: '2017-05-19T13:31:08.849Z' updated_at: type: string format: date-time example: '2017-05-19T13:40:17.727Z' owner: $ref: '#/definitions/API_Entities_UserBasic' inputs: $ref: '#/definitions/API_Entities_Ci_Input' required: - id - description - ref - cron - cron_timezone - next_run_at - active - created_at - updated_at - owner description: API_Entities_Ci_PipelineSchedule model API_Entities_UserBasic: type: object properties: id: type: integer format: int32 example: 1 username: type: string example: admin public_email: type: string example: john@example.com name: type: string example: Administrator state: type: string example: active locked: type: boolean avatar_url: type: string example: https://gravatar.com/avatar/1 avatar_path: type: string example: /user/avatar/28/The-Big-Lebowski-400-400.png custom_attributes: type: array items: $ref: '#/definitions/API_Entities_CustomAttribute' web_url: type: string example: https://gitlab.example.com/root required: - id - username - public_email - name - state - locked - avatar_url - web_url description: API_Entities_UserBasic model putApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariablesKey: type: object properties: value: type: string description: The value of the variable example: new value variable_type: type: string description: The type of variable, must be one of env_var or file enum: - env_var - file default: env_var description: Edit a pipeline schedule variable API_Entities_Ci_PipelineScheduleDetails: type: object properties: id: type: integer format: int32 example: 13 description: type: string example: Test schedule pipeline ref: type: string example: develop cron: type: string example: '* * * * *' cron_timezone: type: string example: Asia/Tokyo next_run_at: type: string format: date-time example: '2017-05-19T13:41:00.000Z' active: type: boolean example: true created_at: type: string format: date-time example: '2017-05-19T13:31:08.849Z' updated_at: type: string format: date-time example: '2017-05-19T13:40:17.727Z' owner: $ref: '#/definitions/API_Entities_UserBasic' inputs: $ref: '#/definitions/API_Entities_Ci_Input' last_pipeline: $ref: '#/definitions/API_Entities_Ci_PipelineBasic' variables: $ref: '#/definitions/API_Entities_Ci_Variable' required: - id - description - ref - cron - cron_timezone - next_run_at - active - created_at - updated_at - owner - last_pipeline description: API_Entities_Ci_PipelineScheduleDetails model API_Entities_Ci_Variable: type: object properties: variable_type: type: string example: env_var key: type: string example: TEST_VARIABLE_1 value: type: string example: TEST_1 hidden: type: boolean protected: type: boolean masked: type: boolean raw: type: boolean environment_scope: type: string example: '*' description: type: string example: This variable is being used for ... required: - variable_type - key - value description: API_Entities_Ci_Variable model postApiV4ProjectsIdPipelineSchedulesPipelineScheduleIdVariables: type: object properties: key: type: string description: The key of the variable example: NEW_VARIABLE value: type: string description: The value of the variable example: new value variable_type: type: string description: The type of variable, must be one of env_var or file. Defaults to env_var enum: - env_var - file default: env_var required: - key - value description: Create a new pipeline schedule variable securityDefinitions: access_token_header: type: apiKey name: PRIVATE-TOKEN in: header access_token_query: type: apiKey name: private_token in: query