openapi: 3.0.0 info: version: 1.0.4 title: Qovery Account Info Job Secret API description: '- Qovery is the fastest way to deploy your full-stack apps on any Cloud provider. - ℹ️ The API is stable and still in development. ' contact: name: Qovery Product Team url: https://www.qovery.com email: support+api+documentation@qovery.com x-logo: url: https://console.qovery.com/assets/logos/logo-white.svg altText: Qovery servers: - url: https://api.qovery.com security: - bearerAuth: [] - ApiKeyAuth: [] tags: - name: Job Secret paths: /job/{jobId}/secret: get: summary: List job secrets description: Secrets are like environment variables, but they are secured and can't be revealed. operationId: listJobSecrets parameters: - $ref: '#/components/parameters/jobId' tags: - Job Secret responses: '200': description: List secrets content: application/json: schema: $ref: '#/components/schemas/SecretResponseList' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' post: summary: Add a secret to the job description: '- Add a secret to the job. ' operationId: createJobSecret parameters: - $ref: '#/components/parameters/jobId' tags: - Job Secret requestBody: content: application/json: schema: $ref: '#/components/schemas/SecretRequest' responses: '201': description: Add a secret content: application/json: schema: $ref: '#/components/schemas/Secret' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /job/{jobId}/secret/{secretId}: delete: summary: Delete a secret from an job description: '- To delete a secret you must have the project user permission - You can''t delete a BUILT_IN secret - If you delete a secret having override or alias, the associated override/alias will be deleted as well ' operationId: deleteJobSecret parameters: - $ref: '#/components/parameters/jobId' - $ref: '#/components/parameters/secretId' tags: - Job Secret responses: '204': $ref: '#/components/responses/204-deletion' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' put: summary: Edit a secret belonging to the job description: '- You can''t edit a BUILT_IN secret - For an override, you can''t edit the key - For an alias, you can''t edit the value - An override can only have a scope lower to the secret it is overriding (hierarchy is BUILT_IN > PROJECT > ENVIRONMENT > CONTAINER) ' operationId: editJobSecret parameters: - $ref: '#/components/parameters/jobId' - $ref: '#/components/parameters/secretId' tags: - Job Secret requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SecretEditRequest' responses: '200': description: Edited the secret value content: application/json: schema: $ref: '#/components/schemas/Secret' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /job/{jobId}/secret/{secretId}/override: post: summary: Create a secret override at the job level description: '- Allows you to override at job level a secret that has a higher scope. - You only have to specify a value in the request body - The system will create a new secret at job level with the same key as the one corresponding to the secret id in the path - The response body will contain the newly created secret - Information regarding the overridden_secret will be exposed in the "overridden_secret" field of the newly created secret ' operationId: createJobSecretOverride parameters: - $ref: '#/components/parameters/jobId' - $ref: '#/components/parameters/secretId' tags: - Job Secret requestBody: content: application/json: schema: $ref: '#/components/schemas/Value' responses: '201': description: Create secret override content: application/json: schema: $ref: '#/components/schemas/Secret' '400': description: Can't create an override on a higher scope. Overrides can only be created from one scope to a lower scope. Scope hierarchy is BUILT_IN > PROJECT > ENVIRONMENT > APPLICATION '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /job/{jobId}/secret/{secretId}/alias: post: summary: Create a secret alias at the job level description: '- Allows you to add an alias at job level on an existing secret having higher scope, in order to customize its key. - You only have to specify a key in the request body - The system will create a new secret at job level with the same value as the one corresponding to the secret id in the path - The response body will contain the newly created secret - Information regarding the aliased_secret will be exposed in the "aliased_secret" field of the newly created secret - You can''t create an alias on an alias ' operationId: createJobSecretAlias parameters: - $ref: '#/components/parameters/jobId' - $ref: '#/components/parameters/secretId' tags: - Job Secret requestBody: content: application/json: schema: $ref: '#/components/schemas/Key' responses: '201': description: Create secret alias content: application/json: schema: $ref: '#/components/schemas/Secret' '400': description: Can't create an alias on a higher scope. Aliases can only be created from one scope to a lower scope. Scope hierarchy is BUILT_IN > PROJECT > ENVIRONMENT > APPLICATION '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' components: schemas: Secret: allOf: - $ref: '#/components/schemas/Base' - type: object required: - key - scope properties: key: type: string description: key is case sensitive overridden_secret: $ref: '#/components/schemas/SecretOverride' aliased_secret: $ref: '#/components/schemas/SecretAlias' scope: $ref: '#/components/schemas/APIVariableScopeEnum' variable_type: $ref: '#/components/schemas/APIVariableTypeEnum' service_id: type: string format: uuid service_name: type: string service_type: $ref: '#/components/schemas/LinkedServiceTypeEnum' owned_by: type: string description: 'Entity that created/own the variable (i.e: Qovery, Doppler)' description: type: string x-stoplight: id: fznezq37gx9ux maxLength: 255 description: optional variable description (255 characters maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: j13355s39qy21 nullable: true SecretOverride: type: object required: - id - key - mount_path - scope - variable_type properties: id: type: string format: uuid key: type: string mount_path: type: string scope: $ref: '#/components/schemas/APIVariableScopeEnum' variable_type: $ref: '#/components/schemas/APIVariableTypeEnum' description: type: string x-stoplight: id: edfpfqj87ezos maxLength: 255 description: optional variable description (255 characters maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: ls2iylkcayehn nullable: true SecretResponseList: type: object properties: results: type: array items: $ref: '#/components/schemas/Secret' SecretRequest: type: object required: - key properties: key: type: string description: key is case sensitive value: type: string description: value of the secret. Clear value will never be returned mount_path: type: string default: null description: should be set for file only. variable mount path make secret a file (where file should be mounted). nullable: true description: type: string x-stoplight: id: dzjq13ney82de maxLength: 255 description: optional variable description (255 character maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: 5d202hkrquox8 nullable: true APIVariableTypeEnum: type: string description: 'type of the environment variable (VALUE, FILE, ALIAS, OVERRIDE or BUIT_IN) ' enum: - VALUE - ALIAS - OVERRIDE - BUILT_IN - FILE Value: type: object title: EnvironmentVariableOverrideRequest properties: value: type: string description: type: string x-stoplight: id: ygzxe4xek3thk maxLength: 255 description: optional variable description (255 characters maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: ercieri1t6gqn nullable: true LinkedServiceTypeEnum: type: string description: type of the service (application, database, job, gateway...) enum: - APPLICATION - CONTAINER - DATABASE - JOB - HELM - TERRAFORM SecretAlias: type: object required: - id - key - mount_path - scope - variable_type properties: id: type: string format: uuid key: type: string example: QOVERY_DATABASE_PSQL_NAME mount_path: type: string scope: $ref: '#/components/schemas/APIVariableScopeEnum' variable_type: $ref: '#/components/schemas/APIVariableTypeEnum' description: type: string x-stoplight: id: 14nham449j6uk maxLength: 255 description: optional variable description (255 characters maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: bm88z8ltgrcc6 nullable: true APIVariableScopeEnum: type: string enum: - APPLICATION - BUILT_IN - ENVIRONMENT - PROJECT - CONTAINER - JOB - HELM - TERRAFORM Key: type: object title: EnvironmentVariableAliasRequest required: - key properties: key: type: string description: type: string x-stoplight: id: qe7qh1tjtkwrm maxLength: 255 description: optional variable description (255 characters maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: alajw1h9vgr9e nullable: true SecretEditRequest: type: object required: - key properties: value: type: string key: type: string description: type: string x-stoplight: id: kpr7b04o3wqkq maxLength: 255 description: optional variable description (255 characters maximum) nullable: true enable_interpolation_in_file: type: boolean x-stoplight: id: kfzgtx3qmrqsk nullable: true Base: type: object required: - id - created_at properties: id: type: string format: uuid readOnly: true created_at: type: string readOnly: true format: date-time updated_at: type: string readOnly: true format: date-time parameters: secretId: name: secretId in: path description: Secret ID required: true schema: type: string format: uuid jobId: name: jobId in: path description: Job ID required: true schema: type: string format: uuid responses: '400': description: Bad request '404': description: Resource not found 204-deletion: description: The resource was deleted successfully '403': description: Access forbidden '401': description: Access token is missing or invalid securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'JWT tokens should be used with OIDC account (human to machine). JWT tokens used by the Qovery console to communicate with the API have a TTL. Curl Example '' curl https://console.qovery.com/organization -H "Authorization: Bearer $qovery_token" ''' ApiKeyAuth: type: apiKey in: header name: Authorization description: 'Token API are generated by Qovery to manage machine to machine interaction and do not have a TTL. Curl Example '' curl https://console.qovery.com/organization -H "Authorization: Token $qovery_token" ''' x-tagGroups: - name: Organization tags: - Organization Main Calls - Organization Api Token - Organization Account Git Repositories - Organization Cluster Lock - Organization Webhook - Organization Custom Role - Organization Event - Organization Annotations Group - Organization Labels Group - Organization Enterprise Connection - Projects - Members - Billing - Clusters - Cloud Provider - Cloud Provider Credentials - Github App - Container Registries - Helm Repositories - name: Project tags: - Project Main Calls - Environments - Project Deployment Rule - Project Environment Variable - Project Secret - name: Environment tags: - Environment Main Calls - Applications - Containers - Databases - Jobs - Helms - Terraforms - Environment Actions - Environment Logs - Environment Deployment History - Environment Deployment Rule - Environment Variable - Environment Secret - Environment Export - name: Deployment Stage tags: - Deployment Stage Main Calls - name: Application tags: - Application Main Calls - Application Actions - Application Configuration - Application Custom Domain - Application Database - Application Logs - Application Deployment Restriction - Application Deployment History - Application Environment Variable - Application Secret - Application Annotations Group - name: Container tags: - Container Main Calls - Container Actions - Container Configuration - Container Custom Domain - Container Database - Container Logs - Container Deployment History - Container Environment Variable - Container Secret - Container Annotations Group - name: Database tags: - Database Main Calls - Database Actions - Database Applications - Database Deployment History - Database Containers - Database Application - Database Container - Backups - Database Annotations Group - name: Job tags: - Job Main Calls - Job Actions - Job Configuration - Job Custom Domain - Job Deployment Restriction - Job Deployment History - Job Environment Variable - Job Secret - Job Annotations Group - name: Helm tags: - Helm Main Calls - Helm Actions - Helm Configuration - Helm Custom Domain - Helm Deployment Restriction - Helm Deployment History - name: Terraform tags: - Terraform Main Calls - Terraform Actions - Terraform Configuration - Terraform Deployment Restriction - Terraform Deployment History - name: Account tags: - Account Info - Git repositories - Referral & Rewards - name: Git tags: - Git repositories - name: Variable tags: - Variable Main Calls - name: Lifecycle Template tags: - Lifecycle Template Main Calls - name: Admin tags: - User Sign Up - name: Alerting tags: - Alert Receivers - Alert Rules