From e707f0d235edeff95cae1a50534723b72aedba9f Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Mon, 12 Feb 2024 14:19:49 +0530 Subject: [PATCH] feat: added description and security over api written in docs --- backend/src/ee/routes/v1/project-router.ts | 14 +++++++ backend/src/ee/routes/v1/snapshot-router.ts | 7 ++++ backend/src/server/plugins/swagger.ts | 6 +-- .../routes/v1/identity-access-token-router.ts | 1 + .../src/server/routes/v1/identity-router.ts | 18 +++++++++ backend/src/server/routes/v1/identity-ua.ts | 37 +++++++++++++++++++ .../server/routes/v1/project-env-router.ts | 21 +++++++++++ .../routes/v1/project-membership-router.ts | 21 +++++++++++ .../server/routes/v1/secret-folder-router.ts | 28 ++++++++++++++ .../server/routes/v1/secret-import-router.ts | 28 ++++++++++++++ .../server/routes/v2/identity-org-router.ts | 7 ++++ .../routes/v2/identity-project-router.ts | 18 +++++++++ .../server/routes/v2/organization-router.ts | 28 ++++++++++++++ .../src/server/routes/v2/project-router.ts | 6 +++ .../server/routes/v2/service-token-router.ts | 6 +++ backend/src/server/routes/v2/user-router.ts | 12 ++++++ backend/src/server/routes/v3/secret-router.ts | 35 ++++++++++++++++++ .../endpoints/environments/create.mdx | 2 +- .../endpoints/environments/delete.mdx | 4 +- .../endpoints/environments/update.mdx | 4 +- .../endpoints/folders/create.mdx | 4 +- .../endpoints/folders/delete.mdx | 4 +- docs/api-reference/endpoints/folders/list.mdx | 4 +- .../endpoints/folders/update.mdx | 4 +- .../endpoints/identities/create.mdx | 4 +- .../endpoints/identities/delete.mdx | 2 +- .../endpoints/identities/update.mdx | 2 +- .../list-identity-memberships.mdx | 4 +- .../endpoints/secret-imports/create.mdx | 4 +- .../endpoints/secret-imports/delete.mdx | 4 +- .../endpoints/secret-imports/list.mdx | 4 +- .../endpoints/secret-imports/update.mdx | 4 +- .../endpoints/service-tokens/get.mdx | 2 +- .../workspaces/delete-identity-membership.mdx | 4 +- .../workspaces/delete-membership.mdx | 2 +- .../workspaces/list-identity-memberships.mdx | 4 +- .../endpoints/workspaces/memberships.mdx | 2 +- .../workspaces/rollback-snapshot.mdx | 2 +- .../workspaces/update-identity-membership.mdx | 4 +- .../workspaces/update-membership.mdx | 2 +- 40 files changed, 328 insertions(+), 41 deletions(-) diff --git a/backend/src/ee/routes/v1/project-router.ts b/backend/src/ee/routes/v1/project-router.ts index 3870123fd..6c0411d7c 100644 --- a/backend/src/ee/routes/v1/project-router.ts +++ b/backend/src/ee/routes/v1/project-router.ts @@ -11,6 +11,13 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => { method: "GET", url: "/:workspaceId/secret-snapshots", schema: { + description: "Return project secret snapshots ids", + security: [ + { + apiKeyAuth: [], + bearerAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim() }), @@ -72,6 +79,13 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => { method: "GET", url: "/:workspaceId/audit-logs", schema: { + description: "Return audit logs", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim() }), diff --git a/backend/src/ee/routes/v1/snapshot-router.ts b/backend/src/ee/routes/v1/snapshot-router.ts index c3b9d2d98..6f246b1cb 100644 --- a/backend/src/ee/routes/v1/snapshot-router.ts +++ b/backend/src/ee/routes/v1/snapshot-router.ts @@ -56,6 +56,13 @@ export const registerSnapshotRouter = async (server: FastifyZodProvider) => { method: "POST", url: "/:secretSnapshotId/rollback", schema: { + description: "Roll back project secrets to those captured in a secret snapshot version.", + security: [ + { + apiKeyAuth: [], + bearerAuth: [] + } + ], params: z.object({ secretSnapshotId: z.string().trim() }), diff --git a/backend/src/server/plugins/swagger.ts b/backend/src/server/plugins/swagger.ts index 482e8260b..1eb1a0f4e 100644 --- a/backend/src/server/plugins/swagger.ts +++ b/backend/src/server/plugins/swagger.ts @@ -25,13 +25,13 @@ export const fastifySwagger = fp(async (fastify) => { ], components: { securitySchemes: { - bearer: { + bearerAuth: { type: "http", scheme: "bearer", bearerFormat: "JWT", - description: "A service token in Infisical" + description: "An access token in Infisical" }, - apiKey: { + apiKeyAuth: { type: "apiKey", in: "header", name: "X-API-Key", diff --git a/backend/src/server/routes/v1/identity-access-token-router.ts b/backend/src/server/routes/v1/identity-access-token-router.ts index 4ddf7b74a..78112f896 100644 --- a/backend/src/server/routes/v1/identity-access-token-router.ts +++ b/backend/src/server/routes/v1/identity-access-token-router.ts @@ -5,6 +5,7 @@ export const registerIdentityAccessTokenRouter = async (server: FastifyZodProvid url: "/token/renew", method: "POST", schema: { + description: "Renew access token", body: z.object({ accessToken: z.string().trim() }), diff --git a/backend/src/server/routes/v1/identity-router.ts b/backend/src/server/routes/v1/identity-router.ts index f86cc9528..2300ac658 100644 --- a/backend/src/server/routes/v1/identity-router.ts +++ b/backend/src/server/routes/v1/identity-router.ts @@ -11,6 +11,12 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => { url: "/", onRequest: verifyAuth([AuthMode.JWT]), schema: { + description: "Create identity", + security: [ + { + bearerAuth: [] + } + ], body: z.object({ name: z.string().trim(), organizationId: z.string().trim(), @@ -51,6 +57,12 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => { url: "/:identityId", onRequest: verifyAuth([AuthMode.JWT]), schema: { + description: "Update identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string() }), @@ -93,6 +105,12 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => { url: "/:identityId", onRequest: verifyAuth([AuthMode.JWT]), schema: { + description: "Delete identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string() }), diff --git a/backend/src/server/routes/v1/identity-ua.ts b/backend/src/server/routes/v1/identity-ua.ts index d92d2a61a..034149df3 100644 --- a/backend/src/server/routes/v1/identity-ua.ts +++ b/backend/src/server/routes/v1/identity-ua.ts @@ -24,6 +24,7 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { url: "/universal-auth/login", method: "POST", schema: { + description: "Login with Universal Auth", body: z.object({ clientId: z.string().trim(), clientSecret: z.string().trim() @@ -67,6 +68,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { method: "POST", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Attach Universal Auth configuration onto identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string().trim() }), @@ -140,6 +147,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { method: "PATCH", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Update Universal Auth configuration on identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string() }), @@ -207,6 +220,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { method: "GET", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Retrieve Universal Auth configuration on identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string() }), @@ -243,6 +262,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { method: "POST", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Create Universal Auth Client Secret for identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string() }), @@ -287,6 +312,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { method: "GET", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "List Universal Auth Client Secrets for identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string() }), @@ -322,6 +353,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => { method: "POST", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Revoke Universal Auth Client Secrets for identity", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ identityId: z.string(), clientSecretId: z.string() diff --git a/backend/src/server/routes/v1/project-env-router.ts b/backend/src/server/routes/v1/project-env-router.ts index 44be1a3d6..ee6c2923f 100644 --- a/backend/src/server/routes/v1/project-env-router.ts +++ b/backend/src/server/routes/v1/project-env-router.ts @@ -10,6 +10,13 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => { url: "/:workspaceId/environments", method: "POST", schema: { + description: "Create environment", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim() }), @@ -57,6 +64,13 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => { url: "/:workspaceId/environments/:id", method: "PATCH", schema: { + description: "Update environment", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim(), id: z.string().trim() @@ -112,6 +126,13 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => { url: "/:workspaceId/environments/:id", method: "DELETE", schema: { + description: "Delete environment", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim(), id: z.string().trim() diff --git a/backend/src/server/routes/v1/project-membership-router.ts b/backend/src/server/routes/v1/project-membership-router.ts index 7d28f470a..7ed02b58f 100644 --- a/backend/src/server/routes/v1/project-membership-router.ts +++ b/backend/src/server/routes/v1/project-membership-router.ts @@ -10,6 +10,13 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider url: "/:workspaceId/memberships", method: "GET", schema: { + description: "Return project user memberships", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim() }), @@ -94,6 +101,13 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider url: "/:workspaceId/memberships/:membershipId", method: "PATCH", schema: { + description: "Update project user membership", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim(), membershipId: z.string().trim() @@ -138,6 +152,13 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider url: "/:workspaceId/memberships/:membershipId", method: "DELETE", schema: { + description: "Delete project user membership", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim(), membershipId: z.string().trim() diff --git a/backend/src/server/routes/v1/secret-folder-router.ts b/backend/src/server/routes/v1/secret-folder-router.ts index 4a152f52e..5cd46c529 100644 --- a/backend/src/server/routes/v1/secret-folder-router.ts +++ b/backend/src/server/routes/v1/secret-folder-router.ts @@ -11,6 +11,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => url: "/", method: "POST", schema: { + description: "Create folders", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], body: z.object({ workspaceId: z.string().trim(), environment: z.string().trim(), @@ -56,6 +63,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => url: "/:folderId", method: "PATCH", schema: { + description: "Update folder", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ // old way this was name folderId: z.string() @@ -107,6 +121,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => url: "/:folderId", method: "DELETE", schema: { + description: "Delete a folder", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ folderId: z.string() }), @@ -155,6 +176,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) => url: "/", method: "GET", schema: { + description: "Get folders", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], querystring: z.object({ workspaceId: z.string().trim(), environment: z.string().trim(), diff --git a/backend/src/server/routes/v1/secret-import-router.ts b/backend/src/server/routes/v1/secret-import-router.ts index 80f980a90..e13354780 100644 --- a/backend/src/server/routes/v1/secret-import-router.ts +++ b/backend/src/server/routes/v1/secret-import-router.ts @@ -11,6 +11,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) => url: "/", method: "POST", schema: { + description: "Create secret imports", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], body: z.object({ workspaceId: z.string().trim(), environment: z.string().trim(), @@ -64,6 +71,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) => url: "/:secretImportId", method: "PATCH", schema: { + description: "Update secret imports", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ secretImportId: z.string().trim() }), @@ -126,6 +140,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) => url: "/:secretImportId", method: "DELETE", schema: { + description: "Delete secret imports", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ secretImportId: z.string().trim() }), @@ -178,6 +199,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) => url: "/", method: "GET", schema: { + description: "Get secret imports", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], querystring: z.object({ workspaceId: z.string().trim(), environment: z.string().trim(), diff --git a/backend/src/server/routes/v2/identity-org-router.ts b/backend/src/server/routes/v2/identity-org-router.ts index f1beb4e86..38affe8fa 100644 --- a/backend/src/server/routes/v2/identity-org-router.ts +++ b/backend/src/server/routes/v2/identity-org-router.ts @@ -10,6 +10,13 @@ export const registerIdentityOrgRouter = async (server: FastifyZodProvider) => { url: "/:orgId/identity-memberships", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Return organization identity memberships", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ orgId: z.string().trim() }), diff --git a/backend/src/server/routes/v2/identity-project-router.ts b/backend/src/server/routes/v2/identity-project-router.ts index ea797e0cb..73266f790 100644 --- a/backend/src/server/routes/v2/identity-project-router.ts +++ b/backend/src/server/routes/v2/identity-project-router.ts @@ -45,6 +45,12 @@ export const registerIdentityProjectRouter = async (server: FastifyZodProvider) url: "/:projectId/identity-memberships/:identityId", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Update project identity memberships", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ projectId: z.string().trim(), identityId: z.string().trim() @@ -75,6 +81,12 @@ export const registerIdentityProjectRouter = async (server: FastifyZodProvider) url: "/:projectId/identity-memberships/:identityId", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Delete project identity memberships", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ projectId: z.string().trim(), identityId: z.string().trim() @@ -101,6 +113,12 @@ export const registerIdentityProjectRouter = async (server: FastifyZodProvider) url: "/:projectId/identity-memberships", onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]), schema: { + description: "Return project identity memberships", + security: [ + { + bearerAuth: [] + } + ], params: z.object({ projectId: z.string().trim() }), diff --git a/backend/src/server/routes/v2/organization-router.ts b/backend/src/server/routes/v2/organization-router.ts index df94f65c7..544ada4fa 100644 --- a/backend/src/server/routes/v2/organization-router.ts +++ b/backend/src/server/routes/v2/organization-router.ts @@ -9,6 +9,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => { method: "GET", url: "/:organizationId/memberships", schema: { + description: "Return organization user memberships", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ organizationId: z.string().trim() }), @@ -42,6 +49,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => { method: "GET", url: "/:organizationId/workspaces", schema: { + description: "Return projects in organization that user is part of", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ organizationId: z.string().trim() }), @@ -79,6 +93,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => { method: "PATCH", url: "/:organizationId/memberships/:membershipId", schema: { + description: "Update organization user memberships", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ organizationId: z.string().trim(), membershipId: z.string().trim() }), body: z.object({ role: z.string().trim() @@ -107,6 +128,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => { method: "DELETE", url: "/:organizationId/memberships/:membershipId", schema: { + description: "Delete organization user memberships", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ organizationId: z.string().trim(), membershipId: z.string().trim() }), response: { 200: z.object({ diff --git a/backend/src/server/routes/v2/project-router.ts b/backend/src/server/routes/v2/project-router.ts index e90a36060..9b40d6b83 100644 --- a/backend/src/server/routes/v2/project-router.ts +++ b/backend/src/server/routes/v2/project-router.ts @@ -10,6 +10,12 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => { url: "/:workspaceId/encrypted-key", method: "GET", schema: { + description: "Return encrypted project key", + security: [ + { + apiKeyAuth: [] + } + ], params: z.object({ workspaceId: z.string().trim() }), diff --git a/backend/src/server/routes/v2/service-token-router.ts b/backend/src/server/routes/v2/service-token-router.ts index ea9912dda..1a5683cfe 100644 --- a/backend/src/server/routes/v2/service-token-router.ts +++ b/backend/src/server/routes/v2/service-token-router.ts @@ -21,6 +21,12 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) => method: "GET", onRequest: verifyAuth([AuthMode.SERVICE_TOKEN]), schema: { + description: "Return Infisical Token data", + security: [ + { + bearerAuth: [] + } + ], response: { 200: ServiceTokensSchema.merge( z.object({ diff --git a/backend/src/server/routes/v2/user-router.ts b/backend/src/server/routes/v2/user-router.ts index 8061aa0e5..8fc114e76 100644 --- a/backend/src/server/routes/v2/user-router.ts +++ b/backend/src/server/routes/v2/user-router.ts @@ -71,6 +71,12 @@ export const registerUserRouter = async (server: FastifyZodProvider) => { method: "GET", url: "/me/organizations", schema: { + description: "Return organizations that current user is part of", + security: [ + { + apiKeyAuth: [] + } + ], response: { 200: z.object({ organizations: OrganizationsSchema.array() @@ -179,6 +185,12 @@ export const registerUserRouter = async (server: FastifyZodProvider) => { method: "GET", url: "/me", schema: { + description: "Retrieve the current user on the request", + security: [ + { + apiKeyAuth: [] + } + ], response: { 200: z.object({ user: UsersSchema.merge(UserEncryptionKeysSchema.omit({ verifier: true })) diff --git a/backend/src/server/routes/v3/secret-router.ts b/backend/src/server/routes/v3/secret-router.ts index 02f218b67..1aa096ab2 100644 --- a/backend/src/server/routes/v3/secret-router.ts +++ b/backend/src/server/routes/v3/secret-router.ts @@ -38,6 +38,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { url: "/raw", method: "GET", schema: { + description: "List secrets", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], querystring: z.object({ workspaceId: z.string().trim().optional(), environment: z.string().trim().optional(), @@ -120,6 +127,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { url: "/raw/:secretName", method: "GET", schema: { + description: "Get a secret by name", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ secretName: z.string().trim() }), @@ -202,6 +216,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { url: "/raw/:secretName", method: "POST", schema: { + description: "Create secret", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ secretName: z.string().trim() }), @@ -271,6 +292,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { url: "/raw/:secretName", method: "PATCH", schema: { + description: "Update secret", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ secretName: z.string().trim() }), @@ -337,6 +365,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => { url: "/raw/:secretName", method: "DELETE", schema: { + description: "Delete secret", + security: [ + { + bearerAuth: [], + apiKeyAuth: [] + } + ], params: z.object({ secretName: z.string().trim() }), diff --git a/docs/api-reference/endpoints/environments/create.mdx b/docs/api-reference/endpoints/environments/create.mdx index 2527c613d..826dcce3d 100644 --- a/docs/api-reference/endpoints/environments/create.mdx +++ b/docs/api-reference/endpoints/environments/create.mdx @@ -1,4 +1,4 @@ --- title: "Create" -openapi: "POST /api/v2/workspace/{workspaceId}/environments" +openapi: "POST /api/v1/workspace/{workspaceId}/environments" --- diff --git a/docs/api-reference/endpoints/environments/delete.mdx b/docs/api-reference/endpoints/environments/delete.mdx index 944e42961..903e58d2a 100644 --- a/docs/api-reference/endpoints/environments/delete.mdx +++ b/docs/api-reference/endpoints/environments/delete.mdx @@ -1,4 +1,4 @@ --- title: "Delete" -openapi: "DELETE /api/v2/workspace/{workspaceId}/environments" ---- \ No newline at end of file +openapi: "DELETE /api/v1/workspace/{workspaceId}/environments/{id}" +--- diff --git a/docs/api-reference/endpoints/environments/update.mdx b/docs/api-reference/endpoints/environments/update.mdx index 291344d6c..f93968668 100644 --- a/docs/api-reference/endpoints/environments/update.mdx +++ b/docs/api-reference/endpoints/environments/update.mdx @@ -1,4 +1,4 @@ --- title: "Update" -openapi: "PUT /api/v2/workspace/{workspaceId}/environments" ---- \ No newline at end of file +openapi: "PATCH /api/v1/workspace/{workspaceId}/environments/{id}" +--- diff --git a/docs/api-reference/endpoints/folders/create.mdx b/docs/api-reference/endpoints/folders/create.mdx index 397f43cb5..e1ff3004a 100644 --- a/docs/api-reference/endpoints/folders/create.mdx +++ b/docs/api-reference/endpoints/folders/create.mdx @@ -1,4 +1,4 @@ --- title: "Create" -openapi: "POST /api/v1/folders/" ---- \ No newline at end of file +openapi: "POST /api/v1/folders" +--- diff --git a/docs/api-reference/endpoints/folders/delete.mdx b/docs/api-reference/endpoints/folders/delete.mdx index 0aacd66e2..dc73a41da 100644 --- a/docs/api-reference/endpoints/folders/delete.mdx +++ b/docs/api-reference/endpoints/folders/delete.mdx @@ -1,4 +1,4 @@ --- title: "Delete" -openapi: "DELETE /api/v1/folders/{folderName}" ---- \ No newline at end of file +openapi: "DELETE /api/v1/folders/{folderId}" +--- diff --git a/docs/api-reference/endpoints/folders/list.mdx b/docs/api-reference/endpoints/folders/list.mdx index c467c5975..f40f93273 100644 --- a/docs/api-reference/endpoints/folders/list.mdx +++ b/docs/api-reference/endpoints/folders/list.mdx @@ -1,4 +1,4 @@ --- title: "List" -openapi: "GET /api/v1/folders/" ---- \ No newline at end of file +openapi: "GET /api/v1/folders" +--- diff --git a/docs/api-reference/endpoints/folders/update.mdx b/docs/api-reference/endpoints/folders/update.mdx index 3ceae7fb6..c54778e94 100644 --- a/docs/api-reference/endpoints/folders/update.mdx +++ b/docs/api-reference/endpoints/folders/update.mdx @@ -1,4 +1,4 @@ --- title: "Update" -openapi: "PATCH /api/v1/folders/{folderName}" ---- \ No newline at end of file +openapi: "PATCH /api/v1/folders/{folderId}" +--- diff --git a/docs/api-reference/endpoints/identities/create.mdx b/docs/api-reference/endpoints/identities/create.mdx index 05a11521f..a6595f97a 100644 --- a/docs/api-reference/endpoints/identities/create.mdx +++ b/docs/api-reference/endpoints/identities/create.mdx @@ -1,4 +1,4 @@ --- title: "Create" -openapi: "POST /api/v1/identities/" ---- \ No newline at end of file +openapi: "POST /api/v1/identities" +--- diff --git a/docs/api-reference/endpoints/identities/delete.mdx b/docs/api-reference/endpoints/identities/delete.mdx index 07e79dfe9..5b6ed220a 100644 --- a/docs/api-reference/endpoints/identities/delete.mdx +++ b/docs/api-reference/endpoints/identities/delete.mdx @@ -1,4 +1,4 @@ --- title: "Delete" openapi: "DELETE /api/v1/identities/{identityId}" ---- \ No newline at end of file +--- diff --git a/docs/api-reference/endpoints/identities/update.mdx b/docs/api-reference/endpoints/identities/update.mdx index c0940467b..02d213181 100644 --- a/docs/api-reference/endpoints/identities/update.mdx +++ b/docs/api-reference/endpoints/identities/update.mdx @@ -1,4 +1,4 @@ --- title: "Update" openapi: "PATCH /api/v1/identities/{identityId}" ---- \ No newline at end of file +--- diff --git a/docs/api-reference/endpoints/organizations/list-identity-memberships.mdx b/docs/api-reference/endpoints/organizations/list-identity-memberships.mdx index 1929a4b59..5995184a5 100644 --- a/docs/api-reference/endpoints/organizations/list-identity-memberships.mdx +++ b/docs/api-reference/endpoints/organizations/list-identity-memberships.mdx @@ -1,4 +1,4 @@ --- title: "List Identity Memberships" -openapi: "GET /api/v2/organizations/{organizationId}/identity-memberships" ---- \ No newline at end of file +openapi: "GET /api/v2/organizations/{orgId}/identity-memberships" +--- diff --git a/docs/api-reference/endpoints/secret-imports/create.mdx b/docs/api-reference/endpoints/secret-imports/create.mdx index 2c823e528..3abfb320f 100644 --- a/docs/api-reference/endpoints/secret-imports/create.mdx +++ b/docs/api-reference/endpoints/secret-imports/create.mdx @@ -1,4 +1,4 @@ --- title: "Create" -openapi: "POST /api/v1/secret-imports/" ---- \ No newline at end of file +openapi: "POST /api/v1/secret-imports" +--- diff --git a/docs/api-reference/endpoints/secret-imports/delete.mdx b/docs/api-reference/endpoints/secret-imports/delete.mdx index c7da4f6d0..cfa5960b1 100644 --- a/docs/api-reference/endpoints/secret-imports/delete.mdx +++ b/docs/api-reference/endpoints/secret-imports/delete.mdx @@ -1,4 +1,4 @@ --- title: "Delete" -openapi: "DELETE /api/v1/secret-imports/{id}" ---- \ No newline at end of file +openapi: "DELETE /api/v1/secret-imports/{secretImportId}" +--- diff --git a/docs/api-reference/endpoints/secret-imports/list.mdx b/docs/api-reference/endpoints/secret-imports/list.mdx index 2de41b5d7..580d4be8d 100644 --- a/docs/api-reference/endpoints/secret-imports/list.mdx +++ b/docs/api-reference/endpoints/secret-imports/list.mdx @@ -1,4 +1,4 @@ --- title: "List" -openapi: "GET /api/v1/secret-imports/" ---- \ No newline at end of file +openapi: "GET /api/v1/secret-imports" +--- diff --git a/docs/api-reference/endpoints/secret-imports/update.mdx b/docs/api-reference/endpoints/secret-imports/update.mdx index 76c8a8feb..f21133223 100644 --- a/docs/api-reference/endpoints/secret-imports/update.mdx +++ b/docs/api-reference/endpoints/secret-imports/update.mdx @@ -1,4 +1,4 @@ --- title: "Update" -openapi: "PUT /api/v1/secret-imports/{id}" ---- \ No newline at end of file +openapi: "PATCH /api/v1/secret-imports/{secretImportId}" +--- diff --git a/docs/api-reference/endpoints/service-tokens/get.mdx b/docs/api-reference/endpoints/service-tokens/get.mdx index 5b2604282..593da8a92 100644 --- a/docs/api-reference/endpoints/service-tokens/get.mdx +++ b/docs/api-reference/endpoints/service-tokens/get.mdx @@ -1,6 +1,6 @@ --- title: "Get" -openapi: "GET /api/v2/service-token/" +openapi: "GET /api/v2/service-token" --- diff --git a/docs/api-reference/endpoints/workspaces/delete-identity-membership.mdx b/docs/api-reference/endpoints/workspaces/delete-identity-membership.mdx index 4621f9b50..e2b266626 100644 --- a/docs/api-reference/endpoints/workspaces/delete-identity-membership.mdx +++ b/docs/api-reference/endpoints/workspaces/delete-identity-membership.mdx @@ -1,4 +1,4 @@ --- title: "Delete Identity Membership" -openapi: "DELETE /api/v2/workspace/{workspaceId}/identity-memberships/{identityId}" ---- \ No newline at end of file +openapi: "DELETE /api/v2/workspace/{projectId}/identity-memberships/{identityId}" +--- diff --git a/docs/api-reference/endpoints/workspaces/delete-membership.mdx b/docs/api-reference/endpoints/workspaces/delete-membership.mdx index e93b2415b..1995e4726 100644 --- a/docs/api-reference/endpoints/workspaces/delete-membership.mdx +++ b/docs/api-reference/endpoints/workspaces/delete-membership.mdx @@ -1,4 +1,4 @@ --- title: "Delete User Membership" -openapi: "DELETE /api/v2/workspace/{workspaceId}/memberships/{membershipId}" +openapi: "DELETE /api/v1/workspace/{workspaceId}/memberships/{membershipId}" --- diff --git a/docs/api-reference/endpoints/workspaces/list-identity-memberships.mdx b/docs/api-reference/endpoints/workspaces/list-identity-memberships.mdx index 45297efff..e5162e693 100644 --- a/docs/api-reference/endpoints/workspaces/list-identity-memberships.mdx +++ b/docs/api-reference/endpoints/workspaces/list-identity-memberships.mdx @@ -1,4 +1,4 @@ --- title: "List Identity Memberships" -openapi: "GET /api/v2/workspace/{workspaceId}/identity-memberships" ---- \ No newline at end of file +openapi: "GET /api/v2/workspace/{projectId}/identity-memberships" +--- diff --git a/docs/api-reference/endpoints/workspaces/memberships.mdx b/docs/api-reference/endpoints/workspaces/memberships.mdx index 386c8a089..3c4735f94 100644 --- a/docs/api-reference/endpoints/workspaces/memberships.mdx +++ b/docs/api-reference/endpoints/workspaces/memberships.mdx @@ -1,4 +1,4 @@ --- title: "Get User Memberships" -openapi: "GET /api/v2/workspace/{workspaceId}/memberships" +openapi: "GET /api/v1/workspace/{workspaceId}/memberships" --- diff --git a/docs/api-reference/endpoints/workspaces/rollback-snapshot.mdx b/docs/api-reference/endpoints/workspaces/rollback-snapshot.mdx index 8b648a400..527c861b2 100644 --- a/docs/api-reference/endpoints/workspaces/rollback-snapshot.mdx +++ b/docs/api-reference/endpoints/workspaces/rollback-snapshot.mdx @@ -1,4 +1,4 @@ --- title: "Roll Back to Snapshot" -openapi: "POST /api/v1/workspace/{workspaceId}/secret-snapshots/rollback" +openapi: "POST /api/v1/secret-snapshot/{secretSnapshotId}/rollback" --- diff --git a/docs/api-reference/endpoints/workspaces/update-identity-membership.mdx b/docs/api-reference/endpoints/workspaces/update-identity-membership.mdx index 398c7bc81..667cf7eb3 100644 --- a/docs/api-reference/endpoints/workspaces/update-identity-membership.mdx +++ b/docs/api-reference/endpoints/workspaces/update-identity-membership.mdx @@ -1,4 +1,4 @@ --- title: "Update Identity Membership" -openapi: "PATCH /api/v2/workspace/{workspaceId}/identity-memberships/{identityId}" ---- \ No newline at end of file +openapi: "PATCH /api/v2/workspace/{projectId}/identity-memberships/{identityId}" +--- diff --git a/docs/api-reference/endpoints/workspaces/update-membership.mdx b/docs/api-reference/endpoints/workspaces/update-membership.mdx index f0ef15412..9a7aa600f 100644 --- a/docs/api-reference/endpoints/workspaces/update-membership.mdx +++ b/docs/api-reference/endpoints/workspaces/update-membership.mdx @@ -1,4 +1,4 @@ --- title: "Update User Membership" -openapi: "PATCH /api/v2/workspace/{workspaceId}/memberships/{membershipId}" +openapi: "PATCH /api/v1/workspace/{workspaceId}/memberships/{membershipId}" ---