openapi: 3.0.3 info: title: Semaphore Public API description: 'The Semaphore Public API is a RESTful API that allows you to interact with Semaphore CI/CD. ## Authorization Authorization is done via bearer token. You can obtain a token by visiting your [account settings](https://me.semaphoreci.com/account). ## Pagination with link headers Each list request supports pagination. List responses include a [link header](https://datatracker.ietf.org/doc/html/rfc5988#section-5) with the pagination URLs. Link headers contain next, previous, first relative URLs. ' version: v2 contact: url: https://semaphore.io/contact email: support@semaphoreci.com termsOfService: https://semaphore.io/terms license: name: Proprietary url: https://semaphore.io/terms servers: - url: https://{org_name}.semaphoreci.com/api/v2 variables: org_name: default: me description: Organization name security: - authorization: [] components: securitySchemes: authorization: description: Token that you get from semaphore [account settings](https://me.semaphoreci.com/account). name: authorization scheme: bearer type: http paths: /agents: get: operationId: SelfHostedAgents.List description: List all registered self-hosted agents. Optionally filter by agent type. tags: - SelfHostedAgents parameters: - description: The name of the agent type to filter for. If not specified, agents for all agent types will be returned. in: query name: agent_type required: false schema: description: Name of the agent type type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: description: Self-hosted agent properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgent description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: SelfHostedAgent readOnly: true title: Kind type: string metadata: description: Metadata of the agent, all fields are read only properties: arch: description: Architecture the agent is built for type: string connected_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string disabled_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string hostname: description: Hostname the agent is running on type: string ip_address: description: The public IP address of the agent type: string name: description: Unique name of the agent type: string org_id: description: ID of a Organization example: c9746a87-aa53-48dd-96c6-737e27bee4f7 format: uuid title: Organization.ID type: string os: description: OS the agent is running on example: Ubuntu 20.04.6 LTS type: string pid: description: '' type: integer status: enum: - WAITING_FOR_JOB - RUNNING_JOB type: string type: description: Self-hosted agent type of the agent example: s1-my-type type: string version: description: Version of the agent example: v2.2.6 type: string type: object required: - apiVersion - kind title: SelfHostedAgents.Agent type: object title: SelfHostedAgents.ListAgentsResponse type: array description: Self-hosted agent type '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /agents/{agent_name}: get: operationId: SelfHostedAgents.Describe description: Describe a single registered self-hosted agent by agent name. tags: - SelfHostedAgents parameters: - description: Unique name of the self-hosted agent. in: path name: agent_name required: true schema: description: Unique name of the self-hosted agent type: string responses: '200': content: application/json: schema: description: Self-hosted agent properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgent description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: SelfHostedAgent readOnly: true title: Kind type: string metadata: description: Metadata of the agent, all fields are read only properties: arch: description: Architecture the agent is built for type: string connected_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string disabled_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string hostname: description: Hostname the agent is running on type: string ip_address: description: The public IP address of the agent type: string name: description: Unique name of the agent type: string org_id: description: ID of a Organization example: c9746a87-aa53-48dd-96c6-737e27bee4f7 format: uuid title: Organization.ID type: string os: description: OS the agent is running on example: Ubuntu 20.04.6 LTS type: string pid: description: '' type: integer status: enum: - WAITING_FOR_JOB - RUNNING_JOB type: string type: description: Self-hosted agent type of the agent example: s1-my-type type: string version: description: Version of the agent example: v2.2.6 type: string type: object required: - apiVersion - kind title: SelfHostedAgents.Agent type: object description: Self-hosted agents '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /dashboards: post: operationId: Dashboards.Create description: Create a dashboard. tags: - Dashboards requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Dashboard description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Dashboard readOnly: true title: Kind type: string metadata: description: Metadata of the dashboard, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Dashboard example: 645d2d5b-603c-49b2-9022-594297b60aa1 format: uuid title: Dashboard.ID type: string name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string org_id: description: ID of a Organization example: a44db728-f627-4560-a548-9f61d61e8780 format: uuid title: Organization.ID type: string title: description: Title of the dashboard type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the dashboard properties: name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string title: description: Title of the dashboard type: string widgets: description: List of widgets on the dashboard items: description: Widget on the dashboard properties: filters: additionalProperties: type: string description: Object with filters for the widget type: object name: description: Name of the widget type: string type: description: Type of the widget type: string required: - name - type type: object type: array required: - name - title - widgets type: object required: - apiVersion - kind - metadata - spec title: Dashboards.Dashboard type: object description: Dashboard to be created required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Dashboard description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Dashboard readOnly: true title: Kind type: string metadata: description: Metadata of the dashboard, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Dashboard example: 645d2d5b-603c-49b2-9022-594297b60aa1 format: uuid title: Dashboard.ID type: string name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string org_id: description: ID of a Organization example: a44db728-f627-4560-a548-9f61d61e8780 format: uuid title: Organization.ID type: string title: description: Title of the dashboard type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the dashboard properties: name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string title: description: Title of the dashboard type: string widgets: description: List of widgets on the dashboard items: description: Widget on the dashboard properties: filters: additionalProperties: type: string description: Object with filters for the widget type: object name: description: Name of the widget type: string type: description: Type of the widget type: string required: - name - type type: object type: array required: - name - title - widgets type: object required: - apiVersion - kind - metadata - spec title: Dashboards.Dashboard type: object description: Created dashboard '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Dashboards.List description: "List all organization level dashboards.\n If the response does not fit all the dashboards refer to\ \ the link header to get next page url." tags: - Dashboards parameters: - description: Ordering of the dashboards in: query name: order required: false schema: default: BY_NAME_ASC enum: - BY_NAME_ASC - BY_CREATE_TIME_ASC type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Dashboard description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: Dashboard readOnly: true title: Kind type: string metadata: description: Metadata of the dashboard, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Dashboard example: 645d2d5b-603c-49b2-9022-594297b60aa1 format: uuid title: Dashboard.ID type: string name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string org_id: description: ID of a Organization example: a44db728-f627-4560-a548-9f61d61e8780 format: uuid title: Organization.ID type: string title: description: Title of the dashboard type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the dashboard properties: name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string title: description: Title of the dashboard type: string widgets: description: List of widgets on the dashboard items: description: Widget on the dashboard properties: filters: additionalProperties: type: string description: Object with filters for the widget type: object name: description: Name of the widget type: string type: description: Type of the widget type: string required: - name - type type: object type: array required: - name - title - widgets type: object required: - apiVersion - kind - metadata - spec title: Dashboards.Dashboard type: object title: Dashboards.ListResponse type: array description: List of dashboards '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /dashboards/{id_or_name}: delete: operationId: Dashboards.Delete description: Delete a dashboard by its id or name. tags: - Dashboards parameters: - description: Id or name of the dashboard in: path name: id_or_name required: true schema: anyOf: - description: ID of a Dashboard example: 825c58c3-bf1a-4680-a186-21df37d5907d format: uuid title: Dashboard.ID type: string - description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string responses: '200': content: application/json: schema: description: '' properties: dashboard_id: description: ID of a Dashboard example: ec3078ea-ba19-4f50-927c-3fc8174899bd format: uuid title: Dashboard.ID type: string title: Dashboards.DeleteResponse type: object description: ID of the deleted dashboard '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Dashboards.Describe description: Describe a dashboard by its id or name. tags: - Dashboards parameters: - description: Id or name of the dashboard in: path name: id_or_name required: true schema: anyOf: - description: ID of a Dashboard example: 2757e6f0-fcdb-4aa7-b24f-9b76b76efc0d format: uuid title: Dashboard.ID type: string - description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Dashboard description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Dashboard readOnly: true title: Kind type: string metadata: description: Metadata of the dashboard, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Dashboard example: 645d2d5b-603c-49b2-9022-594297b60aa1 format: uuid title: Dashboard.ID type: string name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string org_id: description: ID of a Organization example: a44db728-f627-4560-a548-9f61d61e8780 format: uuid title: Organization.ID type: string title: description: Title of the dashboard type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the dashboard properties: name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string title: description: Title of the dashboard type: string widgets: description: List of widgets on the dashboard items: description: Widget on the dashboard properties: filters: additionalProperties: type: string description: Object with filters for the widget type: object name: description: Name of the widget type: string type: description: Type of the widget type: string required: - name - type type: object type: array required: - name - title - widgets type: object required: - apiVersion - kind - metadata - spec title: Dashboards.Dashboard type: object description: Dashboard '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: Dashboards.Update description: Update a dashboard by its id or name. tags: - Dashboards parameters: - description: Id or name of the dashboard in: path name: id_or_name required: true schema: anyOf: - description: ID of a Dashboard example: 3c3b984d-1ec0-4223-a39e-36a686ade3bb format: uuid title: Dashboard.ID type: string - description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Dashboard description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Dashboard readOnly: true title: Kind type: string metadata: description: Metadata of the dashboard, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Dashboard example: 645d2d5b-603c-49b2-9022-594297b60aa1 format: uuid title: Dashboard.ID type: string name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string org_id: description: ID of a Organization example: a44db728-f627-4560-a548-9f61d61e8780 format: uuid title: Organization.ID type: string title: description: Title of the dashboard type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the dashboard properties: name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string title: description: Title of the dashboard type: string widgets: description: List of widgets on the dashboard items: description: Widget on the dashboard properties: filters: additionalProperties: type: string description: Object with filters for the widget type: object name: description: Name of the widget type: string type: description: Type of the widget type: string required: - name - type type: object type: array required: - name - title - widgets type: object required: - apiVersion - kind - metadata - spec title: Dashboards.Dashboard type: object description: Dashboard to be updated required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Dashboard description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Dashboard readOnly: true title: Kind type: string metadata: description: Metadata of the dashboard, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Dashboard example: 645d2d5b-603c-49b2-9022-594297b60aa1 format: uuid title: Dashboard.ID type: string name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string org_id: description: ID of a Organization example: a44db728-f627-4560-a548-9f61d61e8780 format: uuid title: Organization.ID type: string title: description: Title of the dashboard type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the dashboard properties: name: description: Dashboard name must match the regex example: my-dashboard minLength: 1 pattern: \A(?!-)[a-z0-9\-]+\z title: Dashboards.Name type: string title: description: Title of the dashboard type: string widgets: description: List of widgets on the dashboard items: description: Widget on the dashboard properties: filters: additionalProperties: type: string description: Object with filters for the widget type: object name: description: Name of the widget type: string type: description: Type of the widget type: string required: - name - type type: object type: array required: - name - title - widgets type: object required: - apiVersion - kind - metadata - spec title: Dashboards.Dashboard type: object description: Updated dashboard '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /notifications: post: operationId: Notifications.Create description: Create a notification. tags: - Notifications requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Notification description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Notification readOnly: true title: Kind type: string metadata: description: Metadata of the notification, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Notification example: ee251df7-6946-4544-840d-b8ac7c02c3e3 format: uuid title: Notification.ID type: string name: description: Name of the notification type: string org_id: description: ID of a Organization example: 83293713-b759-46ba-8432-f4c641e3bf14 format: uuid title: Organization.ID type: string status: properties: failures: description: A failure contains a timestamp and a description of a failure items: properties: description: description: Description of the failure type: string timestamp: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string type: object type: array title: Notifications.Notification.Status type: object updated_at: description: Timestamp in ISO 8601 format format: date-time nullable: true title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the notification properties: name: description: Name of the notification type: string rules: description: 'Rules must have at least one element. Maximal number of rules: 20.' items: properties: filter: description: Filter for the notification rule properties: branches: description: "List of branch names to trigger this rule. Default: all branches.\n \ \ Examples:\n - \"master\" - strictly match the master branch\n \ \ - \"/^release-*/\" - regex matches branches that start with 'release-' prefix" items: type: string type: array pipelines: default: semaphore.yml description: "List of pipeline names to trigger this rule. The rule matches pipeline file\ \ name disregarding the path.\n Examples:\n - \"semaphore.yml\"\ \ - will match `semaphore.yml` pipeline\n - \"/^stg-*/\" - regex matches pipelines\ \ that start with 'stg-' prefix" items: type: string type: array projects: description: "List of project names to trigger this rule. Default no projects.\n \ \ Examples:\n - \"cli\" - strictly match the CLI project\n \ \ - \"/^s2-*/\" - regex mathes projects that start with 's2-' prefix" items: type: string type: array results: description: 'List of results to trigger this rule. Default: every result.' items: description: 'Either a string or a regex, possible values: `PASSED`, `STOPPED`, `CANCELED`, `FAILED`.' enum: - PASSED - STOPPED - CANCELED - FAILED type: string type: array type: object name: description: Name of the notification rule type: string notify: description: Notification settings properties: email: description: Email notification settings nullable: true properties: bcc: description: Email BCC items: type: string type: array cc: description: Email CC items: type: string minItems: 1 type: array content: description: Email content type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string subject: description: Email subject type: string required: - cc type: object slack: description: Slack notification settings nullable: true properties: channels: description: Slack channels items: type: string type: array endpoint: description: Slack endpoint type: string message: description: Slack message type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string required: - endpoint type: object webhook: description: Webhook notification settings nullable: true properties: method: default: POST description: Webhook http verb type: string retries: default: 3 description: Number of times to retry delivery. maximum: 3 minimum: 1 type: integer secret: description: Name of a Semaphore secret, which will be used to sign the payload. type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string timeout: default: 500 description: Webhook delivery timeout in ms type: integer url: description: Webhook HTTP endpoint to hit. type: string required: - url type: object type: object title: Notifications.Notification.Rule type: object maxLength: 20 minLength: 1 type: array required: - name type: object required: - apiVersion - kind - metadata - spec title: Notifications.Notification type: object description: Notification to be created required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Notification description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Notification readOnly: true title: Kind type: string metadata: description: Metadata of the notification, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Notification example: ee251df7-6946-4544-840d-b8ac7c02c3e3 format: uuid title: Notification.ID type: string name: description: Name of the notification type: string org_id: description: ID of a Organization example: 83293713-b759-46ba-8432-f4c641e3bf14 format: uuid title: Organization.ID type: string status: properties: failures: description: A failure contains a timestamp and a description of a failure items: properties: description: description: Description of the failure type: string timestamp: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string type: object type: array title: Notifications.Notification.Status type: object updated_at: description: Timestamp in ISO 8601 format format: date-time nullable: true title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the notification properties: name: description: Name of the notification type: string rules: description: 'Rules must have at least one element. Maximal number of rules: 20.' items: properties: filter: description: Filter for the notification rule properties: branches: description: "List of branch names to trigger this rule. Default: all branches.\n \ \ Examples:\n - \"master\" - strictly match the master branch\n \ \ - \"/^release-*/\" - regex matches branches that start with 'release-' prefix" items: type: string type: array pipelines: default: semaphore.yml description: "List of pipeline names to trigger this rule. The rule matches pipeline file\ \ name disregarding the path.\n Examples:\n - \"semaphore.yml\"\ \ - will match `semaphore.yml` pipeline\n - \"/^stg-*/\" - regex matches\ \ pipelines that start with 'stg-' prefix" items: type: string type: array projects: description: "List of project names to trigger this rule. Default no projects.\n \ \ Examples:\n - \"cli\" - strictly match the CLI project\n \ \ - \"/^s2-*/\" - regex mathes projects that start with 's2-' prefix" items: type: string type: array results: description: 'List of results to trigger this rule. Default: every result.' items: description: 'Either a string or a regex, possible values: `PASSED`, `STOPPED`, `CANCELED`, `FAILED`.' enum: - PASSED - STOPPED - CANCELED - FAILED type: string type: array type: object name: description: Name of the notification rule type: string notify: description: Notification settings properties: email: description: Email notification settings nullable: true properties: bcc: description: Email BCC items: type: string type: array cc: description: Email CC items: type: string minItems: 1 type: array content: description: Email content type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string subject: description: Email subject type: string required: - cc type: object slack: description: Slack notification settings nullable: true properties: channels: description: Slack channels items: type: string type: array endpoint: description: Slack endpoint type: string message: description: Slack message type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string required: - endpoint type: object webhook: description: Webhook notification settings nullable: true properties: method: default: POST description: Webhook http verb type: string retries: default: 3 description: Number of times to retry delivery. maximum: 3 minimum: 1 type: integer secret: description: Name of a Semaphore secret, which will be used to sign the payload. type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string timeout: default: 500 description: Webhook delivery timeout in ms type: integer url: description: Webhook HTTP endpoint to hit. type: string required: - url type: object type: object title: Notifications.Notification.Rule type: object maxLength: 20 minLength: 1 type: array required: - name type: object required: - apiVersion - kind - metadata - spec title: Notifications.Notification type: object description: Notification '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Notifications.List description: List notifications in organization. tags: - Notifications parameters: - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Notification description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: Notification readOnly: true title: Kind type: string metadata: description: Metadata of the notification, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Notification example: ee251df7-6946-4544-840d-b8ac7c02c3e3 format: uuid title: Notification.ID type: string name: description: Name of the notification type: string org_id: description: ID of a Organization example: 83293713-b759-46ba-8432-f4c641e3bf14 format: uuid title: Organization.ID type: string status: properties: failures: description: A failure contains a timestamp and a description of a failure items: properties: description: description: Description of the failure type: string timestamp: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string type: object type: array title: Notifications.Notification.Status type: object updated_at: description: Timestamp in ISO 8601 format format: date-time nullable: true title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the notification properties: name: description: Name of the notification type: string rules: description: 'Rules must have at least one element. Maximal number of rules: 20.' items: properties: filter: description: Filter for the notification rule properties: branches: description: "List of branch names to trigger this rule. Default: all branches.\n \ \ Examples:\n - \"master\" - strictly match the master branch\n\ \ - \"/^release-*/\" - regex matches branches that start with 'release-'\ \ prefix" items: type: string type: array pipelines: default: semaphore.yml description: "List of pipeline names to trigger this rule. The rule matches pipeline file\ \ name disregarding the path.\n Examples:\n - \"semaphore.yml\"\ \ - will match `semaphore.yml` pipeline\n - \"/^stg-*/\" - regex matches\ \ pipelines that start with 'stg-' prefix" items: type: string type: array projects: description: "List of project names to trigger this rule. Default no projects.\n \ \ Examples:\n - \"cli\" - strictly match the CLI project\n \ \ - \"/^s2-*/\" - regex mathes projects that start with 's2-' prefix" items: type: string type: array results: description: 'List of results to trigger this rule. Default: every result.' items: description: 'Either a string or a regex, possible values: `PASSED`, `STOPPED`, `CANCELED`, `FAILED`.' enum: - PASSED - STOPPED - CANCELED - FAILED type: string type: array type: object name: description: Name of the notification rule type: string notify: description: Notification settings properties: email: description: Email notification settings nullable: true properties: bcc: description: Email BCC items: type: string type: array cc: description: Email CC items: type: string minItems: 1 type: array content: description: Email content type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string subject: description: Email subject type: string required: - cc type: object slack: description: Slack notification settings nullable: true properties: channels: description: Slack channels items: type: string type: array endpoint: description: Slack endpoint type: string message: description: Slack message type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string required: - endpoint type: object webhook: description: Webhook notification settings nullable: true properties: method: default: POST description: Webhook http verb type: string retries: default: 3 description: Number of times to retry delivery. maximum: 3 minimum: 1 type: integer secret: description: Name of a Semaphore secret, which will be used to sign the payload. type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string timeout: default: 500 description: Webhook delivery timeout in ms type: integer url: description: Webhook HTTP endpoint to hit. type: string required: - url type: object type: object title: Notifications.Notification.Rule type: object maxLength: 20 minLength: 1 type: array required: - name type: object required: - apiVersion - kind - metadata - spec title: Notifications.Notification type: object title: Notifications.ListResponse type: array description: List of notifications in organization '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /notifications/{id_or_name}: delete: operationId: Notifications.Delete description: Delete a notification. tags: - Notifications parameters: - description: Id or name of the notification in: path name: id_or_name required: true schema: anyOf: - description: ID of a Notification example: 93d63136-65d8-46fa-82b8-ba1f5c19e973 format: uuid title: Notification.ID type: string - description: Name of the notification type: string responses: '200': content: application/json: schema: properties: id: description: ID of a Notification example: 8dc3d483-7095-4782-8dc0-4194862ae27c format: uuid title: Notification.ID type: string title: Notifications.DeleteResponse type: object description: Notification '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Notifications.Describe description: Describe a notification. tags: - Notifications parameters: - description: Id or name of the notification in: path name: id_or_name required: true schema: anyOf: - description: ID of a Notification example: 416c8945-f2d7-4fdf-b884-b94d89f4edad format: uuid title: Notification.ID type: string - description: Name of the notification type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Notification description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Notification readOnly: true title: Kind type: string metadata: description: Metadata of the notification, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Notification example: ee251df7-6946-4544-840d-b8ac7c02c3e3 format: uuid title: Notification.ID type: string name: description: Name of the notification type: string org_id: description: ID of a Organization example: 83293713-b759-46ba-8432-f4c641e3bf14 format: uuid title: Organization.ID type: string status: properties: failures: description: A failure contains a timestamp and a description of a failure items: properties: description: description: Description of the failure type: string timestamp: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string type: object type: array title: Notifications.Notification.Status type: object updated_at: description: Timestamp in ISO 8601 format format: date-time nullable: true title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the notification properties: name: description: Name of the notification type: string rules: description: 'Rules must have at least one element. Maximal number of rules: 20.' items: properties: filter: description: Filter for the notification rule properties: branches: description: "List of branch names to trigger this rule. Default: all branches.\n \ \ Examples:\n - \"master\" - strictly match the master branch\n \ \ - \"/^release-*/\" - regex matches branches that start with 'release-' prefix" items: type: string type: array pipelines: default: semaphore.yml description: "List of pipeline names to trigger this rule. The rule matches pipeline file\ \ name disregarding the path.\n Examples:\n - \"semaphore.yml\"\ \ - will match `semaphore.yml` pipeline\n - \"/^stg-*/\" - regex matches\ \ pipelines that start with 'stg-' prefix" items: type: string type: array projects: description: "List of project names to trigger this rule. Default no projects.\n \ \ Examples:\n - \"cli\" - strictly match the CLI project\n \ \ - \"/^s2-*/\" - regex mathes projects that start with 's2-' prefix" items: type: string type: array results: description: 'List of results to trigger this rule. Default: every result.' items: description: 'Either a string or a regex, possible values: `PASSED`, `STOPPED`, `CANCELED`, `FAILED`.' enum: - PASSED - STOPPED - CANCELED - FAILED type: string type: array type: object name: description: Name of the notification rule type: string notify: description: Notification settings properties: email: description: Email notification settings nullable: true properties: bcc: description: Email BCC items: type: string type: array cc: description: Email CC items: type: string minItems: 1 type: array content: description: Email content type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string subject: description: Email subject type: string required: - cc type: object slack: description: Slack notification settings nullable: true properties: channels: description: Slack channels items: type: string type: array endpoint: description: Slack endpoint type: string message: description: Slack message type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string required: - endpoint type: object webhook: description: Webhook notification settings nullable: true properties: method: default: POST description: Webhook http verb type: string retries: default: 3 description: Number of times to retry delivery. maximum: 3 minimum: 1 type: integer secret: description: Name of a Semaphore secret, which will be used to sign the payload. type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string timeout: default: 500 description: Webhook delivery timeout in ms type: integer url: description: Webhook HTTP endpoint to hit. type: string required: - url type: object type: object title: Notifications.Notification.Rule type: object maxLength: 20 minLength: 1 type: array required: - name type: object required: - apiVersion - kind - metadata - spec title: Notifications.Notification type: object description: Notification '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: Notifications.Update description: Update a notification. tags: - Notifications parameters: - description: Id or name of the notification to update in: path name: id_or_name required: true schema: anyOf: - description: ID of a Notification example: 0618c238-3830-4a02-8c8e-e1c3fbd730ae format: uuid title: Notification.ID type: string - description: Name of the notification type: string requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Notification description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Notification readOnly: true title: Kind type: string metadata: description: Metadata of the notification, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Notification example: ee251df7-6946-4544-840d-b8ac7c02c3e3 format: uuid title: Notification.ID type: string name: description: Name of the notification type: string org_id: description: ID of a Organization example: 83293713-b759-46ba-8432-f4c641e3bf14 format: uuid title: Organization.ID type: string status: properties: failures: description: A failure contains a timestamp and a description of a failure items: properties: description: description: Description of the failure type: string timestamp: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string type: object type: array title: Notifications.Notification.Status type: object updated_at: description: Timestamp in ISO 8601 format format: date-time nullable: true title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the notification properties: name: description: Name of the notification type: string rules: description: 'Rules must have at least one element. Maximal number of rules: 20.' items: properties: filter: description: Filter for the notification rule properties: branches: description: "List of branch names to trigger this rule. Default: all branches.\n \ \ Examples:\n - \"master\" - strictly match the master branch\n \ \ - \"/^release-*/\" - regex matches branches that start with 'release-' prefix" items: type: string type: array pipelines: default: semaphore.yml description: "List of pipeline names to trigger this rule. The rule matches pipeline file\ \ name disregarding the path.\n Examples:\n - \"semaphore.yml\"\ \ - will match `semaphore.yml` pipeline\n - \"/^stg-*/\" - regex matches pipelines\ \ that start with 'stg-' prefix" items: type: string type: array projects: description: "List of project names to trigger this rule. Default no projects.\n \ \ Examples:\n - \"cli\" - strictly match the CLI project\n \ \ - \"/^s2-*/\" - regex mathes projects that start with 's2-' prefix" items: type: string type: array results: description: 'List of results to trigger this rule. Default: every result.' items: description: 'Either a string or a regex, possible values: `PASSED`, `STOPPED`, `CANCELED`, `FAILED`.' enum: - PASSED - STOPPED - CANCELED - FAILED type: string type: array type: object name: description: Name of the notification rule type: string notify: description: Notification settings properties: email: description: Email notification settings nullable: true properties: bcc: description: Email BCC items: type: string type: array cc: description: Email CC items: type: string minItems: 1 type: array content: description: Email content type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string subject: description: Email subject type: string required: - cc type: object slack: description: Slack notification settings nullable: true properties: channels: description: Slack channels items: type: string type: array endpoint: description: Slack endpoint type: string message: description: Slack message type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string required: - endpoint type: object webhook: description: Webhook notification settings nullable: true properties: method: default: POST description: Webhook http verb type: string retries: default: 3 description: Number of times to retry delivery. maximum: 3 minimum: 1 type: integer secret: description: Name of a Semaphore secret, which will be used to sign the payload. type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string timeout: default: 500 description: Webhook delivery timeout in ms type: integer url: description: Webhook HTTP endpoint to hit. type: string required: - url type: object type: object title: Notifications.Notification.Rule type: object maxLength: 20 minLength: 1 type: array required: - name type: object required: - apiVersion - kind - metadata - spec title: Notifications.Notification type: object description: Notification required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Notification description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Notification readOnly: true title: Kind type: string metadata: description: Metadata of the notification, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string id: description: ID of a Notification example: ee251df7-6946-4544-840d-b8ac7c02c3e3 format: uuid title: Notification.ID type: string name: description: Name of the notification type: string org_id: description: ID of a Organization example: 83293713-b759-46ba-8432-f4c641e3bf14 format: uuid title: Organization.ID type: string status: properties: failures: description: A failure contains a timestamp and a description of a failure items: properties: description: description: Description of the failure type: string timestamp: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string type: object type: array title: Notifications.Notification.Status type: object updated_at: description: Timestamp in ISO 8601 format format: date-time nullable: true title: Timestamp type: string readOnly: true required: - id - name type: object spec: description: Specification of the notification properties: name: description: Name of the notification type: string rules: description: 'Rules must have at least one element. Maximal number of rules: 20.' items: properties: filter: description: Filter for the notification rule properties: branches: description: "List of branch names to trigger this rule. Default: all branches.\n \ \ Examples:\n - \"master\" - strictly match the master branch\n \ \ - \"/^release-*/\" - regex matches branches that start with 'release-' prefix" items: type: string type: array pipelines: default: semaphore.yml description: "List of pipeline names to trigger this rule. The rule matches pipeline file\ \ name disregarding the path.\n Examples:\n - \"semaphore.yml\"\ \ - will match `semaphore.yml` pipeline\n - \"/^stg-*/\" - regex matches\ \ pipelines that start with 'stg-' prefix" items: type: string type: array projects: description: "List of project names to trigger this rule. Default no projects.\n \ \ Examples:\n - \"cli\" - strictly match the CLI project\n \ \ - \"/^s2-*/\" - regex mathes projects that start with 's2-' prefix" items: type: string type: array results: description: 'List of results to trigger this rule. Default: every result.' items: description: 'Either a string or a regex, possible values: `PASSED`, `STOPPED`, `CANCELED`, `FAILED`.' enum: - PASSED - STOPPED - CANCELED - FAILED type: string type: array type: object name: description: Name of the notification rule type: string notify: description: Notification settings properties: email: description: Email notification settings nullable: true properties: bcc: description: Email BCC items: type: string type: array cc: description: Email CC items: type: string minItems: 1 type: array content: description: Email content type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string subject: description: Email subject type: string required: - cc type: object slack: description: Slack notification settings nullable: true properties: channels: description: Slack channels items: type: string type: array endpoint: description: Slack endpoint type: string message: description: Slack message type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string required: - endpoint type: object webhook: description: Webhook notification settings nullable: true properties: method: default: POST description: Webhook http verb type: string retries: default: 3 description: Number of times to retry delivery. maximum: 3 minimum: 1 type: integer secret: description: Name of a Semaphore secret, which will be used to sign the payload. type: string status: enum: - ACTIVE - INACTIVE title: Notifications.Notification.Rule.Status type: string timeout: default: 500 description: Webhook delivery timeout in ms type: integer url: description: Webhook HTTP endpoint to hit. type: string required: - url type: object type: object title: Notifications.Notification.Rule type: object maxLength: 20 minLength: 1 type: array required: - name type: object required: - apiVersion - kind - metadata - spec title: Notifications.Notification type: object description: Notification '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /pipelines: get: operationId: Pipelines.List description: List pipelines using project id or workflow id. tags: - Pipelines parameters: - description: "The id of a project or workflow to list the pipeliens for. Either project_id or wf_id is required.\n\ \ The required_id parameter is just a placeholder" explode: true in: query name: filters required: true schema: oneOf: - properties: project_id: description: id of the project example: 294bb313-5f37-4b23-a088-e177d6d67890 format: uuid type: string wf_id: description: id of a workflow example: a896d216-51b7-4898-bc6b-d9a2e792b31c format: uuid type: string required: - project_id type: object - properties: project_id: description: id of the project example: 10c6a598-4ce0-4a77-975f-09555c2d5df5 format: uuid type: string wf_id: description: id of a workflow example: d58c84a8-103b-41c5-aea9-7457488c7cc4 format: uuid type: string required: - wf_id type: object type: object style: form - description: Label of the branch/pr/tag example: main in: query name: label required: false schema: type: string - description: Yaml file path example: .semaphore/semaphore.yml in: query name: yml_file_path required: false schema: type: string - description: Return only pipelines created before this timestamp example: '2021-01-01T00:00:00Z' in: query name: created_before required: true schema: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string style: form - description: Return only pipelines created after this timestamp example: '2021-01-01T00:00:00Z' in: query name: created_after required: true schema: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string style: form - description: Return only pipelines that finished before this timestamp example: '2021-01-01T00:00:00Z' in: query name: done_before required: false schema: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string - description: Return only pipelines that finished after this timestamp example: '2021-01-01T00:00:00Z' in: query name: done_after required: false schema: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string - description: Direction of the list from the provided token in: query name: direction required: false schema: default: NEXT description: "Use NEXT with value of next_page_token to get next page of results,\n use PREVIOUS with\ \ value of previous_page_token to get previous page of results." enum: - NEXT - PREVIOUS type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: description: Pipelines list. Follow the link headers for fetching additional pages of results items: properties: branch_id: description: ID of the branch in the UI example: a79557f2-dc4e-4807-ba89-601401eb3b1e format: uuid type: string branch_name: description: Name of git branch for which pipeline was scheduled example: main type: string commit_sha: description: Git commit sha for which pipeline was scheduled example: ac3f9796df42db976814e3fee670e11e3fd4b98a type: string created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string done_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string error_description: description: Stores error description when pipeline is MALFORMED example: '' type: string hook_id: description: The id of the hook recieved from VC provider example: cd7f6162-9b6e-435a-89a7-3968b542e9c7 format: uuid type: string name: example: Pipeline type: string org_id: description: ID of a Organization example: 36b2481c-55a4-4ace-9f8a-ac4f7d9549be format: uuid title: Organization.ID type: string pending_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string ppl_id: description: ID of a Pipeline example: 4f49eb59-148b-41bd-90be-20d4f67653f6 format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 77cd0b15-d7af-410c-b462-d3611b0ef1a0 format: uuid title: Project.ID type: string queuing_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string result: description: Result state enum: - PASSED - STOPPED - CANCELED - FAILED title: Pipelines.Result type: string result_reason: description: "Describes the result reason if result is not PASSED\n Reasons for result different\ \ from PASSED\n\n FAILED:\n - TEST - one or more of user tests failed\n \ \ - MALFORMED - Pipeline failed because YAML definition is malformed\n - STUCK - Pipeline\ \ was stuck for some internal reason and then aborted\n STOPPED or CANCELED:\n -\ \ USER - terminated on users requests\n - INTERNAL - terminated for internal reasons (probably\ \ something was stuck)\n - STRATEGY - terminated based on selected cancelation strategy\n\ \ - FAST_FAILING - terminated because something other failed (in case of multiple subpipelines)\n\ \ - DELETED - terminated because branch was deleted while pipeline's build was running\n\ \ - TIMEOUT - Pipeline run longer than execution_time_limit and was terminated" enum: - TEST - MALFORMED - STUCK - USER - INTERNAL - STRATEGY - FAST_FAILING - DELETED - TIMEOUT type: string running_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string state: description: "Pipeline states, the normal flow is\n INITIALIZING -> PENDING -> QUEUING (until\ \ older finishes) -> RUNNING -> DONE\n If termination is requested while pipeline is in RUNNING\ \ it goes to STOPPING" enum: - INITIALIZING - PENDING - QUEUING - RUNNING - STOPPING - DONE type: string stopping_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string terminate_request: description: "It is empty string if there is no need for termination.\n Otherwise, it contains\ \ desired termination action (stop or cancel)" example: stop type: string terminated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object wf_id: description: ID of a Workflow example: 52f2847c-1817-48f2-95a8-b7e6b98c65e0 format: uuid title: Workflow.ID type: string working_directory: example: .semaphore type: string yaml_file_name: example: semaphore.yml type: string title: Pipelines.Pipeline type: object title: Pipelines.ListResp type: array description: List of pipelines in a project or workflow '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /pipelines/{pipeline_id}: get: operationId: Pipelines.Describe description: Describe a pipeline using pipeline_id tags: - Pipelines parameters: - description: Id of the pipeline in: path name: pipeline_id required: true schema: format: uuid type: string - description: "Option to include all information about all blocks and jobs.\n This option is much more expensive--if\ \ you are only interested in the status of a pipeline, don't set detailed to true." in: query name: detailed required: false schema: default: false type: boolean responses: '200': content: application/json: schema: description: Pipeline describe response containg pipeline info and contained blocks info properties: blocks: items: properties: block_id: example: 484e263a-424a-4820-bff0-bba436c54042 format: uuid type: string build_req_id: format: uuid type: string error_description: type: string jobs: items: description: Job started within block properties: index: description: Position in which it is definied in definition file within block type: integer job_id: description: Job unique identifier wthin build system format: uuid type: string name: description: Job name type: string result: type: string status: type: string type: object type: array name: type: string result: description: Result state enum: - PASSED - STOPPED - CANCELED - FAILED title: Pipelines.Result type: string result_reason: description: "Reasons for result different from PASSED\n\n FAILED:\n - TEST - one\ \ or more of user tests failed\n - MALFORMED - Block failed due to one of next:\n \ \ - missing cmd_file, malformed job_matrix or multiple blocks with same name\n\ \ - STUCK - Block was stuck for some internal reason and then aborted\n STOPPED\ \ or CANCELED:\n - USER - terminated on users requests\n - INTERNAL - terminated\ \ for internal reasons (probably something was stuck)\n - STRATEGY - terminated based\ \ on selected cancelation strategy\n - FAST_FAILING - terminated because something other\ \ failed (other block run in parallel)\n - DELETED - terminated because branch was deleted\ \ while blocks's build was running\n - TIMEOUT - Block run longer than execution_time_limit\ \ and was stopped\n - SKIPPED - Filtered out (not executed because did not satisfy filter\ \ conditions)" enum: - TEST - MALFORMED - USER - INTERNAL - STRATEGY - FAST_FAILING - DELETED - TIMEOUT - SKIPPED type: string state: description: "States that describe blocks's execution.\n Normal block state transition looks\ \ like:\n INITIALIZING -> WAITING -> RUNNING -> DONE" enum: - WAITING - RUNNING - STOPPING - INITIALIZING - DONE type: string title: Pipelines.Block type: object type: array pipeline: properties: branch_id: description: ID of the branch in the UI example: a79557f2-dc4e-4807-ba89-601401eb3b1e format: uuid type: string branch_name: description: Name of git branch for which pipeline was scheduled example: main type: string commit_sha: description: Git commit sha for which pipeline was scheduled example: ac3f9796df42db976814e3fee670e11e3fd4b98a type: string created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string done_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string error_description: description: Stores error description when pipeline is MALFORMED example: '' type: string hook_id: description: The id of the hook recieved from VC provider example: cd7f6162-9b6e-435a-89a7-3968b542e9c7 format: uuid type: string name: example: Pipeline type: string org_id: description: ID of a Organization example: 36b2481c-55a4-4ace-9f8a-ac4f7d9549be format: uuid title: Organization.ID type: string pending_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string ppl_id: description: ID of a Pipeline example: 4f49eb59-148b-41bd-90be-20d4f67653f6 format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 77cd0b15-d7af-410c-b462-d3611b0ef1a0 format: uuid title: Project.ID type: string queuing_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string result: description: Result state enum: - PASSED - STOPPED - CANCELED - FAILED title: Pipelines.Result type: string result_reason: description: "Describes the result reason if result is not PASSED\n Reasons for result different\ \ from PASSED\n\n FAILED:\n - TEST - one or more of user tests failed\n \ \ - MALFORMED - Pipeline failed because YAML definition is malformed\n - STUCK - Pipeline\ \ was stuck for some internal reason and then aborted\n STOPPED or CANCELED:\n \ \ - USER - terminated on users requests\n - INTERNAL - terminated for internal reasons\ \ (probably something was stuck)\n - STRATEGY - terminated based on selected cancelation\ \ strategy\n - FAST_FAILING - terminated because something other failed (in case of multiple\ \ subpipelines)\n - DELETED - terminated because branch was deleted while pipeline's build\ \ was running\n - TIMEOUT - Pipeline run longer than execution_time_limit and was terminated" enum: - TEST - MALFORMED - STUCK - USER - INTERNAL - STRATEGY - FAST_FAILING - DELETED - TIMEOUT type: string running_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string state: description: "Pipeline states, the normal flow is\n INITIALIZING -> PENDING -> QUEUING (until\ \ older finishes) -> RUNNING -> DONE\n If termination is requested while pipeline is in RUNNING\ \ it goes to STOPPING" enum: - INITIALIZING - PENDING - QUEUING - RUNNING - STOPPING - DONE type: string stopping_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string terminate_request: description: "It is empty string if there is no need for termination.\n Otherwise, it contains\ \ desired termination action (stop or cancel)" example: stop type: string terminated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object wf_id: description: ID of a Workflow example: 52f2847c-1817-48f2-95a8-b7e6b98c65e0 format: uuid title: Workflow.ID type: string working_directory: example: .semaphore type: string yaml_file_name: example: semaphore.yml type: string title: Pipelines.Pipeline type: object title: Pipelines.DescribeResp type: object description: Pipeline status optionally containing information about all blocks and jobs in the pipeline. '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /pipelines/{pipeline_id}/describe_topology: get: operationId: Pipelines.DescribeTopology description: Describe pipeline topology using pipeline_id tags: - Pipelines parameters: - description: Id of the pipeline in: path name: pipeline_id required: true schema: format: uuid type: string responses: '200': content: application/json: schema: description: Block topology description properties: after_pipeline: properties: jobs: items: description: The job names in after pipeline, empty list means no after_pipeline is present type: string type: array type: object blocks: items: properties: dependencies: description: "List of *block* names, this block depends on.\n All listed\ \ blocks have to transition to done-passed\n before this block can\ \ be scheduled." items: type: string type: array jobs: description: The job names within the Block items: type: string type: array name: description: The name of the Block type: string type: object type: array title: Pipelines.DescribeTopologyResp type: object description: Pipeline topology '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /pipelines/{pipeline_id}/partial_rebuild: post: operationId: Pipelines.PartialRebuild description: "Schedule a new pipeline based on given one which will only run blocks which\n execution failed in\ \ original pipeline." tags: - Pipelines parameters: - description: Id of the pipeline in: path name: pipeline_id required: true schema: format: uuid type: string requestBody: content: application/json: schema: properties: request_token: description: "When partial rebuild request is received, request_token is checked first.\n \ \ If pipeline's partial rebuild with the same request_token is already scheduled:\n \ \ - OK and previously generated ppl_id are returned,\n without scheduling new partial\ \ rebuild of pipeline.\n - Other parameters are not checked; they are assumed to be the\ \ same." type: string required: - request_token type: object description: Idempotency token required: false responses: '200': content: application/json: schema: properties: message: type: string pipeline_id: format: uuid type: string title: PartialRebuildResponse type: object description: Message and created pipeline id '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /pipelines/{pipeline_id}/terminate: post: operationId: Pipelines.Terminate description: Terminate a pipeline using pipeline_id tags: - Pipelines parameters: - description: Id of the pipeline in: path name: pipeline_id required: true schema: format: uuid type: string requestBody: content: application/json: schema: properties: terminate_request: type: boolean required: - terminate_request type: object description: Must set terminate request to true required: false responses: '200': content: application/json: schema: properties: message: description: Message confirming the success of the operation. You can rely on status code for successful termination. example: Pipeline {id} terminated successfully. type: string title: TerminateResponse type: object description: Pipeline topology '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects: post: operationId: Projects.Create description: Create a project. When creating a project description is ignored. tags: - Projects requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Project description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Project readOnly: true title: Kind type: string metadata: description: Metadata of the project, all fields are read only properties: connected: description: Connection status between Semaphore and repository. type: boolean created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the project type: string id: description: ID of a Project example: ed12ab59-9224-45c8-82d6-79bf158aaae6 format: uuid title: Project.ID type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: ff19729a-a8d5-4a62-8c5c-9bdbabf6607e format: uuid title: Organization.ID type: string readOnly: true required: - id - name type: object spec: description: Specification of the project properties: description: description: Description of the project type: string name: description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string repository: description: Repository settings for the project properties: forked_pull_requests: description: Whether to include forked pull requests in the project, read more [here](https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/#exposing-secrets-in-forked-pull-requests). properties: allowed_contributors: description: List of contributors that can create workflows from forked PRs. Empty list means that everyone can. example: [] items: description: Contributor handle title: Contributor type: string type: array allowed_secrets: description: The allowed_secrets property specifies the array of secrets names that are allowed to be exported into jobs triggered by forked-pull-requests. If the array is empty, no secrets will be exported. items: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string type: array type: object integration_type: description: Provider of the repository and authentication method enum: - GITHUB_APP - GITHUB_OAUTH_TOKEN - BITBUCKET type: string pipeline_file: default: .semaphore/semaphore.yml description: Path to the pipeline file to run the projec pipelines with type: string run_on: description: Which event will trigger the pipelines for this project. In most cases it is useful set to ["BRANCHES"] items: enum: - BRANCHES - TAGS - PULL_REQUESTS - FORKED_PULL_REQUESTS title: Projects.RunType type: string type: array status: description: "The status property is used to specify which Semaphore pipeline(s) will submit a status\ \ check on GitHub pull requests.\n A pipeline can create a single status check\ \ as a result of a whole pipeline. Or each block in a pipeline can create its own status check.\n\ \ For most of the projects `path: \".semaphore/semaphore.yml\", level: \"PIPELINE\"\ ` will be suitable. **If left empty default value assumed.** " properties: pipeline_files: default: - level: PIPELINE path: .semaphore/semaphore.yml items: description: List of pipeline files that will submit a status check on GitHub pull requests properties: level: description: Level of the status check enum: - BLOCK - PIPELINE type: string path: default: .semaphore/semaphore.yml description: Path to the pipeline file type: string required: - path - level type: object type: array type: object url: description: URL of the repository example: git@github.com:semaphoreci/toolbox.git type: string whitelist: description: Whitelist of branches and tags that can be built using this project properties: branches: description: List of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. items: type: string type: array tags: description: List of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. items: type: string type: array type: object required: - url - integration_type - run_on type: object visibility: description: Visibility of the project enum: - PUBLIC - PRIVATE type: string required: - repository - name type: object required: - apiVersion - kind - metadata - spec title: Projects.Project type: object description: Project to be created required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Project description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Project readOnly: true title: Kind type: string metadata: description: Metadata of the project, all fields are read only properties: connected: description: Connection status between Semaphore and repository. type: boolean created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the project type: string id: description: ID of a Project example: ed12ab59-9224-45c8-82d6-79bf158aaae6 format: uuid title: Project.ID type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: ff19729a-a8d5-4a62-8c5c-9bdbabf6607e format: uuid title: Organization.ID type: string readOnly: true required: - id - name type: object spec: description: Specification of the project properties: description: description: Description of the project type: string name: description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string repository: description: Repository settings for the project properties: forked_pull_requests: description: Whether to include forked pull requests in the project, read more [here](https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/#exposing-secrets-in-forked-pull-requests). properties: allowed_contributors: description: List of contributors that can create workflows from forked PRs. Empty list means that everyone can. example: [] items: description: Contributor handle title: Contributor type: string type: array allowed_secrets: description: The allowed_secrets property specifies the array of secrets names that are allowed to be exported into jobs triggered by forked-pull-requests. If the array is empty, no secrets will be exported. items: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string type: array type: object integration_type: description: Provider of the repository and authentication method enum: - GITHUB_APP - GITHUB_OAUTH_TOKEN - BITBUCKET type: string pipeline_file: default: .semaphore/semaphore.yml description: Path to the pipeline file to run the projec pipelines with type: string run_on: description: Which event will trigger the pipelines for this project. In most cases it is useful set to ["BRANCHES"] items: enum: - BRANCHES - TAGS - PULL_REQUESTS - FORKED_PULL_REQUESTS title: Projects.RunType type: string type: array status: description: "The status property is used to specify which Semaphore pipeline(s) will submit a\ \ status check on GitHub pull requests.\n A pipeline can create a single status\ \ check as a result of a whole pipeline. Or each block in a pipeline can create its own status\ \ check.\n For most of the projects `path: \".semaphore/semaphore.yml\", level:\ \ \"PIPELINE\"` will be suitable. **If left empty default value assumed.** " properties: pipeline_files: default: - level: PIPELINE path: .semaphore/semaphore.yml items: description: List of pipeline files that will submit a status check on GitHub pull requests properties: level: description: Level of the status check enum: - BLOCK - PIPELINE type: string path: default: .semaphore/semaphore.yml description: Path to the pipeline file type: string required: - path - level type: object type: array type: object url: description: URL of the repository example: git@github.com:semaphoreci/toolbox.git type: string whitelist: description: Whitelist of branches and tags that can be built using this project properties: branches: description: List of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. items: type: string type: array tags: description: List of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. items: type: string type: array type: object required: - url - integration_type - run_on type: object visibility: description: Visibility of the project enum: - PUBLIC - PRIVATE type: string required: - repository - name type: object required: - apiVersion - kind - metadata - spec title: Projects.Project type: object description: Created project '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Projects.List description: List projects in organization. tags: - Projects parameters: - description: UUID of the project owner example: 7d36df70-6eab-4768-83d8-090f44f47235 in: query name: owner_uuid required: false schema: format: uuid type: string - description: URL of the repository the project is associated with example: git@github.com:semaphoreci/toolbox.git in: query name: repo_url required: false schema: type: string - description: "Direction of the pagination.\n `NEXT` will fetch projects after the provided token, `PREVIOUS`\ \ will fetch projects before the provided token" in: query name: direction required: false schema: default: NEXT enum: - NEXT - PREVIOUS type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Project description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: Project readOnly: true title: Kind type: string metadata: description: Metadata of the project, all fields are read only properties: connected: description: Connection status between Semaphore and repository. type: boolean created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the project type: string id: description: ID of a Project example: ed12ab59-9224-45c8-82d6-79bf158aaae6 format: uuid title: Project.ID type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: ff19729a-a8d5-4a62-8c5c-9bdbabf6607e format: uuid title: Organization.ID type: string readOnly: true required: - id - name type: object spec: description: Specification of the project properties: description: description: Description of the project type: string name: description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string repository: description: Repository settings for the project properties: forked_pull_requests: description: Whether to include forked pull requests in the project, read more [here](https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/#exposing-secrets-in-forked-pull-requests). properties: allowed_contributors: description: List of contributors that can create workflows from forked PRs. Empty list means that everyone can. example: [] items: description: Contributor handle title: Contributor type: string type: array allowed_secrets: description: The allowed_secrets property specifies the array of secrets names that are allowed to be exported into jobs triggered by forked-pull-requests. If the array is empty, no secrets will be exported. items: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string type: array type: object integration_type: description: Provider of the repository and authentication method enum: - GITHUB_APP - GITHUB_OAUTH_TOKEN - BITBUCKET type: string pipeline_file: default: .semaphore/semaphore.yml description: Path to the pipeline file to run the projec pipelines with type: string run_on: description: Which event will trigger the pipelines for this project. In most cases it is useful set to ["BRANCHES"] items: enum: - BRANCHES - TAGS - PULL_REQUESTS - FORKED_PULL_REQUESTS title: Projects.RunType type: string type: array status: description: "The status property is used to specify which Semaphore pipeline(s) will submit\ \ a status check on GitHub pull requests.\n A pipeline can create a single\ \ status check as a result of a whole pipeline. Or each block in a pipeline can create its\ \ own status check.\n For most of the projects `path: \".semaphore/semaphore.yml\"\ , level: \"PIPELINE\"` will be suitable. **If left empty default value assumed.** " properties: pipeline_files: default: - level: PIPELINE path: .semaphore/semaphore.yml items: description: List of pipeline files that will submit a status check on GitHub pull requests properties: level: description: Level of the status check enum: - BLOCK - PIPELINE type: string path: default: .semaphore/semaphore.yml description: Path to the pipeline file type: string required: - path - level type: object type: array type: object url: description: URL of the repository example: git@github.com:semaphoreci/toolbox.git type: string whitelist: description: Whitelist of branches and tags that can be built using this project properties: branches: description: List of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. items: type: string type: array tags: description: List of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. items: type: string type: array type: object required: - url - integration_type - run_on type: object visibility: description: Visibility of the project enum: - PUBLIC - PRIVATE type: string required: - repository - name type: object required: - apiVersion - kind - metadata - spec title: Projects.Project type: object title: Projects.ListResponse type: array description: List of projects in organization '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}: delete: operationId: Projects.Delete description: Delete a project. tags: - Projects parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 7addf73c-f7e8-43a4-bc44-b2414f956c7f format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string responses: '200': content: application/json: schema: description: '' properties: project_id: description: ID of a Project example: bdc3abf1-6cd4-43cd-9f2f-5e9d83e1d16d format: uuid title: Project.ID type: string title: Projects.DeleteResponse type: object description: ID of the deleted project '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Projects.Describe description: Describe project. tags: - Projects parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: ebcda0ed-7f7f-4527-8e21-8089cfc1c000 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Project description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Project readOnly: true title: Kind type: string metadata: description: Metadata of the project, all fields are read only properties: connected: description: Connection status between Semaphore and repository. type: boolean created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the project type: string id: description: ID of a Project example: ed12ab59-9224-45c8-82d6-79bf158aaae6 format: uuid title: Project.ID type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: ff19729a-a8d5-4a62-8c5c-9bdbabf6607e format: uuid title: Organization.ID type: string readOnly: true required: - id - name type: object spec: description: Specification of the project properties: description: description: Description of the project type: string name: description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string repository: description: Repository settings for the project properties: forked_pull_requests: description: Whether to include forked pull requests in the project, read more [here](https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/#exposing-secrets-in-forked-pull-requests). properties: allowed_contributors: description: List of contributors that can create workflows from forked PRs. Empty list means that everyone can. example: [] items: description: Contributor handle title: Contributor type: string type: array allowed_secrets: description: The allowed_secrets property specifies the array of secrets names that are allowed to be exported into jobs triggered by forked-pull-requests. If the array is empty, no secrets will be exported. items: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string type: array type: object integration_type: description: Provider of the repository and authentication method enum: - GITHUB_APP - GITHUB_OAUTH_TOKEN - BITBUCKET type: string pipeline_file: default: .semaphore/semaphore.yml description: Path to the pipeline file to run the projec pipelines with type: string run_on: description: Which event will trigger the pipelines for this project. In most cases it is useful set to ["BRANCHES"] items: enum: - BRANCHES - TAGS - PULL_REQUESTS - FORKED_PULL_REQUESTS title: Projects.RunType type: string type: array status: description: "The status property is used to specify which Semaphore pipeline(s) will submit a\ \ status check on GitHub pull requests.\n A pipeline can create a single status\ \ check as a result of a whole pipeline. Or each block in a pipeline can create its own status\ \ check.\n For most of the projects `path: \".semaphore/semaphore.yml\", level:\ \ \"PIPELINE\"` will be suitable. **If left empty default value assumed.** " properties: pipeline_files: default: - level: PIPELINE path: .semaphore/semaphore.yml items: description: List of pipeline files that will submit a status check on GitHub pull requests properties: level: description: Level of the status check enum: - BLOCK - PIPELINE type: string path: default: .semaphore/semaphore.yml description: Path to the pipeline file type: string required: - path - level type: object type: array type: object url: description: URL of the repository example: git@github.com:semaphoreci/toolbox.git type: string whitelist: description: Whitelist of branches and tags that can be built using this project properties: branches: description: List of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. items: type: string type: array tags: description: List of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. items: type: string type: array type: object required: - url - integration_type - run_on type: object visibility: description: Visibility of the project enum: - PUBLIC - PRIVATE type: string required: - repository - name type: object required: - apiVersion - kind - metadata - spec title: Projects.Project type: object description: Project '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: Projects.Update description: Update a project. tags: - Projects parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: e9fc91f4-ad27-47d3-8f0a-e12c7946bff0 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Project description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Project readOnly: true title: Kind type: string metadata: description: Metadata of the project, all fields are read only properties: connected: description: Connection status between Semaphore and repository. type: boolean created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the project type: string id: description: ID of a Project example: ed12ab59-9224-45c8-82d6-79bf158aaae6 format: uuid title: Project.ID type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: ff19729a-a8d5-4a62-8c5c-9bdbabf6607e format: uuid title: Organization.ID type: string readOnly: true required: - id - name type: object spec: description: Specification of the project properties: description: description: Description of the project type: string name: description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string repository: description: Repository settings for the project properties: forked_pull_requests: description: Whether to include forked pull requests in the project, read more [here](https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/#exposing-secrets-in-forked-pull-requests). properties: allowed_contributors: description: List of contributors that can create workflows from forked PRs. Empty list means that everyone can. example: [] items: description: Contributor handle title: Contributor type: string type: array allowed_secrets: description: The allowed_secrets property specifies the array of secrets names that are allowed to be exported into jobs triggered by forked-pull-requests. If the array is empty, no secrets will be exported. items: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string type: array type: object integration_type: description: Provider of the repository and authentication method enum: - GITHUB_APP - GITHUB_OAUTH_TOKEN - BITBUCKET type: string pipeline_file: default: .semaphore/semaphore.yml description: Path to the pipeline file to run the projec pipelines with type: string run_on: description: Which event will trigger the pipelines for this project. In most cases it is useful set to ["BRANCHES"] items: enum: - BRANCHES - TAGS - PULL_REQUESTS - FORKED_PULL_REQUESTS title: Projects.RunType type: string type: array status: description: "The status property is used to specify which Semaphore pipeline(s) will submit a status\ \ check on GitHub pull requests.\n A pipeline can create a single status check\ \ as a result of a whole pipeline. Or each block in a pipeline can create its own status check.\n\ \ For most of the projects `path: \".semaphore/semaphore.yml\", level: \"PIPELINE\"\ ` will be suitable. **If left empty default value assumed.** " properties: pipeline_files: default: - level: PIPELINE path: .semaphore/semaphore.yml items: description: List of pipeline files that will submit a status check on GitHub pull requests properties: level: description: Level of the status check enum: - BLOCK - PIPELINE type: string path: default: .semaphore/semaphore.yml description: Path to the pipeline file type: string required: - path - level type: object type: array type: object url: description: URL of the repository example: git@github.com:semaphoreci/toolbox.git type: string whitelist: description: Whitelist of branches and tags that can be built using this project properties: branches: description: List of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. items: type: string type: array tags: description: List of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. items: type: string type: array type: object required: - url - integration_type - run_on type: object visibility: description: Visibility of the project enum: - PUBLIC - PRIVATE type: string required: - repository - name type: object required: - apiVersion - kind - metadata - spec title: Projects.Project type: object description: Updated secret, only spec can be updated required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Project description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Project readOnly: true title: Kind type: string metadata: description: Metadata of the project, all fields are read only properties: connected: description: Connection status between Semaphore and repository. type: boolean created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the project type: string id: description: ID of a Project example: ed12ab59-9224-45c8-82d6-79bf158aaae6 format: uuid title: Project.ID type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: ff19729a-a8d5-4a62-8c5c-9bdbabf6607e format: uuid title: Organization.ID type: string readOnly: true required: - id - name type: object spec: description: Specification of the project properties: description: description: Description of the project type: string name: description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string repository: description: Repository settings for the project properties: forked_pull_requests: description: Whether to include forked pull requests in the project, read more [here](https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/#exposing-secrets-in-forked-pull-requests). properties: allowed_contributors: description: List of contributors that can create workflows from forked PRs. Empty list means that everyone can. example: [] items: description: Contributor handle title: Contributor type: string type: array allowed_secrets: description: The allowed_secrets property specifies the array of secrets names that are allowed to be exported into jobs triggered by forked-pull-requests. If the array is empty, no secrets will be exported. items: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string type: array type: object integration_type: description: Provider of the repository and authentication method enum: - GITHUB_APP - GITHUB_OAUTH_TOKEN - BITBUCKET type: string pipeline_file: default: .semaphore/semaphore.yml description: Path to the pipeline file to run the projec pipelines with type: string run_on: description: Which event will trigger the pipelines for this project. In most cases it is useful set to ["BRANCHES"] items: enum: - BRANCHES - TAGS - PULL_REQUESTS - FORKED_PULL_REQUESTS title: Projects.RunType type: string type: array status: description: "The status property is used to specify which Semaphore pipeline(s) will submit a\ \ status check on GitHub pull requests.\n A pipeline can create a single status\ \ check as a result of a whole pipeline. Or each block in a pipeline can create its own status\ \ check.\n For most of the projects `path: \".semaphore/semaphore.yml\", level:\ \ \"PIPELINE\"` will be suitable. **If left empty default value assumed.** " properties: pipeline_files: default: - level: PIPELINE path: .semaphore/semaphore.yml items: description: List of pipeline files that will submit a status check on GitHub pull requests properties: level: description: Level of the status check enum: - BLOCK - PIPELINE type: string path: default: .semaphore/semaphore.yml description: Path to the pipeline file type: string required: - path - level type: object type: array type: object url: description: URL of the repository example: git@github.com:semaphoreci/toolbox.git type: string whitelist: description: Whitelist of branches and tags that can be built using this project properties: branches: description: List of branches that can be build. Regular expressions allowed. Empty list means that all branches can. Used only when RunType BRANCHES is included. items: type: string type: array tags: description: List of tags that can be build. Regular expressions allowed. Empty list means that all tags can. Used only when RunType TAGS is included. items: type: string type: array type: object required: - url - integration_type - run_on type: object visibility: description: Visibility of the project enum: - PUBLIC - PRIVATE type: string required: - repository - name type: object required: - apiVersion - kind - metadata - spec title: Projects.Project type: object description: Updated secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/deployment_targets: post: operationId: DeploymentTargets.Create description: Create a deployment target for the project. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: c92c0098-5842-4867-b2d9-de8aae1505d2 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string requestBody: content: application/json: schema: properties: deployment_target: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: DeploymentTarget description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: DeploymentTarget readOnly: true title: Kind type: string metadata: description: Metadata of the deployment targets, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the deployment target type: string id: description: ID of a DeploymentTarget example: 9c777b65-213f-4fe1-bc6b-727d2cdde97d format: uuid title: DeploymentTarget.ID type: string last_deployment: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string org_id: description: ID of a Organization example: 02b7c528-b0f1-4266-8e5e-10b7b984e76a format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: 726dbefd-b30c-4c80-bc9a-c0613968a2ca format: uuid title: Project.ID type: string state: description: "State of the deployment target.\n - `SYNCING` - Deployment Target secret is synchronizing\n\ \ - `USABLE` - Deployment Target is active and can be used or modified\n - `UNUSABLE` - Deployment\ \ Target is corrupted and cannot be used or modified\n - `CORDONED` - Deployment Target has been\ \ cordoned and deactivated\n " enum: - SYNCING - USABLE - UNUSABLE - CORDONED type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - project_id type: object spec: description: Specification of the deployment target properties: active: description: The state of the deployment target, true if the deployment is not cordoned type: boolean bookmark_parameters: description: The names of the promotion parameters. You can later use values of these parameters to filter deployments in deployment history. items: description: The name of the promotion parameter type: string maxItems: 3 minItems: 0 type: array description: description: Description of the deployment target type: string env_vars: description: Environment variables of the deployment target, only in create requests. items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the deployment target, only in create requests. items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string object_rules: description: "Configure which branches, tags or PRs can trigger a deployment.\n **If\ \ left empty all branches, tags or PRs can trigger a deployment.**" properties: branches: oneOf: - description: Allows all branch to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.All type: string - description: The pattern to match against the branch name title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch prs: default: NONE description: Allows all or none of the PRs to trigger a deployment enum: - ALL - NONE type: string tags: oneOf: - description: Allows all tag to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.All type: string - description: The pattern to match against the tag name title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag type: object subject_rules: description: ' Configure who can trigger a deployment. **If left empty all users can trigger a deployment.** ' properties: any: default: false description: Allows any user or auto-promotion to trigger a deployment, if true all other rules are ignored and all users can trigger a deployment type: boolean auto: description: Allows auto-promotions to be triggered type: boolean roles: description: "The list of roles of users that are allowed to trigger a deployment,\n \ \ by default project roles are `Reader`, `Contributor` and `Admin`, read more [here](https://docs.semaphoreci.com/security/default-roles/#project-roles).\n\ \ Role names are case insensitive." items: description: The name of the role. example: Contributor type: string type: array users: description: The list of users that are allowed to trigger a deployment items: anyOf: - description: The uuid of the user format: uuid type: string - description: The git handle of the user type: string description: The git handle or id of the user type: array type: object url: description: The URL of the target type: string required: - name type: object required: - apiVersion - kind - spec title: DeploymentTargets.DeploymentTarget type: object unique_token: description: "The unique value used as an idempotency token.\n If there are multiple requests with\ \ the same `unique_token` values only the first one will be processed,\n and the rest will be\ \ disregarded but the response will be 200 OK as if those requests were processed successfully." type: string required: - unique_token - deployment_target title: DeploymentTargets.CreateRequest type: object description: Deployment target to be created and a unique token. required: true responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: DeploymentTarget description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: DeploymentTarget readOnly: true title: Kind type: string metadata: description: Metadata of the deployment targets, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the deployment target type: string id: description: ID of a DeploymentTarget example: 9c777b65-213f-4fe1-bc6b-727d2cdde97d format: uuid title: DeploymentTarget.ID type: string last_deployment: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string org_id: description: ID of a Organization example: 02b7c528-b0f1-4266-8e5e-10b7b984e76a format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: 726dbefd-b30c-4c80-bc9a-c0613968a2ca format: uuid title: Project.ID type: string state: description: "State of the deployment target.\n - `SYNCING` - Deployment Target secret is synchronizing\n\ \ - `USABLE` - Deployment Target is active and can be used or modified\n - `UNUSABLE` - Deployment\ \ Target is corrupted and cannot be used or modified\n - `CORDONED` - Deployment Target has been\ \ cordoned and deactivated\n " enum: - SYNCING - USABLE - UNUSABLE - CORDONED type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - project_id type: object spec: description: Specification of the deployment target properties: active: description: The state of the deployment target, true if the deployment is not cordoned type: boolean bookmark_parameters: description: The names of the promotion parameters. You can later use values of these parameters to filter deployments in deployment history. items: description: The name of the promotion parameter type: string maxItems: 3 minItems: 0 type: array description: description: Description of the deployment target type: string env_vars: description: Environment variables of the deployment target, only in create requests. items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the deployment target, only in create requests. items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string object_rules: description: "Configure which branches, tags or PRs can trigger a deployment.\n **If left\ \ empty all branches, tags or PRs can trigger a deployment.**" properties: branches: oneOf: - description: Allows all branch to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.All type: string - description: The pattern to match against the branch name title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch prs: default: NONE description: Allows all or none of the PRs to trigger a deployment enum: - ALL - NONE type: string tags: oneOf: - description: Allows all tag to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.All type: string - description: The pattern to match against the tag name title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag type: object subject_rules: description: ' Configure who can trigger a deployment. **If left empty all users can trigger a deployment.** ' properties: any: default: false description: Allows any user or auto-promotion to trigger a deployment, if true all other rules are ignored and all users can trigger a deployment type: boolean auto: description: Allows auto-promotions to be triggered type: boolean roles: description: "The list of roles of users that are allowed to trigger a deployment,\n \ \ by default project roles are `Reader`, `Contributor` and `Admin`, read more [here](https://docs.semaphoreci.com/security/default-roles/#project-roles).\n\ \ Role names are case insensitive." items: description: The name of the role. example: Contributor type: string type: array users: description: The list of users that are allowed to trigger a deployment items: anyOf: - description: The uuid of the user format: uuid type: string - description: The git handle of the user type: string description: The git handle or id of the user type: array type: object url: description: The URL of the target type: string required: - name type: object required: - apiVersion - kind - spec title: DeploymentTargets.DeploymentTarget type: object description: Created deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: DeploymentTargets.List description: List of deployment targets for the project. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 6dc230a9-dba8-4295-93b8-9ffb7a7aedbe format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: DeploymentTarget description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: DeploymentTarget readOnly: true title: Kind type: string metadata: description: Metadata of the deployment targets, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the deployment target type: string id: description: ID of a DeploymentTarget example: 9c777b65-213f-4fe1-bc6b-727d2cdde97d format: uuid title: DeploymentTarget.ID type: string last_deployment: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string org_id: description: ID of a Organization example: 02b7c528-b0f1-4266-8e5e-10b7b984e76a format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: 726dbefd-b30c-4c80-bc9a-c0613968a2ca format: uuid title: Project.ID type: string state: description: "State of the deployment target.\n - `SYNCING` - Deployment Target secret is synchronizing\n\ \ - `USABLE` - Deployment Target is active and can be used or modified\n - `UNUSABLE` - Deployment\ \ Target is corrupted and cannot be used or modified\n - `CORDONED` - Deployment Target has been\ \ cordoned and deactivated\n " enum: - SYNCING - USABLE - UNUSABLE - CORDONED type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - project_id type: object spec: description: Specification of the deployment target properties: active: description: The state of the deployment target, true if the deployment is not cordoned type: boolean bookmark_parameters: description: The names of the promotion parameters. You can later use values of these parameters to filter deployments in deployment history. items: description: The name of the promotion parameter type: string maxItems: 3 minItems: 0 type: array description: description: Description of the deployment target type: string env_vars: description: Environment variables of the deployment target, only in create requests. items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the deployment target, only in create requests. items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string object_rules: description: "Configure which branches, tags or PRs can trigger a deployment.\n **If\ \ left empty all branches, tags or PRs can trigger a deployment.**" properties: branches: oneOf: - description: Allows all branch to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.All type: string - description: The pattern to match against the branch name title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch prs: default: NONE description: Allows all or none of the PRs to trigger a deployment enum: - ALL - NONE type: string tags: oneOf: - description: Allows all tag to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.All type: string - description: The pattern to match against the tag name title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag type: object subject_rules: description: ' Configure who can trigger a deployment. **If left empty all users can trigger a deployment.** ' properties: any: default: false description: Allows any user or auto-promotion to trigger a deployment, if true all other rules are ignored and all users can trigger a deployment type: boolean auto: description: Allows auto-promotions to be triggered type: boolean roles: description: "The list of roles of users that are allowed to trigger a deployment,\n \ \ by default project roles are `Reader`, `Contributor` and `Admin`, read more [here](https://docs.semaphoreci.com/security/default-roles/#project-roles).\n\ \ Role names are case insensitive." items: description: The name of the role. example: Contributor type: string type: array users: description: The list of users that are allowed to trigger a deployment items: anyOf: - description: The uuid of the user format: uuid type: string - description: The git handle of the user type: string description: The git handle or id of the user type: array type: object url: description: The URL of the target type: string required: - name type: object required: - apiVersion - kind - spec title: DeploymentTargets.DeploymentTarget type: object title: DeploymentTargets.ListResponse type: array description: List of deployment targets '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/deployment_targets/{id_or_name}: delete: operationId: DeploymentTargets.Delete description: Delete a deployment target for the project. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 19563d51-0eb8-449c-934b-05eae500593a format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the deployment target in: path name: id_or_name required: true schema: description: Id or name of the deployment target type: string - description: Idempotency token for the delete operation in: query name: unique_token required: true schema: description: Idempotency token type: string responses: '200': content: application/json: schema: properties: id: description: ID of a DeploymentTarget example: ebcd9452-b3b1-40f4-885c-c5d43ea0b40a format: uuid title: DeploymentTarget.ID type: string title: DeploymentTargets.DeleteResponse type: object description: ID of the deleted deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: DeploymentTargets.Describe description: Describe a deployment target for the project. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 52e76aa3-d5c2-4e0a-a1f0-5dbb98ec0544 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the deployment target in: path name: id_or_name required: true schema: description: Id or name of the deployment target type: string - description: If true, fetches the secret associated with the deployment target in: query name: with_credentials required: false schema: default: false description: If true, fetches the credentials associated with the deployment target type: boolean responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: DeploymentTarget description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: DeploymentTarget readOnly: true title: Kind type: string metadata: description: Metadata of the deployment targets, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the deployment target type: string id: description: ID of a DeploymentTarget example: 9c777b65-213f-4fe1-bc6b-727d2cdde97d format: uuid title: DeploymentTarget.ID type: string last_deployment: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string org_id: description: ID of a Organization example: 02b7c528-b0f1-4266-8e5e-10b7b984e76a format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: 726dbefd-b30c-4c80-bc9a-c0613968a2ca format: uuid title: Project.ID type: string state: description: "State of the deployment target.\n - `SYNCING` - Deployment Target secret is synchronizing\n\ \ - `USABLE` - Deployment Target is active and can be used or modified\n - `UNUSABLE` - Deployment\ \ Target is corrupted and cannot be used or modified\n - `CORDONED` - Deployment Target has been\ \ cordoned and deactivated\n " enum: - SYNCING - USABLE - UNUSABLE - CORDONED type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - project_id type: object spec: description: Specification of the deployment target properties: active: description: The state of the deployment target, true if the deployment is not cordoned type: boolean bookmark_parameters: description: The names of the promotion parameters. You can later use values of these parameters to filter deployments in deployment history. items: description: The name of the promotion parameter type: string maxItems: 3 minItems: 0 type: array description: description: Description of the deployment target type: string env_vars: description: Environment variables of the deployment target, only in create requests. items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the deployment target, only in create requests. items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string object_rules: description: "Configure which branches, tags or PRs can trigger a deployment.\n **If left\ \ empty all branches, tags or PRs can trigger a deployment.**" properties: branches: oneOf: - description: Allows all branch to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.All type: string - description: The pattern to match against the branch name title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch prs: default: NONE description: Allows all or none of the PRs to trigger a deployment enum: - ALL - NONE type: string tags: oneOf: - description: Allows all tag to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.All type: string - description: The pattern to match against the tag name title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag type: object subject_rules: description: ' Configure who can trigger a deployment. **If left empty all users can trigger a deployment.** ' properties: any: default: false description: Allows any user or auto-promotion to trigger a deployment, if true all other rules are ignored and all users can trigger a deployment type: boolean auto: description: Allows auto-promotions to be triggered type: boolean roles: description: "The list of roles of users that are allowed to trigger a deployment,\n \ \ by default project roles are `Reader`, `Contributor` and `Admin`, read more [here](https://docs.semaphoreci.com/security/default-roles/#project-roles).\n\ \ Role names are case insensitive." items: description: The name of the role. example: Contributor type: string type: array users: description: The list of users that are allowed to trigger a deployment items: anyOf: - description: The uuid of the user format: uuid type: string - description: The git handle of the user type: string description: The git handle or id of the user type: array type: object url: description: The URL of the target type: string required: - name type: object required: - apiVersion - kind - spec title: DeploymentTargets.DeploymentTarget type: object description: Described deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] patch: operationId: DeploymentTargets.Update description: Update a deployment target for the project. Fields that are not provided will not be updated. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 140560e5-352b-4b51-a728-1bb144a7a0d7 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the deployment target in: path name: id_or_name required: true schema: description: Id or name of the deployment target type: string requestBody: content: application/json: schema: properties: deployment_target: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: DeploymentTarget description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: DeploymentTarget readOnly: true title: Kind type: string metadata: description: Metadata of the deployment targets, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the deployment target type: string id: description: ID of a DeploymentTarget example: 9c777b65-213f-4fe1-bc6b-727d2cdde97d format: uuid title: DeploymentTarget.ID type: string last_deployment: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string org_id: description: ID of a Organization example: 02b7c528-b0f1-4266-8e5e-10b7b984e76a format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: 726dbefd-b30c-4c80-bc9a-c0613968a2ca format: uuid title: Project.ID type: string state: description: "State of the deployment target.\n - `SYNCING` - Deployment Target secret is synchronizing\n\ \ - `USABLE` - Deployment Target is active and can be used or modified\n - `UNUSABLE` - Deployment\ \ Target is corrupted and cannot be used or modified\n - `CORDONED` - Deployment Target has been\ \ cordoned and deactivated\n " enum: - SYNCING - USABLE - UNUSABLE - CORDONED type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - project_id type: object spec: description: Specification of the deployment target properties: active: description: The state of the deployment target, true if the deployment is not cordoned type: boolean bookmark_parameters: description: The names of the promotion parameters. You can later use values of these parameters to filter deployments in deployment history. items: description: The name of the promotion parameter type: string maxItems: 3 minItems: 0 type: array description: description: Description of the deployment target type: string env_vars: description: Environment variables of the deployment target, only in create requests. items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the deployment target, only in create requests. items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string object_rules: description: "Configure which branches, tags or PRs can trigger a deployment.\n **If\ \ left empty all branches, tags or PRs can trigger a deployment.**" properties: branches: oneOf: - description: Allows all branch to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.All type: string - description: The pattern to match against the branch name title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch prs: default: NONE description: Allows all or none of the PRs to trigger a deployment enum: - ALL - NONE type: string tags: oneOf: - description: Allows all tag to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.All type: string - description: The pattern to match against the tag name title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag type: object subject_rules: description: ' Configure who can trigger a deployment. **If left empty all users can trigger a deployment.** ' properties: any: default: false description: Allows any user or auto-promotion to trigger a deployment, if true all other rules are ignored and all users can trigger a deployment type: boolean auto: description: Allows auto-promotions to be triggered type: boolean roles: description: "The list of roles of users that are allowed to trigger a deployment,\n \ \ by default project roles are `Reader`, `Contributor` and `Admin`, read more [here](https://docs.semaphoreci.com/security/default-roles/#project-roles).\n\ \ Role names are case insensitive." items: description: The name of the role. example: Contributor type: string type: array users: description: The list of users that are allowed to trigger a deployment items: anyOf: - description: The uuid of the user format: uuid type: string - description: The git handle of the user type: string description: The git handle or id of the user type: array type: object url: description: The URL of the target type: string required: - name type: object required: - apiVersion - kind - spec title: DeploymentTargets.DeploymentTarget type: object unique_token: description: The unique idempotency UUID. type: string required: - unique_token - deployment_target title: DeploymentTargets.UpdateRequest type: object description: Deployment target to be updated and a unique token. required: true responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: DeploymentTarget description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: DeploymentTarget readOnly: true title: Kind type: string metadata: description: Metadata of the deployment targets, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the deployment target type: string id: description: ID of a DeploymentTarget example: 9c777b65-213f-4fe1-bc6b-727d2cdde97d format: uuid title: DeploymentTarget.ID type: string last_deployment: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string org_id: description: ID of a Organization example: 02b7c528-b0f1-4266-8e5e-10b7b984e76a format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: 726dbefd-b30c-4c80-bc9a-c0613968a2ca format: uuid title: Project.ID type: string state: description: "State of the deployment target.\n - `SYNCING` - Deployment Target secret is synchronizing\n\ \ - `USABLE` - Deployment Target is active and can be used or modified\n - `UNUSABLE` - Deployment\ \ Target is corrupted and cannot be used or modified\n - `CORDONED` - Deployment Target has been\ \ cordoned and deactivated\n " enum: - SYNCING - USABLE - UNUSABLE - CORDONED type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - project_id type: object spec: description: Specification of the deployment target properties: active: description: The state of the deployment target, true if the deployment is not cordoned type: boolean bookmark_parameters: description: The names of the promotion parameters. You can later use values of these parameters to filter deployments in deployment history. items: description: The name of the promotion parameter type: string maxItems: 3 minItems: 0 type: array description: description: Description of the deployment target type: string env_vars: description: Environment variables of the deployment target, only in create requests. items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the deployment target, only in create requests. items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array name: description: 'DeploymentTargets name must be unique on project level, must match the name regex: `^[A-Za-z0-9_.-]+$`' example: production minLength: 1 pattern: ^[A-Za-z0-9_\.\-]+$ title: DeploymentTargets.Name type: string object_rules: description: "Configure which branches, tags or PRs can trigger a deployment.\n **If left\ \ empty all branches, tags or PRs can trigger a deployment.**" properties: branches: oneOf: - description: Allows all branch to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.All type: string - description: The pattern to match against the branch name title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Branch prs: default: NONE description: Allows all or none of the PRs to trigger a deployment enum: - ALL - NONE type: string tags: oneOf: - description: Allows all tag to trigger a deployment enum: - ALL title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.All type: string - description: The pattern to match against the tag name title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag.MatchType type: array title: DeploymentTargets.DeploymentTarget.ObjectRule.Tag type: object subject_rules: description: ' Configure who can trigger a deployment. **If left empty all users can trigger a deployment.** ' properties: any: default: false description: Allows any user or auto-promotion to trigger a deployment, if true all other rules are ignored and all users can trigger a deployment type: boolean auto: description: Allows auto-promotions to be triggered type: boolean roles: description: "The list of roles of users that are allowed to trigger a deployment,\n \ \ by default project roles are `Reader`, `Contributor` and `Admin`, read more [here](https://docs.semaphoreci.com/security/default-roles/#project-roles).\n\ \ Role names are case insensitive." items: description: The name of the role. example: Contributor type: string type: array users: description: The list of users that are allowed to trigger a deployment items: anyOf: - description: The uuid of the user format: uuid type: string - description: The git handle of the user type: string description: The git handle or id of the user type: array type: object url: description: The URL of the target type: string required: - name type: object required: - apiVersion - kind - spec title: DeploymentTargets.DeploymentTarget type: object description: Updated deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/deployment_targets/{id_or_name}/activate: patch: operationId: DeploymentTargets.Activate description: Activate a deployment target for the project. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 7b409a00-3160-4a36-9527-3b53d6de8926 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the deployment target in: path name: id_or_name required: true schema: description: Id or name of the deployment target type: string responses: '200': content: application/json: schema: properties: id: description: ID of a DeploymentTarget example: 2bc0207c-155f-4824-be69-6136bd5e0a1d format: uuid title: DeploymentTarget.ID type: string state: description: "State of the deployment target, `CORDONED` deployment target is an deactivated deployment\ \ target.\n Deployment Target in `USABLE` state can be used or modified." enum: - USABLE - CORDONED type: string title: DeploymentTargets.CordonResponse type: object description: Activated deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/deployment_targets/{id_or_name}/deactivate: patch: operationId: DeploymentTargets.Deactivate description: Deactivate a deployment target for the project. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 5e7822f2-0663-44e0-a722-ed64d29c80fb format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the deployment target in: path name: id_or_name required: true schema: description: Id or name of the deployment target type: string responses: '200': content: application/json: schema: properties: id: description: ID of a DeploymentTarget example: 2bc0207c-155f-4824-be69-6136bd5e0a1d format: uuid title: DeploymentTarget.ID type: string state: description: "State of the deployment target, `CORDONED` deployment target is an deactivated deployment\ \ target.\n Deployment Target in `USABLE` state can be used or modified." enum: - USABLE - CORDONED type: string title: DeploymentTargets.CordonResponse type: object description: Deactivated deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/deployment_targets/{id_or_name}/history: get: operationId: DeploymentTargets.History description: This endpoint provides the deployment history for a specific deployment target. tags: - DeploymentTargets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: ccaedf80-b27c-4471-8c6f-3e936f3b457c format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the deployment target in: path name: id_or_name required: true schema: description: Id or name of the deployment target type: string - description: Git reference type in: query name: git_ref_type required: false schema: description: Git reference type type: string - description: Git reference label in: query name: git_ref_label required: false schema: description: Git reference label type: string - description: Triggerer ID or value in: query name: triggered_by required: false schema: description: Triggerer ID or value type: string - description: 'Value of promotion parameter with the name from bookmark slot #1' in: query name: parameter1 required: false schema: description: 'Value of promotion parameter with the name from bookmark slot #1' type: string - description: 'Value of promotion parameter with the name from bookmark slot #2' in: query name: parameter2 required: false schema: description: 'Value of promotion parameter with the name from bookmark slot #2' type: string - description: 'Value of promotion parameter with the name from bookmark slot #3' in: query name: parameter3 required: false schema: description: 'Value of promotion parameter with the name from bookmark slot #3' type: string - description: Direction of the list from the provided token in: query name: direction required: false schema: default: NEXT description: "Use NEXT the token to get next page of results,\n use PREVIOUS to get the deployments\ \ before the token." enum: - NEXT - PREVIOUS type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: description: A deployment history item contains relevant details about deployments triggered for a deployment target. nullable: true properties: env_vars: description: Environment variables of the deployment target items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array id: description: ID of a Deployment example: a0424427-ff28-4f77-a893-0fdf5f50c380 format: uuid title: Deployment.ID type: string origin_pipeline_id: description: ID of a Pipeline example: 97ba55d1-90d7-40b9-a2dd-bdbd02389b58 format: uuid nullable: true title: Pipeline.ID type: string pipeline_id: description: ID of a Pipeline example: adc5a26f-4077-47bc-8d4f-cb4467f2c103 format: uuid nullable: true title: Pipeline.ID type: string state: description: The state of the last deployment of the deployment target enum: - PENDING - STARTED - FAILED type: string state_message: description: The message of the last deployment of the deployment target type: string target_id: description: ID of a DeploymentTarget example: 4a9e9001-6703-4815-9c19-ed2e9e8c87ea format: uuid title: DeploymentTarget.ID type: string target_name: description: The name of the deployment target type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object title: DeploymentTargets.HistoryItem type: object title: DeploymentTargets.HistoryResponse type: array description: History of deployment target '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/secrets: post: operationId: ProjectSecrets.Create description: Create a project scoped secret. tags: - ProjectSecrets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: c3528752-03d4-4a80-9da6-4f851bed62ad format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: ProjectSecret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: ProjectSecret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: abbb5683-9310-49bb-9fd2-ac69486a4c6d format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: f0f54dbb-0f70-444f-ad99-773830e2428b format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: afed5713-8c6e-4081-bdae-7030cebf24b6 format: uuid title: Project.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id - project_id type: object spec: description: Specification of the secret properties: data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Value of the secret items: description: Environment variable properties: name: description: Name of the environment variable example: ENV_VAR_NAME minLength: 1 type: string value: description: Value of the environment variable, or a md5 checksum type: string required: - name - value type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: ProjectSecrets.Secret type: object description: Secret to be created required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: ProjectSecret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: ProjectSecret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: abbb5683-9310-49bb-9fd2-ac69486a4c6d format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: f0f54dbb-0f70-444f-ad99-773830e2428b format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: afed5713-8c6e-4081-bdae-7030cebf24b6 format: uuid title: Project.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id - project_id type: object spec: description: Specification of the secret properties: data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Value of the secret items: description: Environment variable properties: name: description: Name of the environment variable example: ENV_VAR_NAME minLength: 1 type: string value: description: Value of the environment variable, or a md5 checksum type: string required: - name - value type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: ProjectSecrets.Secret type: object description: Created secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: ProjectSecrets.List description: "List all project level secrets in a project.\n If the response does not fit all the secrets refer\ \ to the link header to get next page url." tags: - ProjectSecrets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: e0fe5f6d-5e5b-41b0-b63a-c086b6ae704b format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Ordering of the secrets in: query name: order required: false schema: default: BY_NAME_ASC enum: - BY_NAME_ASC - BY_CREATE_TIME_ASC type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: ProjectSecret description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: ProjectSecret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: abbb5683-9310-49bb-9fd2-ac69486a4c6d format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: f0f54dbb-0f70-444f-ad99-773830e2428b format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: afed5713-8c6e-4081-bdae-7030cebf24b6 format: uuid title: Project.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id - project_id type: object spec: description: Specification of the secret properties: data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Value of the secret items: description: Environment variable properties: name: description: Name of the environment variable example: ENV_VAR_NAME minLength: 1 type: string value: description: Value of the environment variable, or a md5 checksum type: string required: - name - value type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: ProjectSecrets.Secret type: object title: ProjectSecrets.ListResponse type: array description: List of secrets '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/secrets/{id_or_name}: delete: operationId: ProjectSecrets.Delete description: Delete a project secret. tags: - ProjectSecrets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 4e2de168-eee7-4c85-a28b-5cd626972ebe format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the secret in: path name: id_or_name required: true schema: anyOf: - description: ID of a Secret example: ab4eb476-f564-4f8a-9cba-95fc91fde6b3 format: uuid title: Secret.ID type: string - description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string responses: '200': content: application/json: schema: description: '' properties: secret_id: description: ID of a Secret example: faee2e53-cd9f-4071-82d1-d1493a8f870a format: uuid title: Secret.ID type: string title: Secrets.DeleteResponse type: object description: ID of the deleted secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: ProjectSecrets.Describe description: Describe project secret with md5 contents. tags: - ProjectSecrets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 79f0da1c-fb41-42f1-ad75-5c15a06544f8 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the secret in: path name: id_or_name required: true schema: anyOf: - description: ID of a Secret example: df855d0f-158c-486d-b526-7aa31817a3c2 format: uuid title: Secret.ID type: string - description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: ProjectSecret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: ProjectSecret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: abbb5683-9310-49bb-9fd2-ac69486a4c6d format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: f0f54dbb-0f70-444f-ad99-773830e2428b format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: afed5713-8c6e-4081-bdae-7030cebf24b6 format: uuid title: Project.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id - project_id type: object spec: description: Specification of the secret properties: data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Value of the secret items: description: Environment variable properties: name: description: Name of the environment variable example: ENV_VAR_NAME minLength: 1 type: string value: description: Value of the environment variable, or a md5 checksum type: string required: - name - value type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: ProjectSecrets.Secret type: object description: Project secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: ProjectSecrets.Update description: Update a project scoped secret. tags: - ProjectSecrets parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 968cbe56-98cc-497a-90ac-df11f13811e5 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Id or name of the secret in: path name: id_or_name required: true schema: anyOf: - description: ID of a Secret example: 91f7bf26-9e90-4fd1-81b7-e56034482f9c format: uuid title: Secret.ID type: string - description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES = attach\ \ mode is enabled for this secret\n - NO = attach mode is disabled for this secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug mode\ \ is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL = all\ \ projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents of the\ \ secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object description: Updated secret, only spec can be updated required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: ProjectSecret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: ProjectSecret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: abbb5683-9310-49bb-9fd2-ac69486a4c6d format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: f0f54dbb-0f70-444f-ad99-773830e2428b format: uuid title: Organization.ID type: string project_id: description: ID of a Project example: afed5713-8c6e-4081-bdae-7030cebf24b6 format: uuid title: Project.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id - project_id type: object spec: description: Specification of the secret properties: data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Value of the secret items: description: Environment variable properties: name: description: Name of the environment variable example: ENV_VAR_NAME minLength: 1 type: string value: description: Value of the environment variable, or a md5 checksum type: string required: - name - value type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: ProjectSecrets.Secret type: object description: Updated secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/tasks: post: operationId: Tasks.Create description: Create a task from given params tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 969a3894-cd74-4451-aabd-ecd2598d0e61 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string requestBody: content: application/json: schema: description: Task Create request body properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object required: - apiVersion - kind - spec title: Task.CreateRequestBody type: object description: '' required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string metadata: description: Task Metadata properties: id: description: ID of a Task example: 49f06438-9c54-4d1d-9e4a-76faa292b150 format: uuid title: Task.ID type: string inserted_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object project_id: description: ID of a Project example: a3fa7cf5-0fee-4a76-ab75-f1a57f1316c1 format: uuid title: Project.ID type: string scheduled: example: false type: boolean suspended: example: false type: boolean updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object required: - id - project_id - suspended - updated_by - inserted_at - updated_at title: Task.Metadata type: object spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object title: Tasks.Task type: object description: Task '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Tasks.List description: List tasks for organization and/or project ID tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: dbddd505-77fc-4a21-a676-d8bf4489551d format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Search string for task name in: query name: name required: false schema: type: string - description: Direction of the list from the provided token in: query name: direction required: false schema: default: NEXT description: "Use NEXT with value of next_page_token to get next page of results,\n use PREVIOUS with\ \ value of previous_page_token to get previous page of results." enum: - NEXT - PREVIOUS type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: Task readOnly: true title: Kind type: string metadata: description: Task Metadata properties: id: description: ID of a Task example: 49f06438-9c54-4d1d-9e4a-76faa292b150 format: uuid title: Task.ID type: string inserted_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object project_id: description: ID of a Project example: a3fa7cf5-0fee-4a76-ab75-f1a57f1316c1 format: uuid title: Project.ID type: string scheduled: example: false type: boolean suspended: example: false type: boolean updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object required: - id - project_id - suspended - updated_by - inserted_at - updated_at title: Task.Metadata type: object spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object title: Tasks.Task type: object title: Tasks.ListResponse type: array description: List of tasks '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/tasks/{task_id}: delete: operationId: Tasks.Delete description: Delete a task by given ID tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 42227668-22e7-4ac9-a3e8-ba15a4596fc6 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Task ID in: path name: task_id required: true schema: description: ID of a Task example: cbfcd4d0-fc05-4008-adb7-b7f311c90d78 format: uuid title: Task.ID type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string metadata: description: Task Metadata properties: id: description: ID of a Task example: 49f06438-9c54-4d1d-9e4a-76faa292b150 format: uuid title: Task.ID type: string inserted_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object project_id: description: ID of a Project example: a3fa7cf5-0fee-4a76-ab75-f1a57f1316c1 format: uuid title: Project.ID type: string scheduled: example: false type: boolean suspended: example: false type: boolean updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object required: - id - project_id - suspended - updated_by - inserted_at - updated_at title: Task.Metadata type: object spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object title: Tasks.Task type: object description: Task Deleted '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Tasks.Describe description: Describe a task by given ID tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 8c199c5f-9667-490e-99a4-1fe6e7465b82 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Task ID in: path name: task_id required: true schema: description: ID of a Task example: 316bea6e-95f2-4a63-b5c2-e0c981c2b246 format: uuid title: Task.ID type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string metadata: description: Task Metadata properties: id: description: ID of a Task example: 49f06438-9c54-4d1d-9e4a-76faa292b150 format: uuid title: Task.ID type: string inserted_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object project_id: description: ID of a Project example: a3fa7cf5-0fee-4a76-ab75-f1a57f1316c1 format: uuid title: Project.ID type: string scheduled: example: false type: boolean suspended: example: false type: boolean updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object required: - id - project_id - suspended - updated_by - inserted_at - updated_at title: Task.Metadata type: object spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object title: Tasks.Task type: object description: Task '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: Tasks.Replace description: Replace tasks with new data tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: c33a966b-17c4-4c4e-a00c-5b2c8a109a62 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Task ID in: path name: task_id required: true schema: description: ID of a Task example: 38d60f82-5cc1-4bf2-8751-5f531081b87e format: uuid title: Task.ID type: string requestBody: content: application/json: schema: description: Task Replace request body properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object required: - apiVersion - kind - spec title: Task.ReplaceRequestBody type: object description: '' required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string metadata: description: Task Metadata properties: id: description: ID of a Task example: 49f06438-9c54-4d1d-9e4a-76faa292b150 format: uuid title: Task.ID type: string inserted_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object project_id: description: ID of a Project example: a3fa7cf5-0fee-4a76-ab75-f1a57f1316c1 format: uuid title: Project.ID type: string scheduled: example: false type: boolean suspended: example: false type: boolean updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object required: - id - project_id - suspended - updated_by - inserted_at - updated_at title: Task.Metadata type: object spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object title: Tasks.Task type: object description: Task '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] patch: operationId: Tasks.Update description: Update (patch) task with given params tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 71466bf8-e40a-4653-8926-dc4d971a5e45 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Task ID in: path name: task_id required: true schema: description: ID of a Task example: 4e15f8af-429b-4147-b45b-f389fe79509b format: uuid title: Task.ID type: string requestBody: content: application/json: schema: description: Task Update request body properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string title: Task.Spec type: object required: - apiVersion - kind - spec type: object description: '' required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Task description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Task readOnly: true title: Kind type: string metadata: description: Task Metadata properties: id: description: ID of a Task example: 49f06438-9c54-4d1d-9e4a-76faa292b150 format: uuid title: Task.ID type: string inserted_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string paused_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object project_id: description: ID of a Project example: a3fa7cf5-0fee-4a76-ab75-f1a57f1316c1 format: uuid title: Project.ID type: string scheduled: example: false type: boolean suspended: example: false type: boolean updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: nullable: true properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object required: - id - project_id - suspended - updated_by - inserted_at - updated_at title: Task.Metadata type: object spec: description: Task Specification properties: branch: example: master type: string cron_schedule: example: 0 0 * * * type: string description: example: Periodic task description type: string name: example: Periodic task type: string parameters: items: description: Task Parameter properties: default_value: example: Default value type: string description: example: Parameter description type: string name: example: PARAM_NAME pattern: ^[A-Z_]{1,}[A-Z0-9_]*$ type: string options: items: type: string type: array required: example: true type: boolean required: - name - required title: Task.Parameter type: object type: array paused: example: false type: boolean pipeline_file: example: pipeline.yml type: string required: - name - branch - pipeline_file title: Task.Spec type: object title: Tasks.Task type: object description: Task '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /projects/{project_id_or_name}/tasks/{task_id}/triggers: post: operationId: Tasks.Trigger description: Creates a workflow originating from task tags: - Tasks parameters: - description: Id or name of the project in: path name: project_id_or_name required: true schema: anyOf: - description: ID of a Project example: 43a29719-ca26-4c3d-800b-6bf007a356a3 format: uuid title: Project.ID type: string - description: Project name must match the regex example: my-project minLength: 1 pattern: \A[\w\-\.]+\z title: Project.Name type: string - description: Task ID in: path name: task_id required: true schema: description: ID of a Task example: c94c2e3e-fe76-44e1-9bf2-5f931a2ebf82 format: uuid title: Task.ID type: string requestBody: content: application/json: schema: description: Task Trigger request body properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: TaskTrigger description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: TaskTrigger readOnly: true title: Kind type: string spec: description: Task Trigger specification properties: branch: example: master type: string parameters: items: description: Task Trigger Parameter properties: name: example: Parameter name type: string value: example: Parameter value type: string required: - name - value title: Task.Trigger.Parameter type: object type: array pipeline_file: example: .semaphore/semaphore.yml type: string title: Task.Trigger.Spec type: object required: - apiVersion - kind - spec type: object description: '' required: false responses: '200': content: application/json: schema: description: Task Trigger properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: TaskTrigger description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: TaskTrigger readOnly: true title: Kind type: string metadata: description: Task Trigger Metadata properties: scheduled_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string status: example: passed type: string triggered_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string triggered_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object workflow_id: description: ID of a Workflow example: 33c93e7e-5239-4b80-8d86-1cdcc0a15087 format: uuid title: Workflow.ID type: string title: Task.Trigger.Metadata type: object spec: description: Task Trigger specification properties: branch: example: master type: string parameters: items: description: Task Trigger Parameter properties: name: example: Parameter name type: string value: example: Parameter value type: string required: - name - value title: Task.Trigger.Parameter type: object type: array pipeline_file: example: .semaphore/semaphore.yml type: string title: Task.Trigger.Spec type: object required: - apiVersion - kind - metadata - spec title: Task.Trigger type: object description: Task '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /secrets: post: operationId: Secrets.Create description: Create an organization secret. tags: - Secrets requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES = attach\ \ mode is enabled for this secret\n - NO = attach mode is disabled for this secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug mode\ \ is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL = all\ \ projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents of the\ \ secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object description: Secret to be created required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES =\ \ attach mode is enabled for this secret\n - NO = attach mode is disabled for this\ \ secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug mode\ \ is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL =\ \ all projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents of\ \ the secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object description: Created secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Secrets.List description: "List all organization level secrets.\n If the response does not fit all the secrets refer to the\ \ link header to get next page url." tags: - Secrets parameters: - description: Ordering of the secrets in: query name: order required: false schema: default: BY_NAME_ASC enum: - BY_NAME_ASC - BY_CREATE_TIME_ASC type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES\ \ = attach mode is enabled for this secret\n - NO = attach mode is disabled for this\ \ secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug\ \ mode is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL \ \ = all projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents\ \ of the secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object title: Secrets.ListResponse type: array description: List of secrets '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /secrets/{id_or_name}: delete: operationId: Secrets.Delete description: Delete an organization secret. tags: - Secrets parameters: - description: Id or name of the secret in: path name: id_or_name required: true schema: anyOf: - description: ID of a Secret example: 3f2c2e86-1099-478f-a02b-698832a42c56 format: uuid title: Secret.ID type: string - description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string responses: '200': content: application/json: schema: description: '' properties: secret_id: description: ID of a Secret example: faee2e53-cd9f-4071-82d1-d1493a8f870a format: uuid title: Secret.ID type: string title: Secrets.DeleteResponse type: object description: ID of the deleted secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: Secrets.Describe description: Describe an organization secret with md5 contents. tags: - Secrets parameters: - description: Id or name of the secret in: path name: id_or_name required: true schema: anyOf: - description: ID of a Secret example: 5e3bd585-4b94-4970-adc1-ffc38e94534b format: uuid title: Secret.ID type: string - description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES =\ \ attach mode is enabled for this secret\n - NO = attach mode is disabled for this\ \ secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug mode\ \ is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL =\ \ all projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents of\ \ the secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object description: Organization secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: Secrets.Update description: Update an organization secret. tags: - Secrets parameters: - description: Id or name of the secret in: path name: id_or_name required: true schema: anyOf: - description: ID of a Secret example: a40fc3a6-2049-475b-bef9-7f3eac561218 format: uuid title: Secret.ID type: string - description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string requestBody: content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES = attach\ \ mode is enabled for this secret\n - NO = attach mode is disabled for this secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug mode\ \ is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL = all\ \ projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents of the\ \ secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object description: Updated secret, only spec can be updated required: false responses: '200': content: application/json: schema: properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: Secret description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: Secret readOnly: true title: Kind type: string metadata: description: Metadata of the secret, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string created_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object description: description: Description of the secret type: string id: description: ID of a Secret example: b6654945-cf11-43a1-8e3a-f5a22c7d19fa format: uuid title: Secret.ID type: string last_used_at: description: Last time the secret was used in a job format: date-time nullable: true title: Timestamp type: string last_used_by: description: Collected information about last usage of the secret nullable: true properties: hook_id: description: ID of a Hook example: c0798875-7908-456b-ab3e-78de8247b6e0 format: uuid title: Hook.ID type: string job_id: description: ID of a Job example: 7ce0901c-84b0-4bb4-ab96-f0a4b15ae52d format: uuid title: Job.ID type: string pipeline_id: description: ID of a Pipeline example: 4cd4fdb9-4248-4348-932c-855746110bcc format: uuid title: Pipeline.ID type: string project_id: description: ID of a Project example: 1c306e24-af58-4e95-8cd9-27e9a1a36428 format: uuid title: Project.ID type: string user_id: description: ID of a User example: 7a8f94b1-c5b6-4195-82ca-f68664fa832b format: uuid title: User.ID type: string workflow_id: description: ID of a Workflow example: 40dcd7b2-3e42-4958-8c08-7eb5aa8690f6 format: uuid title: Workflow.ID type: string title: Secrets.Checkout type: object name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string org_id: description: ID of a Organization example: 476f994f-76bc-4ff1-9cdf-5092d29236cf format: uuid title: Organization.ID type: string updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string updated_by: properties: id: description: ID of a User example: 18b40eaf-ce10-49c3-93f2-e4fe72d5160b format: uuid title: User.ID type: string title: User type: object readOnly: true required: - id - name - org_id type: object spec: description: Specification of the secret properties: access_config: description: "Access configuration of the secret if the feature is enabled.\n More info: https://docs.semaphoreci.com/essentials/using-secrets/#organization-level-secrets-access-policy" properties: attach_access: default: 'YES' description: "Field determining if you can attach to a job using this secret\n - YES =\ \ attach mode is enabled for this secret\n - NO = attach mode is disabled for this\ \ secret" enum: - 'YES' - 'NO' type: string debug_access: default: 'YES' description: "Field determining if secret can be used in debug jobs\n - YES = debug mode\ \ is enabled for this secret\n - NO = debug mode is disabled for this secret" enum: - 'YES' - 'NO' type: string project_access: default: ALL description: "Field determining if projects can use the secret contents\n - ALL =\ \ all projects can use this secret\n - ALLOWED = oly projects whitelisted in project_ids\ \ will be able to read this secret\n - NONE = no projects can access contents of\ \ the secret" enum: - ALL - ALLOWED - NONE type: string project_ids: default: [] description: List of project ids that can use the secret contents if project_access is set to ALLOWED items: description: ID of a Project example: 0e7fa31e-f974-4f57-ab99-72ac8b70df41 format: uuid title: Project.ID type: string type: array title: Secrets.AccessConfig type: object data: description: Data of the secret, both env_vars and files are required but can be empty properties: env_vars: description: Environment variables of the secret items: description: EnvVar properties: name: description: Name of the environment variable example: MY_SECRET minLength: 1 type: string value: description: Value of the environment variable example: secret minLength: 1 type: string required: - name - value title: Secrets.Secret.EnvVar type: object type: array files: description: Files of the secret items: description: File properties: content: description: base64 encoded content of the file or a md5 checksum type: string path: description: Name of the file. Both absolute and relative paths are allowed. example: /path/to/file minLength: 1 type: string required: - path - content title: Secrets.Secret.File type: object type: array required: - env_vars - files type: object description: description: Description of the secret type: string name: description: Secret name must match the regex example: my-secret minLength: 1 pattern: '^[@: -._a-zA-Z0-9]+$' title: Secret.Name type: string required: - name - data type: object required: - apiVersion - kind - metadata - spec title: Secrets.Secret type: object description: Updated secret '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /self_hosted_agent_types: post: operationId: SelfHostedAgentTypes.Create description: Create a self-hosted agent type tags: - SelfHostedAgentTypes requestBody: content: application/json: schema: description: Self-hosted agent type properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgentType description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: SelfHostedAgentType readOnly: true title: Kind type: string metadata: description: Metadata of the agent type, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string name: description: The name of the agent type example: my-agent-type type: string status: description: Status of the agent type properties: registration_token: description: Registration token for the agent type example: '...' type: string total_agent_count: description: Total number of agents of this type example: 0 type: integer type: object updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - name type: object spec: description: Specification of the agent type properties: agent_name_settings: description: Settings for the agent name properties: assignment_origin: default: ASSIGNMENT_ORIGIN_AGENT description: The origin of the agent name assignment during its registration enum: - ASSIGNMENT_ORIGIN_UNSPECIFIED - ASSIGNMENT_ORIGIN_AGENT - ASSIGNMENT_ORIGIN_AWS_STS type: string aws: description: AWS settings, required if `assignment_origin` `ASSIGNMENT_ORIGIN_AWS_STS` is used nullable: true properties: account_id: description: The AWS account ID example: '123456789012' type: string role_name_patterns: description: Comma-separated list of AWS role names. Wildcards (*) can be used too example: my-role-name type: string required: - account_id - role_name_patterns type: object release_after: default: 0 description: How long to hold the agent name after its disconnection, not allowing other agents to register with its name type: integer title: SelfHostedAgents.AgentType.NameSettings type: object name: description: The name of the agent type example: my-agent-type type: string required: - name - agent_name_settings type: object required: - apiVersion - kind - spec title: SelfHostedAgents.AgentType type: object description: Self-hosted-agent type to be created required: false responses: '200': content: application/json: schema: description: Self-hosted agent properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgent description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: SelfHostedAgent readOnly: true title: Kind type: string metadata: description: Metadata of the agent, all fields are read only properties: arch: description: Architecture the agent is built for type: string connected_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string disabled_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string hostname: description: Hostname the agent is running on type: string ip_address: description: The public IP address of the agent type: string name: description: Unique name of the agent type: string org_id: description: ID of a Organization example: c9746a87-aa53-48dd-96c6-737e27bee4f7 format: uuid title: Organization.ID type: string os: description: OS the agent is running on example: Ubuntu 20.04.6 LTS type: string pid: description: '' type: integer status: enum: - WAITING_FOR_JOB - RUNNING_JOB type: string type: description: Self-hosted agent type of the agent example: s1-my-type type: string version: description: Version of the agent example: v2.2.6 type: string type: object required: - apiVersion - kind title: SelfHostedAgents.Agent type: object description: Created self-hosted agent type '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: SelfHostedAgentTypes.List description: List self-hosted agent types tags: - SelfHostedAgentTypes parameters: - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: items: description: Self-hosted agent type properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n \ \ Servers should convert recognized schemas to the latest internal value, and may reject\n \ \ unrecognized values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgentType description: "Kind is a string value representing the REST resource this object represents.\n \ \ Servers may infer this from the endpoint the client submits requests to. Cannot be\n updated.\ \ In CamelCase." example: SelfHostedAgentType readOnly: true title: Kind type: string metadata: description: Metadata of the agent type, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string name: description: The name of the agent type example: my-agent-type type: string status: description: Status of the agent type properties: registration_token: description: Registration token for the agent type example: '...' type: string total_agent_count: description: Total number of agents of this type example: 0 type: integer type: object updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - name type: object spec: description: Specification of the agent type properties: agent_name_settings: description: Settings for the agent name properties: assignment_origin: default: ASSIGNMENT_ORIGIN_AGENT description: The origin of the agent name assignment during its registration enum: - ASSIGNMENT_ORIGIN_UNSPECIFIED - ASSIGNMENT_ORIGIN_AGENT - ASSIGNMENT_ORIGIN_AWS_STS type: string aws: description: AWS settings, required if `assignment_origin` `ASSIGNMENT_ORIGIN_AWS_STS` is used nullable: true properties: account_id: description: The AWS account ID example: '123456789012' type: string role_name_patterns: description: Comma-separated list of AWS role names. Wildcards (*) can be used too example: my-role-name type: string required: - account_id - role_name_patterns type: object release_after: default: 0 description: How long to hold the agent name after its disconnection, not allowing other agents to register with its name type: integer title: SelfHostedAgents.AgentType.NameSettings type: object name: description: The name of the agent type example: my-agent-type type: string required: - name - agent_name_settings type: object required: - apiVersion - kind - spec title: SelfHostedAgents.AgentType type: object title: SelfHostedAgents.AgentTypeListResponse type: array description: Self-hosted agent type '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /self_hosted_agent_types/{agent_type_name}: delete: operationId: SelfHostedAgentTypes.Delete description: Delete a self-hosted agent type tags: - SelfHostedAgentTypes parameters: - description: Name of the agent type to delete in: path name: agent_type_name required: true schema: description: Name of the agent type type: string responses: '200': content: application/json: schema: description: Message about success of the operation properties: message: description: Message about success of the operation example: Agent type deleted successfully type: string title: SelfHostedAgents.OperationResponse type: object description: Message containing confirmation for deleted self-hosted agent type '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] get: operationId: SelfHostedAgentTypes.Describe description: Describe a self-hosted agent type tags: - SelfHostedAgentTypes parameters: - description: Name of the agent type in: path name: agent_type_name required: true schema: description: Name of the agent type type: string responses: '200': content: application/json: schema: description: Self-hosted agent type properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgentType description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: SelfHostedAgentType readOnly: true title: Kind type: string metadata: description: Metadata of the agent type, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string name: description: The name of the agent type example: my-agent-type type: string status: description: Status of the agent type properties: registration_token: description: Registration token for the agent type example: '...' type: string total_agent_count: description: Total number of agents of this type example: 0 type: integer type: object updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - name type: object spec: description: Specification of the agent type properties: agent_name_settings: description: Settings for the agent name properties: assignment_origin: default: ASSIGNMENT_ORIGIN_AGENT description: The origin of the agent name assignment during its registration enum: - ASSIGNMENT_ORIGIN_UNSPECIFIED - ASSIGNMENT_ORIGIN_AGENT - ASSIGNMENT_ORIGIN_AWS_STS type: string aws: description: AWS settings, required if `assignment_origin` `ASSIGNMENT_ORIGIN_AWS_STS` is used nullable: true properties: account_id: description: The AWS account ID example: '123456789012' type: string role_name_patterns: description: Comma-separated list of AWS role names. Wildcards (*) can be used too example: my-role-name type: string required: - account_id - role_name_patterns type: object release_after: default: 0 description: How long to hold the agent name after its disconnection, not allowing other agents to register with its name type: integer title: SelfHostedAgents.AgentType.NameSettings type: object name: description: The name of the agent type example: my-agent-type type: string required: - name - agent_name_settings type: object required: - apiVersion - kind - spec title: SelfHostedAgents.AgentType type: object description: Self-hosted agent type '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] put: operationId: SelfHostedAgentTypes.Update description: Update a self-hosted agent type tags: - SelfHostedAgentTypes parameters: - description: Name of the agent type in: path name: agent_type_name required: true schema: description: Name of the agent type type: string requestBody: content: application/json: schema: description: Self-hosted agent type properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgentType description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: SelfHostedAgentType readOnly: true title: Kind type: string metadata: description: Metadata of the agent type, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string name: description: The name of the agent type example: my-agent-type type: string status: description: Status of the agent type properties: registration_token: description: Registration token for the agent type example: '...' type: string total_agent_count: description: Total number of agents of this type example: 0 type: integer type: object updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - name type: object spec: description: Specification of the agent type properties: agent_name_settings: description: Settings for the agent name properties: assignment_origin: default: ASSIGNMENT_ORIGIN_AGENT description: The origin of the agent name assignment during its registration enum: - ASSIGNMENT_ORIGIN_UNSPECIFIED - ASSIGNMENT_ORIGIN_AGENT - ASSIGNMENT_ORIGIN_AWS_STS type: string aws: description: AWS settings, required if `assignment_origin` `ASSIGNMENT_ORIGIN_AWS_STS` is used nullable: true properties: account_id: description: The AWS account ID example: '123456789012' type: string role_name_patterns: description: Comma-separated list of AWS role names. Wildcards (*) can be used too example: my-role-name type: string required: - account_id - role_name_patterns type: object release_after: default: 0 description: How long to hold the agent name after its disconnection, not allowing other agents to register with its name type: integer title: SelfHostedAgents.AgentType.NameSettings type: object name: description: The name of the agent type example: my-agent-type type: string required: - name - agent_name_settings type: object required: - apiVersion - kind - spec title: SelfHostedAgents.AgentType type: object description: Updated details of the self-hosted agent type. required: false responses: '200': content: application/json: schema: description: Self-hosted agent type properties: apiVersion: default: v2 description: "ApiVersion defines the versioned schema of this representation of an object.\n Servers\ \ should convert recognized schemas to the latest internal value, and may reject\n unrecognized\ \ values." example: v2 readOnly: true title: ApiVersion type: string kind: default: SelfHostedAgentType description: "Kind is a string value representing the REST resource this object represents.\n Servers\ \ may infer this from the endpoint the client submits requests to. Cannot be\n updated. In CamelCase." example: SelfHostedAgentType readOnly: true title: Kind type: string metadata: description: Metadata of the agent type, all fields are read only properties: created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string name: description: The name of the agent type example: my-agent-type type: string status: description: Status of the agent type properties: registration_token: description: Registration token for the agent type example: '...' type: string total_agent_count: description: Total number of agents of this type example: 0 type: integer type: object updated_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string readOnly: true required: - name type: object spec: description: Specification of the agent type properties: agent_name_settings: description: Settings for the agent name properties: assignment_origin: default: ASSIGNMENT_ORIGIN_AGENT description: The origin of the agent name assignment during its registration enum: - ASSIGNMENT_ORIGIN_UNSPECIFIED - ASSIGNMENT_ORIGIN_AGENT - ASSIGNMENT_ORIGIN_AWS_STS type: string aws: description: AWS settings, required if `assignment_origin` `ASSIGNMENT_ORIGIN_AWS_STS` is used nullable: true properties: account_id: description: The AWS account ID example: '123456789012' type: string role_name_patterns: description: Comma-separated list of AWS role names. Wildcards (*) can be used too example: my-role-name type: string required: - account_id - role_name_patterns type: object release_after: default: 0 description: How long to hold the agent name after its disconnection, not allowing other agents to register with its name type: integer title: SelfHostedAgents.AgentType.NameSettings type: object name: description: The name of the agent type example: my-agent-type type: string required: - name - agent_name_settings type: object required: - apiVersion - kind - spec title: SelfHostedAgents.AgentType type: object description: Self-hosted agent type '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /self_hosted_agent_types/{agent_type_name}/disable_all: post: operationId: SelfHostedAgentTypes.DisableAll description: Disable agents for an agent type tags: - SelfHostedAgentTypes parameters: - description: Name of the agent type to disable in: path name: agent_type_name required: true schema: description: Name of the agent type type: string requestBody: content: application/json: schema: description: Disable all self-hosted agents request properties: only_idle: default: true description: "A boolean flag that controls whether all agents will be disabled or only idle agents. If set\ \ to `true` only idle agents are disabled.\n By default, this is set to `true`" type: boolean title: SelfHostedAgents.DisableAllRequest type: object description: Disable all or only idle agents for an agent type required: false responses: '200': content: application/json: schema: description: Message about success of the operation properties: message: description: Message about success of the operation example: Agent type deleted successfully type: string title: SelfHostedAgents.OperationResponse type: object description: Self-hosted agents of the given type were disabled. '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /workflows: get: operationId: Workflows.List description: List workflows using project id. tags: - Workflows parameters: - description: The id of the project to list the workflows for in: query name: project_id required: true schema: format: uuid type: string - description: Branch name example: main in: query name: branch_name required: false schema: type: string - description: Return only workflows created before this timestamp example: '2021-01-01T00:00:00Z' in: query name: created_before required: true schema: format: date-time type: string - description: Return only workflows created after this timestamp example: '2021-01-01T00:00:00Z' in: query name: created_after required: true schema: format: date-time type: string - description: Return only workflows with given label (label is branch/tag name, PR number, snapshot generated label etc.) example: v2 in: query name: label required: false schema: type: string - description: Type of git reference for which workflow is initiated. example: BRANCH in: query name: git_ref_type required: false schema: enum: - BRANCH - TAG - PR type: string - description: Direction of the list from the provided token in: query name: direction required: false schema: default: NEXT description: "Use NEXT with value of next_page_token to get next page of results,\n use PREVIOUS with\ \ value of previous_page_token to get previous page of results." enum: - NEXT - PREVIOUS type: string - description: Starting point for listing, if you are fetching first page leave it empty in: query name: page_token required: false schema: default: '' type: string - description: Page size in: query name: page_size required: false schema: default: 20 maximum: 100 minimum: 1 title: PageSize type: integer responses: '200': content: application/json: schema: description: Workflow list. Follow the link headers for fetching additional pages of results items: properties: branch_id: description: ID of a Branch example: 76ee0686-789f-4930-a5c5-ac72d93815c8 format: uuid title: Branch.ID type: string commit_sha: format: sha-1 type: string created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string hook_id: description: ID of a Hook example: 0380850a-ac70-4f95-93b5-dc89ebdf48fb format: uuid title: Hook.ID type: string initial_ppl_id: description: The ID of the initial pipeline that was ran by this workflow format: uuid type: string project_id: description: ID of a Project example: cdbad08d-903b-43c5-8e9a-99c5b74a89aa format: uuid title: Project.ID type: string requester_id: description: ID of a User example: 5df2cadb-310f-4c14-8784-e27289133a78 format: uuid title: User.ID type: string triggered_by: enum: - HOOK - SCHEDULE - API - MANUAL_RUN type: string wf_id: description: ID of a Workflow example: f850cdcf-d3de-4d50-91bf-b6190fa5f9c0 format: uuid title: Workflow.ID type: string title: Workflows.Workflow type: object title: Workflows.ListResponse type: array description: List of workflows in a project '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] post: operationId: Workflows.Schedule description: Schedule a workflow for running tags: - Workflows requestBody: content: application/json: schema: description: Workflow schedule parameters properties: commit_sha: description: Commit sha of the desired commit. type: string pipeline_file: default: .semaphore/semaphore.yml description: he path within the repository to the YAML file that contains the pipeline definition type: string project_id: description: Id of the project to schedule the workflow in. format: uuid type: string reference: description: git reference for the desired branch, tag, or pull request example: refs/tags/v1.0 type: string required: - project_id - reference title: Workflows.ScheduleParameters type: object description: Workflow schedule parameters required: false responses: '200': content: application/json: schema: properties: hook_id: description: ID of a Hook example: 9f794fc1-b637-47cd-8128-ad68a1436da8 format: uuid title: Hook.ID type: string ppl_id: description: ID of a Pipeline example: 0fa8f3e2-c4ae-4796-81fc-7b635d111314 format: uuid title: Pipeline.ID type: string wf_id: description: ID of a Workflow example: 3c41a156-a280-47fa-bb3b-d15421e99a1c format: uuid title: Workflow.ID type: string title: Workflows.ScheduleResponse type: object description: '' '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /workflows/{wf_id}: get: operationId: Workflows.Describe description: Describe a workflow based on workflow id tags: - Workflows parameters: - description: Workflow id example: 7b84a2e0-f0c4-4100-9aad-b77d2325f476 in: path name: wf_id required: true schema: description: ID of a Workflow example: 232c2d5a-3122-4818-a8a4-288cac7c29ac format: uuid title: Workflow.ID type: string responses: '200': content: application/json: schema: properties: branch_id: description: ID of a Branch example: 76ee0686-789f-4930-a5c5-ac72d93815c8 format: uuid title: Branch.ID type: string commit_sha: format: sha-1 type: string created_at: description: Timestamp in ISO 8601 format format: date-time title: Timestamp type: string hook_id: description: ID of a Hook example: 0380850a-ac70-4f95-93b5-dc89ebdf48fb format: uuid title: Hook.ID type: string initial_ppl_id: description: The ID of the initial pipeline that was ran by this workflow format: uuid type: string project_id: description: ID of a Project example: cdbad08d-903b-43c5-8e9a-99c5b74a89aa format: uuid title: Project.ID type: string requester_id: description: ID of a User example: 5df2cadb-310f-4c14-8784-e27289133a78 format: uuid title: User.ID type: string triggered_by: enum: - HOOK - SCHEDULE - API - MANUAL_RUN type: string wf_id: description: ID of a Workflow example: f850cdcf-d3de-4d50-91bf-b6190fa5f9c0 format: uuid title: Workflow.ID type: string title: Workflows.Workflow type: object description: Workflow '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /workflows/{wf_id}/reschedule: post: operationId: Workflows.Reschedule description: Schedule a workflow for re-running tags: - Workflows parameters: - description: Workflow id example: 5f3bba98-1d60-4a21-af09-2de1db0a5b8c in: path name: wf_id required: true schema: format: uuid type: string requestBody: content: application/json: schema: properties: request_token: format: uuid type: string required: - request_token type: object description: Request token can be any string required: false responses: '200': content: application/json: schema: properties: ppl_id: description: ID of a Pipeline example: 586c1e84-9b4f-47b7-8d75-40f0913c9b03 format: uuid title: Pipeline.ID type: string wf_id: description: ID of a Workflow example: 161d6c5e-e3e5-4c4f-8c77-3c338b8b96c7 format: uuid title: Workflow.ID type: string title: Workflows.RescheduleResponse type: object description: '' '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /workflows/{wf_id}/terminate: post: operationId: Workflows.Terminate description: Stop a scheduled workflow tags: - Workflows parameters: - description: Workflow id example: e78b0d2e-af4e-4a1a-85ba-4a7e9918db25 in: path name: wf_id required: true schema: description: ID of a Workflow example: edd44c05-ccd0-4758-99d8-d0715d45a802 format: uuid title: Workflow.ID type: string responses: '200': content: application/json: schema: properties: message: description: Message indicating the workflow termination status type: string title: Workflows.TerminateResponse type: object description: '' '400': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Bad Request '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] /yaml: post: operationId: Pipelines.ValidateYaml tags: - Pipelines requestBody: content: application/json: schema: properties: yml_definition: description: Pipeline YAML definition, be careful to escape the contents type: string required: - yml_definition type: object description: Json containing a YAML file to be validated required: false responses: '200': content: application/json: schema: properties: message: example: YAML definition is valid. type: string type: object description: Valid YAML response, check out 400 response as well. '400': content: application/json: schema: properties: message: type: string type: object description: Message explaining the errors in YAML '401': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Unauthorized '404': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Not Found '422': content: application/json: schema: description: Resource validation failed properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string errors: items: properties: field: type: string message: type: string type: object type: array message: type: string title: Error.Validation type: object description: Validation Failed '500': content: application/json: schema: properties: documentation_url: example: https://docs.semaphoreci.com/api/error-codes/bad-request format: uri type: string message: type: string title: Error type: object description: Internal Server Error security: - authorization: [] tags: - name: Workflows description: Workflow management - name: Pipelines description: Pipeline management - name: Tasks description: Task management - name: Secrets description: Organization-level secrets - name: ProjectSecrets description: Project-level secrets - name: Projects description: Project management - name: SelfHostedAgentTypes description: Self-hosted agent type management - name: SelfHostedAgents description: Self-hosted agent management - name: Notifications description: Notification management - name: Dashboards description: Dashboard management - name: DeploymentTargets description: Deployment target management