swagger: '2.0' info: title: Koyeb Rest activity Secrets API description: 'The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. ' version: 1.0.0 host: app.koyeb.com schemes: - https security: - Bearer: [] tags: - name: Secrets paths: /v1/secrets: get: summary: List Secrets operationId: ListSecrets responses: '200': description: A successful response. schema: $ref: '#/definitions/ListSecretsReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: name in: query required: false type: string - name: limit in: query required: false type: string - name: offset in: query required: false type: string - name: types description: Filter by secret types in: query required: false type: array items: type: string enum: - SIMPLE - REGISTRY - MANAGED collectionFormat: multi - name: project_id description: (Optional) A filter for the project ID in: query required: false type: string tags: - Secrets post: summary: Create Secret operationId: CreateSecret responses: '200': description: A successful response. schema: $ref: '#/definitions/CreateSecretReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: secret in: body required: true schema: $ref: '#/definitions/CreateSecret' tags: - Secrets /v1/secrets/{id}: get: summary: Get Secret operationId: GetSecret responses: '200': description: A successful response. schema: $ref: '#/definitions/GetSecretReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id in: path required: true type: string tags: - Secrets delete: summary: Delete Secret operationId: DeleteSecret responses: '200': description: A successful response. schema: $ref: '#/definitions/DeleteSecretReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id in: path required: true type: string tags: - Secrets put: summary: Update Secret operationId: UpdateSecret responses: '200': description: A successful response. schema: $ref: '#/definitions/UpdateSecretReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id in: path required: true type: string - name: secret in: body required: true schema: $ref: '#/definitions/Secret' - name: update_mask in: query required: false type: string tags: - Secrets patch: summary: Update Secret operationId: UpdateSecret2 responses: '200': description: A successful response. schema: $ref: '#/definitions/UpdateSecretReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id in: path required: true type: string - name: secret in: body required: true schema: $ref: '#/definitions/Secret' - name: update_mask in: query required: false type: string tags: - Secrets /v1/secrets/{id}/reveal: post: summary: Reveal Secret operationId: RevealSecret responses: '200': description: A successful response. schema: $ref: '#/definitions/RevealSecretReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id in: path required: true type: string - name: body in: body required: true schema: type: object tags: - Secrets definitions: PrivateRegistryConfiguration: type: object properties: username: type: string password: type: string url: type: string CreateSecretReply: type: object properties: secret: $ref: '#/definitions/Secret' CreateSecret: type: object properties: name: type: string type: $ref: '#/definitions/SecretType' value: type: string docker_hub_registry: $ref: '#/definitions/DockerHubRegistryConfiguration' private_registry: $ref: '#/definitions/PrivateRegistryConfiguration' digital_ocean_registry: $ref: '#/definitions/DigitalOceanRegistryConfiguration' github_registry: $ref: '#/definitions/GitHubRegistryConfiguration' gitlab_registry: $ref: '#/definitions/GitLabRegistryConfiguration' gcp_container_registry: $ref: '#/definitions/GCPContainerRegistryConfiguration' azure_container_registry: $ref: '#/definitions/AzureContainerRegistryConfiguration' project_id: type: string title: (Optional) The project ID to associate with the secret ListSecretsReply: type: object properties: secrets: type: array items: $ref: '#/definitions/Secret' limit: type: integer format: int64 offset: type: integer format: int64 count: type: integer format: int64 DigitalOceanRegistryConfiguration: type: object properties: username: type: string password: type: string GitLabRegistryConfiguration: type: object properties: username: type: string password: type: string GetSecretReply: type: object properties: secret: $ref: '#/definitions/Secret' ErrorWithFields: type: object properties: status: type: integer format: int32 code: type: string message: type: string fields: type: array items: $ref: '#/definitions/ErrorField' RevealSecretReply: type: object properties: value: {} ErrorField: type: object properties: field: type: string description: type: string Error: type: object properties: status: type: integer format: int32 code: type: string message: type: string DeleteSecretReply: type: object google.rpc.Status: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: $ref: '#/definitions/google.protobuf.Any' GitHubRegistryConfiguration: type: object properties: username: type: string password: type: string UpdateSecretReply: type: object properties: secret: $ref: '#/definitions/Secret' AzureContainerRegistryConfiguration: type: object properties: registry_name: type: string username: type: string password: type: string DatabaseRolePassword: type: object properties: username: type: string password: type: string Secret: type: object properties: id: type: string name: type: string organization_id: type: string type: $ref: '#/definitions/SecretType' updated_at: type: string format: date-time created_at: type: string format: date-time value: type: string docker_hub_registry: $ref: '#/definitions/DockerHubRegistryConfiguration' private_registry: $ref: '#/definitions/PrivateRegistryConfiguration' digital_ocean_registry: $ref: '#/definitions/DigitalOceanRegistryConfiguration' github_registry: $ref: '#/definitions/GitHubRegistryConfiguration' gitlab_registry: $ref: '#/definitions/GitLabRegistryConfiguration' gcp_container_registry: $ref: '#/definitions/GCPContainerRegistryConfiguration' azure_container_registry: $ref: '#/definitions/AzureContainerRegistryConfiguration' database_role_password: $ref: '#/definitions/DatabaseRolePassword' SecretType: type: string enum: - SIMPLE - REGISTRY - MANAGED default: SIMPLE GCPContainerRegistryConfiguration: type: object properties: keyfile_content: type: string url: type: string DockerHubRegistryConfiguration: type: object properties: username: type: string password: type: string google.protobuf.Any: type: object properties: '@type': type: string additionalProperties: {} securityDefinitions: Bearer: type: apiKey name: Authorization in: header x-tagGroups: - name: Introduction tags: - intro - name: API tags: - Profile - Sessions - Users - organization - OrganizationMembers - OrganizationInvitations - OrganizationConfirmations - Subscriptions - Coupons - Credentials - Secrets - activity - Apps - Services - Deployments - Archives - RegionalDeployments - Instances - Domains - PersistentVolumes - Snapshots - Compose - Repositories - Logs - Metrics - Catalog - CatalogRegions - CatalogInstances - Usages - Summary - DockerHelper