diff --git a/backend/spec.json b/backend/spec.json
index fab6d99a..5b74ef6a 100644
--- a/backend/spec.json
+++ b/backend/spec.json
@@ -304,98 +304,6 @@
}
}
},
- "/api/v1/workspace/{workspaceId}/logs": {
- "get": {
- "summary": "Return project (audit) logs",
- "description": "Return project (audit) logs",
- "parameters": [
- {
- "name": "workspaceId",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- },
- "description": "ID of project"
- },
- {
- "name": "userId",
- "description": "ID of project member",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "offset",
- "description": "Number of logs to skip",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "limit",
- "description": "Maximum number of logs to return",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "sortBy",
- "description": "Order to sort the logs by",
- "schema": {
- "type": "string",
- "enum": [
- "oldest",
- "recent"
- ]
- },
- "required": false,
- "in": "query"
- },
- {
- "name": "actionNames",
- "description": "Names of log actions (comma-separated)",
- "required": false,
- "in": "query",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "logs": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Log"
- },
- "description": "Project logs"
- }
- }
- }
- }
- }
- }
- },
- "security": [
- {
- "apiKeyAuth": []
- }
- ]
- }
- },
"/api/v1/workspace/{workspaceId}/audit-logs": {
"get": {
"description": "",
@@ -537,26 +445,6 @@
}
}
},
- "/api/v1/action/{actionId}": {
- "get": {
- "description": "",
- "parameters": [
- {
- "name": "actionId",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
"/api/v1/organizations/{organizationId}/plans/table": {
"get": {
"description": "",
@@ -956,6 +844,54 @@
}
}
},
+ "/api/v3/api-key/": {
+ "post": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/api/v3/api-key/{apiKeyDataId}": {
+ "patch": {
+ "description": "",
+ "parameters": [
+ {
+ "name": "apiKeyDataId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ },
+ "delete": {
+ "description": "",
+ "parameters": [
+ {
+ "name": "apiKeyDataId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
"/api/v3/service-token/me/key": {
"get": {
"description": "",
@@ -966,6 +902,16 @@
}
}
},
+ "/api/v3/service-token/me/token": {
+ "post": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
"/api/v3/service-token/": {
"post": {
"description": "",
@@ -1020,6 +966,74 @@
}
}
},
+ "/api/v1/secret-rotation-providers/{workspaceId}": {
+ "get": {
+ "description": "",
+ "parameters": [
+ {
+ "name": "workspaceId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/api/v1/secret-rotations/": {
+ "post": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ },
+ "get": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/api/v1/secret-rotations/restart": {
+ "post": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/api/v1/secret-rotations/{id}": {
+ "delete": {
+ "description": "",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
"/api/v1/signup/email/signup": {
"post": {
"description": "",
@@ -1091,15 +1105,6 @@
"/api/v1/auth/logout": {
"post": {
"description": "",
- "parameters": [
- {
- "name": "user-agent",
- "in": "header",
- "schema": {
- "type": "string"
- }
- }
- ],
"responses": {
"200": {
"description": "OK"
@@ -2186,6 +2191,26 @@
}
}
},
+ "/api/v1/integration-auth/{integrationAuthId}/checkly/groups": {
+ "get": {
+ "description": "",
+ "parameters": [
+ {
+ "name": "integrationAuthId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
"/api/v1/integration-auth/{integrationAuthId}/qovery/orgs": {
"get": {
"description": "",
@@ -2408,8 +2433,8 @@
},
"/api/v1/folders/": {
"post": {
- "summary": "Create a folder",
- "description": "Create a new folder in a specified workspace and environment",
+ "summary": "Create folder",
+ "description": "Create folder",
"responses": {
"200": {
"description": "OK",
@@ -2446,7 +2471,8 @@
},
"security": [
{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}
],
"requestBody": {
@@ -2457,23 +2483,23 @@
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the folder will be created",
+ "description": "ID of the workspace where to create folder",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment where the folder will reside",
+ "description": "Slug of environment where to create folder",
"example": "production"
},
"folderName": {
"type": "string",
- "description": "Name of the folder to be created",
+ "description": "Name of folder to create",
"example": "my_folder"
},
- "parentFolderId": {
+ "directory": {
"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"
+ "description": "Path where to create folder like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
}
},
"required": [
@@ -2487,12 +2513,12 @@
}
},
"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",
+ "summary": "Get folders",
+ "description": "Get folders",
"parameters": [
{
"name": "workspaceId",
- "description": "ID of the workspace from which the folders are to be fetched",
+ "description": "ID of the workspace where to get folders from",
"required": true,
"in": "query",
"schema": {
@@ -2501,7 +2527,7 @@
},
{
"name": "environment",
- "description": "Environment where the folder is located",
+ "description": "Slug of environment where to get folders from",
"required": true,
"in": "query",
"schema": {
@@ -2509,17 +2535,8 @@
}
},
{
- "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",
+ "name": "directory",
+ "description": "Path where to get fodlers from like / or /foo/bar. Default is /",
"required": false,
"in": "query",
"schema": {
@@ -2551,23 +2568,6 @@
}
},
"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"
}
}
}
@@ -2583,15 +2583,16 @@
},
"security": [
{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}
]
}
},
"/api/v1/folders/{folderName}": {
"patch": {
- "summary": "Update a folder by ID",
- "description": "Update the name of a folder in a specified workspace and environment by its ID",
+ "summary": "Update folder",
+ "description": "Update folder",
"parameters": [
{
"name": "folderName",
@@ -2599,16 +2600,8 @@
"required": true,
"schema": {
"type": "string"
- }
- },
- {
- "name": "folderId",
- "description": "ID of the folder to be updated",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
+ },
+ "description": "Name of folder to update"
}
],
"responses": {
@@ -2651,7 +2644,8 @@
},
"security": [
{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}
],
"requestBody": {
@@ -2662,18 +2656,23 @@
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the folder is located",
+ "description": "ID of workspace where to update folder",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment where the folder is located",
+ "description": "Slug of environment where to update folder",
"example": "production"
},
"name": {
"type": "string",
- "description": "New name for the folder",
+ "description": "Name of folder to update to",
"example": "updated_folder_name"
+ },
+ "directory": {
+ "type": "string",
+ "description": "Path where to update folder like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
}
},
"required": [
@@ -2687,8 +2686,8 @@
}
},
"delete": {
- "summary": "Delete a folder by ID",
- "description": "Delete the specified folder from a specified workspace and environment using its ID",
+ "summary": "Delete folder",
+ "description": "Delete folder",
"parameters": [
{
"name": "folderName",
@@ -2696,16 +2695,8 @@
"required": true,
"schema": {
"type": "string"
- }
- },
- {
- "name": "folderId",
- "description": "ID of the folder to be deleted",
- "required": true,
- "in": "path",
- "schema": {
- "type": "string"
- }
+ },
+ "description": "Name of folder to delete"
}
],
"responses": {
@@ -2751,7 +2742,8 @@
},
"security": [
{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}
],
"requestBody": {
@@ -2762,13 +2754,18 @@
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the folder is located",
+ "description": "ID of the workspace where to delete folder",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment where the folder is located",
+ "description": "Slug of environment where to delete folder",
"example": "production"
+ },
+ "directory": {
+ "type": "string",
+ "description": "Path where to delete folder like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
}
},
"required": [
@@ -2961,7 +2958,7 @@
"/api/v1/secret-imports/": {
"post": {
"summary": "Create secret import",
- "description": "Create a new secret import for a specified workspace and environment",
+ "description": "Create secret import",
"responses": {
"200": {
"description": "OK",
@@ -2998,30 +2995,30 @@
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the secret import will be created",
+ "description": "ID of workspace where to create secret import",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment to import to",
- "example": "production"
+ "description": "Slug of environment where to create secret import",
+ "example": "dev"
},
- "folderId": {
+ "directory": {
"type": "string",
- "description": "Folder ID. Use root for the root folder.",
- "example": "my_folder"
+ "description": "Path where to create secret import like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
},
"secretImport": {
"type": "object",
"properties": {
"environment": {
"type": "string",
- "description": "Import from environment",
+ "description": "Slug of environment to import from",
"example": "development"
},
"secretPath": {
"type": "string",
- "description": "Import from secret path",
+ "description": "Path where to import from like / or /foo/bar.",
"example": "/user/oauth"
}
}
@@ -3030,7 +3027,8 @@
"required": [
"workspaceId",
"environment",
- "folderName"
+ "directory",
+ "secretImport"
]
}
}
@@ -3038,13 +3036,13 @@
}
},
"get": {
- "summary": "Retrieve secret imports",
- "description": "Fetches the secret imports based on the workspaceId, environment, and folderId",
+ "summary": "Get secret imports",
+ "description": "Get secret imports",
"parameters": [
{
"name": "workspaceId",
"in": "query",
- "description": "ID of the workspace of secret imports to get",
+ "description": "ID of workspace where to get secret imports from",
"required": true,
"example": "workspace12345",
"schema": {
@@ -3054,7 +3052,7 @@
{
"name": "environment",
"in": "query",
- "description": "Environment of secret imports to get",
+ "description": "Slug of environment where to get secret imports from",
"required": true,
"example": "production",
"schema": {
@@ -3062,9 +3060,9 @@
}
},
{
- "name": "folderId",
+ "name": "directory",
"in": "query",
- "description": "ID of the folder containing the secret imports. Default: root",
+ "description": "Path where to get secret imports from like / or /foo/bar. Default is /",
"required": false,
"example": "folder12345",
"schema": {
@@ -3100,8 +3098,8 @@
},
"/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",
+ "summary": "Update secret import",
+ "description": "Update secret import",
"parameters": [
{
"name": "id",
@@ -3110,7 +3108,7 @@
"schema": {
"type": "string"
},
- "description": "ID of the secret import to be updated",
+ "description": "ID of secret import to update",
"example": "import12345"
}
],
@@ -3149,19 +3147,19 @@
"properties": {
"secretImports": {
"type": "array",
- "description": "List of new secret imports",
+ "description": "List of secret imports to update to",
"items": {
"type": "object",
"properties": {
"environment": {
"type": "string",
- "description": "Environment of the secret import",
- "example": "production"
+ "description": "Slug of environment to import from",
+ "example": "dev"
},
"secretPath": {
"type": "string",
- "description": "Path of the secret import",
- "example": "/path/to/secret"
+ "description": "Path where to import secrets from like / or /foo/bar",
+ "example": "/foo/bar"
}
},
"required": [
@@ -3190,7 +3188,7 @@
"schema": {
"type": "string"
},
- "description": "ID of the secret import",
+ "description": "ID of parent secret import document from which to delete secret import",
"example": "12345abcde"
}
],
@@ -3221,12 +3219,12 @@
"properties": {
"secretImportEnv": {
"type": "string",
- "description": "Import from environment",
+ "description": "Slug of environment of import to delete",
"example": "someWorkspaceId"
},
"secretImportPath": {
"type": "string",
- "description": "Import from secret path",
+ "description": "Path like / or /foo/bar of import to delete",
"example": "production"
}
},
@@ -4193,8 +4191,18 @@
]
}
},
- "/api/v2/organizations/{organizationId}/service-accounts": {
- "get": {
+ "/api/v2/organizations/": {
+ "post": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
+ "/api/v2/organizations/{organizationId}": {
+ "delete": {
"description": "",
"parameters": [
{
@@ -4213,22 +4221,12 @@
}
}
},
- "/api/v2/organizations/": {
+ "/api/v2/workspace/{workspaceId}/memberships": {
"post": {
- "description": "",
- "responses": {
- "200": {
- "description": "OK"
- }
- }
- }
- },
- "/api/v2/organizations/{organizationId}": {
- "delete": {
"description": "",
"parameters": [
{
- "name": "organizationId",
+ "name": "workspaceId",
"in": "path",
"required": true,
"schema": {
@@ -4241,12 +4239,10 @@
"description": "OK"
}
}
- }
- },
- "/api/v2/workspace/{workspaceId}/environments": {
- "post": {
- "summary": "Create environment",
- "description": "Create environment",
+ },
+ "get": {
+ "summary": "Return project memberships",
+ "description": "Return project memberships",
"parameters": [
{
"name": "workspaceId",
@@ -4266,32 +4262,44 @@
"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"
- }
- }
+ "memberships": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Membership"
+ },
+ "description": "Memberships of project"
}
- },
- "description": "Response after creating a new environment"
+ }
}
}
}
+ }
+ },
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ]
+ }
+ },
+ "/api/v2/workspace/{workspaceId}/environments": {
+ "post": {
+ "summary": "Create environment",
+ "description": "Create environment",
+ "parameters": [
+ {
+ "name": "workspaceId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "ID of workspace where to create environment"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
},
"400": {
"description": "Bad Request"
@@ -4310,12 +4318,12 @@
"properties": {
"environmentName": {
"type": "string",
- "description": "Name of the environment",
+ "description": "Name of the environment to create",
"example": "development"
},
"environmentSlug": {
"type": "string",
- "description": "Slug of the environment",
+ "description": "Slug of environment to create",
"example": "dev-environment"
}
},
@@ -4329,8 +4337,8 @@
}
},
"put": {
- "summary": "Rename workspace environment",
- "description": "Rename a specific environment within a workspace",
+ "summary": "Update environment",
+ "description": "Update environment",
"parameters": [
{
"name": "workspaceId",
@@ -4339,7 +4347,7 @@
"schema": {
"type": "string"
},
- "description": "ID of the workspace"
+ "description": "ID of workspace where to update environment"
}
],
"responses": {
@@ -4378,6 +4386,11 @@
}
}
},
+ "security": [
+ {
+ "apiKeyAuth": []
+ }
+ ],
"requestBody": {
"content": {
"application/json": {
@@ -4386,17 +4399,17 @@
"properties": {
"environmentName": {
"type": "string",
- "description": "New name for the environment",
+ "description": "Name of environment to update to",
"example": "Staging-Renamed"
},
"environmentSlug": {
"type": "string",
- "description": "New slug for the environment",
+ "description": "Slug of environment to update to",
"example": "staging-renamed"
},
"oldEnvironmentSlug": {
"type": "string",
- "description": "Current slug of the environment to rename",
+ "description": "Current slug of environment",
"example": "staging-old"
}
},
@@ -4429,8 +4442,8 @@
}
},
"delete": {
- "summary": "Delete workspace environment",
- "description": "Delete a specific environment from a workspace",
+ "summary": "Delete environment",
+ "description": "Delete environment",
"parameters": [
{
"name": "workspaceId",
@@ -4439,7 +4452,7 @@
"schema": {
"type": "string"
},
- "description": "ID of the workspace"
+ "description": "ID of workspace where to delete environment"
}
],
"responses": {
@@ -4471,7 +4484,8 @@
},
"security": [
{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}
],
"requestBody": {
@@ -4482,8 +4496,8 @@
"properties": {
"environmentSlug": {
"type": "string",
- "description": "Slug of the environment to delete",
- "example": "dev-environment"
+ "description": "Slug of environment to delete",
+ "example": "dev"
}
},
"required": [
@@ -4745,49 +4759,6 @@
}
}
},
- "/api/v2/workspace/{workspaceId}/memberships": {
- "get": {
- "summary": "Return project memberships",
- "description": "Return project memberships",
- "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": {
- "memberships": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Membership"
- },
- "description": "Memberships of project"
- }
- }
- }
- }
- }
- }
- },
- "security": [
- {
- "apiKeyAuth": []
- }
- ]
- }
- },
"/api/v2/workspace/{workspaceId}/memberships/{membershipId}": {
"patch": {
"summary": "Update project membership",
@@ -5299,13 +5270,6 @@
"schema": {
"type": "string"
}
- },
- {
- "name": "user-agent",
- "in": "header",
- "schema": {
- "type": "string"
- }
}
],
"responses": {
@@ -5529,35 +5493,134 @@
},
"/api/v3/secrets/raw": {
"get": {
- "description": "",
+ "summary": "List secrets",
+ "description": "List secrets",
+ "parameters": [
+ {
+ "name": "workspaceId",
+ "description": "ID of workspace where to get secrets from",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "environment",
+ "description": "Slug of environment where to get secrets from",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "secretPath",
+ "description": "Path where to update secret like / or /foo/bar. Default is /",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "include_imports",
+ "description": "Whether or not to include imported secrets. Default is false",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
"responses": {
"200": {
"description": "OK"
}
- }
+ },
+ "security": [
+ {
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }
+ ]
}
},
"/api/v3/secrets/raw/{secretName}": {
"get": {
- "description": "",
+ "summary": "Get secret",
+ "description": "Get secret",
"parameters": [
{
"name": "secretName",
"in": "path",
"required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Name of secret to get"
+ },
+ {
+ "name": "workspaceId",
+ "description": "ID of workspace where to get secret",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "environment",
+ "description": "Slug of environment where to get secret",
+ "required": true,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "secretPath",
+ "description": "Path where to update secret like / or /foo/bar. Default is /",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "type",
+ "description": "Type of secret to get; either shared or personal. Default is shared.",
+ "required": true,
+ "in": "query",
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "include_imports",
+ "description": "Whether or not to include imported secrets. Default is false",
+ "required": false,
+ "in": "query",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
"200": {
"description": "OK"
}
- }
+ },
+ "security": [
+ {
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }
+ ]
},
"post": {
- "description": "",
+ "summary": "Create secret",
+ "description": "Create secret",
"parameters": [
{
"name": "secretName",
@@ -5565,17 +5628,76 @@
"required": true,
"schema": {
"type": "string"
- }
+ },
+ "description": "Name of secret to create"
}
],
"responses": {
"200": {
"description": "OK"
}
+ },
+ "security": [
+ {
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of the workspace where to create secret",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Slug of environment where to create secret",
+ "example": "dev"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Path where to create secret. Default is /",
+ "example": "/foo/bar"
+ },
+ "secretValue": {
+ "type": "string",
+ "description": "Value of secret to create",
+ "example": "Some value"
+ },
+ "secretComment": {
+ "type": "string",
+ "description": "Comment for secret to create",
+ "example": "Some comment"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of secret to create; either shared or personal. Default is shared.",
+ "example": "shared"
+ },
+ "skipMultilineEncoding": {
+ "type": "boolean",
+ "description": "Convert multi line secrets into one line by wrapping",
+ "example": "true"
+ }
+ },
+ "required": [
+ "workspaceId",
+ "environment",
+ "secretValue"
+ ]
+ }
+ }
+ }
}
},
"patch": {
- "description": "",
+ "summary": "Update secret",
+ "description": "Update secret",
"parameters": [
{
"name": "secretName",
@@ -5583,17 +5705,71 @@
"required": true,
"schema": {
"type": "string"
- }
+ },
+ "description": "Name of secret to update"
}
],
"responses": {
"200": {
"description": "OK"
}
+ },
+ "security": [
+ {
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of the workspace where to update secret",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Slug of environment where to update secret",
+ "example": "dev"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Path where to update secret like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
+ },
+ "secretValue": {
+ "type": "string",
+ "description": "Value of secret to update to",
+ "example": "Some value"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of secret to update; either shared or personal. Default is shared.",
+ "example": "shared"
+ },
+ "skipMultilineEncoding": {
+ "type": "boolean",
+ "description": "Convert multi line secrets into one line by wrapping",
+ "example": "true"
+ }
+ },
+ "required": [
+ "workspaceId",
+ "environment",
+ "secretValue"
+ ]
+ }
+ }
+ }
}
},
"delete": {
- "description": "",
+ "summary": "Delete secret",
+ "description": "Delete secret",
"parameters": [
{
"name": "secretName",
@@ -5601,13 +5777,55 @@
"required": true,
"schema": {
"type": "string"
- }
+ },
+ "description": "Name of secret to delete"
}
],
"responses": {
"200": {
"description": "OK"
}
+ },
+ "security": [
+ {
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of workspace where to delete secret",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Slug of Environment where to delete secret",
+ "example": "dev"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Path where to delete secret. Default is /",
+ "example": "/foo/bar"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of secret to delete; either shared or personal. Default is shared",
+ "example": "shared"
+ }
+ },
+ "required": [
+ "workspaceId",
+ "environment"
+ ]
+ }
+ }
+ }
}
}
},
@@ -5833,6 +6051,16 @@
}
}
},
+ "/api/v3/us/me/api-keys": {
+ "get": {
+ "description": "",
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ }
+ }
+ },
"/api/status": {
"get": {
"description": "",
@@ -6468,13 +6696,13 @@
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT",
- "description": "This security definition uses the HTTP 'bearer' scheme, which allows the client to authenticate using a JSON Web Token (JWT) that is passed in the Authorization header of the request."
+ "description": "A service token in Infisical"
},
"apiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-API-Key",
- "description": "This security definition uses an API key, which is passed in the header of the request as the value of the \"X-API-Key\" header. The client must provide a valid key in order to access the API."
+ "description": "An API Key in Infisical"
}
}
}
diff --git a/backend/src/controllers/v1/secretImpsController.ts b/backend/src/controllers/v1/secretImpsController.ts
index 956229b7..9c3dc88c 100644
--- a/backend/src/controllers/v1/secretImpsController.ts
+++ b/backend/src/controllers/v1/secretImpsController.ts
@@ -22,7 +22,7 @@ import { ForbiddenError, subject } from "@casl/ability";
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.description = 'Create secret import'
#swagger.requestBody = {
content: {
@@ -32,36 +32,36 @@ export const createSecretImp = async (req: Request, res: Response) => {
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the secret import will be created",
+ "description": "ID of workspace where to create secret import",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment to import to",
- "example": "production"
+ "description": "Slug of environment where to create secret import",
+ "example": "dev"
},
- "folderId": {
+ "directory": {
"type": "string",
- "description": "Folder ID. Use root for the root folder.",
- "example": "my_folder"
+ "description": "Path where to create secret import like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
},
"secretImport": {
"type": "object",
"properties": {
"environment": {
"type": "string",
- "description": "Import from environment",
+ "description": "Slug of environment to import from",
"example": "development"
},
"secretPath": {
"type": "string",
- "description": "Import from secret path",
+ "description": "Path where to import from like / or /foo/bar.",
"example": "/user/oauth"
}
}
}
},
- "required": ["workspaceId", "environment", "folderName"]
+ "required": ["workspaceId", "environment", "directory", "secretImport"]
}
}
}
@@ -206,12 +206,12 @@ export const createSecretImp = async (req: Request, res: Response) => {
*/
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.summary = 'Update secret import'
+ #swagger.description = 'Update secret import'
#swagger.parameters['id'] = {
in: 'path',
- description: 'ID of the secret import to be updated',
+ description: 'ID of secret import to update',
required: true,
type: 'string',
example: 'import12345'
@@ -225,19 +225,19 @@ export const updateSecretImport = async (req: Request, res: Response) => {
"properties": {
"secretImports": {
"type": "array",
- "description": "List of new secret imports",
+ "description": "List of secret imports to update to",
"items": {
"type": "object",
"properties": {
"environment": {
"type": "string",
- "description": "Environment of the secret import",
- "example": "production"
+ "description": "Slug of environment to import from",
+ "example": "dev"
},
"secretPath": {
"type": "string",
- "description": "Path of the secret import",
- "example": "/path/to/secret"
+ "description": "Path where to import secrets from like / or /foo/bar",
+ "example": "/foo/bar"
}
},
"required": ["environment", "secretPath"]
@@ -364,7 +364,7 @@ export const deleteSecretImport = async (req: Request, res: Response) => {
#swagger.parameters['id'] = {
in: 'path',
- description: 'ID of the secret import',
+ description: 'ID of parent secret import document from which to delete secret import',
required: true,
type: 'string',
example: '12345abcde'
@@ -378,12 +378,12 @@ export const deleteSecretImport = async (req: Request, res: Response) => {
"properties": {
"secretImportEnv": {
"type": "string",
- "description": "Import from environment",
+ "description": "Slug of environment of import to delete",
"example": "someWorkspaceId"
},
"secretImportPath": {
"type": "string",
- "description": "Import from secret path",
+ "description": "Path like / or /foo/bar of import to delete",
"example": "production"
}
},
@@ -489,12 +489,12 @@ export const deleteSecretImport = async (req: Request, res: Response) => {
*/
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.summary = 'Get secret imports'
+ #swagger.description = 'Get secret imports'
#swagger.parameters['workspaceId'] = {
in: 'query',
- description: 'ID of the workspace of secret imports to get',
+ description: 'ID of workspace where to get secret imports from',
required: true,
type: 'string',
example: 'workspace12345'
@@ -502,15 +502,15 @@ export const getSecretImports = async (req: Request, res: Response) => {
#swagger.parameters['environment'] = {
in: 'query',
- description: 'Environment of secret imports to get',
+ description: 'Slug of environment where to get secret imports from',
required: true,
type: 'string',
example: 'production'
}
- #swagger.parameters['folderId'] = {
+ #swagger.parameters['directory'] = {
in: 'query',
- description: 'ID of the folder containing the secret imports. Default: root',
+ description: 'Path where to get secret imports from like / or /foo/bar. Default is /',
required: false,
type: 'string',
example: 'folder12345'
diff --git a/backend/src/controllers/v1/secretsFolderController.ts b/backend/src/controllers/v1/secretsFolderController.ts
index 835551e7..48a30277 100644
--- a/backend/src/controllers/v1/secretsFolderController.ts
+++ b/backend/src/controllers/v1/secretsFolderController.ts
@@ -27,11 +27,12 @@ const ERR_FOLDER_NOT_FOUND = BadRequestError({ message: "The folder doesn't exis
// verify workspace id/environment
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.summary = 'Create folder'
+ #swagger.description = 'Create folder'
#swagger.security = [{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}]
#swagger.requestBody = {
@@ -42,23 +43,23 @@ export const createFolder = async (req: Request, res: Response) => {
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the folder will be created",
+ "description": "ID of the workspace where to create folder",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment where the folder will reside",
+ "description": "Slug of environment where to create folder",
"example": "production"
},
"folderName": {
"type": "string",
- "description": "Name of the folder to be created",
+ "description": "Name of folder to create",
"example": "my_folder"
},
- "parentFolderId": {
+ "directory": {
"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"
+ "description": "Path where to create folder like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
}
},
"required": ["workspaceId", "environment", "folderName"]
@@ -219,18 +220,18 @@ export const createFolder = async (req: Request, res: Response) => {
*/
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.summary = 'Update folder'
+ #swagger.description = 'Update folder'
#swagger.security = [{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}]
- #swagger.parameters['folderId'] = {
- "description": "ID of the folder to be updated",
+ #swagger.parameters['folderName'] = {
+ "description": "Name of folder to update",
"required": true,
- "type": "string",
- "in": "path"
+ "type": "string"
}
#swagger.requestBody = {
@@ -241,18 +242,23 @@ export const updateFolderById = async (req: Request, res: Response) => {
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the folder is located",
+ "description": "ID of workspace where to update folder",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment where the folder is located",
+ "description": "Slug of environment where to update folder",
"example": "production"
},
"name": {
"type": "string",
- "description": "New name for the folder",
+ "description": "Name of folder to update to",
"example": "updated_folder_name"
+ },
+ "directory": {
+ "type": "string",
+ "description": "Path where to update folder like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
}
},
"required": ["workspaceId", "environment", "name"]
@@ -387,15 +393,16 @@ export const updateFolderById = async (req: Request, res: Response) => {
*/
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.summary = 'Delete folder'
+ #swagger.description = 'Delete folder'
#swagger.security = [{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}]
- #swagger.parameters['folderId'] = {
- "description": "ID of the folder to be deleted",
+ #swagger.parameters['folderName'] = {
+ "description": "Name of folder to delete",
"required": true,
"type": "string",
"in": "path"
@@ -409,13 +416,18 @@ export const deleteFolder = async (req: Request, res: Response) => {
"properties": {
"workspaceId": {
"type": "string",
- "description": "ID of the workspace where the folder is located",
+ "description": "ID of the workspace where to delete folder",
"example": "someWorkspaceId"
},
"environment": {
"type": "string",
- "description": "Environment where the folder is located",
+ "description": "Slug of environment where to delete folder",
"example": "production"
+ },
+ "directory": {
+ "type": "string",
+ "description": "Path where to delete folder like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
}
},
"required": ["workspaceId", "environment"]
@@ -540,43 +552,37 @@ export const deleteFolder = async (req: Request, res: Response) => {
/**
* Get folders for workspace with id [workspaceId] and environment [environment]
- * considering [parentFolderId] and [parentFolderPath]
+ * considering directory/path [directory]
* @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.summary = 'Get folders'
+ #swagger.description = 'Get folders'
#swagger.security = [{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}]
#swagger.parameters['workspaceId'] = {
- "description": "ID of the workspace from which the folders are to be fetched",
+ "description": "ID of the workspace where to get folders from",
"required": true,
"type": "string",
"in": "query"
}
#swagger.parameters['environment'] = {
- "description": "Environment where the folder is located",
+ "description": "Slug of environment where to get folders from",
"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",
+ #swagger.parameters['directory'] = {
+ "description": "Path where to get fodlers from like / or /foo/bar. Default is /",
"required": false,
"type": "string",
"in": "query"
@@ -604,23 +610,6 @@ export const getFolders = async (req: Request, res: Response) => {
}
},
"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"
}
}
}
diff --git a/backend/src/controllers/v2/environmentController.ts b/backend/src/controllers/v2/environmentController.ts
index a56429df..87c30651 100644
--- a/backend/src/controllers/v2/environmentController.ts
+++ b/backend/src/controllers/v2/environmentController.ts
@@ -38,29 +38,16 @@ export const createWorkspaceEnvironment = async (req: Request, res: Response) =>
#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": []
+ "apiKeyAuth": [],
}]
#swagger.parameters['workspaceId'] = {
- "description": "ID of project",
+ "description": "ID of workspace where to create environment",
"required": true,
- "type": "string"
+ "type": "string",
+ "in": "path"
}
-
+
#swagger.requestBody = {
content: {
"application/json": {
@@ -69,12 +56,12 @@ export const createWorkspaceEnvironment = async (req: Request, res: Response) =>
"properties": {
"environmentName": {
"type": "string",
- "description": "Name of the environment",
+ "description": "Name of the environment to create",
"example": "development"
},
"environmentSlug": {
"type": "string",
- "description": "Slug of the environment",
+ "description": "Slug of environment to create",
"example": "dev-environment"
}
},
@@ -83,40 +70,6 @@ export const createWorkspaceEnvironment = async (req: Request, res: Response) =>
}
}
}
-
- #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 },
@@ -246,15 +199,19 @@ export const reorderWorkspaceEnvironments = async (req: Request, res: Response)
*/
export const renameWorkspaceEnvironment = async (req: Request, res: Response) => {
/*
- #swagger.summary = 'Rename workspace environment'
- #swagger.description = 'Rename a specific environment within a workspace'
+ #swagger.summary = 'Update environment'
+ #swagger.description = 'Update environment'
+
+ #swagger.security = [{
+ "apiKeyAuth": [],
+ }]
#swagger.parameters['workspaceId'] = {
- "description": "ID of the workspace",
- "required": true,
- "type": "string",
- "in": "path"
- }
+ "description": "ID of workspace where to update environment",
+ "required": true,
+ "type": "string",
+ "in": "path"
+ }
#swagger.requestBody = {
content: {
@@ -264,17 +221,17 @@ export const renameWorkspaceEnvironment = async (req: Request, res: Response) =>
"properties": {
"environmentName": {
"type": "string",
- "description": "New name for the environment",
+ "description": "Name of environment to update to",
"example": "Staging-Renamed"
},
"environmentSlug": {
"type": "string",
- "description": "New slug for the environment",
+ "description": "Slug of environment to update to",
"example": "staging-renamed"
},
"oldEnvironmentSlug": {
"type": "string",
- "description": "Current slug of the environment to rename",
+ "description": "Current slug of environment",
"example": "staging-old"
}
},
@@ -447,19 +404,20 @@ export const renameWorkspaceEnvironment = async (req: Request, res: Response) =>
*/
export const deleteWorkspaceEnvironment = async (req: Request, res: Response) => {
/*
- #swagger.summary = 'Delete workspace environment'
- #swagger.description = 'Delete a specific environment from a workspace'
+ #swagger.summary = 'Delete environment'
+ #swagger.description = 'Delete environment'
#swagger.security = [{
- "apiKeyAuth": []
+ "apiKeyAuth": [],
+ "bearerAuth": []
}]
#swagger.parameters['workspaceId'] = {
- "description": "ID of the workspace",
- "required": true,
- "type": "string",
- "in": "path"
- }
+ "description": "ID of workspace where to delete environment",
+ "required": true,
+ "type": "string",
+ "in": "path"
+ }
#swagger.requestBody = {
content: {
@@ -469,8 +427,8 @@ export const deleteWorkspaceEnvironment = async (req: Request, res: Response) =>
"properties": {
"environmentSlug": {
"type": "string",
- "description": "Slug of the environment to delete",
- "example": "dev-environment"
+ "description": "Slug of environment to delete",
+ "example": "dev"
}
},
"required": ["environmentSlug"]
diff --git a/backend/src/controllers/v3/secretsController.ts b/backend/src/controllers/v3/secretsController.ts
index dedb15b6..ebd7bddd 100644
--- a/backend/src/controllers/v3/secretsController.ts
+++ b/backend/src/controllers/v3/secretsController.ts
@@ -8,7 +8,7 @@ import { encryptSymmetric128BitHexKeyUTF8 } from "../../utils/crypto";
import { getAllImportedSecrets } from "../../services/SecretImportService";
import { Folder, IMembership, IServiceTokenData, IServiceTokenDataV3 } from "../../models";
import { Permission } from "../../models/serviceTokenDataV3";
-import { getFolderByPath, getFolderWithPathFromId } from "../../services/FolderService";
+import { getFolderByPath } from "../../services/FolderService";
import { BadRequestError } from "../../utils/errors";
import { validateRequest } from "../../helpers/validation";
import * as reqValidator from "../../validation/secrets";
@@ -135,6 +135,43 @@ const checkSecretsPermission = async ({
* @param res
*/
export const getSecretsRaw = async (req: Request, res: Response) => {
+ /*
+ #swagger.summary = 'List secrets'
+ #swagger.description = 'List secrets'
+
+ #swagger.security = [{
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }]
+
+ #swagger.parameters['workspaceId'] = {
+ "description": "ID of workspace where to get secrets from",
+ "required": true,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['environment'] = {
+ "description": "Slug of environment where to get secrets from",
+ "required": true,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['secretPath'] = {
+ "description": "Path where to update secret like / or /foo/bar. Default is /",
+ "required": false,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['include_imports'] = {
+ "description": "Whether or not to include imported secrets. Default is false",
+ "required": false,
+ "type": "boolean",
+ "in": "query"
+ }
+ */
const validatedData = await validateRequest(reqValidator.GetSecretsRawV3, req);
let {
query: { secretPath, environment, workspaceId }
@@ -226,6 +263,57 @@ export const getSecretsRaw = async (req: Request, res: Response) => {
* @param res
*/
export const getSecretByNameRaw = async (req: Request, res: Response) => {
+ /*
+ #swagger.summary = 'Get secret'
+ #swagger.description = 'Get secret'
+
+ #swagger.security = [{
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }]
+
+ #swagger.parameters['secretName'] = {
+ "description": "Name of secret to get",
+ "required": true,
+ "type": "string",
+ "in": "path"
+ }
+
+ #swagger.parameters['workspaceId'] = {
+ "description": "ID of workspace where to get secret",
+ "required": true,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['environment'] = {
+ "description": "Slug of environment where to get secret",
+ "required": true,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['secretPath'] = {
+ "description": "Path where to update secret like / or /foo/bar. Default is /",
+ "required": false,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['type'] = {
+ "description": "Type of secret to get; either shared or personal. Default is shared.",
+ "required": true,
+ "type": "string",
+ "in": "query"
+ }
+
+ #swagger.parameters['include_imports'] = {
+ "description": "Whether or not to include imported secrets. Default is false",
+ "required": false,
+ "type": "boolean",
+ "in": "query"
+ }
+ */
const {
query: { secretPath, environment, workspaceId, type, include_imports },
params: { secretName }
@@ -267,12 +355,76 @@ export const getSecretByNameRaw = async (req: Request, res: Response) => {
* @param res
*/
export const createSecretRaw = async (req: Request, res: Response) => {
+ /*
+ #swagger.summary = 'Create secret'
+ #swagger.description = 'Create secret'
+
+ #swagger.security = [{
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }]
+
+ #swagger.parameters['secretName'] = {
+ "description": "Name of secret to create",
+ "required": true,
+ "type": "string",
+ "in": "path"
+ }
+
+ #swagger.requestBody = {
+ content: {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of the workspace where to create secret",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Slug of environment where to create secret",
+ "example": "dev"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Path where to create secret. Default is /",
+ "example": "/foo/bar"
+ },
+ "secretValue": {
+ "type": "string",
+ "description": "Value of secret to create",
+ "example": "Some value"
+ },
+ "secretComment": {
+ "type": "string",
+ "description": "Comment for secret to create",
+ "example": "Some comment"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of secret to create; either shared or personal. Default is shared.",
+ "example": "shared"
+ },
+ "skipMultilineEncoding": {
+ "type": "boolean",
+ "description": "Convert multi line secrets into one line by wrapping",
+ "example": "true"
+ },
+ },
+ "required": ["workspaceId", "environment", "secretValue"]
+ }
+ }
+ }
+ }
+ */
const {
params: { secretName },
body: {
- secretPath,
- environment,
workspaceId,
+ environment,
+ secretPath,
type,
secretValue,
secretComment,
@@ -351,9 +503,68 @@ export const createSecretRaw = async (req: Request, res: Response) => {
* @param res
*/
export const updateSecretByNameRaw = async (req: Request, res: Response) => {
+ /*
+ #swagger.summary = 'Update secret'
+ #swagger.description = 'Update secret'
+
+ #swagger.security = [{
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }]
+
+ #swagger.parameters['secretName'] = {
+ "description": "Name of secret to update",
+ "required": true,
+ "type": "string",
+ "in": "path"
+ }
+
+ #swagger.requestBody = {
+ content: {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of the workspace where to update secret",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Slug of environment where to update secret",
+ "example": "dev"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Path where to update secret like / or /foo/bar. Default is /",
+ "example": "/foo/bar"
+ },
+ "secretValue": {
+ "type": "string",
+ "description": "Value of secret to update to",
+ "example": "Some value"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of secret to update; either shared or personal. Default is shared.",
+ "example": "shared"
+ },
+ "skipMultilineEncoding": {
+ "type": "boolean",
+ "description": "Convert multi line secrets into one line by wrapping",
+ "example": "true"
+ },
+ },
+ "required": ["workspaceId", "environment", "secretValue"]
+ }
+ }
+ }
+ }
+ */
const {
params: { secretName },
- body: { secretValue, environment, secretPath, type, workspaceId, skipMultilineEncoding }
+ body: { workspaceId, environment, secretValue, secretPath, type, skipMultilineEncoding }
} = await validateRequest(reqValidator.UpdateSecretByNameRawV3, req);
await checkSecretsPermission({
@@ -408,6 +619,55 @@ export const updateSecretByNameRaw = async (req: Request, res: Response) => {
* @param res
*/
export const deleteSecretByNameRaw = async (req: Request, res: Response) => {
+ /*
+ #swagger.summary = 'Delete secret'
+ #swagger.description = 'Delete secret'
+
+ #swagger.security = [{
+ "apiKeyAuth": [],
+ "bearerAuth": []
+ }]
+
+ #swagger.parameters['secretName'] = {
+ "description": "Name of secret to delete",
+ "required": true,
+ "type": "string",
+ "in": "path"
+ }
+
+ #swagger.requestBody = {
+ content: {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "workspaceId": {
+ "type": "string",
+ "description": "ID of workspace where to delete secret",
+ "example": "someWorkspaceId"
+ },
+ "environment": {
+ "type": "string",
+ "description": "Slug of Environment where to delete secret",
+ "example": "dev"
+ },
+ "secretPath": {
+ "type": "string",
+ "description": "Path where to delete secret. Default is /",
+ "example": "/foo/bar"
+ },
+ "type": {
+ "type": "string",
+ "description": "Type of secret to delete; either shared or personal. Default is shared",
+ "example": "shared"
+ }
+ },
+ "required": ["workspaceId", "environment"]
+ }
+ }
+ }
+ }
+ */
const {
params: { secretName },
body: { environment, secretPath, type, workspaceId }
@@ -462,7 +722,7 @@ export const getSecrets = async (req: Request, res: Response) => {
query: { environment, workspaceId, include_imports: includeImports }
} = validatedData;
- let {
+ const {
query: { secretPath }
} = validatedData;
diff --git a/backend/swagger/index.ts b/backend/swagger/index.ts
index 14baed46..7fd4094a 100644
--- a/backend/swagger/index.ts
+++ b/backend/swagger/index.ts
@@ -30,13 +30,13 @@ const generateOpenAPISpec = async () => {
type: "http",
scheme: "bearer",
bearerFormat: "JWT",
- description: "This security definition uses the HTTP 'bearer' scheme, which allows the client to authenticate using a JSON Web Token (JWT) that is passed in the Authorization header of the request.",
+ description: "A service token in Infisical",
},
apiKeyAuth: {
type: "apiKey",
in: "header",
name: "X-API-Key",
- description: 'This security definition uses an API key, which is passed in the header of the request as the value of the "X-API-Key" header. The client must provide a valid key in order to access the API.',
+ description: "An API Key in Infisical",
},
},
definitions: {
diff --git a/docs/api-reference/endpoints/environments/list.mdx b/docs/api-reference/endpoints/environments/list.mdx
deleted file mode 100644
index 4a9d9068..00000000
--- a/docs/api-reference/endpoints/environments/list.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "List"
-openapi: "GET /api/v2/workspace/{workspaceId}/environments"
----
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/folders/delete.mdx b/docs/api-reference/endpoints/folders/delete.mdx
index 2147443e..0aacd66e 100644
--- a/docs/api-reference/endpoints/folders/delete.mdx
+++ b/docs/api-reference/endpoints/folders/delete.mdx
@@ -1,4 +1,4 @@
---
title: "Delete"
-openapi: "DELETE /api/v1/folders/{folderId}"
+openapi: "DELETE /api/v1/folders/{folderName}"
---
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/folders/update.mdx b/docs/api-reference/endpoints/folders/update.mdx
index fe8dd6cd..3ceae7fb 100644
--- a/docs/api-reference/endpoints/folders/update.mdx
+++ b/docs/api-reference/endpoints/folders/update.mdx
@@ -1,4 +1,4 @@
---
title: "Update"
-openapi: "PATCH /api/v1/folders/{folderId}"
+openapi: "PATCH /api/v1/folders/{folderName}"
---
\ 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 9f6b6587..16591ca7 100644
--- a/docs/api-reference/endpoints/secrets/create.mdx
+++ b/docs/api-reference/endpoints/secrets/create.mdx
@@ -1,10 +1,8 @@
---
title: "Create"
-openapi: "POST /api/v3/secrets/{secretName}"
+openapi: "POST /api/v3/secrets/raw/{secretName}"
---
- Using this route requires understanding Infisical's system and cryptography.
- You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use
- this endpoint.
+ This endpoint requires you to disable end-to-end encryption. For more information, you should consult this [note](https://infisical.com/docs/api-reference/overview/examples/note).
diff --git a/docs/api-reference/endpoints/secrets/delete.mdx b/docs/api-reference/endpoints/secrets/delete.mdx
index 0ab8e130..c117d5e2 100644
--- a/docs/api-reference/endpoints/secrets/delete.mdx
+++ b/docs/api-reference/endpoints/secrets/delete.mdx
@@ -1,4 +1,8 @@
---
title: "Delete"
-openapi: "DELETE /api/v3/secrets/{secretName}"
----
\ No newline at end of file
+openapi: "DELETE /api/v3/secrets/raw/{secretName}"
+---
+
+
+ This endpoint requires you to disable end-to-end encryption. For more information, you should consult this [note](https://infisical.com/docs/api-reference/overview/examples/note).
+
\ 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 377c6db8..09505762 100644
--- a/docs/api-reference/endpoints/secrets/list.mdx
+++ b/docs/api-reference/endpoints/secrets/list.mdx
@@ -1,11 +1,8 @@
---
title: "List"
-openapi: "GET /api/v3/secrets/"
+openapi: "GET /api/v3/secrets/raw"
---
- Using this route requires understanding Infisical's system and cryptography.
- You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use
- this endpoint.
-
-
+ This endpoint requires you to disable end-to-end encryption. For more information, you should consult this [note](https://infisical.com/docs/api-reference/overview/examples/note).
+
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secrets/read.mdx b/docs/api-reference/endpoints/secrets/read.mdx
index e472efcc..5c423cce 100644
--- a/docs/api-reference/endpoints/secrets/read.mdx
+++ b/docs/api-reference/endpoints/secrets/read.mdx
@@ -1,10 +1,8 @@
---
title: "Retrieve"
-openapi: "GET /api/v3/secrets/{secretName}"
+openapi: "GET /api/v3/secrets/raw/{secretName}"
---
- Using this route requires understanding Infisical's system and cryptography.
- You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use
- this endpoint.
-
+ This endpoint requires you to disable end-to-end encryption. For more information, you should consult this [note](https://infisical.com/docs/api-reference/overview/examples/note).
+
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secrets/rollback-version.mdx b/docs/api-reference/endpoints/secrets/rollback-version.mdx
deleted file mode 100644
index dff577fe..00000000
--- a/docs/api-reference/endpoints/secrets/rollback-version.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Roll Back to Version"
-openapi: "POST /api/v1/secret/{secretId}/secret-versions/rollback"
----
diff --git a/docs/api-reference/endpoints/secrets/update.mdx b/docs/api-reference/endpoints/secrets/update.mdx
index c0bdcb94..3ece203c 100644
--- a/docs/api-reference/endpoints/secrets/update.mdx
+++ b/docs/api-reference/endpoints/secrets/update.mdx
@@ -1,11 +1,8 @@
---
title: "Update"
-openapi: "PATCH /api/v3/secrets/{secretName}"
+openapi: "PATCH /api/v3/secrets/raw/{secretName}"
---
- Using this route requires understanding Infisical's system and cryptography.
- You should consult the [examples](https://infisical.com/docs/api-reference/overview/examples/note) for how to use
- this endpoint.
-
-
+ This endpoint requires you to disable end-to-end encryption. For more information, you should consult this [note](https://infisical.com/docs/api-reference/overview/examples/note).
+
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secrets/versions.mdx b/docs/api-reference/endpoints/secrets/versions.mdx
deleted file mode 100644
index e8693684..00000000
--- a/docs/api-reference/endpoints/secrets/versions.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Get Versions"
-openapi: "GET /api/v1/secret/{secretId}/secret-versions"
----
diff --git a/docs/api-reference/endpoints/workspaces/logs.mdx b/docs/api-reference/endpoints/workspaces/logs.mdx
deleted file mode 100644
index d5921c1c..00000000
--- a/docs/api-reference/endpoints/workspaces/logs.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Get Logs"
-openapi: "GET /api/v1/workspace/{workspaceId}/logs"
----
diff --git a/docs/mint.json b/docs/mint.json
index 35691cb1..b42b0531 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -330,7 +330,6 @@
"api-reference/endpoints/workspaces/update-membership",
"api-reference/endpoints/workspaces/delete-membership",
"api-reference/endpoints/workspaces/workspace-key",
- "api-reference/endpoints/workspaces/logs",
"api-reference/endpoints/workspaces/secret-snapshots",
"api-reference/endpoints/workspaces/rollback-snapshot"
]
@@ -338,7 +337,6 @@
{
"group": "Environments",
"pages": [
- "api-reference/endpoints/environments/list",
"api-reference/endpoints/environments/create",
"api-reference/endpoints/environments/update",
"api-reference/endpoints/environments/delete"
diff --git a/docs/spec.yaml b/docs/spec.yaml
index b1b58134..06441f9c 100644
--- a/docs/spec.yaml
+++ b/docs/spec.yaml
@@ -190,65 +190,6 @@ paths:
version:
type: integer
description: Version of secret snapshot to roll back to
- /api/v1/workspace/{workspaceId}/logs:
- get:
- summary: Return project (audit) logs
- description: Return project (audit) logs
- parameters:
- - name: workspaceId
- in: path
- required: true
- schema:
- type: string
- description: ID of project
- - name: userId
- description: ID of project member
- required: false
- in: query
- schema:
- type: string
- - name: offset
- description: Number of logs to skip
- required: false
- in: query
- schema:
- type: string
- - name: limit
- description: Maximum number of logs to return
- required: false
- in: query
- schema:
- type: string
- - name: sortBy
- description: Order to sort the logs by
- schema:
- type: string
- enum:
- - oldest
- - recent
- required: false
- in: query
- - name: actionNames
- description: Names of log actions (comma-separated)
- required: false
- in: query
- schema:
- type: string
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: object
- properties:
- logs:
- type: array
- items:
- $ref: '#/components/schemas/Log'
- description: Project logs
- security:
- - apiKeyAuth: []
/api/v1/workspace/{workspaceId}/audit-logs:
get:
description: ''
@@ -335,18 +276,6 @@ paths:
description: OK
'400':
description: Bad Request
- /api/v1/action/{actionId}:
- get:
- description: ''
- parameters:
- - name: actionId
- in: path
- required: true
- schema:
- type: string
- responses:
- '200':
- description: OK
/api/v1/organizations/{organizationId}/plans/table:
get:
description: ''
@@ -588,12 +517,47 @@ paths:
responses:
'200':
description: OK
+ /api/v3/api-key/:
+ post:
+ description: ''
+ responses:
+ '200':
+ description: OK
+ /api/v3/api-key/{apiKeyDataId}:
+ patch:
+ description: ''
+ parameters:
+ - name: apiKeyDataId
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
+ delete:
+ description: ''
+ parameters:
+ - name: apiKeyDataId
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
/api/v3/service-token/me/key:
get:
description: ''
responses:
'200':
description: OK
+ /api/v3/service-token/me/token:
+ post:
+ description: ''
+ responses:
+ '200':
+ description: OK
/api/v3/service-token/:
post:
description: ''
@@ -627,6 +591,47 @@ paths:
responses:
'200':
description: OK
+ /api/v1/secret-rotation-providers/{workspaceId}:
+ get:
+ description: ''
+ parameters:
+ - name: workspaceId
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
+ /api/v1/secret-rotations/:
+ post:
+ description: ''
+ responses:
+ '200':
+ description: OK
+ get:
+ description: ''
+ responses:
+ '200':
+ description: OK
+ /api/v1/secret-rotations/restart:
+ post:
+ description: ''
+ responses:
+ '200':
+ description: OK
+ /api/v1/secret-rotations/{id}:
+ delete:
+ description: ''
+ parameters:
+ - name: id
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
/api/v1/signup/email/signup:
post:
description: ''
@@ -671,11 +676,6 @@ paths:
/api/v1/auth/logout:
post:
description: ''
- parameters:
- - name: user-agent
- in: header
- schema:
- type: string
responses:
'200':
description: OK
@@ -1330,6 +1330,18 @@ paths:
responses:
'200':
description: OK
+ /api/v1/integration-auth/{integrationAuthId}/checkly/groups:
+ get:
+ description: ''
+ parameters:
+ - name: integrationAuthId
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
/api/v1/integration-auth/{integrationAuthId}/qovery/orgs:
get:
description: ''
@@ -1464,8 +1476,8 @@ paths:
description: OK
/api/v1/folders/:
post:
- summary: Create a folder
- description: Create a new folder in a specified workspace and environment
+ summary: Create folder
+ description: Create folder
responses:
'200':
description: OK
@@ -1492,6 +1504,7 @@ paths:
description: Unauthorized request. For example, 'Folder Permission Denied'
security:
- apiKeyAuth: []
+ bearerAuth: []
requestBody:
content:
application/json:
@@ -1500,54 +1513,42 @@ paths:
properties:
workspaceId:
type: string
- description: ID of the workspace where the folder will be created
+ description: ID of the workspace where to create folder
example: someWorkspaceId
environment:
type: string
- description: Environment where the folder will reside
+ description: Slug of environment where to create folder
example: production
folderName:
type: string
- description: Name of the folder to be created
+ description: Name of folder to create
example: my_folder
- parentFolderId:
+ directory:
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
+ description: Path where to create folder like / or /foo/bar. Default is /
+ example: /foo/bar
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
+ summary: Get folders
+ description: Get folders
parameters:
- name: workspaceId
- description: ID of the workspace from which the folders are to be fetched
+ description: ID of the workspace where to get folders from
required: true
in: query
schema:
type: string
- name: environment
- description: Environment where the folder is located
+ description: Slug of environment where to get folders from
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
+ - name: directory
+ description: Path where to get fodlers from like / or /foo/bar. Default is /
required: false
in: query
schema:
@@ -1572,42 +1573,24 @@ paths:
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: []
+ bearerAuth: []
/api/v1/folders/{folderName}:
patch:
- summary: Update a folder by ID
- description: >-
- Update the name of a folder in a specified workspace and environment by
- its ID
+ summary: Update folder
+ description: Update folder
parameters:
- name: folderName
in: path
required: true
schema:
type: string
- - name: folderId
- description: ID of the folder to be updated
- required: true
- in: path
- schema:
- type: string
+ description: Name of folder to update
responses:
'200':
description: OK
@@ -1637,6 +1620,7 @@ paths:
description: Unauthorized request. For example, 'Folder Permission Denied'
security:
- apiKeyAuth: []
+ bearerAuth: []
requestBody:
content:
application/json:
@@ -1645,37 +1629,34 @@ paths:
properties:
workspaceId:
type: string
- description: ID of the workspace where the folder is located
+ description: ID of workspace where to update folder
example: someWorkspaceId
environment:
type: string
- description: Environment where the folder is located
+ description: Slug of environment where to update folder
example: production
name:
type: string
- description: New name for the folder
+ description: Name of folder to update to
example: updated_folder_name
+ directory:
+ type: string
+ description: Path where to update folder like / or /foo/bar. Default is /
+ example: /foo/bar
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
+ summary: Delete folder
+ description: Delete folder
parameters:
- name: folderName
in: path
required: true
schema:
type: string
- - name: folderId
- description: ID of the folder to be deleted
- required: true
- in: path
- schema:
- type: string
+ description: Name of folder to delete
responses:
'200':
description: OK
@@ -1705,6 +1686,7 @@ paths:
description: Unauthorized request. For example, 'Folder Permission Denied'
security:
- apiKeyAuth: []
+ bearerAuth: []
requestBody:
content:
application/json:
@@ -1713,12 +1695,16 @@ paths:
properties:
workspaceId:
type: string
- description: ID of the workspace where the folder is located
+ description: ID of the workspace where to delete folder
example: someWorkspaceId
environment:
type: string
- description: Environment where the folder is located
+ description: Slug of environment where to delete folder
example: production
+ directory:
+ type: string
+ description: Path where to delete folder like / or /foo/bar. Default is /
+ example: /foo/bar
required:
- workspaceId
- environment
@@ -1832,7 +1818,7 @@ paths:
/api/v1/secret-imports/:
post:
summary: Create secret import
- description: Create a new secret import for a specified workspace and environment
+ description: Create secret import
responses:
'200':
description: OK
@@ -1859,54 +1845,57 @@ paths:
properties:
workspaceId:
type: string
- description: ID of the workspace where the secret import will be created
+ description: ID of workspace where to create secret import
example: someWorkspaceId
environment:
type: string
- description: Environment to import to
- example: production
- folderId:
+ description: Slug of environment where to create secret import
+ example: dev
+ directory:
type: string
- description: Folder ID. Use root for the root folder.
- example: my_folder
+ description: >-
+ Path where to create secret import like / or /foo/bar.
+ Default is /
+ example: /foo/bar
secretImport:
type: object
properties:
environment:
type: string
- description: Import from environment
+ description: Slug of environment to import from
example: development
secretPath:
type: string
- description: Import from secret path
+ description: Path where to import from like / or /foo/bar.
example: /user/oauth
required:
- workspaceId
- environment
- - folderName
+ - directory
+ - secretImport
get:
- summary: Retrieve secret imports
- description: >-
- Fetches the secret imports based on the workspaceId, environment, and
- folderId
+ summary: Get secret imports
+ description: Get secret imports
parameters:
- name: workspaceId
in: query
- description: ID of the workspace of secret imports to get
+ description: ID of workspace where to get secret imports from
required: true
example: workspace12345
schema:
type: string
- name: environment
in: query
- description: Environment of secret imports to get
+ description: Slug of environment where to get secret imports from
required: true
example: production
schema:
type: string
- - name: folderId
+ - name: directory
in: query
- description: 'ID of the folder containing the secret imports. Default: root'
+ description: >-
+ Path where to get secret imports from like / or /foo/bar. Default is
+ /
required: false
example: folder12345
schema:
@@ -1928,17 +1917,15 @@ paths:
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
+ summary: Update secret import
+ description: Update secret import
parameters:
- name: id
in: path
required: true
schema:
type: string
- description: ID of the secret import to be updated
+ description: ID of secret import to update
example: import12345
responses:
'200':
@@ -1965,18 +1952,18 @@ paths:
properties:
secretImports:
type: array
- description: List of new secret imports
+ description: List of secret imports to update to
items:
type: object
properties:
environment:
type: string
- description: Environment of the secret import
- example: production
+ description: Slug of environment to import from
+ example: dev
secretPath:
type: string
- description: Path of the secret import
- example: /path/to/secret
+ description: Path where to import secrets from like / or /foo/bar
+ example: /foo/bar
required:
- environment
- secretPath
@@ -1991,7 +1978,9 @@ paths:
required: true
schema:
type: string
- description: ID of the secret import
+ description: >-
+ ID of parent secret import document from which to delete secret
+ import
example: 12345abcde
responses:
'200':
@@ -2013,11 +2002,11 @@ paths:
properties:
secretImportEnv:
type: string
- description: Import from environment
+ description: Slug of environment of import to delete
example: someWorkspaceId
secretImportPath:
type: string
- description: Import from secret path
+ description: Path like / or /foo/bar of import to delete
example: production
required:
- id
@@ -2601,8 +2590,14 @@ paths:
description: Projects of organization
security:
- apiKeyAuth: []
- /api/v2/organizations/{organizationId}/service-accounts:
- get:
+ /api/v2/organizations/:
+ post:
+ description: ''
+ responses:
+ '200':
+ description: OK
+ /api/v2/organizations/{organizationId}:
+ delete:
description: ''
parameters:
- name: organizationId
@@ -2613,24 +2608,43 @@ paths:
responses:
'200':
description: OK
- /api/v2/organizations/:
+ /api/v2/workspace/{workspaceId}/memberships:
post:
description: ''
+ parameters:
+ - name: workspaceId
+ in: path
+ required: true
+ schema:
+ type: string
responses:
'200':
description: OK
- /api/v2/organizations/{organizationId}:
- delete:
- description: ''
+ get:
+ summary: Return project memberships
+ description: Return project memberships
parameters:
- - name: organizationId
+ - name: workspaceId
in: path
required: true
schema:
type: string
+ description: ID of project
responses:
'200':
description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ memberships:
+ type: array
+ items:
+ $ref: '#/components/schemas/Membership'
+ description: Memberships of project
+ security:
+ - apiKeyAuth: []
/api/v2/workspace/{workspaceId}/environments:
post:
summary: Create environment
@@ -2641,31 +2655,10 @@ paths:
required: true
schema:
type: string
- description: ID of project
+ description: ID of workspace where to create environment
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:
@@ -2678,25 +2671,25 @@ paths:
properties:
environmentName:
type: string
- description: Name of the environment
+ description: Name of the environment to create
example: development
environmentSlug:
type: string
- description: Slug of the environment
+ description: Slug of environment to create
example: dev-environment
required:
- environmentName
- environmentSlug
put:
- summary: Rename workspace environment
- description: Rename a specific environment within a workspace
+ summary: Update environment
+ description: Update environment
parameters:
- name: workspaceId
in: path
required: true
schema:
type: string
- description: ID of the workspace
+ description: ID of workspace where to update environment
responses:
'200':
description: OK
@@ -2721,6 +2714,8 @@ paths:
type: string
example: staging-renamed
description: Details of the renamed environment
+ security:
+ - apiKeyAuth: []
requestBody:
content:
application/json:
@@ -2729,15 +2724,15 @@ paths:
properties:
environmentName:
type: string
- description: New name for the environment
+ description: Name of environment to update to
example: Staging-Renamed
environmentSlug:
type: string
- description: New slug for the environment
+ description: Slug of environment to update to
example: staging-renamed
oldEnvironmentSlug:
type: string
- description: Current slug of the environment to rename
+ description: Current slug of environment
example: staging-old
required:
- environmentName
@@ -2755,15 +2750,15 @@ paths:
'200':
description: OK
delete:
- summary: Delete workspace environment
- description: Delete a specific environment from a workspace
+ summary: Delete environment
+ description: Delete environment
parameters:
- name: workspaceId
in: path
required: true
schema:
type: string
- description: ID of the workspace
+ description: ID of workspace where to delete environment
responses:
'200':
description: OK
@@ -2784,6 +2779,7 @@ paths:
description: Response after deleting an environment from a workspace
security:
- apiKeyAuth: []
+ bearerAuth: []
requestBody:
content:
application/json:
@@ -2792,8 +2788,8 @@ paths:
properties:
environmentSlug:
type: string
- description: Slug of the environment to delete
- example: dev-environment
+ description: Slug of environment to delete
+ example: dev
required:
- environmentSlug
get:
@@ -2953,32 +2949,6 @@ paths:
responses:
'200':
description: OK
- /api/v2/workspace/{workspaceId}/memberships:
- get:
- summary: Return project memberships
- description: Return project memberships
- 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:
- memberships:
- type: array
- items:
- $ref: '#/components/schemas/Membership'
- description: Memberships of project
- security:
- - apiKeyAuth: []
/api/v2/workspace/{workspaceId}/memberships/{membershipId}:
patch:
summary: Update project membership
@@ -3293,10 +3263,6 @@ paths:
in: query
schema:
type: string
- - name: user-agent
- in: header
- schema:
- type: string
responses:
'200':
description: OK
@@ -3429,55 +3395,237 @@ paths:
description: Bad Request
/api/v3/secrets/raw:
get:
- description: ''
+ summary: List secrets
+ description: List secrets
+ parameters:
+ - name: workspaceId
+ description: ID of workspace where to get secrets from
+ required: true
+ in: query
+ schema:
+ type: string
+ - name: environment
+ description: Slug of environment where to get secrets from
+ required: true
+ in: query
+ schema:
+ type: string
+ - name: secretPath
+ description: Path where to update secret like / or /foo/bar. Default is /
+ required: false
+ in: query
+ schema:
+ type: string
+ - name: include_imports
+ description: Whether or not to include imported secrets. Default is false
+ required: false
+ in: query
+ schema:
+ type: boolean
responses:
'200':
description: OK
+ security:
+ - apiKeyAuth: []
+ bearerAuth: []
/api/v3/secrets/raw/{secretName}:
get:
- description: ''
+ summary: Get secret
+ description: Get secret
parameters:
- name: secretName
in: path
required: true
schema:
type: string
+ description: Name of secret to get
+ - name: workspaceId
+ description: ID of workspace where to get secret
+ required: true
+ in: query
+ schema:
+ type: string
+ - name: environment
+ description: Slug of environment where to get secret
+ required: true
+ in: query
+ schema:
+ type: string
+ - name: secretPath
+ description: Path where to update secret like / or /foo/bar. Default is /
+ required: false
+ in: query
+ schema:
+ type: string
+ - name: type
+ description: Type of secret to get; either shared or personal. Default is shared.
+ required: true
+ in: query
+ schema:
+ type: string
+ - name: include_imports
+ description: Whether or not to include imported secrets. Default is false
+ required: false
+ in: query
+ schema:
+ type: boolean
responses:
'200':
description: OK
+ security:
+ - apiKeyAuth: []
+ bearerAuth: []
post:
- description: ''
+ summary: Create secret
+ description: Create secret
parameters:
- name: secretName
in: path
required: true
schema:
type: string
+ description: Name of secret to create
responses:
'200':
description: OK
+ security:
+ - apiKeyAuth: []
+ bearerAuth: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspaceId:
+ type: string
+ description: ID of the workspace where to create secret
+ example: someWorkspaceId
+ environment:
+ type: string
+ description: Slug of environment where to create secret
+ example: dev
+ secretPath:
+ type: string
+ description: Path where to create secret. Default is /
+ example: /foo/bar
+ secretValue:
+ type: string
+ description: Value of secret to create
+ example: Some value
+ secretComment:
+ type: string
+ description: Comment for secret to create
+ example: Some comment
+ type:
+ type: string
+ description: >-
+ Type of secret to create; either shared or personal. Default
+ is shared.
+ example: shared
+ skipMultilineEncoding:
+ type: boolean
+ description: Convert multi line secrets into one line by wrapping
+ example: 'true'
+ required:
+ - workspaceId
+ - environment
+ - secretValue
patch:
- description: ''
+ summary: Update secret
+ description: Update secret
parameters:
- name: secretName
in: path
required: true
schema:
type: string
+ description: Name of secret to update
responses:
'200':
description: OK
+ security:
+ - apiKeyAuth: []
+ bearerAuth: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspaceId:
+ type: string
+ description: ID of the workspace where to update secret
+ example: someWorkspaceId
+ environment:
+ type: string
+ description: Slug of environment where to update secret
+ example: dev
+ secretPath:
+ type: string
+ description: Path where to update secret like / or /foo/bar. Default is /
+ example: /foo/bar
+ secretValue:
+ type: string
+ description: Value of secret to update to
+ example: Some value
+ type:
+ type: string
+ description: >-
+ Type of secret to update; either shared or personal. Default
+ is shared.
+ example: shared
+ skipMultilineEncoding:
+ type: boolean
+ description: Convert multi line secrets into one line by wrapping
+ example: 'true'
+ required:
+ - workspaceId
+ - environment
+ - secretValue
delete:
- description: ''
+ summary: Delete secret
+ description: Delete secret
parameters:
- name: secretName
in: path
required: true
schema:
type: string
+ description: Name of secret to delete
responses:
'200':
description: OK
+ security:
+ - apiKeyAuth: []
+ bearerAuth: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ workspaceId:
+ type: string
+ description: ID of workspace where to delete secret
+ example: someWorkspaceId
+ environment:
+ type: string
+ description: Slug of Environment where to delete secret
+ example: dev
+ secretPath:
+ type: string
+ description: Path where to delete secret. Default is /
+ example: /foo/bar
+ type:
+ type: string
+ description: >-
+ Type of secret to delete; either shared or personal. Default
+ is shared
+ example: shared
+ required:
+ - workspaceId
+ - environment
/api/v3/secrets/:
get:
description: ''
@@ -3612,6 +3760,12 @@ paths:
description: Bad Request
'403':
description: Forbidden
+ /api/v3/us/me/api-keys:
+ get:
+ description: ''
+ responses:
+ '200':
+ description: OK
/api/status:
get:
description: ''
@@ -4069,15 +4223,9 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
- description: >-
- This security definition uses the HTTP 'bearer' scheme, which allows the
- client to authenticate using a JSON Web Token (JWT) that is passed in
- the Authorization header of the request.
+ description: A service token in Infisical
apiKeyAuth:
type: apiKey
in: header
name: X-API-Key
- description: >-
- This security definition uses an API key, which is passed in the header
- of the request as the value of the "X-API-Key" header. The client must
- provide a valid key in order to access the API.
+ description: An API Key in Infisical