diff --git a/backend/spec.json b/backend/spec.json index ce66388398..fab6d99a7e 100644 --- a/backend/spec.json +++ b/backend/spec.json @@ -7,7 +7,7 @@ }, "servers": [ { - "url": "https://infisical.com", + "url": "https://app.infisical.com", "description": "Production server" }, { @@ -867,64 +867,6 @@ } } }, - "/api/v1/sso/redirect/google": { - "get": { - "description": "", - "parameters": [ - { - "name": "callback_port", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "" - } - } - } - }, - "/api/v1/sso/google": { - "get": { - "description": "", - "responses": { - "default": { - "description": "" - } - } - } - }, - "/api/v1/sso/redirect/github": { - "get": { - "description": "", - "parameters": [ - { - "name": "callback_port", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "" - } - } - } - }, - "/api/v1/sso/github": { - "get": { - "description": "", - "responses": { - "default": { - "description": "" - } - } - } - }, "/api/v1/sso/redirect/saml2/{ssoIdentifier}": { "get": { "description": "", @@ -1014,6 +956,70 @@ } } }, + "/api/v3/service-token/me/key": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v3/service-token/": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/api/v3/service-token/{serviceTokenDataId}": { + "patch": { + "description": "", + "parameters": [ + { + "name": "serviceTokenDataId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + }, + "delete": { + "description": "", + "parameters": [ + { + "name": "serviceTokenDataId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v1/signup/email/signup": { "post": { "description": "", @@ -1200,14 +1206,6 @@ "description": "OK" } } - }, - "post": { - "description": "", - "responses": { - "200": { - "description": "OK" - } - } } }, "/api/v1/organization/{organizationId}": { @@ -2188,6 +2186,126 @@ } } }, + "/api/v1/integration-auth/{integrationAuthId}/qovery/orgs": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/qovery/projects": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/qovery/environments": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/qovery/apps": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/qovery/containers": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/qovery/jobs": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v1/integration-auth/{integrationAuthId}/railway/environments": { "get": { "description": "", @@ -2470,19 +2588,27 @@ ] } }, - "/api/v1/folders/{folderId}": { + "/api/v1/folders/{folderName}": { "patch": { "summary": "Update a folder by ID", "description": "Update the name of a folder in a specified workspace and environment by its ID", "parameters": [ { - "name": "folderId", + "name": "folderName", "in": "path", "required": true, "schema": { "type": "string" - }, - "description": "ID of the folder to be updated" + } + }, + { + "name": "folderId", + "description": "ID of the folder to be updated", + "required": true, + "in": "path", + "schema": { + "type": "string" + } } ], "responses": { @@ -2565,13 +2691,21 @@ "description": "Delete the specified folder from a specified workspace and environment using its ID", "parameters": [ { - "name": "folderId", + "name": "folderName", "in": "path", "required": true, "schema": { "type": "string" - }, - "description": "ID of the folder to be deleted" + } + }, + { + "name": "folderId", + "description": "ID of the folder to be deleted", + "required": true, + "in": "path", + "schema": { + "type": "string" + } } ], "responses": { @@ -3213,6 +3347,259 @@ } } }, + "/api/v1/secret-approvals/": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approvals/board": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approvals/{id}": { + "patch": { + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "delete": { + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/sso/redirect/google": { + "get": { + "description": "", + "parameters": [ + { + "name": "callback_port", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/google": { + "get": { + "description": "", + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/redirect/github": { + "get": { + "description": "", + "parameters": [ + { + "name": "callback_port", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/github": { + "get": { + "description": "", + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/redirect/gitlab": { + "get": { + "description": "", + "parameters": [ + { + "name": "callback_port", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/gitlab": { + "get": { + "description": "", + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/secret-approval-requests/": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approval-requests/count": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approval-requests/{id}": { + "get": { + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approval-requests/{id}/merge": { + "post": { + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approval-requests/{id}/review": { + "post": { + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-approval-requests/{id}/status": { + "post": { + "description": "", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v2/signup/complete-account/signup": { "post": { "description": "", @@ -3449,36 +3836,6 @@ } } }, - "/api/v2/users/me": { - "get": { - "summary": "Retrieve the current user on the request", - "description": "Retrieve the current user on the request", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "user": { - "type": "object", - "$ref": "#/components/schemas/CurrentUser", - "description": "Current user on request" - } - } - } - } - } - } - }, - "security": [ - { - "apiKeyAuth": [] - } - ] - } - }, "/api/v2/users/me/mfa": { "patch": { "description": "", @@ -3600,6 +3957,44 @@ } } }, + "/api/v2/users/me": { + "get": { + "summary": "Retrieve the current user on the request", + "description": "Retrieve the current user on the request", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "$ref": "#/components/schemas/CurrentUser", + "description": "Current user on request" + } + } + } + } + } + } + }, + "security": [ + { + "apiKeyAuth": [] + } + ] + }, + "delete": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v2/organizations/{organizationId}/memberships": { "get": { "summary": "Return organization memberships", @@ -3818,6 +4213,36 @@ } } }, + "/api/v2/organizations/": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v2/organizations/{organizationId}": { + "delete": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v2/workspace/{workspaceId}/environments": { "post": { "summary": "Create environment", @@ -5196,6 +5621,32 @@ } } }, + "/api/v3/secrets/batch": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "patch": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "delete": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v3/secrets/{secretName}": { "post": { "description": "", @@ -5330,6 +5781,26 @@ } } }, + "/api/v3/workspaces/{workspaceId}/service-token": { + "get": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v3/signup/complete-account/signup": { "post": { "description": "", diff --git a/backend/swagger/index.ts b/backend/swagger/index.ts index 707abbfde6..14baed4668 100644 --- a/backend/swagger/index.ts +++ b/backend/swagger/index.ts @@ -17,7 +17,7 @@ const generateOpenAPISpec = async () => { host: ["https://infisical.com"], servers: [ { - url: "https://infisical.com", + url: "https://app.infisical.com", description: "Production server", }, { @@ -111,7 +111,7 @@ const generateOpenAPISpec = async () => { secretValueTag: "", secretCommentCiphertext: "", secretCommentIV: "", - secretCommentTag: "", + secretCommentTag: "", }, UpdateSecret: { id: "", @@ -196,7 +196,7 @@ const generateOpenAPISpec = async () => { secretKeyTag: "", secretValueCiphertext: "", secretValueIV: "", - secretValueTag: "", + secretValueTag: "", }, ServiceTokenData: { _id: "", @@ -223,7 +223,7 @@ const generateOpenAPISpec = async () => { const endpointsFiles = ["../src/index.ts"]; const spec = await swaggerAutogen(outputJSONFile, endpointsFiles, doc); - + await fs.writeFile(outputYAMLFile, yaml.dump(spec.data)); } diff --git a/docs/spec.yaml b/docs/spec.yaml index 6000b53449..b1b581347c 100644 --- a/docs/spec.yaml +++ b/docs/spec.yaml @@ -534,40 +534,6 @@ paths: responses: '200': description: OK - /api/v1/sso/redirect/google: - get: - description: '' - parameters: - - name: callback_port - in: query - schema: - type: string - responses: - default: - description: '' - /api/v1/sso/google: - get: - description: '' - responses: - default: - description: '' - /api/v1/sso/redirect/github: - get: - description: '' - parameters: - - name: callback_port - in: query - schema: - type: string - responses: - default: - description: '' - /api/v1/sso/github: - get: - description: '' - responses: - default: - description: '' /api/v1/sso/redirect/saml2/{ssoIdentifier}: get: description: '' @@ -622,6 +588,45 @@ paths: responses: '200': description: OK + /api/v3/service-token/me/key: + get: + description: '' + responses: + '200': + description: OK + /api/v3/service-token/: + post: + description: '' + responses: + '200': + description: OK + '400': + description: Bad Request + /api/v3/service-token/{serviceTokenDataId}: + patch: + description: '' + parameters: + - name: serviceTokenDataId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + delete: + description: '' + parameters: + - name: serviceTokenDataId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK /api/v1/signup/email/signup: post: description: '' @@ -735,11 +740,6 @@ paths: responses: '200': description: OK - post: - description: '' - responses: - '200': - description: OK /api/v1/organization/{organizationId}: get: description: '' @@ -1330,6 +1330,78 @@ paths: responses: '200': description: OK + /api/v1/integration-auth/{integrationAuthId}/qovery/orgs: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/qovery/projects: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/qovery/environments: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/qovery/apps: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/qovery/containers: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/qovery/jobs: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK /api/v1/integration-auth/{integrationAuthId}/railway/environments: get: description: '' @@ -1518,19 +1590,24 @@ paths: description: Unauthorized request. For example, 'Folder Permission Denied' security: - apiKeyAuth: [] - /api/v1/folders/{folderId}: + /api/v1/folders/{folderName}: patch: summary: Update a folder by ID description: >- Update the name of a folder in a specified workspace and environment by its ID parameters: - - name: folderId + - name: folderName in: path required: true schema: type: string + - name: folderId description: ID of the folder to be updated + required: true + in: path + schema: + type: string responses: '200': description: OK @@ -1588,12 +1665,17 @@ paths: Delete the specified folder from a specified workspace and environment using its ID parameters: - - name: folderId + - name: folderName in: path required: true schema: type: string + - name: folderId description: ID of the folder to be deleted + required: true + in: path + schema: + type: string responses: '200': description: OK @@ -2005,6 +2087,157 @@ paths: responses: '200': description: OK + /api/v1/secret-approvals/: + get: + description: '' + responses: + '200': + description: OK + post: + description: '' + responses: + '200': + description: OK + /api/v1/secret-approvals/board: + get: + description: '' + responses: + '200': + description: OK + /api/v1/secret-approvals/{id}: + patch: + description: '' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + delete: + description: '' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/sso/redirect/google: + get: + description: '' + parameters: + - name: callback_port + in: query + schema: + type: string + responses: + default: + description: '' + /api/v1/sso/google: + get: + description: '' + responses: + default: + description: '' + /api/v1/sso/redirect/github: + get: + description: '' + parameters: + - name: callback_port + in: query + schema: + type: string + responses: + default: + description: '' + /api/v1/sso/github: + get: + description: '' + responses: + default: + description: '' + /api/v1/sso/redirect/gitlab: + get: + description: '' + parameters: + - name: callback_port + in: query + schema: + type: string + responses: + default: + description: '' + /api/v1/sso/gitlab: + get: + description: '' + responses: + default: + description: '' + /api/v1/secret-approval-requests/: + get: + description: '' + responses: + '200': + description: OK + /api/v1/secret-approval-requests/count: + get: + description: '' + responses: + '200': + description: OK + /api/v1/secret-approval-requests/{id}: + get: + description: '' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/secret-approval-requests/{id}/merge: + post: + description: '' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/secret-approval-requests/{id}/review: + post: + description: '' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/secret-approval-requests/{id}/status: + post: + description: '' + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: OK /api/v2/signup/complete-account/signup: post: description: '' @@ -2149,24 +2382,6 @@ paths: responses: '200': description: OK - /api/v2/users/me: - get: - summary: Retrieve the current user on the request - description: Retrieve the current user on the request - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - user: - type: object - $ref: '#/components/schemas/CurrentUser' - description: Current user on request - security: - - apiKeyAuth: [] /api/v2/users/me/mfa: patch: description: '' @@ -2240,6 +2455,29 @@ paths: responses: '200': description: OK + /api/v2/users/me: + get: + summary: Retrieve the current user on the request + description: Retrieve the current user on the request + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + user: + type: object + $ref: '#/components/schemas/CurrentUser' + description: Current user on request + security: + - apiKeyAuth: [] + delete: + description: '' + responses: + '200': + description: OK /api/v2/organizations/{organizationId}/memberships: get: summary: Return organization memberships @@ -2375,6 +2613,24 @@ paths: responses: '200': description: OK + /api/v2/organizations/: + post: + description: '' + responses: + '200': + description: OK + /api/v2/organizations/{organizationId}: + delete: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK /api/v2/workspace/{workspaceId}/environments: post: summary: Create environment @@ -3228,6 +3484,22 @@ paths: responses: '200': description: OK + /api/v3/secrets/batch: + post: + description: '' + responses: + '200': + description: OK + patch: + description: '' + responses: + '200': + description: OK + delete: + description: '' + responses: + '200': + description: OK /api/v3/secrets/{secretName}: post: description: '' @@ -3309,6 +3581,18 @@ paths: responses: '200': description: OK + /api/v3/workspaces/{workspaceId}/service-token: + get: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK /api/v3/signup/complete-account/signup: post: description: '' @@ -3785,7 +4069,7 @@ components: type: http scheme: bearer bearerFormat: JWT - description: + description: >- This security definition uses the HTTP 'bearer' scheme, which allows the client to authenticate using a JSON Web Token (JWT) that is passed in the Authorization header of the request. @@ -3793,7 +4077,7 @@ components: type: apiKey in: header name: X-API-Key - description: + description: >- This security definition uses an API key, which is passed in the header of the request as the value of the "X-API-Key" header. The client must provide a valid key in order to access the API.