openapi: 3.0.3 info: title: Semaphore Public Dashboards ProjectSecrets 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: [] tags: - name: ProjectSecrets description: Project-level secrets paths: /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: [] components: securitySchemes: authorization: description: Token that you get from semaphore [account settings](https://me.semaphoreci.com/account). name: authorization scheme: bearer type: http