diff --git a/backend/package-lock.json b/backend/package-lock.json index f5c55cf56..76b10ce2e 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -55,7 +55,6 @@ "query-string": "^7.1.3", "rate-limit-mongo": "^2.3.2", "rimraf": "^3.0.2", - "swagger-autogen": "^2.22.0", "swagger-ui-express": "^4.6.2", "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1", @@ -96,6 +95,7 @@ "npm": "^8.19.3", "smee-client": "^1.2.3", "supertest": "^6.3.3", + "swagger-autogen": "^2.23.5", "ts-jest": "^29.0.3", "ts-node": "^10.9.1" } @@ -10023,6 +10023,7 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, "bin": { "json5": "lib/cli.js" }, @@ -15559,6 +15560,7 @@ "version": "2.23.5", "resolved": "https://registry.npmjs.org/swagger-autogen/-/swagger-autogen-2.23.5.tgz", "integrity": "sha512-4Tl2+XhZMyHoBYkABnScHtQE0lKPKUD3NBt09mClrI6UKOUYljKlYw1xiFVwsHCTGR2hAXmhT4PpgjruCtt1ZA==", + "dev": true, "dependencies": { "acorn": "^7.4.1", "deepmerge": "^4.2.2", @@ -15570,6 +15572,7 @@ "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -24521,7 +24524,8 @@ "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "jsonwebtoken": { "version": "9.0.1", @@ -28614,6 +28618,7 @@ "version": "2.23.5", "resolved": "https://registry.npmjs.org/swagger-autogen/-/swagger-autogen-2.23.5.tgz", "integrity": "sha512-4Tl2+XhZMyHoBYkABnScHtQE0lKPKUD3NBt09mClrI6UKOUYljKlYw1xiFVwsHCTGR2hAXmhT4PpgjruCtt1ZA==", + "dev": true, "requires": { "acorn": "^7.4.1", "deepmerge": "^4.2.2", @@ -28624,7 +28629,8 @@ "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true } } }, diff --git a/backend/package.json b/backend/package.json index 08db10ecc..e9846de54 100644 --- a/backend/package.json +++ b/backend/package.json @@ -46,7 +46,6 @@ "query-string": "^7.1.3", "rate-limit-mongo": "^2.3.2", "rimraf": "^3.0.2", - "swagger-autogen": "^2.22.0", "swagger-ui-express": "^4.6.2", "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1", @@ -114,6 +113,7 @@ "npm": "^8.19.3", "smee-client": "^1.2.3", "supertest": "^6.3.3", + "swagger-autogen": "^2.23.5", "ts-jest": "^29.0.3", "ts-node": "^10.9.1" }, diff --git a/backend/spec.json b/backend/spec.json index 1afbc8dce..ce6638839 100644 --- a/backend/spec.json +++ b/backend/spec.json @@ -68,9 +68,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -112,9 +109,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -156,9 +150,16 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" + } + } + } + }, + "/api/v1/users/me/ip": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" } } } @@ -215,9 +216,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -243,9 +241,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -284,9 +279,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -395,9 +387,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -407,6 +396,147 @@ ] } }, + "/api/v1/workspace/{workspaceId}/audit-logs": { + "get": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/workspace/{workspaceId}/audit-logs/filters/actors": { + "get": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/workspace/{workspaceId}/trusted-ips": { + "get": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "post": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/api/v1/workspace/{workspaceId}/trusted-ips/{trustedIpId}": { + "patch": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "trustedIpId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + }, + "delete": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "trustedIpId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + } + }, "/api/v1/action/{actionId}": { "get": { "description": "", @@ -427,81 +557,495 @@ } } }, - "/api/v1/signup/email/signup": { + "/api/v1/organizations/{organizationId}/plans/table": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/plan": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/session/trial": { + "post": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/plan/billing": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/plan/table": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/billing-details": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "patch": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/billing-details/payment-methods": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "post": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/billing-details/payment-methods/{pmtMethodId}": { + "delete": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pmtMethodId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/billing-details/tax-ids": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "post": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/billing-details/tax-ids/{taxId}": { + "delete": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "taxId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/invoices": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/organizations/{organizationId}/licenses": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "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/saml2/{ssoIdentifier}": { + "get": { + "description": "", + "parameters": [ + { + "name": "ssoIdentifier", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "callback_port", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/saml2/{ssoIdentifier}": { + "post": { + "description": "", + "parameters": [ + { + "name": "ssoIdentifier", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "description": "" + } + } + } + }, + "/api/v1/sso/config": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" + } + } + }, + "patch": { + "description": "", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/api/v1/cloud-products/": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/signup/email/signup": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" }, "403": { "description": "Forbidden" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/signup/email/verify": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" }, - "400": { - "description": "Bad Request" - }, "403": { "description": "Forbidden" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - }, - "code": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/auth/token": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -509,30 +1053,9 @@ "/api/v1/auth/login1": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - }, - "clientPublicKey": { - "example": "any" - } - } - } - } } } } @@ -556,23 +1079,6 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - }, - "clientProof": { - "example": "any" - } - } - } - } - } } } }, @@ -591,9 +1097,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -601,7 +1104,16 @@ "/api/v1/auth/checkAuth": { "post": { "description": "", - "parameters": [], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/auth/sessions": { + "delete": { + "description": "", "responses": { "200": { "description": "OK" @@ -625,9 +1137,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -652,30 +1161,12 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "isActive": { - "example": "any" - }, - "botKey": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/user/": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -686,47 +1177,17 @@ "/api/v1/user-action/": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "action": { - "example": "any" - } - } - } - } } } }, "get": { "description": "", - "parameters": [ - { - "name": "action", - "in": "query", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -734,39 +1195,17 @@ "/api/v1/organization/": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } }, "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "organizationName": { - "example": "any" - } - } - } - } } } } @@ -787,9 +1226,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -810,9 +1246,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -833,9 +1266,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -856,23 +1286,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "example": "any" - } - } - } - } } } } @@ -893,9 +1306,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } }, @@ -914,23 +1324,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - } - } - } - } } } }, @@ -949,23 +1342,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - } - } - } - } } } } @@ -986,32 +1362,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - } - } - }, - "/api/v1/organization/{organizationId}/subscriptions": { - "get": { - "description": "", - "parameters": [ - { - "name": "organizationId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1052,9 +1402,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1075,9 +1422,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1085,19 +1429,14 @@ "/api/v1/workspace/": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } }, "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -1105,23 +1444,6 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceName": { - "example": "any" - }, - "organizationId": { - "example": "any" - } - } - } - } - } } } }, @@ -1141,9 +1463,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } }, @@ -1162,9 +1481,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1185,23 +1501,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "example": "any" - } - } - } - } } } } @@ -1222,23 +1521,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - } - } - } - } } } } @@ -1259,9 +1541,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1282,9 +1561,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1305,9 +1581,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1346,8 +1619,8 @@ } ], "responses": { - "400": { - "description": "Bad Request" + "default": { + "description": "" } } } @@ -1368,9 +1641,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1391,9 +1661,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1414,57 +1681,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "example": "any" - } - } - } - } - } - } - } - }, - "/api/v1/membership/{membershipId}/deny-permissions": { - "post": { - "description": "", - "parameters": [ - { - "name": "membershipId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "permissions": { - "example": "any" - } - } - } - } } } } @@ -1485,23 +1701,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "key": { - "example": "any" - } - } - } - } } } } @@ -1522,9 +1721,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1548,53 +1744,15 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "organizationId": { - "example": "any" - }, - "inviteeEmail": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/invite-org/verify": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - }, - "code": { - "example": "any" - } - } - } - } } } } @@ -1615,9 +1773,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } }, "requestBody": { @@ -1673,9 +1828,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1710,9 +1862,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -1720,7 +1869,6 @@ "/api/v1/service-token/": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -1729,7 +1877,6 @@ }, "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -1775,27 +1922,9 @@ "/api/v1/password/srp1": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "clientPublicKey": { - "example": "any" - } - } - } - } } } } @@ -1803,7 +1932,6 @@ "/api/v1/password/change-password": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -1811,74 +1939,15 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "clientProof": { - "example": "any" - }, - "protectedKey": { - "example": "any" - }, - "protectedKeyIV": { - "example": "any" - }, - "protectedKeyTag": { - "example": "any" - }, - "encryptedPrivateKey": { - "example": "any" - }, - "encryptedPrivateKeyIV": { - "example": "any" - }, - "encryptedPrivateKeyTag": { - "example": "any" - }, - "salt": { - "example": "any" - }, - "verifier": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/password/email/password-reset": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - }, - "403": { - "description": "Forbidden" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - } - } - } - } } } } @@ -1886,53 +1955,27 @@ "/api/v1/password/email/password-reset-verify": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" }, - "400": { - "description": "Bad Request" - }, "403": { "description": "Forbidden" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - }, - "code": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/password/backup-private-key": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } }, "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -1940,105 +1983,15 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "clientProof": { - "example": "any" - }, - "encryptedPrivateKey": { - "example": "any" - }, - "iv": { - "example": "any" - }, - "tag": { - "example": "any" - }, - "salt": { - "example": "any" - }, - "verifier": { - "example": "any" - } - } - } - } - } } } }, "/api/v1/password/password-reset": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "protectedKey": { - "example": "any" - }, - "protectedKeyIV": { - "example": "any" - }, - "protectedKeyTag": { - "example": "any" - }, - "encryptedPrivateKey": { - "example": "any" - }, - "encryptedPrivateKeyIV": { - "example": "any" - }, - "encryptedPrivateKeyTag": { - "example": "any" - }, - "salt": { - "example": "any" - }, - "verifier": { - "example": "any" - } - } - } - } - } - } - } - }, - "/api/v1/stripe/webhook": { - "post": { - "description": "", - "parameters": [ - { - "name": "stripe-signature", - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -2046,60 +1999,9 @@ "/api/v1/integration/": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "integrationAuthId": { - "example": "any" - }, - "app": { - "example": "any" - }, - "appId": { - "example": "any" - }, - "isActive": { - "example": "any" - }, - "sourceEnvironment": { - "example": "any" - }, - "targetEnvironment": { - "example": "any" - }, - "targetEnvironmentId": { - "example": "any" - }, - "targetService": { - "example": "any" - }, - "targetServiceId": { - "example": "any" - }, - "owner": { - "example": "any" - }, - "path": { - "example": "any" - }, - "region": { - "example": "any" - } - } - } - } } } } @@ -2120,38 +2022,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "environment": { - "example": "any" - }, - "isActive": { - "example": "any" - }, - "app": { - "example": "any" - }, - "appId": { - "example": "any" - }, - "targetEnvironment": { - "example": "any" - }, - "owner": { - "example": "any" - } - } - } - } } } }, @@ -2170,9 +2040,16 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" + } + } + } + }, + "/api/v1/integration/manual-sync": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" } } } @@ -2180,7 +2057,6 @@ "/api/v1/integration-auth/integration-options": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -2235,33 +2111,9 @@ "/api/v1/integration-auth/oauth-token": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceId": { - "example": "any" - }, - "code": { - "example": "any" - }, - "integration": { - "example": "any" - } - } - } - } } } } @@ -2269,36 +2121,9 @@ "/api/v1/integration-auth/access-token": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceId": { - "example": "any" - }, - "accessId": { - "example": "any" - }, - "accessToken": { - "example": "any" - }, - "integration": { - "example": "any" - } - } - } - } } } } @@ -2314,21 +2139,11 @@ "schema": { "type": "string" } - }, - { - "name": "teamId", - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -2364,13 +2179,6 @@ "schema": { "type": "string" } - }, - { - "name": "appId", - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -2391,13 +2199,6 @@ "schema": { "type": "string" } - }, - { - "name": "appId", - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -2418,13 +2219,991 @@ "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/bitbucket/workspaces": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/northflank/secret-groups": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/integration-auth/{integrationAuthId}/teamcity/build-configs": { + "get": { + "description": "", + "parameters": [ + { + "name": "integrationAuthId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/folders/": { + "post": { + "summary": "Create a folder", + "description": "Create a new folder in a specified workspace and environment", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "folder": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "someFolderId" + }, + "name": { + "type": "string", + "example": "my_folder" + } + }, + "description": "Details of the created folder" + } + } + } + } + } + }, + "400": { + "description": "Bad Request. For example, 'Folder name cannot contain spaces. Only underscore and dashes'" + }, + "401": { + "description": "Unauthorized request. For example, 'Folder Permission Denied'" + } + }, + "security": [ + { + "apiKeyAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the folder will be created", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment where the folder will reside", + "example": "production" + }, + "folderName": { + "type": "string", + "description": "Name of the folder to be created", + "example": "my_folder" + }, + "parentFolderId": { + "type": "string", + "description": "ID of the parent folder under which this folder will be created. If not specified, it will be created at the root level.", + "example": "someParentFolderId" + } + }, + "required": [ + "workspaceId", + "environment", + "folderName" + ] + } + } + } + } + }, + "get": { + "summary": "Retrieve folders based on specific conditions", + "description": "Fetches folders from the specified workspace and environment, optionally providing either a parentFolderId or a parentFolderPath to narrow down results", + "parameters": [ + { + "name": "workspaceId", + "description": "ID of the workspace from which the folders are to be fetched", + "required": true, + "in": "query", + "schema": { + "type": "string" + } }, { - "name": "appId", + "name": "environment", + "description": "Environment where the folder is located", + "required": true, "in": "query", "schema": { "type": "string" } + }, + { + "name": "parentFolderId", + "description": "ID of the parent folder", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "parentFolderPath", + "description": "Path of the parent folder, like /folder1/folder2", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "folders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "someFolderId" + }, + "name": { + "type": "string", + "example": "someFolderName" + } + } + }, + "description": "List of folders" + }, + "dir": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "parentFolderName" + }, + "id": { + "type": "string", + "example": "parentFolderId" + } + } + }, + "description": "List of directories" + } + } + } + } + } + }, + "400": { + "description": "Bad Request. For instance, 'The folder doesn't exist'" + }, + "401": { + "description": "Unauthorized request. For example, 'Folder Permission Denied'" + } + }, + "security": [ + { + "apiKeyAuth": [] + } + ] + } + }, + "/api/v1/folders/{folderId}": { + "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", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the folder to be updated" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully updated folder" + }, + "folder": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "updated_folder_name" + }, + "id": { + "type": "string", + "example": "someFolderId" + } + }, + "description": "Details of the updated folder" + } + } + } + } + } + }, + "400": { + "description": "Bad Request. Reasons can include 'The folder doesn't exist' or 'Folder name cannot contain spaces. Only underscore and dashes'" + }, + "401": { + "description": "Unauthorized request. For example, 'Folder Permission Denied'" + } + }, + "security": [ + { + "apiKeyAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the folder is located", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment where the folder is located", + "example": "production" + }, + "name": { + "type": "string", + "description": "New name for the folder", + "example": "updated_folder_name" + } + }, + "required": [ + "workspaceId", + "environment", + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete a folder by ID", + "description": "Delete the specified folder from a specified workspace and environment using its ID", + "parameters": [ + { + "name": "folderId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the folder to be deleted" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully deleted folders" + }, + "folders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "someFolderId" + }, + "name": { + "type": "string", + "example": "someFolderName" + } + } + }, + "description": "List of IDs and names of the deleted folders" + } + } + } + } + } + }, + "400": { + "description": "Bad Request. Reasons can include 'The folder doesn't exist'" + }, + "401": { + "description": "Unauthorized request. For example, 'Folder Permission Denied'" + } + }, + "security": [ + { + "apiKeyAuth": [] + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the folder is located", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment where the folder is located", + "example": "production" + } + }, + "required": [ + "workspaceId", + "environment" + ] + } + } + } + } + } + }, + "/api/v1/secret-scanning/create-installation-session/organization/{organizationId}": { + "post": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-scanning/link-installation": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-scanning/installation-status/organization/{organizationId}": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-scanning/organization/{organizationId}/risks": { + "get": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/secret-scanning/organization/{organizationId}/risks/{riskId}/status": { + "post": { + "description": "", + "parameters": [ + { + "name": "organizationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "riskId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/webhooks/": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/webhooks/{webhookId}": { + "patch": { + "description": "", + "parameters": [ + { + "name": "webhookId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "delete": { + "description": "", + "parameters": [ + { + "name": "webhookId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/webhooks/{webhookId}/test": { + "post": { + "description": "", + "parameters": [ + { + "name": "webhookId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/api/v1/secret-imports/": { + "post": { + "summary": "Create secret import", + "description": "Create a new secret import for a specified workspace and environment", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully created secret import" + } + }, + "description": "Confirmation of secret import creation" + } + } + } + }, + "400": { + "description": "Bad Request. For example, 'Secret import already exist'" + }, + "401": { + "description": "Unauthorized request. For example, 'Folder Permission Denied'" + }, + "404": { + "description": "Resource Not Found. For example, 'Failed to find folder'" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the secret import will be created", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment to import to", + "example": "production" + }, + "folderId": { + "type": "string", + "description": "Folder ID. Use root for the root folder.", + "example": "my_folder" + }, + "secretImport": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "description": "Import from environment", + "example": "development" + }, + "secretPath": { + "type": "string", + "description": "Import from secret path", + "example": "/user/oauth" + } + } + } + }, + "required": [ + "workspaceId", + "environment", + "folderName" + ] + } + } + } + } + }, + "get": { + "summary": "Retrieve secret imports", + "description": "Fetches the secret imports based on the workspaceId, environment, and folderId", + "parameters": [ + { + "name": "workspaceId", + "in": "query", + "description": "ID of the workspace of secret imports to get", + "required": true, + "example": "workspace12345", + "schema": { + "type": "string" + } + }, + { + "name": "environment", + "in": "query", + "description": "Environment of secret imports to get", + "required": true, + "example": "production", + "schema": { + "type": "string" + } + }, + { + "name": "folderId", + "in": "query", + "description": "ID of the folder containing the secret imports. Default: root", + "required": false, + "example": "folder12345", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved secret import", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secretImport": { + "type": "object", + "description": "Details of a secret import" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized access due to invalid token or scope" + }, + "403": { + "description": "Forbidden access due to insufficient permissions" + } + } + } + }, + "/api/v1/secret-imports/{id}": { + "put": { + "summary": "Update a secret import", + "description": "Updates an existing secret import based on the provided ID and new import details", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the secret import to be updated", + "example": "import12345" + } + ], + "responses": { + "200": { + "description": "Successfully updated the secret import", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully updated secret import" + } + } + } + } + } + }, + "400": { + "description": "Bad Request - Import not found" + }, + "401": { + "description": "Unauthorized access due to invalid token or scope" + }, + "403": { + "description": "Forbidden access due to insufficient permissions" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secretImports": { + "type": "array", + "description": "List of new secret imports", + "items": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "description": "Environment of the secret import", + "example": "production" + }, + "secretPath": { + "type": "string", + "description": "Path of the secret import", + "example": "/path/to/secret" + } + }, + "required": [ + "environment", + "secretPath" + ] + } + } + }, + "required": [ + "secretImports" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete secret import", + "description": "Delete secret import", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the secret import", + "example": "12345abcde" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully delete secret import" + } + }, + "description": "Confirmation of secret import deletion" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secretImportEnv": { + "type": "string", + "description": "Import from environment", + "example": "someWorkspaceId" + }, + "secretImportPath": { + "type": "string", + "description": "Import from secret path", + "example": "production" + } + }, + "required": [ + "id", + "secretImportEnv", + "secretImportPath" + ] + } + } + } + } + } + }, + "/api/v1/secret-imports/secrets": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/roles/": { + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/roles/{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/roles/organization/{orgId}/permissions": { + "get": { + "description": "", + "parameters": [ + { + "name": "orgId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v1/roles/workspace/{workspaceId}/permissions": { + "get": { + "description": "", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -2437,14 +3216,19 @@ "/api/v2/signup/complete-account/signup": { "post": { "description": "", - "parameters": [], + "parameters": [ + { + "name": "user-agent", + "in": "header", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK" }, - "400": { - "description": "Bad Request" - }, "403": { "description": "Forbidden" } @@ -2504,14 +3288,19 @@ "/api/v2/signup/complete-account/invite": { "post": { "description": "", - "parameters": [], + "parameters": [ + { + "name": "user-agent", + "in": "header", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK" }, - "400": { - "description": "Bad Request" - }, "403": { "description": "Forbidden" } @@ -2568,13 +3357,9 @@ "/api/v2/auth/login1": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } }, "requestBody": { @@ -2638,27 +3423,9 @@ "/api/v2/auth/mfa/send": { "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - } - } - } - } } } } @@ -2679,23 +3446,6 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "email": { - "example": "any" - }, - "mfaToken": { - "example": "any" - } - } - } - } - } } } }, @@ -2703,7 +3453,6 @@ "get": { "summary": "Retrieve the current user on the request", "description": "Retrieve the current user on the request", - "parameters": [], "responses": { "200": { "description": "OK", @@ -2721,9 +3470,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -2736,7 +3482,26 @@ "/api/v2/users/me/mfa": { "patch": { "description": "", - "parameters": [], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v2/users/me/name": { + "patch": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v2/users/me/auth-methods": { + "put": { + "description": "", "responses": { "200": { "description": "OK" @@ -2744,20 +3509,6 @@ "400": { "description": "Bad Request" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "isMfaEnabled": { - "example": "any" - } - } - } - } - } } } }, @@ -2765,7 +3516,6 @@ "get": { "summary": "Return organizations that current user is part of", "description": "Return organizations that current user is part of", - "parameters": [], "responses": { "200": { "description": "OK", @@ -2785,9 +3535,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -2797,6 +3544,62 @@ ] } }, + "/api/v2/users/me/api-keys": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "post": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v2/users/me/api-keys/{apiKeyDataId}": { + "delete": { + "description": "", + "parameters": [ + { + "name": "apiKeyDataId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v2/users/me/sessions": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + }, + "delete": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/api/v2/organizations/{organizationId}/memberships": { "get": { "summary": "Return organization memberships", @@ -2831,9 +3634,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -2883,9 +3683,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -2949,9 +3746,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -3026,7 +3820,8 @@ }, "/api/v2/workspace/{workspaceId}/environments": { "post": { - "description": "", + "summary": "Create environment", + "description": "Create environment", "parameters": [ { "name": "workspaceId", @@ -3034,17 +3829,54 @@ "required": true, "schema": { "type": "string" - } + }, + "description": "ID of project" } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully created new environment" + }, + "workspace": { + "type": "string", + "example": "someWorkspaceId" + }, + "environment": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "someEnvironmentName" + }, + "slug": { + "type": "string", + "example": "someEnvironmentSlug" + } + } + } + }, + "description": "Response after creating a new environment" + } + } + } }, "400": { "description": "Bad Request" } }, + "security": [ + { + "apiKeyAuth": [] + } + ], "requestBody": { "content": { "application/json": { @@ -3052,19 +3884,28 @@ "type": "object", "properties": { "environmentName": { - "example": "any" + "type": "string", + "description": "Name of the environment", + "example": "development" }, "environmentSlug": { - "example": "any" + "type": "string", + "description": "Slug of the environment", + "example": "dev-environment" } - } + }, + "required": [ + "environmentName", + "environmentSlug" + ] } } } } }, "put": { - "description": "", + "summary": "Rename workspace environment", + "description": "Rename a specific environment within a workspace", "parameters": [ { "name": "workspaceId", @@ -3072,15 +3913,44 @@ "required": true, "schema": { "type": "string" - } + }, + "description": "ID of the workspace" } ], "responses": { "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully update environment" + }, + "workspace": { + "type": "string", + "example": "someWorkspaceId" + }, + "environment": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Staging-Renamed" + }, + "slug": { + "type": "string", + "example": "staging-renamed" + } + } + } + }, + "description": "Details of the renamed environment" + } + } + } } }, "requestBody": { @@ -3090,21 +3960,32 @@ "type": "object", "properties": { "environmentName": { - "example": "any" + "type": "string", + "description": "New name for the environment", + "example": "Staging-Renamed" }, "environmentSlug": { - "example": "any" + "type": "string", + "description": "New slug for the environment", + "example": "staging-renamed" }, "oldEnvironmentSlug": { - "example": "any" + "type": "string", + "description": "Current slug of the environment to rename", + "example": "staging-old" } - } + }, + "required": [ + "environmentName", + "environmentSlug", + "oldEnvironmentSlug" + ] } } } } }, - "delete": { + "patch": { "description": "", "parameters": [ { @@ -3119,11 +4000,55 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" + } + } + }, + "delete": { + "summary": "Delete workspace environment", + "description": "Delete a specific environment from a workspace", + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "ID of the workspace" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully deleted environment" + }, + "workspace": { + "type": "string", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "example": "dev-environment" + } + }, + "description": "Response after deleting an environment from a workspace" + } + } + } } }, + "security": [ + { + "apiKeyAuth": [] + } + ], "requestBody": { "content": { "application/json": { @@ -3131,16 +4056,22 @@ "type": "object", "properties": { "environmentSlug": { - "example": "any" + "type": "string", + "description": "Slug of the environment to delete", + "example": "dev-environment" } - } + }, + "required": [ + "environmentSlug" + ] } } } } }, "get": { - "description": "", + "summary": "Get all accessible environments of a workspace", + "description": "Fetch all environments that the user has access to in a specified workspace", "parameters": [ { "name": "workspaceId", @@ -3148,14 +4079,54 @@ "required": true, "schema": { "type": "string" - } + }, + "description": "ID of the workspace" } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accessibleEnvironments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Development" + }, + "slug": { + "type": "string", + "example": "development" + }, + "isWriteDenied": { + "type": "boolean", + "example": false + }, + "isReadDenied": { + "type": "boolean", + "example": false + } + } + } + } + }, + "description": "List of environments the user has access to in the specified workspace" + } + } + } } - } + }, + "security": [ + { + "apiKeyAuth": [] + } + ] } }, "/api/v2/workspace/{workspaceId}/tags": { @@ -3193,26 +4164,6 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "example": "any" - }, - "tagColor": { - "example": "any" - }, - "slug": { - "example": "any" - } - } - } - } - } } } }, @@ -3252,9 +4203,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } }, "requestBody": { @@ -3310,9 +4258,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -3346,9 +4291,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -3374,9 +4316,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" } } } @@ -3415,9 +4354,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -3467,9 +4403,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -3533,9 +4466,6 @@ } } } - }, - "400": { - "description": "Bad Request" } }, "security": [ @@ -3561,23 +4491,6 @@ "responses": { "200": { "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "autoCapitalization": { - "example": "any" - } - } - } - } } } } @@ -3873,26 +4786,6 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceId": { - "example": "any" - }, - "environment": { - "example": "any" - }, - "requests": { - "example": "any" - } - } - } - } - } } } }, @@ -3988,13 +4881,6 @@ "schema": { "type": "string" } - }, - { - "name": "content", - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -4027,7 +4913,6 @@ "patch": { "summary": "Update secret(s)", "description": "Update secret(s)", - "parameters": [], "responses": { "200": { "description": "OK", @@ -4131,7 +5016,6 @@ "get": { "summary": "Return Infisical Token data", "description": "Return Infisical Token data", - "parameters": [], "responses": { "200": { "description": "OK", @@ -4159,46 +5043,10 @@ }, "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "example": "any" - }, - "workspaceId": { - "example": "any" - }, - "environment": { - "example": "any" - }, - "encryptedKey": { - "example": "any" - }, - "iv": { - "example": "any" - }, - "tag": { - "example": "any" - }, - "expiresIn": { - "example": "any" - }, - "permissions": { - "example": "any" - } - } - } - } - } } } }, @@ -4222,10 +5070,9 @@ } } }, - "/api/v2/service-accounts/me": { - "get": { + "/api/v3/auth/login1": { + "post": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" @@ -4233,12 +5080,44 @@ } } }, - "/api/v2/service-accounts/{serviceAccountId}": { + "/api/v3/auth/login2": { + "post": { + "description": "", + "parameters": [ + { + "name": "user-agent", + "in": "header", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + } + } + } + }, + "/api/v3/secrets/raw": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/api/v3/secrets/raw/{secretName}": { "get": { "description": "", "parameters": [ { - "name": "serviceAccountId", + "name": "secretName", "in": "path", "required": true, "schema": { @@ -4252,11 +5131,11 @@ } } }, - "delete": { + "post": { "description": "", "parameters": [ { - "name": "serviceAccountId", + "name": "secretName", "in": "path", "required": true, "schema": { @@ -4269,59 +5148,12 @@ "description": "OK" } } - } - }, - "/api/v2/service-accounts/": { - "post": { - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v2/service-accounts/{serviceAccountId}/name": { + }, "patch": { "description": "", "parameters": [ { - "name": "serviceAccountId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "example": "any" - } - } - } - } - } - } - } - }, - "/api/v2/service-accounts/{serviceAccountId}/permissions/workspace": { - "get": { - "description": "", - "parameters": [ - { - "name": "serviceAccountId", + "name": "secretName", "in": "path", "required": true, "schema": { @@ -4335,71 +5167,11 @@ } } }, - "post": { - "description": "", - "parameters": [ - { - "name": "serviceAccountId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "environment": { - "example": "any" - }, - "workspaceId": { - "example": "any" - }, - "read": { - "example": "any" - }, - "write": { - "example": "any" - }, - "encryptedKey": { - "example": "any" - }, - "nonce": { - "example": "any" - } - } - } - } - } - } - } - }, - "/api/v2/service-accounts/{serviceAccountId}/permissions/workspace/{serviceAccountWorkspacePermissionId}": { "delete": { "description": "", "parameters": [ { - "name": "serviceAccountId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "serviceAccountWorkspacePermissionId", + "name": "secretName", "in": "path", "required": true, "schema": { @@ -4414,118 +5186,9 @@ } } }, - "/api/v2/service-accounts/{serviceAccountId}/keys": { - "get": { - "description": "", - "parameters": [ - { - "name": "serviceAccountId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "workspaceId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/api/v2/api-key/": { - "get": { - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" - } - } - }, - "post": { - "description": "", - "parameters": [], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "example": "any" - }, - "expiresIn": { - "example": "any" - } - } - } - } - } - } - } - }, - "/api/v2/api-key/{apiKeyDataId}": { - "delete": { - "description": "", - "parameters": [ - { - "name": "apiKeyDataId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request" - } - } - } - }, "/api/v3/secrets/": { "get": { "description": "", - "parameters": [ - { - "name": "workspaceId", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "environment", - "in": "query", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "OK" @@ -4550,53 +5213,6 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceId": { - "example": "any" - }, - "environment": { - "example": "any" - }, - "type": { - "example": "any" - }, - "secretKeyCiphertext": { - "example": "any" - }, - "secretKeyIV": { - "example": "any" - }, - "secretKeyTag": { - "example": "any" - }, - "secretValueCiphertext": { - "example": "any" - }, - "secretValueIV": { - "example": "any" - }, - "secretValueTag": { - "example": "any" - }, - "secretCommentCiphertext": { - "example": "any" - }, - "secretCommentIV": { - "example": "any" - }, - "secretCommentTag": { - "example": "any" - } - } - } - } - } } }, "get": { @@ -4609,27 +5225,6 @@ "schema": { "type": "string" } - }, - { - "name": "workspaceId", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "environment", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "schema": { - "type": "string" - } } ], "responses": { @@ -4654,35 +5249,6 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceId": { - "example": "any" - }, - "environment": { - "example": "any" - }, - "type": { - "example": "any" - }, - "secretValueCiphertext": { - "example": "any" - }, - "secretValueIV": { - "example": "any" - }, - "secretValueTag": { - "example": "any" - } - } - } - } - } } }, "delete": { @@ -4701,26 +5267,6 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "workspaceId": { - "example": "any" - }, - "environment": { - "example": "any" - }, - "type": { - "example": "any" - } - } - } - } - } } } }, @@ -4781,19 +5327,37 @@ "200": { "description": "OK" } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "secretsToUpdate": { - "example": "any" - } - } - } + } + } + }, + "/api/v3/signup/complete-account/signup": { + "post": { + "description": "", + "parameters": [ + { + "name": "authorization", + "in": "header", + "schema": { + "type": "string" } + }, + { + "name": "user-agent", + "in": "header", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request" + }, + "403": { + "description": "Forbidden" } } } @@ -4801,7 +5365,6 @@ "/api/status": { "get": { "description": "", - "parameters": [], "responses": { "200": { "description": "OK" diff --git a/backend/src/controllers/v1/index.ts b/backend/src/controllers/v1/index.ts index f3212d32d..7fe7b3e99 100644 --- a/backend/src/controllers/v1/index.ts +++ b/backend/src/controllers/v1/index.ts @@ -15,7 +15,7 @@ import * as userController from "./userController"; import * as workspaceController from "./workspaceController"; import * as secretScanningController from "./secretScanningController"; import * as webhookController from "./webhookController"; -import * as secretImportController from "./secretImportController"; +import * as secretImpsController from "./secretImpsController"; import * as roleController from "./roleController"; export { @@ -37,5 +37,5 @@ export { secretScanningController, webhookController, roleController, - secretImportController + secretImpsController }; diff --git a/backend/src/controllers/v1/secretImportController.ts b/backend/src/controllers/v1/secretImpsController.ts similarity index 57% rename from backend/src/controllers/v1/secretImportController.ts rename to backend/src/controllers/v1/secretImpsController.ts index b912c0653..8e11a2c62 100644 --- a/backend/src/controllers/v1/secretImportController.ts +++ b/backend/src/controllers/v1/secretImpsController.ts @@ -19,7 +19,81 @@ import { } from "../../services/ProjectRoleService"; import { ForbiddenError, subject } from "@casl/ability"; -export const createSecretImport = async (req: Request, res: Response) => { +export const createSecretImp = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Create secret import' + #swagger.description = 'Create a new secret import for a specified workspace and environment' + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the secret import will be created", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment to import to", + "example": "production" + }, + "folderId": { + "type": "string", + "description": "Folder ID. Use root for the root folder.", + "example": "my_folder" + }, + "secretImport": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "description": "Import from environment", + "example": "development" + }, + "secretPath": { + "type": "string", + "description": "Import from secret path", + "example": "/user/oauth" + } + } + } + }, + "required": ["workspaceId", "environment", "folderName"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully created secret import" + } + }, + "description": "Confirmation of secret import creation" + } + } + } + } + #swagger.responses[400] = { + description: "Bad Request. For example, 'Secret import already exist'" + } + #swagger.responses[401] = { + description: "Unauthorized request. For example, 'Folder Permission Denied'" + } + #swagger.responses[404] = { + description: "Resource Not Found. For example, 'Failed to find folder'" + } + */ + const { body: { workspaceId, environment, folderId, secretImport } } = await validateRequest(reqValidator.CreateSecretImportV1, req); @@ -129,7 +203,88 @@ export const createSecretImport = async (req: Request, res: Response) => { // to keep the ordering, you must pass all the imports in here not the only updated one // this is because the order decide which import gets overriden + +/** + * Update secret import + * @param req + * @param res + * @returns + */ export const updateSecretImport = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Update a secret import' + #swagger.description = 'Updates an existing secret import based on the provided ID and new import details' + + #swagger.parameters['id'] = { + in: 'path', + description: 'ID of the secret import to be updated', + required: true, + type: 'string', + example: 'import12345' + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secretImports": { + "type": "array", + "description": "List of new secret imports", + "items": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "description": "Environment of the secret import", + "example": "production" + }, + "secretPath": { + "type": "string", + "description": "Path of the secret import", + "example": "/path/to/secret" + } + }, + "required": ["environment", "secretPath"] + } + } + }, + "required": ["secretImports"] + } + } + } + } + + #swagger.responses[200] = { + description: 'Successfully updated the secret import', + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully updated secret import" + } + } + } + } + } + } + + #swagger.responses[400] = { + description: 'Bad Request - Import not found', + } + + #swagger.responses[403] = { + description: 'Forbidden access due to insufficient permissions', + } + + #swagger.responses[401] = { + description: 'Unauthorized access due to invalid token or scope', + } + */ const { body: { secretImports }, params: { id } @@ -202,7 +357,65 @@ export const updateSecretImport = async (req: Request, res: Response) => { return res.status(200).json({ message: "successfully updated secret import" }); }; +/** + * Delete secret import + * @param req + * @param res + * @returns + */ export const deleteSecretImport = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Delete secret import' + #swagger.description = 'Delete secret import' + + #swagger.parameters['id'] = { + in: 'path', + description: 'ID of the secret import', + required: true, + type: 'string', + example: '12345abcde' + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secretImportEnv": { + "type": "string", + "description": "Import from environment", + "example": "someWorkspaceId" + }, + "secretImportPath": { + "type": "string", + "description": "Import from secret path", + "example": "production" + } + }, + "required": ["id", "secretImportEnv", "secretImportPath"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully delete secret import" + } + }, + "description": "Confirmation of secret import deletion" + } + } + } + } + */ const { params: { id }, body: { secretImportEnv, secretImportPath } @@ -274,7 +487,66 @@ export const deleteSecretImport = async (req: Request, res: Response) => { return res.status(200).json({ message: "successfully delete secret import" }); }; +/** + * Get secret imports + * @param req + * @param res + * @returns + */ export const getSecretImports = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Retrieve secret imports' + #swagger.description = 'Fetches the secret imports based on the workspaceId, environment, and folderId' + + #swagger.parameters['workspaceId'] = { + in: 'query', + description: 'ID of the workspace of secret imports to get', + required: true, + type: 'string', + example: 'workspace12345' + } + + #swagger.parameters['environment'] = { + in: 'query', + description: 'Environment of secret imports to get', + required: true, + type: 'string', + example: 'production' + } + + #swagger.parameters['folderId'] = { + in: 'query', + description: 'ID of the folder containing the secret imports. Default: root', + required: false, + type: 'string', + example: 'folder12345' + } + + #swagger.responses[200] = { + description: 'Successfully retrieved secret import', + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "secretImport": { + "type": "object", + "description": "Details of a secret import" + } + } + } + } + } + } + + #swagger.responses[403] = { + description: 'Forbidden access due to insufficient permissions', + } + + #swagger.responses[401] = { + description: 'Unauthorized access due to invalid token or scope', + } + */ const { query: { workspaceId, environment, folderId } } = await validateRequest(reqValidator.GetSecretImportsV1, req); @@ -326,6 +598,12 @@ export const getSecretImports = async (req: Request, res: Response) => { return res.status(200).json({ secretImport: importSecDoc }); }; +/** + * Get all secret imports + * @param req + * @param res + * @returns + */ export const getAllSecretsFromImport = async (req: Request, res: Response) => { const { query: { workspaceId, environment, folderId } diff --git a/backend/src/controllers/v1/secretsFolderController.ts b/backend/src/controllers/v1/secretsFolderController.ts index 5f9595d88..2e741b756 100644 --- a/backend/src/controllers/v1/secretsFolderController.ts +++ b/backend/src/controllers/v1/secretsFolderController.ts @@ -25,8 +25,87 @@ import { import { BadRequestError, UnauthorizedRequestError } from "../../utils/errors"; import * as reqValidator from "../../validation/folders"; -// verify workspace id/environment +/** + * Create folder with name [folderName] for workspace with id [workspaceId] + * and environment [environment] + * @param req + * @param res + * @returns + */ export const createFolder = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Create a folder' + #swagger.description = 'Create a new folder in a specified workspace and environment' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the folder will be created", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment where the folder will reside", + "example": "production" + }, + "folderName": { + "type": "string", + "description": "Name of the folder to be created", + "example": "my_folder" + }, + "parentFolderId": { + "type": "string", + "description": "ID of the parent folder under which this folder will be created. If not specified, it will be created at the root level.", + "example": "someParentFolderId" + } + }, + "required": ["workspaceId", "environment", "folderName"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "folder": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "someFolderId" + }, + "name": { + "type": "string", + "example": "my_folder" + } + }, + "description": "Details of the created folder" + } + } + } + } + } + } + #swagger.responses[400] = { + description: "Bad Request. For example, 'Folder name cannot contain spaces. Only underscore and dashes'" + } + #swagger.responses[401] = { + description: "Unauthorized request. For example, 'Folder Permission Denied'" + } + */ const { body: { workspaceId, environment, folderName, parentFolderId } } = await validateRequest(reqValidator.CreateFolderV1, req); @@ -164,7 +243,94 @@ export const createFolder = async (req: Request, res: Response) => { return res.json({ folder }); }; +/** + * Update folder with id [folderId] + * @param req + * @param res + * @returns + */ export const updateFolderById = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Update a folder by ID' + #swagger.description = 'Update the name of a folder in a specified workspace and environment by its ID' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['folderId'] = { + "description": "ID of the folder to be updated", + "required": true, + "type": "string", + "in": "path" + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the folder is located", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment where the folder is located", + "example": "production" + }, + "name": { + "type": "string", + "description": "New name for the folder", + "example": "updated_folder_name" + } + }, + "required": ["workspaceId", "environment", "name"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully updated folder" + }, + "folder": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "updated_folder_name" + }, + "id": { + "type": "string", + "example": "someFolderId" + } + }, + "description": "Details of the updated folder" + } + } + } + } + } + } + + #swagger.responses[400] = { + description: "Bad Request. Reasons can include 'The folder doesn't exist' or 'Folder name cannot contain spaces. Only underscore and dashes'" + } + + #swagger.responses[401] = { + description: "Unauthorized request. For example, 'Folder Permission Denied'" + } + */ const { body: { workspaceId, environment, name }, params: { folderId } @@ -252,7 +418,92 @@ export const updateFolderById = async (req: Request, res: Response) => { }); }; +/** + * Delete folder with id [folderId] + * @param req + * @param res + * @returns + */ export const deleteFolder = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Delete a folder by ID' + #swagger.description = 'Delete the specified folder from a specified workspace and environment using its ID' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['folderId'] = { + "description": "ID of the folder to be deleted", + "required": true, + "type": "string", + "in": "path" + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "ID of the workspace where the folder is located", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "description": "Environment where the folder is located", + "example": "production" + } + }, + "required": ["workspaceId", "environment"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "successfully deleted folders" + }, + "folders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "someFolderId" + }, + "name": { + "type": "string", + "example": "someFolderName" + } + } + }, + "description": "List of IDs and names of the deleted folders" + } + } + } + } + } + } + + #swagger.responses[400] = { + description: "Bad Request. Reasons can include 'The folder doesn't exist'" + } + + #swagger.responses[401] = { + description: "Unauthorized request. For example, 'Folder Permission Denied'" + } + */ const { params: { folderId }, body: { environment, workspaceId } @@ -327,8 +578,104 @@ export const deleteFolder = async (req: Request, res: Response) => { res.send({ message: "successfully deleted folders", folders: delFolderIds }); }; -// TODO: validate workspace +/** + * Get folders for workspace with id [workspaceId] and environment [environment] + * considering [parentFolderId] and [parentFolderPath] + * @param req + * @param res + * @returns + */ export const getFolders = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Retrieve folders based on specific conditions' + #swagger.description = 'Fetches folders from the specified workspace and environment, optionally providing either a parentFolderId or a parentFolderPath to narrow down results' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['workspaceId'] = { + "description": "ID of the workspace from which the folders are to be fetched", + "required": true, + "type": "string", + "in": "query" + } + + #swagger.parameters['environment'] = { + "description": "Environment where the folder is located", + "required": true, + "type": "string", + "in": "query" + } + + #swagger.parameters['parentFolderId'] = { + "description": "ID of the parent folder", + "required": false, + "type": "string", + "in": "query" + } + + #swagger.parameters['parentFolderPath'] = { + "description": "Path of the parent folder, like /folder1/folder2", + "required": false, + "type": "string", + "in": "query" + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "folders": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "someFolderId" + }, + "name": { + "type": "string", + "example": "someFolderName" + } + } + }, + "description": "List of folders" + }, + "dir": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "parentFolderName" + }, + "id": { + "type": "string", + "example": "parentFolderId" + } + } + }, + "description": "List of directories" + } + } + } + } + } + } + + #swagger.responses[400] = { + description: "Bad Request. For instance, 'The folder doesn't exist'" + } + + #swagger.responses[401] = { + description: "Unauthorized request. For example, 'Folder Permission Denied'" + } + */ const { query: { workspaceId, environment, parentFolderId, parentFolderPath } } = await validateRequest(reqValidator.GetFoldersV1, req); diff --git a/backend/src/controllers/v2/environmentController.ts b/backend/src/controllers/v2/environmentController.ts index 1d43630db..037373881 100644 --- a/backend/src/controllers/v2/environmentController.ts +++ b/backend/src/controllers/v2/environmentController.ts @@ -23,12 +23,98 @@ import { import { ForbiddenError } from "@casl/ability"; /** - * Create new workspace environment named [environmentName] under workspace with id + * Create new workspace environment named [environmentName] + * with slug [environmentSlug] under workspace with id * @param req * @param res * @returns */ export const createWorkspaceEnvironment = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Create environment' + #swagger.description = 'Create environment' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['workspaceId'] = { + "description": "ID of project", + "required": true, + "type": "string" + } + + /* + #swagger.summary = 'Create environment' + #swagger.description = 'Create environment' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['workspaceId'] = { + "description": "ID of project", + "required": true, + "type": "string" + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "environmentName": { + "type": "string", + "description": "Name of the environment", + "example": "development" + }, + "environmentSlug": { + "type": "string", + "description": "Slug of the environment", + "example": "dev-environment" + } + }, + "required": ["environmentName", "environmentSlug"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully created new environment" + }, + "workspace": { + "type": "string", + "example": "someWorkspaceId" + }, + "environment": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "someEnvironmentName" + }, + "slug": { + "type": "string", + "example": "someEnvironmentSlug" + } + } + } + }, + "description": "Response after creating a new environment" + } + } + } + } + */ const { params: { workspaceId }, body: { environmentName, environmentSlug } @@ -156,6 +242,79 @@ export const reorderWorkspaceEnvironments = async (req: Request, res: Response) * @returns */ export const renameWorkspaceEnvironment = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Rename workspace environment' + #swagger.description = 'Rename a specific environment within a workspace' + + #swagger.parameters['workspaceId'] = { + "description": "ID of the workspace", + "required": true, + "type": "string", + "in": "path" + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "environmentName": { + "type": "string", + "description": "New name for the environment", + "example": "Staging-Renamed" + }, + "environmentSlug": { + "type": "string", + "description": "New slug for the environment", + "example": "staging-renamed" + }, + "oldEnvironmentSlug": { + "type": "string", + "description": "Current slug of the environment to rename", + "example": "staging-old" + } + }, + "required": ["environmentName", "environmentSlug", "oldEnvironmentSlug"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully update environment" + }, + "workspace": { + "type": "string", + "example": "someWorkspaceId" + }, + "environment": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Staging-Renamed" + }, + "slug": { + "type": "string", + "example": "staging-renamed" + } + } + } + }, + "description": "Details of the renamed environment" + } + } + } + } + */ const { params: { workspaceId }, body: { environmentName, environmentSlug, oldEnvironmentSlug } @@ -259,6 +418,64 @@ export const renameWorkspaceEnvironment = async (req: Request, res: Response) => * @returns */ export const deleteWorkspaceEnvironment = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Delete workspace environment' + #swagger.description = 'Delete a specific environment from a workspace' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['workspaceId'] = { + "description": "ID of the workspace", + "required": true, + "type": "string", + "in": "path" + } + + #swagger.requestBody = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "environmentSlug": { + "type": "string", + "description": "Slug of the environment to delete", + "example": "dev-environment" + } + }, + "required": ["environmentSlug"] + } + } + } + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Successfully deleted environment" + }, + "workspace": { + "type": "string", + "example": "someWorkspaceId" + }, + "environment": { + "type": "string", + "example": "dev-environment" + } + }, + "description": "Response after deleting an environment from a workspace" + } + } + } + } +*/ const { params: { workspaceId }, body: { environmentSlug } @@ -344,6 +561,58 @@ export const deleteWorkspaceEnvironment = async (req: Request, res: Response) => // TODO(akhilmhdh) after rbac this can be completely removed export const getAllAccessibleEnvironmentsOfWorkspace = async (req: Request, res: Response) => { + /* + #swagger.summary = 'Get all accessible environments of a workspace' + #swagger.description = 'Fetch all environments that the user has access to in a specified workspace' + + #swagger.security = [{ + "apiKeyAuth": [] + }] + + #swagger.parameters['workspaceId'] = { + "description": "ID of the workspace", + "required": true, + "type": "string", + "in": "path" + } + + #swagger.responses[200] = { + content: { + "application/json": { + "schema": { + "type": "object", + "properties": { + "accessibleEnvironments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "Development" + }, + "slug": { + "type": "string", + "example": "development" + }, + "isWriteDenied": { + "type": "boolean", + "example": false + }, + "isReadDenied": { + "type": "boolean", + "example": false + } + } + } + } + }, + "description": "List of environments the user has access to in the specified workspace" + } + } + } + } + */ const { params: { workspaceId } } = await validateRequest(reqValidator.GetAllAccessibileEnvironmentsOfWorkspaceV2, req); diff --git a/backend/src/index.ts b/backend/src/index.ts index 7a5723b04..c5ecb6fad 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -38,7 +38,7 @@ import { organization as v1OrganizationRouter, password as v1PasswordRouter, role as v1RoleRouter, - secretImport as v1SecretImportRouter, + secretImps as v1SecretImpsRouter, secret as v1SecretRouter, secretsFolder as v1SecretsFolder, serviceToken as v1ServiceTokenRouter, @@ -138,6 +138,7 @@ const main = async () => { app.use((req, res, next) => { // default to IP address provided by Cloudflare + // #swagger.ignore = true const cfIp = req.headers["cf-connecting-ip"]; req.realIP = Array.isArray(cfIp) ? cfIp[0] : (cfIp as string) || req.ip; next(); @@ -153,7 +154,7 @@ const main = async () => { app.use("/api/v1/sso", eeSSORouter); app.use("/api/v1/cloud-products", eeCloudProductsRouter); - // v1 routes (default) + // v1 routes app.use("/api/v1/signup", v1SignupRouter); app.use("/api/v1/auth", v1AuthRouter); app.use("/api/v1/bot", v1BotRouter); @@ -162,7 +163,7 @@ const main = async () => { app.use("/api/v1/organization", v1OrganizationRouter); app.use("/api/v1/workspace", v1WorkspaceRouter); app.use("/api/v1/membership-org", v1MembershipOrgRouter); - app.use("/api/v1/membership", v1MembershipRouter); + app.use("/api/v1/membership", v1MembershipRouter); // app.use("/api/v1/key", v1KeyRouter); app.use("/api/v1/invite-org", v1InviteOrgRouter); app.use("/api/v1/secret", v1SecretRouter); // deprecate @@ -173,7 +174,7 @@ const main = async () => { app.use("/api/v1/folders", v1SecretsFolder); app.use("/api/v1/secret-scanning", v1SecretScanningRouter); app.use("/api/v1/webhooks", v1WebhooksRouter); - app.use("/api/v1/secret-imports", v1SecretImportRouter); + app.use("/api/v1/secret-imports", v1SecretImpsRouter); app.use("/api/v1/roles", v1RoleRouter); // v2 routes (improvements) diff --git a/backend/src/routes/v1/index.ts b/backend/src/routes/v1/index.ts index 5edab6a18..fc0392f58 100644 --- a/backend/src/routes/v1/index.ts +++ b/backend/src/routes/v1/index.ts @@ -16,7 +16,7 @@ import integration from "./integration"; import integrationAuth from "./integrationAuth"; import secretsFolder from "./secretsFolder"; import webhooks from "./webhook"; -import secretImport from "./secretImport"; +import secretImps from "./secretImps"; import role from "./role"; export { @@ -38,6 +38,6 @@ export { integrationAuth, secretsFolder, webhooks, - secretImport, + secretImps, role }; diff --git a/backend/src/routes/v1/secretImport.ts b/backend/src/routes/v1/secretImps.ts similarity index 71% rename from backend/src/routes/v1/secretImport.ts rename to backend/src/routes/v1/secretImps.ts index 11232d970..1d2696d60 100644 --- a/backend/src/routes/v1/secretImport.ts +++ b/backend/src/routes/v1/secretImps.ts @@ -1,15 +1,15 @@ import express from "express"; -import { secretImportController } from "../../controllers/v1"; -import { requireAuth } from "../../middleware"; -import { AuthMode } from "../../variables"; const router = express.Router(); +import { requireAuth } from "../../middleware"; +import { secretImpsController } from "../../controllers/v1"; +import { AuthMode } from "../../variables"; router.post( "/", requireAuth({ acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN] }), - secretImportController.createSecretImport + secretImpsController.createSecretImp ); router.put( @@ -17,7 +17,7 @@ router.put( requireAuth({ acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN] }), - secretImportController.updateSecretImport + secretImpsController.updateSecretImport ); router.delete( @@ -25,7 +25,7 @@ router.delete( requireAuth({ acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN] }), - secretImportController.deleteSecretImport + secretImpsController.deleteSecretImport ); router.get( @@ -33,7 +33,7 @@ router.get( requireAuth({ acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN] }), - secretImportController.getSecretImports + secretImpsController.getSecretImports ); router.get( @@ -41,7 +41,7 @@ router.get( requireAuth({ acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN] }), - secretImportController.getAllSecretsFromImport + secretImpsController.getAllSecretsFromImport ); export default router; diff --git a/backend/src/routes/v1/secretsFolder.ts b/backend/src/routes/v1/secretsFolder.ts index edc2b09c5..00ca2acea 100644 --- a/backend/src/routes/v1/secretsFolder.ts +++ b/backend/src/routes/v1/secretsFolder.ts @@ -1,13 +1,13 @@ import express from "express"; +const router = express.Router(); +import { requireAuth } from "../../middleware"; import { createFolder, deleteFolder, getFolders, updateFolderById } from "../../controllers/v1/secretsFolderController"; -import { requireAuth } from "../../middleware"; import { AuthMode } from "../../variables"; -const router = express.Router(); router.post( "/", diff --git a/backend/src/routes/v2/environment.ts b/backend/src/routes/v2/environment.ts index 45ea51594..9682a04a2 100644 --- a/backend/src/routes/v2/environment.ts +++ b/backend/src/routes/v2/environment.ts @@ -7,7 +7,7 @@ import { AuthMode } from "../../variables"; router.post( "/:workspaceId/environments", requireAuth({ - acceptedAuthModes: [AuthMode.JWT] + acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY] }), environmentController.createWorkspaceEnvironment ); @@ -15,7 +15,7 @@ router.post( router.put( "/:workspaceId/environments", requireAuth({ - acceptedAuthModes: [AuthMode.JWT] + acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY] }), environmentController.renameWorkspaceEnvironment ); @@ -31,7 +31,7 @@ router.patch( router.delete( "/:workspaceId/environments", requireAuth({ - acceptedAuthModes: [AuthMode.JWT] + acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY] }), environmentController.deleteWorkspaceEnvironment ); @@ -39,7 +39,7 @@ router.delete( router.get( "/:workspaceId/environments", requireAuth({ - acceptedAuthModes: [AuthMode.JWT] + acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY] }), environmentController.getAllAccessibleEnvironmentsOfWorkspace ); diff --git a/backend/swagger/index.ts b/backend/swagger/index.ts index 35ed20790..707abbfde 100644 --- a/backend/swagger/index.ts +++ b/backend/swagger/index.ts @@ -223,7 +223,8 @@ const generateOpenAPISpec = async () => { const endpointsFiles = ["../src/index.ts"]; const spec = await swaggerAutogen(outputJSONFile, endpointsFiles, doc); + await fs.writeFile(outputYAMLFile, yaml.dump(spec.data)); } -generateOpenAPISpec(); +generateOpenAPISpec(); \ No newline at end of file diff --git a/docs/api-reference/endpoints/folders/create.mdx b/docs/api-reference/endpoints/folders/create.mdx new file mode 100644 index 000000000..397f43cb5 --- /dev/null +++ b/docs/api-reference/endpoints/folders/create.mdx @@ -0,0 +1,4 @@ +--- +title: "Create" +openapi: "POST /api/v1/folders/" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/folders/delete.mdx b/docs/api-reference/endpoints/folders/delete.mdx new file mode 100644 index 000000000..2147443e5 --- /dev/null +++ b/docs/api-reference/endpoints/folders/delete.mdx @@ -0,0 +1,4 @@ +--- +title: "Delete" +openapi: "DELETE /api/v1/folders/{folderId}" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/folders/list.mdx b/docs/api-reference/endpoints/folders/list.mdx new file mode 100644 index 000000000..c467c5975 --- /dev/null +++ b/docs/api-reference/endpoints/folders/list.mdx @@ -0,0 +1,4 @@ +--- +title: "List" +openapi: "GET /api/v1/folders/" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/folders/update.mdx b/docs/api-reference/endpoints/folders/update.mdx new file mode 100644 index 000000000..fe8dd6cd8 --- /dev/null +++ b/docs/api-reference/endpoints/folders/update.mdx @@ -0,0 +1,4 @@ +--- +title: "Update" +openapi: "PATCH /api/v1/folders/{folderId}" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/secret-imports/create.mdx b/docs/api-reference/endpoints/secret-imports/create.mdx new file mode 100644 index 000000000..2c823e528 --- /dev/null +++ b/docs/api-reference/endpoints/secret-imports/create.mdx @@ -0,0 +1,4 @@ +--- +title: "Create" +openapi: "POST /api/v1/secret-imports/" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/secret-imports/delete.mdx b/docs/api-reference/endpoints/secret-imports/delete.mdx new file mode 100644 index 000000000..c7da4f6d0 --- /dev/null +++ b/docs/api-reference/endpoints/secret-imports/delete.mdx @@ -0,0 +1,4 @@ +--- +title: "Delete" +openapi: "DELETE /api/v1/secret-imports/{id}" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/secret-imports/list.mdx b/docs/api-reference/endpoints/secret-imports/list.mdx new file mode 100644 index 000000000..2de41b5d7 --- /dev/null +++ b/docs/api-reference/endpoints/secret-imports/list.mdx @@ -0,0 +1,4 @@ +--- +title: "List" +openapi: "GET /api/v1/secret-imports/" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/secret-imports/update.mdx b/docs/api-reference/endpoints/secret-imports/update.mdx new file mode 100644 index 000000000..76c8a8feb --- /dev/null +++ b/docs/api-reference/endpoints/secret-imports/update.mdx @@ -0,0 +1,4 @@ +--- +title: "Update" +openapi: "PUT /api/v1/secret-imports/{id}" +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/secrets/create.mdx b/docs/api-reference/endpoints/secrets/create.mdx index 85d8ed350..9f6b65875 100644 --- a/docs/api-reference/endpoints/secrets/create.mdx +++ b/docs/api-reference/endpoints/secrets/create.mdx @@ -5,7 +5,6 @@ openapi: "POST /api/v3/secrets/{secretName}" Using this route requires understanding Infisical's system and cryptography. - It may be helpful to read through the - [introduction](/api-reference/overview/introduction) and [guide for creating - secrets](/api-reference/overview/examples/create-secret). + You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use + this endpoint. diff --git a/docs/api-reference/endpoints/secrets/delete.mdx b/docs/api-reference/endpoints/secrets/delete.mdx index d4084a465..0ab8e1309 100644 --- a/docs/api-reference/endpoints/secrets/delete.mdx +++ b/docs/api-reference/endpoints/secrets/delete.mdx @@ -1,4 +1,4 @@ --- title: "Delete" openapi: "DELETE /api/v3/secrets/{secretName}" ---- +--- \ No newline at end of file diff --git a/docs/api-reference/endpoints/secrets/list.mdx b/docs/api-reference/endpoints/secrets/list.mdx index eaa4597fb..377c6db86 100644 --- a/docs/api-reference/endpoints/secrets/list.mdx +++ b/docs/api-reference/endpoints/secrets/list.mdx @@ -5,7 +5,7 @@ openapi: "GET /api/v3/secrets/" Using this route requires understanding Infisical's system and cryptography. - It may be helpful to read through the - [introduction](/api-reference/overview/introduction) and [guide for retrieving - secrets](/api-reference/overview/examples/retrieve-secret). + You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use + this endpoint. + diff --git a/docs/api-reference/endpoints/secrets/read.mdx b/docs/api-reference/endpoints/secrets/read.mdx index 6dbbcd726..e472efccd 100644 --- a/docs/api-reference/endpoints/secrets/read.mdx +++ b/docs/api-reference/endpoints/secrets/read.mdx @@ -5,7 +5,6 @@ openapi: "GET /api/v3/secrets/{secretName}" Using this route requires understanding Infisical's system and cryptography. - It may be helpful to read through the - [introduction](/api-reference/overview/introduction) and [guide for retrieving - secrets](/api-reference/overview/examples/retrieve-secret). + You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use + this endpoint. diff --git a/docs/api-reference/endpoints/secrets/update.mdx b/docs/api-reference/endpoints/secrets/update.mdx index 594d8201c..c0bdcb94f 100644 --- a/docs/api-reference/endpoints/secrets/update.mdx +++ b/docs/api-reference/endpoints/secrets/update.mdx @@ -5,7 +5,7 @@ openapi: "PATCH /api/v3/secrets/{secretName}" Using this route requires understanding Infisical's system and cryptography. - It may be helpful to read through the - [introduction](/api-reference/overview/introduction) and [guide for updating - secrets](/api-reference/overview/examples/update-secret). + You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use + this endpoint. + diff --git a/docs/mint.json b/docs/mint.json index a1053fd57..8c39483ea 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -331,6 +331,15 @@ "api-reference/endpoints/environments/delete" ] }, + { + "group": "Folders", + "pages": [ + "api-reference/endpoints/folders/list", + "api-reference/endpoints/folders/create", + "api-reference/endpoints/folders/update", + "api-reference/endpoints/folders/delete" + ] + }, { "group": "Secrets", "pages": [ @@ -343,6 +352,15 @@ "api-reference/endpoints/secrets/rollback-version" ] }, + { + "group": "Secret imports", + "pages": [ + "api-reference/endpoints/secret-imports/list", + "api-reference/endpoints/secret-imports/create", + "api-reference/endpoints/secret-imports/update", + "api-reference/endpoints/secret-imports/delete" + ] + }, { "group": "Service Tokens", "pages": ["api-reference/endpoints/service-tokens/get"] diff --git a/docs/spec.yaml b/docs/spec.yaml index 5cf129be3..40379087a 100644 --- a/docs/spec.yaml +++ b/docs/spec.yaml @@ -45,8 +45,8 @@ paths: items: $ref: '#/components/schemas/SecretVersion' description: Secret versions - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v1/secret/{secretId}/secret-versions/rollback: post: summary: Roll back secret to a version. @@ -70,8 +70,8 @@ paths: type: object $ref: '#/components/schemas/Secret' description: Secret rolled back to - '400': - description: Bad Request + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -94,8 +94,12 @@ paths: responses: '200': description: OK - '400': - description: Bad Request + /api/v1/users/me/ip: + get: + description: '' + responses: + '200': + description: OK /api/v1/workspace/{workspaceId}/secret-snapshots: get: summary: Return project secret snapshot ids @@ -132,8 +136,8 @@ paths: items: $ref: '#/components/schemas/SecretSnapshot' description: Project secret snapshots - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v1/workspace/{workspaceId}/secret-snapshots/count: get: description: '' @@ -146,8 +150,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/workspace/{workspaceId}/secret-snapshots/rollback: post: summary: >- @@ -176,8 +178,8 @@ paths: items: $ref: '#/components/schemas/Secret' description: Secrets rolled back to - '400': - description: Bad Request + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -245,6 +247,92 @@ paths: items: $ref: '#/components/schemas/Log' description: Project logs + security: + - apiKeyAuth: [] + /api/v1/workspace/{workspaceId}/audit-logs: + get: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/workspace/{workspaceId}/audit-logs/filters/actors: + get: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/workspace/{workspaceId}/trusted-ips: + get: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + post: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + /api/v1/workspace/{workspaceId}/trusted-ips/{trustedIpId}: + patch: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + - name: trustedIpId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + delete: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + - name: trustedIpId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK '400': description: Bad Request /api/v1/action/{actionId}: @@ -259,74 +347,309 @@ paths: responses: '200': description: OK + /api/v1/organizations/{organizationId}/plans/table: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/plan: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/session/trial: + post: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/plan/billing: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/plan/table: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/billing-details: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + patch: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/billing-details/payment-methods: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + post: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/billing-details/payment-methods/{pmtMethodId}: + delete: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + - name: pmtMethodId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/billing-details/tax-ids: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + post: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/billing-details/tax-ids/{taxId}: + delete: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + - name: taxId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/invoices: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/organizations/{organizationId}/licenses: + get: + description: '' + parameters: + - name: organizationId + 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/saml2/{ssoIdentifier}: + get: + description: '' + parameters: + - name: ssoIdentifier + in: path + required: true + schema: + type: string + - name: callback_port + in: query + schema: + type: string + responses: + default: + description: '' + /api/v1/sso/saml2/{ssoIdentifier}: + post: + description: '' + parameters: + - name: ssoIdentifier + in: path + required: true + schema: + type: string + responses: + default: + description: '' + /api/v1/sso/config: + get: + description: '' + responses: + '200': + description: OK + post: + description: '' + responses: + '200': + description: OK + '400': + description: Bad Request + patch: + description: '' + responses: + '200': + description: OK + '400': + description: Bad Request + /api/v1/cloud-products/: + get: + description: '' + responses: + '200': + description: OK /api/v1/signup/email/signup: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request '403': description: Forbidden - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any /api/v1/signup/email/verify: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request '403': description: Forbidden - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any - code: - example: any /api/v1/auth/token: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request /api/v1/auth/login1: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any - clientPublicKey: - example: any /api/v1/auth/login2: post: description: '' @@ -340,16 +663,6 @@ paths: description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any - clientProof: - example: any /api/v1/auth/logout: post: description: '' @@ -361,12 +674,15 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/auth/checkAuth: post: description: '' - parameters: [] + responses: + '200': + description: OK + /api/v1/auth/sessions: + delete: + description: '' responses: '200': description: OK @@ -382,8 +698,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/bot/{botId}/active: patch: description: '' @@ -398,77 +712,34 @@ paths: description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - isActive: - example: any - botKey: - example: any /api/v1/user/: get: description: '' - parameters: [] responses: '200': description: OK /api/v1/user-action/: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - action: - example: any get: description: '' - parameters: - - name: action - in: query - schema: - type: string responses: '200': description: OK - '400': - description: Bad Request /api/v1/organization/: get: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - organizationName: - example: any /api/v1/organization/{organizationId}: get: description: '' @@ -481,8 +752,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/organization/{organizationId}/users: get: description: '' @@ -495,8 +764,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/organization/{organizationId}/my-workspaces: get: description: '' @@ -509,8 +776,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/organization/{organizationId}/name: patch: description: '' @@ -523,16 +788,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - example: any /api/v1/organization/{organizationId}/incidentContactOrg: get: description: '' @@ -545,8 +800,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request post: description: '' parameters: @@ -558,16 +811,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any delete: description: '' parameters: @@ -579,16 +822,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any /api/v1/organization/{organizationId}/customer-portal-session: post: description: '' @@ -601,22 +834,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - /api/v1/organization/{organizationId}/subscriptions: - get: - description: '' - parameters: - - name: organizationId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - '400': - description: Bad Request /api/v1/organization/{organizationId}/workspace-memberships: get: description: '' @@ -641,8 +858,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/workspace/{workspaceId}/users: get: description: '' @@ -655,35 +870,19 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/workspace/: get: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request post: description: '' - parameters: [] responses: '200': description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceName: - example: any - organizationId: - example: any /api/v1/workspace/{workspaceId}: get: description: '' @@ -696,8 +895,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request delete: description: '' parameters: @@ -709,8 +906,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/workspace/{workspaceId}/name: post: description: '' @@ -723,16 +918,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - example: any /api/v1/workspace/{workspaceId}/invite-signup: post: description: '' @@ -745,16 +930,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any /api/v1/workspace/{workspaceId}/integrations: get: description: '' @@ -767,8 +942,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/workspace/{workspaceId}/authorizations: get: description: '' @@ -781,8 +954,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/workspace/{workspaceId}/service-tokens: get: description: '' @@ -795,8 +966,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/membership-org/membershipOrg/{membershipOrgId}/change-role: post: description: '' @@ -819,8 +988,8 @@ paths: schema: type: string responses: - '400': - description: Bad Request + default: + description: '' /api/v1/membership/{workspaceId}/connect: get: description: '' @@ -833,8 +1002,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/membership/{membershipId}: delete: description: '' @@ -847,8 +1014,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/membership/{membershipId}/change-role: post: description: '' @@ -861,36 +1026,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - role: - example: any - /api/v1/membership/{membershipId}/deny-permissions: - post: - description: '' - parameters: - - name: membershipId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - permissions: - example: any /api/v1/key/{workspaceId}: post: description: '' @@ -903,16 +1038,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - key: - example: any /api/v1/key/{workspaceId}/latest: get: description: '' @@ -925,8 +1050,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/invite-org/signup: post: description: '' @@ -940,35 +1063,12 @@ paths: description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - organizationId: - example: any - inviteeEmail: - example: any /api/v1/invite-org/verify: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any - code: - example: any /api/v1/secret/{workspaceId}: post: description: '' @@ -981,8 +1081,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request requestBody: content: application/json: @@ -1016,8 +1114,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/secret/{workspaceId}/service-token: get: description: '' @@ -1038,18 +1134,14 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v1/service-token/: get: description: '' - parameters: [] responses: '200': description: OK post: description: '' - parameters: [] responses: '200': description: OK @@ -1078,211 +1170,56 @@ paths: /api/v1/password/srp1: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - clientPublicKey: - example: any /api/v1/password/change-password: post: description: '' - parameters: [] responses: '200': description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - clientProof: - example: any - protectedKey: - example: any - protectedKeyIV: - example: any - protectedKeyTag: - example: any - encryptedPrivateKey: - example: any - encryptedPrivateKeyIV: - example: any - encryptedPrivateKeyTag: - example: any - salt: - example: any - verifier: - example: any /api/v1/password/email/password-reset: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - '403': - description: Forbidden - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any /api/v1/password/email/password-reset-verify: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request '403': description: Forbidden - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any - code: - example: any /api/v1/password/backup-private-key: get: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request post: description: '' - parameters: [] responses: '200': description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - clientProof: - example: any - encryptedPrivateKey: - example: any - iv: - example: any - tag: - example: any - salt: - example: any - verifier: - example: any /api/v1/password/password-reset: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - protectedKey: - example: any - protectedKeyIV: - example: any - protectedKeyTag: - example: any - encryptedPrivateKey: - example: any - encryptedPrivateKeyIV: - example: any - encryptedPrivateKeyTag: - example: any - salt: - example: any - verifier: - example: any - /api/v1/stripe/webhook: - post: - description: '' - parameters: - - name: stripe-signature - in: header - schema: - type: string - responses: - '200': - description: OK - '400': - description: Bad Request /api/v1/integration/: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - integrationAuthId: - example: any - app: - example: any - appId: - example: any - isActive: - example: any - sourceEnvironment: - example: any - targetEnvironment: - example: any - targetEnvironmentId: - example: any - targetService: - example: any - targetServiceId: - example: any - owner: - example: any - path: - example: any - region: - example: any /api/v1/integration/{integrationId}: patch: description: '' @@ -1295,26 +1232,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - environment: - example: any - isActive: - example: any - app: - example: any - appId: - example: any - targetEnvironment: - example: any - owner: - example: any delete: description: '' parameters: @@ -1326,12 +1243,15 @@ paths: responses: '200': description: OK - '400': - description: Bad Request + /api/v1/integration/manual-sync: + post: + description: '' + responses: + '200': + description: OK /api/v1/integration-auth/integration-options: get: description: '' - parameters: [] responses: '200': description: OK @@ -1365,47 +1285,15 @@ paths: /api/v1/integration-auth/oauth-token: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceId: - example: any - code: - example: any - integration: - example: any /api/v1/integration-auth/access-token: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceId: - example: any - accessId: - example: any - accessToken: - example: any - integration: - example: any /api/v1/integration-auth/{integrationAuthId}/apps: get: description: '' @@ -1415,15 +1303,9 @@ paths: required: true schema: type: string - - name: teamId - in: query - schema: - type: string responses: '200': description: OK - '400': - description: Bad Request /api/v1/integration-auth/{integrationAuthId}/teams: get: description: '' @@ -1445,10 +1327,6 @@ paths: required: true schema: type: string - - name: appId - in: query - schema: - type: string responses: '200': description: OK @@ -1461,10 +1339,6 @@ paths: required: true schema: type: string - - name: appId - in: query - schema: - type: string responses: '200': description: OK @@ -1477,22 +1351,671 @@ paths: required: true schema: type: string - - name: appId + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/bitbucket/workspaces: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/northflank/secret-groups: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/integration-auth/{integrationAuthId}/teamcity/build-configs: + get: + description: '' + parameters: + - name: integrationAuthId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/folders/: + post: + summary: Create a folder + description: Create a new folder in a specified workspace and environment + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + folder: + type: object + properties: + id: + type: string + example: someFolderId + name: + type: string + example: my_folder + description: Details of the created folder + '400': + description: >- + Bad Request. For example, 'Folder name cannot contain spaces. Only + underscore and dashes' + '401': + description: Unauthorized request. For example, 'Folder Permission Denied' + security: + - apiKeyAuth: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + workspaceId: + type: string + description: ID of the workspace where the folder will be created + example: someWorkspaceId + environment: + type: string + description: Environment where the folder will reside + example: production + folderName: + type: string + description: Name of the folder to be created + example: my_folder + parentFolderId: + type: string + description: >- + ID of the parent folder under which this folder will be + created. If not specified, it will be created at the root + level. + example: someParentFolderId + required: + - workspaceId + - environment + - folderName + get: + summary: Retrieve folders based on specific conditions + description: >- + Fetches folders from the specified workspace and environment, optionally + providing either a parentFolderId or a parentFolderPath to narrow down + results + parameters: + - name: workspaceId + description: ID of the workspace from which the folders are to be fetched + required: true in: query schema: type: string + - name: environment + description: Environment where the folder is located + required: true + in: query + schema: + type: string + - name: parentFolderId + description: ID of the parent folder + required: false + in: query + schema: + type: string + - name: parentFolderPath + description: Path of the parent folder, like /folder1/folder2 + required: false + in: query + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + folders: + type: array + items: + type: object + properties: + id: + type: string + example: someFolderId + name: + type: string + example: someFolderName + description: List of folders + dir: + type: array + items: + type: object + properties: + name: + type: string + example: parentFolderName + id: + type: string + example: parentFolderId + description: List of directories + '400': + description: Bad Request. For instance, 'The folder doesn't exist' + '401': + description: Unauthorized request. For example, 'Folder Permission Denied' + security: + - apiKeyAuth: [] + /api/v1/folders/{folderId}: + 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 + in: path + required: true + schema: + type: string + description: ID of the folder to be updated + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Successfully updated folder + folder: + type: object + properties: + name: + type: string + example: updated_folder_name + id: + type: string + example: someFolderId + description: Details of the updated folder + '400': + description: >- + Bad Request. Reasons can include 'The folder doesn't exist' or + 'Folder name cannot contain spaces. Only underscore and dashes' + '401': + description: Unauthorized request. For example, 'Folder Permission Denied' + security: + - apiKeyAuth: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + workspaceId: + type: string + description: ID of the workspace where the folder is located + example: someWorkspaceId + environment: + type: string + description: Environment where the folder is located + example: production + name: + type: string + description: New name for the folder + example: updated_folder_name + required: + - workspaceId + - environment + - name + delete: + summary: Delete a folder by ID + description: >- + Delete the specified folder from a specified workspace and environment + using its ID + parameters: + - name: folderId + in: path + required: true + schema: + type: string + description: ID of the folder to be deleted + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: successfully deleted folders + folders: + type: array + items: + type: object + properties: + id: + type: string + example: someFolderId + name: + type: string + example: someFolderName + description: List of IDs and names of the deleted folders + '400': + description: Bad Request. Reasons can include 'The folder doesn't exist' + '401': + description: Unauthorized request. For example, 'Folder Permission Denied' + security: + - apiKeyAuth: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + workspaceId: + type: string + description: ID of the workspace where the folder is located + example: someWorkspaceId + environment: + type: string + description: Environment where the folder is located + example: production + required: + - workspaceId + - environment + /api/v1/secret-scanning/create-installation-session/organization/{organizationId}: + post: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/secret-scanning/link-installation: + post: + description: '' + responses: + '200': + description: OK + /api/v1/secret-scanning/installation-status/organization/{organizationId}: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/secret-scanning/organization/{organizationId}/risks: + get: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/secret-scanning/organization/{organizationId}/risks/{riskId}/status: + post: + description: '' + parameters: + - name: organizationId + in: path + required: true + schema: + type: string + - name: riskId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/webhooks/: + post: + description: '' + responses: + '200': + description: OK + get: + description: '' + responses: + '200': + description: OK + /api/v1/webhooks/{webhookId}: + patch: + description: '' + parameters: + - name: webhookId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + delete: + description: '' + parameters: + - name: webhookId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/webhooks/{webhookId}/test: + post: + description: '' + parameters: + - name: webhookId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + /api/v1/secret-imports/: + post: + summary: Create secret import + description: Create a new secret import for a specified workspace and environment + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: successfully created secret import + description: Confirmation of secret import creation + '400': + description: Bad Request. For example, 'Secret import already exist' + '401': + description: Unauthorized request. For example, 'Folder Permission Denied' + '404': + description: Resource Not Found. For example, 'Failed to find folder' + requestBody: + content: + application/json: + schema: + type: object + properties: + workspaceId: + type: string + description: ID of the workspace where the secret import will be created + example: someWorkspaceId + environment: + type: string + description: Environment to import to + example: production + folderId: + type: string + description: Folder ID. Use root for the root folder. + example: my_folder + secretImport: + type: object + properties: + environment: + type: string + description: Import from environment + example: development + secretPath: + type: string + description: Import from secret path + example: /user/oauth + required: + - workspaceId + - environment + - folderName + get: + summary: Retrieve secret imports + description: >- + Fetches the secret imports based on the workspaceId, environment, and + folderId + parameters: + - name: workspaceId + in: query + description: ID of the workspace of secret imports to get + required: true + example: workspace12345 + schema: + type: string + - name: environment + in: query + description: Environment of secret imports to get + required: true + example: production + schema: + type: string + - name: folderId + in: query + description: 'ID of the folder containing the secret imports. Default: root' + required: false + example: folder12345 + schema: + type: string + responses: + '200': + description: Successfully retrieved secret import + content: + application/json: + schema: + type: object + properties: + secretImport: + type: object + description: Details of a secret import + '401': + description: Unauthorized access due to invalid token or scope + '403': + description: Forbidden access due to insufficient permissions + /api/v1/secret-imports/{id}: + put: + summary: Update a secret import + description: >- + Updates an existing secret import based on the provided ID and new + import details + parameters: + - name: id + in: path + required: true + schema: + type: string + description: ID of the secret import to be updated + example: import12345 + responses: + '200': + description: Successfully updated the secret import + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: successfully updated secret import + '400': + description: Bad Request - Import not found + '401': + description: Unauthorized access due to invalid token or scope + '403': + description: Forbidden access due to insufficient permissions + requestBody: + content: + application/json: + schema: + type: object + properties: + secretImports: + type: array + description: List of new secret imports + items: + type: object + properties: + environment: + type: string + description: Environment of the secret import + example: production + secretPath: + type: string + description: Path of the secret import + example: /path/to/secret + required: + - environment + - secretPath + required: + - secretImports + delete: + summary: Delete secret import + description: Delete secret import + parameters: + - name: id + in: path + required: true + schema: + type: string + description: ID of the secret import + example: 12345abcde + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: successfully delete secret import + description: Confirmation of secret import deletion + requestBody: + content: + application/json: + schema: + type: object + properties: + secretImportEnv: + type: string + description: Import from environment + example: someWorkspaceId + secretImportPath: + type: string + description: Import from secret path + example: production + required: + - id + - secretImportEnv + - secretImportPath + /api/v1/secret-imports/secrets: + get: + description: '' + responses: + '200': + description: OK + /api/v1/roles/: + post: + description: '' + responses: + '200': + description: OK + get: + description: '' + responses: + '200': + description: OK + /api/v1/roles/{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/roles/organization/{orgId}/permissions: + get: + description: '' + parameters: + - name: orgId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v1/roles/workspace/{workspaceId}/permissions: + get: + description: '' + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string responses: '200': description: OK /api/v2/signup/complete-account/signup: post: description: '' - parameters: [] + parameters: + - name: user-agent + in: header + schema: + type: string responses: '200': description: OK - '400': - description: Bad Request '403': description: Forbidden requestBody: @@ -1530,12 +2053,14 @@ paths: /api/v2/signup/complete-account/invite: post: description: '' - parameters: [] + parameters: + - name: user-agent + in: header + schema: + type: string responses: '200': description: OK - '400': - description: Bad Request '403': description: Forbidden requestBody: @@ -1571,12 +2096,9 @@ paths: /api/v2/auth/login1: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request requestBody: content: application/json: @@ -1613,20 +2135,9 @@ paths: /api/v2/auth/mfa/send: post: description: '' - parameters: [] responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any /api/v2/auth/mfa/verify: post: description: '' @@ -1638,21 +2149,10 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - email: - example: any - mfaToken: - example: any /api/v2/users/me: get: summary: Retrieve the current user on the request description: Retrieve the current user on the request - parameters: [] responses: '200': description: OK @@ -1665,30 +2165,32 @@ paths: type: object $ref: '#/components/schemas/CurrentUser' description: Current user on request - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v2/users/me/mfa: patch: description: '' - parameters: [] + responses: + '200': + description: OK + /api/v2/users/me/name: + patch: + description: '' + responses: + '200': + description: OK + /api/v2/users/me/auth-methods: + put: + description: '' responses: '200': description: OK '400': description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - isMfaEnabled: - example: any /api/v2/users/me/organizations: get: summary: Return organizations that current user is part of description: Return organizations that current user is part of - parameters: [] responses: '200': description: OK @@ -1702,8 +2204,42 @@ paths: items: $ref: '#/components/schemas/Organization' description: Organizations that user is part of - '400': - description: Bad Request + security: + - apiKeyAuth: [] + /api/v2/users/me/api-keys: + get: + description: '' + responses: + '200': + description: OK + post: + description: '' + responses: + '200': + description: OK + /api/v2/users/me/api-keys/{apiKeyDataId}: + delete: + description: '' + parameters: + - name: apiKeyDataId + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + /api/v2/users/me/sessions: + get: + description: '' + responses: + '200': + description: OK + delete: + description: '' + responses: + '200': + description: OK /api/v2/organizations/{organizationId}/memberships: get: summary: Return organization memberships @@ -1728,8 +2264,8 @@ paths: items: $ref: '#/components/schemas/MembershipOrg' description: Memberships of organization - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v2/organizations/{organizationId}/memberships/{membershipId}: patch: summary: Update organization membership @@ -1758,8 +2294,8 @@ paths: membership: $ref: '#/components/schemas/MembershipOrg' description: Updated organization membership - '400': - description: Bad Request + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -1799,8 +2335,8 @@ paths: membership: $ref: '#/components/schemas/MembershipOrg' description: Deleted organization membership - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v2/organizations/{organizationId}/workspaces: get: summary: Return projects in organization that user is part of @@ -1825,6 +2361,8 @@ paths: items: $ref: '#/components/schemas/Project' description: Projects of organization + security: + - apiKeyAuth: [] /api/v2/organizations/{organizationId}/service-accounts: get: description: '' @@ -1839,18 +2377,43 @@ paths: description: OK /api/v2/workspace/{workspaceId}/environments: post: - description: '' + summary: Create environment + description: Create environment parameters: - name: workspaceId in: path required: true schema: type: string + description: ID of project responses: '200': description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Successfully created new environment + workspace: + type: string + example: someWorkspaceId + environment: + type: object + properties: + name: + type: string + example: someEnvironmentName + slug: + type: string + example: someEnvironmentSlug + description: Response after creating a new environment '400': description: Bad Request + security: + - apiKeyAuth: [] requestBody: content: application/json: @@ -1858,22 +2421,50 @@ paths: type: object properties: environmentName: - example: any + type: string + description: Name of the environment + example: development environmentSlug: - example: any + type: string + description: Slug of the environment + example: dev-environment + required: + - environmentName + - environmentSlug put: - description: '' + summary: Rename workspace environment + description: Rename a specific environment within a workspace parameters: - name: workspaceId in: path required: true schema: type: string + description: ID of the workspace responses: '200': description: OK - '400': - description: Bad Request + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Successfully update environment + workspace: + type: string + example: someWorkspaceId + environment: + type: object + properties: + name: + type: string + example: Staging-Renamed + slug: + type: string + example: staging-renamed + description: Details of the renamed environment requestBody: content: application/json: @@ -1881,12 +2472,22 @@ paths: type: object properties: environmentName: - example: any + type: string + description: New name for the environment + example: Staging-Renamed environmentSlug: - example: any + type: string + description: New slug for the environment + example: staging-renamed oldEnvironmentSlug: - example: any - delete: + type: string + description: Current slug of the environment to rename + example: staging-old + required: + - environmentName + - environmentSlug + - oldEnvironmentSlug + patch: description: '' parameters: - name: workspaceId @@ -1897,8 +2498,36 @@ paths: responses: '200': description: OK - '400': - description: Bad Request + delete: + summary: Delete workspace environment + description: Delete a specific environment from a workspace + parameters: + - name: workspaceId + in: path + required: true + schema: + type: string + description: ID of the workspace + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Successfully deleted environment + workspace: + type: string + example: someWorkspaceId + environment: + type: string + example: dev-environment + description: Response after deleting an environment from a workspace + security: + - apiKeyAuth: [] requestBody: content: application/json: @@ -1906,18 +2535,53 @@ paths: type: object properties: environmentSlug: - example: any + type: string + description: Slug of the environment to delete + example: dev-environment + required: + - environmentSlug get: - description: '' + summary: Get all accessible environments of a workspace + description: >- + Fetch all environments that the user has access to in a specified + workspace parameters: - name: workspaceId in: path required: true schema: type: string + description: ID of the workspace responses: '200': description: OK + content: + application/json: + schema: + type: object + properties: + accessibleEnvironments: + type: array + items: + type: object + properties: + name: + type: string + example: Development + slug: + type: string + example: development + isWriteDenied: + type: boolean + example: false + isReadDenied: + type: boolean + example: false + description: >- + List of environments the user has access to in the specified + workspace + security: + - apiKeyAuth: [] /api/v2/workspace/{workspaceId}/tags: get: description: '' @@ -1941,18 +2605,6 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - example: any - tagColor: - example: any - slug: - example: any /api/v2/workspace/tags/{tagId}: delete: description: '' @@ -1977,8 +2629,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request requestBody: content: application/json: @@ -2012,8 +2662,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v2/workspace/{workspaceId}/encrypted-key: get: summary: Return encrypted project key @@ -2035,8 +2683,8 @@ paths: items: $ref: '#/components/schemas/ProjectKey' description: Encrypted project key for the given project - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v2/workspace/{workspaceId}/service-token-data: get: description: '' @@ -2049,8 +2697,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request /api/v2/workspace/{workspaceId}/memberships: get: summary: Return project memberships @@ -2075,8 +2721,8 @@ paths: items: $ref: '#/components/schemas/Membership' description: Memberships of project - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v2/workspace/{workspaceId}/memberships/{membershipId}: patch: summary: Update project membership @@ -2105,8 +2751,8 @@ paths: membership: $ref: '#/components/schemas/Membership' description: Updated membership - '400': - description: Bad Request + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -2144,8 +2790,8 @@ paths: membership: $ref: '#/components/schemas/Membership' description: Deleted membership - '400': - description: Bad Request + security: + - apiKeyAuth: [] /api/v2/workspace/{workspaceId}/auto-capitalization: patch: description: '' @@ -2158,16 +2804,6 @@ paths: responses: '200': description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - autoCapitalization: - example: any /api/v2/secret/batch-create/workspace/{workspaceId}/environment/{environment}: post: description: '' @@ -2343,18 +2979,6 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceId: - example: any - environment: - example: any - requests: - example: any /api/v2/secrets/: post: summary: Create new secret(s) @@ -2379,6 +3003,8 @@ paths: description: >- Newly-created secrets for the given project and environment + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -2415,10 +3041,6 @@ paths: in: header schema: type: string - - name: content - in: query - schema: - type: string responses: '200': description: OK @@ -2432,10 +3054,11 @@ paths: items: $ref: '#/components/schemas/Secret' description: Secrets for the given project and environment + security: + - apiKeyAuth: [] patch: summary: Update secret(s) description: Update secret(s) - parameters: [] responses: '200': description: OK @@ -2449,6 +3072,8 @@ paths: items: $ref: '#/components/schemas/Secret' description: Updated secrets + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -2480,6 +3105,8 @@ paths: items: $ref: '#/components/schemas/Secret' description: Deleted secrets + security: + - apiKeyAuth: [] requestBody: required: true content: @@ -2494,7 +3121,6 @@ paths: get: summary: Return Infisical Token data description: Return Infisical Token data - parameters: [] responses: '200': description: OK @@ -2511,32 +3137,9 @@ paths: - bearerAuth: [] post: description: '' - parameters: [] responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - example: any - workspaceId: - example: any - environment: - example: any - encryptedKey: - example: any - iv: - example: any - tag: - example: any - expiresIn: - example: any - permissions: - example: any /api/v2/service-token/{serviceTokenDataId}: delete: description: '' @@ -2549,48 +3152,58 @@ paths: responses: '200': description: OK - /api/v2/service-accounts/me: - get: - description: '' - parameters: [] - responses: - '200': - description: OK - /api/v2/service-accounts/{serviceAccountId}: - get: - description: '' - parameters: - - name: serviceAccountId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - delete: - description: '' - parameters: - - name: serviceAccountId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - /api/v2/service-accounts/: + /api/v3/auth/login1: post: description: '' - parameters: [] responses: '200': description: OK - /api/v2/service-accounts/{serviceAccountId}/name: + /api/v3/auth/login2: + post: + description: '' + parameters: + - name: user-agent + in: header + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + /api/v3/secrets/raw: + get: + description: '' + responses: + '200': + description: OK + /api/v3/secrets/raw/{secretName}: + get: + description: '' + parameters: + - name: secretName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + post: + description: '' + parameters: + - name: secretName + in: path + required: true + schema: + type: string + responses: + '200': + description: OK patch: description: '' parameters: - - name: serviceAccountId + - name: secretName in: path required: true schema: @@ -2598,67 +3211,10 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - example: any - /api/v2/service-accounts/{serviceAccountId}/permissions/workspace: - get: - description: '' - parameters: - - name: serviceAccountId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - post: - description: '' - parameters: - - name: serviceAccountId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - environment: - example: any - workspaceId: - example: any - read: - example: any - write: - example: any - encryptedKey: - example: any - nonce: - example: any - /api/v2/service-accounts/{serviceAccountId}/permissions/workspace/{serviceAccountWorkspacePermissionId}: delete: description: '' parameters: - - name: serviceAccountId - in: path - required: true - schema: - type: string - - name: serviceAccountWorkspacePermissionId + - name: secretName in: path required: true schema: @@ -2666,75 +3222,9 @@ paths: responses: '200': description: OK - /api/v2/service-accounts/{serviceAccountId}/keys: - get: - description: '' - parameters: - - name: serviceAccountId - in: path - required: true - schema: - type: string - - name: workspaceId - in: query - schema: - type: string - responses: - '200': - description: OK - /api/v2/api-key/: - get: - description: '' - parameters: [] - responses: - '200': - description: OK - '400': - description: Bad Request - post: - description: '' - parameters: [] - responses: - '200': - description: OK - '400': - description: Bad Request - requestBody: - content: - application/json: - schema: - type: object - properties: - name: - example: any - expiresIn: - example: any - /api/v2/api-key/{apiKeyDataId}: - delete: - description: '' - parameters: - - name: apiKeyDataId - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - '400': - description: Bad Request /api/v3/secrets/: get: description: '' - parameters: - - name: workspaceId - in: query - schema: - type: string - - name: environment - in: query - schema: - type: string responses: '200': description: OK @@ -2750,36 +3240,6 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceId: - example: any - environment: - example: any - type: - example: any - secretKeyCiphertext: - example: any - secretKeyIV: - example: any - secretKeyTag: - example: any - secretValueCiphertext: - example: any - secretValueIV: - example: any - secretValueTag: - example: any - secretCommentCiphertext: - example: any - secretCommentIV: - example: any - secretCommentTag: - example: any get: description: '' parameters: @@ -2788,18 +3248,6 @@ paths: required: true schema: type: string - - name: workspaceId - in: query - schema: - type: string - - name: environment - in: query - schema: - type: string - - name: type - in: query - schema: - type: string responses: '200': description: OK @@ -2814,24 +3262,6 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceId: - example: any - environment: - example: any - type: - example: any - secretValueCiphertext: - example: any - secretValueIV: - example: any - secretValueTag: - example: any delete: description: '' parameters: @@ -2843,18 +3273,6 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - workspaceId: - example: any - environment: - example: any - type: - example: any /api/v3/workspaces/{workspaceId}/secrets/blind-index-status: get: description: '' @@ -2891,18 +3309,28 @@ paths: responses: '200': description: OK - requestBody: - content: - application/json: - schema: - type: object - properties: - secretsToUpdate: - example: any + /api/v3/signup/complete-account/signup: + post: + description: '' + parameters: + - name: authorization + in: header + schema: + type: string + - name: user-agent + in: header + schema: + type: string + responses: + '200': + description: OK + '400': + description: Bad Request + '403': + description: Forbidden /api/status: get: description: '' - parameters: [] responses: '200': description: OK