openapi: 3.1.0 info: contact: email: contact@passbolt.com description: >- This is a low-level overview of the API and its endpoints, if you need higher-level guides for interacting with the endpoints, use the Developer guide. license: name: AGPL-3.0 url: https://www.gnu.org/licenses/agpl-3.0.html termsOfService: https://www.passbolt.com/terms title: Passbolt API version: 5.0.0 servers: - url: https://passbolt.local description: API Passbolt paths: /auth/is-authenticated.json: get: summary: Check authentication status. description: Can be used as a session keep-alive. operationId: viewAuthIsAuthenticated security: - gpgCookieAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/auth/is-authenticated.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/auth/is-authenticated.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/is-authenticated.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (GPGAuth) responses: '200': $ref: '#/components/responses/nullBody' '401': $ref: '#/components/responses/authenticationRequired' /auth/jwt/jwks.json: get: summary: Get the JWKs server information. operationId: viewAuthJwtJwks security: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/auth/jwt/jwks.json - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/jwt/jwks.json'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/jwt/jwks.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (JWT) responses: '200': $ref: '#/components/responses/jwks' '404': $ref: '#/components/responses/notFound' /auth/jwt/login.json: post: summary: Login. operationId: authJwtLogin security: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/auth/jwt/login.json \ --header 'Content-Type: application/json' \ --data '{ "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2", "challenge": "-----BEGIN PGP MESSAGE-----" }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/jwt/login.json'; const options = { method: 'POST', body: '{"user_id":"8bb80df5-700c-48ce-b568-85a60fc3c8f2","challenge":"-----BEGIN PGP MESSAGE-----"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/jwt/login.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'user_id' => '8bb80df5-700c-48ce-b568-85a60fc3c8f2', 'challenge' => '-----BEGIN PGP MESSAGE-----' ]), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (JWT) requestBody: $ref: '#/components/requestBodies/login' responses: '200': $ref: '#/components/responses/login' '400': $ref: '#/components/responses/badRequest' /auth/jwt/logout.json: post: summary: Logout. operationId: authJwtLogout security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/auth/jwt/logout.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "refresh_token": "ad71952e-7842-599e-a19e-3a82e6974b23" }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/jwt/logout.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"refresh_token":"ad71952e-7842-599e-a19e-3a82e6974b23"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/jwt/logout.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'refresh_token' => 'ad71952e-7842-599e-a19e-3a82e6974b23' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (JWT) requestBody: $ref: '#/components/requestBodies/logout' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /auth/jwt/refresh.json: post: summary: Refresh access token. operationId: authJwtRefresh security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/auth/jwt/refresh.json \ --header 'Content-Type: application/json' \ --data '{ "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2", "refresh_token": "f8cea352-6bd3-4944-9523-20b31272bef0" }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/jwt/refresh.json'; const options = { method: 'POST', body: '{"user_id":"8bb80df5-700c-48ce-b568-85a60fc3c8f2","refresh_token":"f8cea352-6bd3-4944-9523-20b31272bef0"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/jwt/refresh.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'user_id' => '8bb80df5-700c-48ce-b568-85a60fc3c8f2', 'refresh_token' => 'f8cea352-6bd3-4944-9523-20b31272bef0' ]), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (JWT) requestBody: $ref: '#/components/requestBodies/refresh' responses: '200': $ref: '#/components/responses/refresh' '400': $ref: '#/components/responses/badRequest' /auth/jwt/rsa.json: get: summary: Get the JWT RSA server information. operationId: viewAuthJwtRsa description: | This is not the key to use when encrypting the JWT login challenge. security: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/auth/jwt/rsa.json - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/jwt/rsa.json'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/jwt/rsa.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (JWT) responses: '200': $ref: '#/components/responses/rsa' '404': $ref: '#/components/responses/notFound' /auth/login.json: post: summary: Log in. operationId: authLogin security: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/auth/login.json \ --header 'Content-Type: application/json' \ --data '{ "data": { "gpg_auth": { "keyid": "5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59", "user_token_result": "gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0" } } }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/login.json'; const options = { method: 'POST', body: '{"data":{"gpg_auth":{"keyid":"5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59","user_token_result":"gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0"}}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/login.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'data' => [ 'gpg_auth' => [ 'keyid' => '5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59', 'user_token_result' => 'gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0' ] ] ]), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (GPGAuth) requestBody: $ref: '#/components/requestBodies/authGpg_login' responses: '200': $ref: '#/components/responses/authGpg_login' '400': $ref: '#/components/responses/badRequest' /auth/logout.json: post: summary: Log out. operationId: authLogout security: - gpgCookieAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/auth/logout.json - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/logout.json'; const options = {method: 'POST'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/logout.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (GPGAuth) responses: '200': $ref: '#/components/responses/nullBody' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/missingCsrfToken' /auth/verify.json: get: summary: Get the server's public PGP key. description: Can be used to validate data signature. operationId: viewAuthVerify security: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/auth/verify.json - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/verify.json'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/verify.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (GPGAuth) responses: '200': $ref: '#/components/responses/verify' post: summary: Verify the server's identity. operationId: checkAuthVerify security: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/auth/verify.json \ --header 'Content-Type: application/json' \ --data '{ "data": { "gpg_auth": { "keyid": "5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59", "server_verify_token": "-----BEGIN PGP MESSAGE-----" } } }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/auth/verify.json'; const options = { method: 'POST', body: '{"data":{"gpg_auth":{"keyid":"5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59","server_verify_token":"-----BEGIN PGP MESSAGE-----"}}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/auth/verify.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'data' => [ 'gpg_auth' => [ 'keyid' => '5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59', 'server_verify_token' => '-----BEGIN PGP MESSAGE-----' ] ] ]), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Authentication (GPGAuth) requestBody: $ref: '#/components/requestBodies/verify' responses: '200': $ref: '#/components/responses/stage0' '400': $ref: '#/components/responses/badRequest' /avatars/view/{avatarId}/{avatarFormat}: get: summary: Get an avatar as an image. description: When the avatar doesn't exist, a placeholder image is returned instead. operationId: viewAvatar security: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb49/medium.jpg - lang: JavaScript source: > const url = '{{API_BASE_URL}}/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb48/medium.jpg'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb48/medium.jpg", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Avatars parameters: - $ref: '#/components/parameters/avatarId' - $ref: '#/components/parameters/avatarFormat' responses: '200': $ref: '#/components/responses/view' /comments/{commentId}.json: put: summary: Update a comment. operationId: updateComment security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/comments/41aca4aa-430c-4b60-a1f1-c0de1b52a1ce.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "content": "no comment" }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/comments/41aca4aa-430c-4b60-a1f1-c0de1b52a1ce.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"content":"no comment"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/comments/41aca4aa-430c-4b60-a1f1-c0de1b52a1ce.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'content' => 'no comment' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Comments parameters: - $ref: '#/components/parameters/commentId' requestBody: $ref: '#/components/requestBodies/commentUpdate' responses: '200': $ref: '#/components/responses/update' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' delete: summary: Delete a comment. operationId: deleteComment security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/comments/9149d7d7-e191-41d5-a263-cfccbd775f0b.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/comments/9149d7d7-e191-41d5-a263-cfccbd775f0b.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/comments/9149d7d7-e191-41d5-a263-cfccbd775f0b.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Comments parameters: - $ref: '#/components/parameters/commentId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /comments/resource/{resourceId}.json: get: summary: Get comments for a resource. operationId: indexComments security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Comments parameters: - $ref: '#/components/parameters/resourceId' - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containModifier' responses: '200': $ref: '#/components/responses/index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' post: summary: Add a comment. operationId: addComment security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "content": "no comment" }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"content":"no comment"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'content' => 'no comment' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Comments parameters: - $ref: '#/components/parameters/resourceId' requestBody: $ref: '#/components/requestBodies/commentAdd' responses: '200': $ref: '#/components/responses/add' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /directorysync/synchronize/dry-run.json: get: summary: Simulate directory synchronization without making changes. operationId: simulateSync security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/directorysync/synchronize/dry-run.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/directorysync/synchronize/dry-run.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/directorysync/synchronize/dry-run.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Directory Sync responses: '200': $ref: '#/components/responses/synchronizeAndSimulate' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' /directorysync/synchronize.json: post: summary: Run the directory synchronization. operationId: runSync security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/directorysync/synchronize.json.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ - lang: JavaScript source: | const url = '{{API_BASE_URL}}/directorysync/synchronize.json.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/directorysync/synchronize.json.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Directory Sync responses: '200': $ref: '#/components/responses/synchronizeAndSimulate' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' /favorite/{favoriteId}.json: delete: summary: Unset a resource as favorite. operationId: deleteFavorite security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/favorites/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/favorites/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/favorites/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Favorites parameters: - $ref: '#/components/parameters/favoriteId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /favorite/{foreignModel}/{foreignId}.json: post: summary: Set a resource as favorite. operationId: addFavorite security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/favorites/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' --header 'Content-Type: application/json' \ - lang: JavaScript source: > const url = '{{API_BASE_URL}}/favorites/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = {method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/favorites/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Favorites parameters: - $ref: '#/components/parameters/favoritesForeignModel' - $ref: '#/components/parameters/foreignId' responses: '200': $ref: '#/components/responses/favorites_add' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /folders.json: get: summary: Get multiple folders. operationId: indexFolders security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/folders.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/folders.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/folders.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Folders parameters: - $ref: '#/components/parameters/containChildrenResources' - $ref: '#/components/parameters/containChildrenFolders' - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containCreatorProfile' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containModifierProfile' - $ref: '#/components/parameters/containPermission' - $ref: '#/components/parameters/containPermissions' - $ref: '#/components/parameters/containPermissionsUserProfile' - $ref: '#/components/parameters/containPermissionsGroup' - $ref: '#/components/parameters/filterHasId' - $ref: '#/components/parameters/filterHasParent' - $ref: '#/components/parameters/filterSearch' responses: '200': $ref: '#/components/responses/folders_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Create a folder. description: | > *Encrypted metadata for this item is not supported on all clients.* operationId: addFolder security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/folders.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": "e3dabc04-cfbd-45c1-9f7d-827c61603e20", "metadata_key_type": "shared_key" }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/folders.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": "e3dabc04-cfbd-45c1-9f7d-827c61603e20", "metadata_key_type": "shared_key"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/folders.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'metadata' => '-----BEGIN PGP MESSAGE-----', 'metadata_key_id' => 'e3dabc04-cfbd-45c1-9f7d-827c61603e20', 'metadata_key_type' => 'shared_key' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Folders requestBody: $ref: '#/components/requestBodies/folderAdd' parameters: - $ref: '#/components/parameters/containChildrenResources' - $ref: '#/components/parameters/containChildrenFolders' - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containPermission' - $ref: '#/components/parameters/containPermissions' - $ref: '#/components/parameters/containPermissionsUserProfile' - $ref: '#/components/parameters/containPermissionsGroup' responses: '200': $ref: '#/components/responses/folders_add' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /folders/{folderId}.json: get: summary: Get a folder. operationId: viewFolder security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Folders parameters: - $ref: '#/components/parameters/folderId' - $ref: '#/components/parameters/containChildrenResources' - $ref: '#/components/parameters/containChildrenFolders' - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containCreatorProfile' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containModifierProfile' - $ref: '#/components/parameters/containPermission' - $ref: '#/components/parameters/containPermissions' - $ref: '#/components/parameters/containPermissionsUserProfile' - $ref: '#/components/parameters/containPermissionsGroup' - $ref: '#/components/parameters/filterHasId' responses: '200': $ref: '#/components/responses/folders_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' put: summary: Update a folder. description: > > *Encrypted metadata for this item is not supported on all clients.* The current user must have the “update” or “owner” permission on the folder. operationId: updateFolder x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": "9d9a6672-35d6-4d0f-a807-b90edf25c275", "metadata_key_type": "shared_key", }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"metadata":"-----BEGIN PGP MESSAGE-----","metadata_key_id":"9d9a6672-35d6-4d0f-a807-b90edf25c275","metadata_key_type":"shared_key"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'metadata' => '-----BEGIN PGP MESSAGE-----', 'metadata_key_id' => '9d9a6672-35d6-4d0f-a807-b90edf25c275', 'metadata_key_type' => 'shared_key', ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } security: - bearerHttpAuthentication: [] parameters: - $ref: '#/components/parameters/folderId' - $ref: '#/components/parameters/containChildrenResources' - $ref: '#/components/parameters/containChildrenFolders' - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containPermission' - $ref: '#/components/parameters/containPermissions' - $ref: '#/components/parameters/containPermissionsUserProfile' - $ref: '#/components/parameters/containPermissionsGroup' tags: - Folders requestBody: $ref: '#/components/requestBodies/folderUpdate' responses: '200': $ref: '#/components/responses/folders_update' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' delete: summary: Delete a folder. operationId: deleteFolder x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/folders/b2a72cb2-508c-43ad-b96f-697f7ad21635.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/folders/b2a72cb2-508c-43ad-b96f-697f7ad21635.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/folders/b2a72cb2-508c-43ad-b96f-697f7ad21635.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } security: - bearerHttpAuthentication: [] parameters: - $ref: '#/components/parameters/folderId' - $ref: '#/components/parameters/cascade' tags: - Folders responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /gpgkeys.json: get: summary: Get multiple GPG keys. operationId: indexGpgkeys security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/gpgkeys.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/gpgkeys.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/gpgkeys.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - GPG keys parameters: - $ref: '#/components/parameters/filterModifiedAfter' - $ref: '#/components/parameters/filterIsDeleted' responses: '200': $ref: '#/components/responses/gpgkeys_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /gpgkeys/{gpgkeyId}.json: get: summary: Get a GPG key. operationId: viewGpgkey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/gpgkeys/ed4d9ea6-f354-4a74-ad09-4e1dd69041ec.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/gpgkeys/ed4d9ea6-f354-4a74-ad09-4e1dd69041ec.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/gpgkeys/ed4d9ea6-f354-4a74-ad09-4e1dd69041ec.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } parameters: - $ref: '#/components/parameters/gpgkeyId' tags: - GPG keys responses: '200': $ref: '#/components/responses/gpgkeys_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /groups.json: get: summary: Get multiple groups. operationId: indexGroups security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/groups.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/groups.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups parameters: - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containModifierProfile' - $ref: '#/components/parameters/containMyGroupUser' - $ref: '#/components/parameters/containGroupsUsers' - $ref: '#/components/parameters/containGroupsUsersUser' - $ref: '#/components/parameters/containGroupsUsersUserProfile' - $ref: '#/components/parameters/containGroupsUsersUserGpgkey' - $ref: '#/components/parameters/filterHasUsers' - $ref: '#/components/parameters/filterHasManagers' responses: '200': $ref: '#/components/responses/groups_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Create a group. description: Please note that only users with Admin role can create a group. operationId: addGroup security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/groups.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "name": "Groupe B", "groups_users": [ { "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2", "is_admin": true }] }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/groups.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"name":"Groupe B","groups_users":[{"user_id":"8bb80df5-700c-48ce-b568-85a60fc3c8f2","is_admin":true}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'name' => 'Groupe B', 'groups_users' => [ [ 'user_id' => '8bb80df5-700c-48ce-b568-85a60fc3c8f2', 'is_admin' => true ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups responses: '200': $ref: '#/components/responses/addAndUpdate' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' requestBody: $ref: '#/components/requestBodies/groupAdd' /groups/{groupId}.json: get: summary: Get a group. operationId: viewGroup security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups parameters: - $ref: '#/components/parameters/groupId' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containModifierProfile' - $ref: '#/components/parameters/containUsers' - $ref: '#/components/parameters/containMyGroupUser' - $ref: '#/components/parameters/containGroupsUsers' - $ref: '#/components/parameters/containGroupsUsersUser' - $ref: '#/components/parameters/containGroupsUsersUserProfile' - $ref: '#/components/parameters/containGroupsUsersUserGpgkey' responses: '200': $ref: '#/components/responses/groups_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' put: summary: Update a group. operationId: updateGroup security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: > curl --request PUT \ --url {{API_BASE_URL}}/groups/8fa37ef6-f167-4342-8e1c-3488439cf7d1.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "name": "WRC", "groups_users": [ { "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2", "is_admin": true }, { "id": "3b9b9757-1ccb-444a-a3cf-4090364fac4f", "is_admin": false }, { "id": "1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6", "delete": true } ] }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/groups/8fa37ef6-f167-4342-8e1c-3488439cf7d1.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"name":"WRC","groups_users":[{"user_id":"8bb80df5-700c-48ce-b568-85a60fc3c8f2","is_admin":true},{"id":"3b9b9757-1ccb-444a-a3cf-4090364fac4f","is_admin":false},{"id":"1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6","delete":true}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups/8fa37ef6-f167-4342-8e1c-3488439cf7d1.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'name' => 'WRC', 'groups_users' => [ [ 'user_id' => '8bb80df5-700c-48ce-b568-85a60fc3c8f2', 'is_admin' => true ], [ 'id' => '3b9b9757-1ccb-444a-a3cf-4090364fac4f', 'is_admin' => false ], [ 'id' => '1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6', 'delete' => true ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups parameters: - $ref: '#/components/parameters/groupId' responses: '200': $ref: '#/components/responses/addAndUpdate' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/groupUpdate' delete: summary: Delete a group. description: > Only a group manager or a user with administrator role can delete a group. A group cannot be deleted as long as it is the sole owner of a shared resource or folder. operationId: deleteGroup security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups parameters: - $ref: '#/components/parameters/groupId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /groups/{groupId}/dry-run.json: put: summary: Dry run a group update. operationId: dryRunUpdateGroup security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: > curl --request PUT \ --url {{API_BASE_URL}}/groups/8fa37ef6-f167-4342-8e1c-3488439cf7d1/dry-run.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "name": "WRC", "groups_users": [ { "user_id": "8bb80df5-700c-48ce-b568-85a60fc3c8f2", "is_admin": true } ] }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/groups/8fa37ef6-f167-4342-8e1c-3488439cf7d1/dry-run.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"name":"WRC","groups_users":[{"user_id":"8bb80df5-700c-48ce-b568-85a60fc3c8f2","is_admin":true}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups/8fa37ef6-f167-4342-8e1c-3488439cf7d1/dry-run.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'name' => 'WRC', 'groups_users' => [ [ 'user_id' => '8bb80df5-700c-48ce-b568-85a60fc3c8f2', 'is_admin' => true ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups parameters: - $ref: '#/components/parameters/groupId' responses: '200': $ref: '#/components/responses/updateDryRunSuccess' '400': $ref: '#/components/responses/updateDryRunError' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/groupUpdate' delete: summary: Dry run a group deletion. operationId: dryRunDeleteGroup security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e/dry-run.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e/dry-run.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/groups/164d51b8-d6ce-4d59-b8a0-43869919407e/dry-run.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Groups parameters: - $ref: '#/components/parameters/groupId' responses: '200': $ref: '#/components/responses/emptyArrayBody' '400': $ref: '#/components/responses/deleteDryRun' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /healthcheck.json: get: summary: Get healthcheck information. description: Only administrators can query this endpoint. security: - bearerHttpAuthentication: [] operationId: viewHealthcheck x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/healthcheck.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/healthcheck.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/healthcheck.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Healthcheck responses: '200': $ref: '#/components/responses/healthcheck' '403': $ref: '#/components/responses/authenticationRequired' /healthcheck/status.json: get: summary: Check if passbolt is up. operationId: viewHealthcheckStatus security: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/healthcheck/status.json - lang: JavaScript source: | const url = '{{API_BASE_URL}}/healthcheck/status.json'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/healthcheck/status.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Healthcheck responses: '200': $ref: '#/components/responses/status' /metadata/keys.json: get: summary: Get metadata keys. operationId: indexMetadataKeys security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/keys.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/keys.json'; const options = {method: 'GET', headers: {authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } parameters: - $ref: '#/components/parameters/filterDeleted' - $ref: '#/components/parameters/filterExpired' - $ref: '#/components/parameters/containMetadataPrivateKeys' tags: - Metadata keys responses: '200': $ref: '#/components/responses/addAndIndex' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Create a metadata key. operationId: addMetadataKey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/keys.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "fingerprint": "17B5913BC13128674F2A6F31C79A1AB152C3C573", "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----", "metadata_private_keys": [ { "user_id": null, "data": "-----BEGIN PGP MESSAGE-----" }, { "user_id": "5ea1c453-749b-43ca-8606-b85d63ab137f", "data": "-----BEGIN PGP MESSAGE-----" } ] }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/metadata/keys.json'; const options = { method: 'POST', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"fingerprint":"17B5913BC13128674F2A6F31C79A1AB152C3C573","armored_key":"-----BEGIN PGP PUBLIC KEY BLOCK-----","metadata_private_keys":[{"user_id":null,"data":"-----BEGIN PGP MESSAGE-----"},{"user_id":"5ea1c453-749b-43ca-8606-b85d63ab137f","data":"-----BEGIN PGP MESSAGE-----"}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'fingerprint' => '17B5913BC13128674F2A6F31C79A1AB152C3C573', 'armored_key' => '-----BEGIN PGP PUBLIC KEY BLOCK-----', 'metadata_private_keys' => [ [ 'user_id' => null, 'data' => '-----BEGIN PGP MESSAGE-----' ], [ 'user_id' => '5ea1c453-749b-43ca-8606-b85d63ab137f', 'data' => '-----BEGIN PGP MESSAGE-----' ] ] ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata keys responses: '200': $ref: '#/components/responses/addAndIndex' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' requestBody: $ref: '#/components/requestBodies/metadataKeyAdd' /metadata/keys/{metadataKeyId}.json: put: summary: Mark a metadata key as expired. operationId: updateMetadataKey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/metadata/keys/2e5d88cb-9b04-4010-806c-a449315ae4d5.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "fingerprint": "17B5913BC13128674F2A6F31C79A1AB152C3C573", "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----", "expired": "2025-02-25T09:00:00+00:00" }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/keys/2e5d88cb-9b04-4010-806c-a449315ae4d5.json'; const options = { method: 'PUT', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"fingerprint":"17B5913BC13128674F2A6F31C79A1AB152C3C573","armored_key":"-----BEGIN PGP PUBLIC KEY BLOCK-----","expired":"2025-02-25T09:00:00+00:00"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys/2e5d88cb-9b04-4010-806c-a449315ae4d5.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'fingerprint' => '17B5913BC13128674F2A6F31C79A1AB152C3C573', 'armored_key' => '-----BEGIN PGP PUBLIC KEY BLOCK-----', 'expired' => '2025-02-25T09:00:00+00:00' ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } parameters: - $ref: '#/components/parameters/metadataKeyId' tags: - Metadata keys responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/metadataKeyUpdate' delete: summary: Delete a metadata key. operationId: deleteMetadataKey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/metadata/keys/6c598bc2-8354-4d47-8844-37bae9fed02f.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/keys/6c598bc2-8354-4d47-8844-37bae9fed02f.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys/6c598bc2-8354-4d47-8844-37bae9fed02f.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata keys parameters: - $ref: '#/components/parameters/metadataKeyId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' /metadata/keys/privates.json: post: summary: Create a metadata private key. description: >- Can also be used for sharing a missing private key for one or more users. operationId: addMetadataPrivateKey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/keys/privates.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '[ { "metadata_key_id": "d00efe12-0892-4111-b08a-fb42d9e0a5de", "user_id": "eca7c94a-02ac-4e08-a7e1-035981c34868", "data": "-----BEGIN PGP MESSAGE-----" }, { "metadata_key_id": "7d316bc3-0cca-4b5d-9d77-3eb9c408f9df", "user_id": "4448fee0-2eef-4d47-b221-2101317f60d1", "data": "-----BEGIN PGP MESSAGE-----" } ]' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/metadata/keys/privates.json'; const options = { method: 'POST', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '[{"metadata_key_id":"d00efe12-0892-4111-b08a-fb42d9e0a5de","user_id":"eca7c94a-02ac-4e08-a7e1-035981c34868","data":"-----BEGIN PGP MESSAGE-----"},{"metadata_key_id":"7d316bc3-0cca-4b5d-9d77-3eb9c408f9df","user_id":"4448fee0-2eef-4d47-b221-2101317f60d1","data":"-----BEGIN PGP MESSAGE-----"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys/privates.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ [ 'metadata_key_id' => 'd00efe12-0892-4111-b08a-fb42d9e0a5de', 'user_id' => 'eca7c94a-02ac-4e08-a7e1-035981c34868', 'data' => '-----BEGIN PGP MESSAGE-----' ], [ 'metadata_key_id' => '7d316bc3-0cca-4b5d-9d77-3eb9c408f9df', 'user_id' => '4448fee0-2eef-4d47-b221-2101317f60d1', 'data' => '-----BEGIN PGP MESSAGE-----' ] ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata private keys requestBody: $ref: '#/components/requestBodies/metadataPrivateKeysAdd' responses: '200': $ref: '#/components/responses/emptyBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' /metadata/keys/private/{metadataPrivateKeyId}.json: put: summary: Update a metadata private key. operationId: updateMetadataPrivateKey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/metadata/keys/privates/2e5d88cb-9b04-4010-806c-a449315ae4d5.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "data": "-----BEGIN PGP MESSAGE-----" }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/keys/privates/2e5d88cb-9b04-4010-806c-a449315ae4d5.json'; const options = { method: 'PUT', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"data":"-----BEGIN PGP MESSAGE-----"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys/privates/2e5d88cb-9b04-4010-806c-a449315ae4d5.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'data' => '-----BEGIN PGP MESSAGE-----' ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata private keys parameters: - $ref: '#/components/parameters/metadataPrivateKeyId' requestBody: $ref: '#/components/requestBodies/metadataPrivateKeysUpdate' responses: '200': $ref: '#/components/responses/metadataPrivateKeysUpdate' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /metadata/keys/settings.json: get: summary: Get metadata keys settings. operationId: indexMetadataKeysSettings security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/keys/settings.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/keys/settings.json'; const options = {method: 'GET', headers: {authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys/settings.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata keys responses: '200': $ref: '#/components/responses/indexAndUpdateSettings' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' post: summary: Update metadata keys settings. operationId: updateMetadataKeysSettings security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/keys/settings.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "allow_usage_of_personal_keys": true, "zero_knowledge_key_share": false }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/metadata/keys/settings.json'; const options = { method: 'POST', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"allow_usage_of_personal_keys":true,"zero_knowledge_key_share":false}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/keys/settings.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'allow_usage_of_personal_keys' => null, 'zero_knowledge_key_share' => null ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata keys requestBody: $ref: '#/components/requestBodies/updateMetadataKeysSettings' responses: '200': $ref: '#/components/responses/indexAndUpdateSettings' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /metadata/types/settings.json: get: summary: Get metadata types settings description: >- Get information from the resource types settings, as selected by the administrators. security: - bearerHttpAuthentication: [] operationId: viewMetadataTypesSettings x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/types/settings.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/types/settings.json'; const options = {method: 'GET', headers: {authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/types/settings.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata types settings responses: '200': $ref: '#/components/responses/viewMetadataTypesSettings' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' post: summary: Upgrade a resource types settings description: Administrators can define which resource type is the default operationId: upgradeMetadataTypesSettings security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/types/settings.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "default_resource_types": "v5", "default_folder_type": "v5", "default_tag_type": "v5", "default_comment_type": "v5", "allow_creation_of_v5_resources": true, "allow_creation_of_v5_folders": false, "allow_creation_of_v5_tags": false, "allow_creation_of_v5_comments": false, "allow_creation_of_v4_resources": true, "allow_creation_of_v4_folders": true, "allow_creation_of_v4_tags": true, "allow_creation_of_v4_comments": true, "allow_v5_v4_downgrade": false, "allow_v4_v5_upgrade": true }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/types/settings.json'; const options = { method: 'POST', headers: { authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json' }, body: '{"default_resource_types":"v5","default_folder_type":"v5","default_tag_type":"v5","default_comment_type":"v5","allow_creation_of_v5_resources":true,"allow_creation_of_v5_folders":false,"allow_creation_of_v5_tags":false,"allow_creation_of_v5_comments":false,"allow_creation_of_v4_resources":true,"allow_creation_of_v4_folders":true,"allow_creation_of_v4_tags":true,"allow_creation_of_v4_comments":true,"allow_v5_v4_downgrade":false,"allow_v4_v5_upgrade":true}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}metadata/types/settings.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'default_resource_types' => 'v5', 'default_folder_type' => 'v5', 'default_tag_type' => 'v5', 'default_comment_type' => 'v5', 'allow_creation_of_v5_resources' => null, 'allow_creation_of_v5_folders' => null, 'allow_creation_of_v5_tags' => null, 'allow_creation_of_v5_comments' => null, 'allow_creation_of_v4_resources' => null, 'allow_creation_of_v4_folders' => null, 'allow_creation_of_v4_tags' => null, 'allow_creation_of_v4_comments' => null, 'allow_v5_v4_downgrade' => null, 'allow_v4_v5_upgrade' => null ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata types settings responses: '200': $ref: '#/components/responses/upgradeMetadataTypesSettings' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' requestBody: $ref: '#/components/requestBodies/upgradeMetadataTypesSettings' /metadata/rotate-key/folders.json: get: summary: Get folders with expired keys description: >- See the folders that are using an expired key that needs to/can be rotated. Only administrators can query this endpoint. security: - bearerHttpAuthentication: [] operationId: viewMetadataRotateKeyFolders x-codeSamples: &ref_0 - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/rotate-key/{{MODEL}}.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/rotate-key/{{MODEL}}.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/rotate-key/{{MODEL}}.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata rotate key responses: '200': $ref: '#/components/responses/indexAndAddMetadataRotateKey' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' post: summary: Rotate expired metadata keys for folders description: Rotate the metadata of a given set of folders operationId: rotateMetadataExpiredKeysFolders security: - bearerHttpAuthentication: [] x-codeSamples: &ref_1 - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/rotate-key/{{MODEL}}.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' --header 'content-type: application/json' \ --data '[{ "id": "97f5415f-2e09-4171-a99e-1908e876662a", "metadata_key_id": "9d9a6672-35d6-4d0f-a807-b90edf25c275", "metadata_key_type": "shared_key", "metadata": "-----BEGIN PGP MESSAGE-----", "modified": "2025-02-18T15:52:17+00:00", "modified_by": "ae48ed02-54ea-4be4-9ae8-229bf8c04739" }]' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/metadata/rotate-key/{{MODEL}}.json'; const options = { method: 'POST', headers: { authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json' }, body: '[{"id":"97f5415f-2e09-4171-a99e-1908e876662a","metadata_key_id":"9d9a6672-35d6-4d0f-a807-b90edf25c275","metadata_key_type":"shared_key","metadata":"-----BEGIN PGP MESSAGE-----","modified":"2025-02-18T15:52:17+00:00","modified_by":"ae48ed02-54ea-4be4-9ae8-229bf8c04739"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: > "{{API_BASE_URL}}/metadata/rotate-key/{{MODEL}}.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ [ 'id' => '97f5415f-2e09-4171-a99e-1908e876662a', 'metadata_key_id' => '9d9a6672-35d6-4d0f-a807-b90edf25c275', 'metadata_key_type' => 'shared_key', 'metadata' => '-----BEGIN PGP MESSAGE-----', 'modified' => '2025-02-18T15:52:17+00:00', 'modified_by' => 'ae48ed02-54ea-4be4-9ae8-229bf8c04739' ] ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata rotate key responses: '200': $ref: '#/components/responses/indexAndAddMetadataRotateKey' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/tooManyUpdatedEntities' requestBody: $ref: '#/components/requestBodies/rotateMetadataKeyUpgrade' /metadata/rotate-key/resources.json: get: summary: Get resources with expired keys description: >- See the resources that are using an expired key that needs to/can be rotated. Only administrators can query this endpoint. security: - bearerHttpAuthentication: [] operationId: viewMetadataRotateKeyResources x-codeSamples: *ref_0 tags: - Metadata rotate key responses: '200': $ref: '#/components/responses/indexAndAddMetadataRotateKeyResources' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' post: summary: Rotate expired metadata keys for resources description: Rotate the metadata of a given set of resources operationId: rotateMetadataExpiredKeys security: - bearerHttpAuthentication: [] x-codeSamples: *ref_1 tags: - Metadata rotate key responses: '200': $ref: '#/components/responses/indexAndAddMetadataRotateKeyResources' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/error' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/tooManyUpdatedEntities' requestBody: $ref: '#/components/requestBodies/rotateMetadataKeyUpgrade' /metadata/session-keys.json: get: summary: Get session keys. description: >- Get a list of available encrypted session keys in cache for the given user. security: - bearerHttpAuthentication: [] operationId: viewMetadataSessionKeys x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/session-keys.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/session-keys.json'; const options = {method: 'GET', headers: {authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/session-keys.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata session key responses: '200': $ref: '#/components/responses/metadataSessionKey_index' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Add a session key. security: - bearerHttpAuthentication: [] operationId: addMetadataSessionKey x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/session-keys.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "data": "-----BEGIN PGP MESSAGE-----" }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/metadata/session-keys.json'; const options = { method: 'POST', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"data":"-----BEGIN PGP MESSAGE-----"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/session-keys.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'data' => '-----BEGIN PGP MESSAGE-----' ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata session key requestBody: $ref: '#/components/requestBodies/add' responses: '200': $ref: '#/components/responses/metadataSessionKey_add' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /metadata/session-key/{sessionKeyId}.json: post: summary: Update a given session-key entry. operationId: updateMetadataSessionKey x-codeSamples: - lang: cURL source: > curl --request POST \ --url {{API_BASE_URL}}/metadata/session-keys/1771fe31-2702-427d-9c03-640711c00c71.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "data": "-----BEGIN PGP MESSAGE-----", "modified": "2025-02-18T15:52:17+00:00", }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/session-keys/1771fe31-2702-427d-9c03-640711c00c71.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"data": "-----BEGIN PGP MESSAGE-----", "modified": "2025-02-18T15:52:17+00:00"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/session-keys/1771fe31-2702-427d-9c03-640711c00c71.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'data' => '-----BEGIN PGP MESSAGE-----', 'modified' => '2025-02-18T15:52:17+00:00', ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } security: - bearerHttpAuthentication: [] parameters: - $ref: '#/components/parameters/sessionKeyId' tags: - Metadata session key responses: '200': $ref: '#/components/responses/metadataSessionKey_update' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/modifiedDateIsNotMatching' requestBody: $ref: '#/components/requestBodies/update' delete: summary: Delete a given session-key entry. operationId: deleteSessionKey security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/metadata/session-keys/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/session-keys/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/session-keys/9edeffa4-a4fb-4e6a-b5f8-1ffc3f408335.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata session key parameters: - $ref: '#/components/parameters/sessionKeyId' responses: '200': $ref: '#/components/responses/nullBody' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /metadata/rotate-key/tags.json: get: summary: Get tags with expired keys description: > > *This endpoint is available since version 5.1.* See the tags that are using an expired key that needs to/can be rotated. Only administrators can query this endpoint. security: - bearerHttpAuthentication: [] operationId: viewMetadataRotateKeyTags x-codeSamples: *ref_0 tags: - Metadata rotate key responses: '200': $ref: '#/components/responses/indexAndAddMetadataRotateKeyTags' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' post: summary: Rotate expired metadata keys for tags description: | > *This endpoint is available since version 5.1.* Rotate the metadata key of a given set of tags. operationId: rotateMetadataKeysTags security: - bearerHttpAuthentication: [] x-codeSamples: *ref_1 tags: - Metadata rotate key responses: '200': $ref: '#/components/responses/indexAndAddMetadataRotateKeyTags' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/rotateMetadataKeyUpgradeTags' /metadata/upgrade/folders.json: get: summary: Get Upgradable Folders description: > > *Encrypted metadata for this item is not supported on all clients.* Retrieves a list of folders that are eligible for an upgrade to v5 format. Results are paginated and the page size is fixed at 20. security: - bearerHttpAuthentication: [] operationId: viewMetadataUpgradeFolders x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/upgrade/folders.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/upgrade/folders.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/upgrade/folders.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata upgrade parameters: - $ref: '#/components/parameters/filterIsShared' - $ref: '#/components/parameters/containPermission' responses: '200': $ref: '#/components/responses/upgradeMetadataFolders' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' post: summary: Upgrade a folder description: | > *Encrypted metadata for this item is not supported on all clients.* Upgrade folders that are eligible for an upgrade to v5 format. operationId: upgradeMetadataFolders security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/upgrade/folders.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '[{ "id": "0e840721-58ea-4649-b603-2d9cf4f2213c", "metadata_key_id": "9d9a6672-35d6-4d0f-a807-b90edf25c275", "metadata_key_type": "shared_key", "metadata": "-----BEGIN PGP MESSAGE-----", "modified": "2025-02-18T15:52:17+00:00", "modified_by": "ae48ed02-54ea-4be4-9ae8-229bf8c04739" }]' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/upgrade/folders.json'; const options = { method: 'POST', headers: { authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json' }, body: '[{"id":"0e840721-58ea-4649-b603-2d9cf4f2213c","metadata_key_id":"9d9a6672-35d6-4d0f-a807-b90edf25c275","metadata_key_type":"shared_key","metadata":"-----BEGIN PGP MESSAGE-----","modified":"2025-02-18T15:52:17+00:00","modified_by":"ae48ed02-54ea-4be4-9ae8-229bf8c04739"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/upgrade/folders.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ [ 'id' => '0e840721-58ea-4649-b603-2d9cf4f2213c', 'metadata_key_id' => '9d9a6672-35d6-4d0f-a807-b90edf25c275', 'metadata_key_type' => 'shared_key', 'metadata' => '-----BEGIN PGP MESSAGE-----', 'modified' => '2025-02-18T15:52:17+00:00', 'modified_by' => 'ae48ed02-54ea-4be4-9ae8-229bf8c04739' ] ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata upgrade parameters: - $ref: '#/components/parameters/containPermissions' responses: '200': $ref: '#/components/responses/upgradeMetadataFolders' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/entityWasUpdated' requestBody: $ref: '#/components/requestBodies/upgradeMetadataFolders' /metadata/upgrade/resources.json: get: summary: Get Upgradable Resources description: >- Retrieves a list of resources that are eligible for an upgrade to v5 format. Results are paginated and the page size is fixed at 20. security: - bearerHttpAuthentication: [] operationId: viewMetadataUpgradeResources x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/upgrade/resources.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/upgrade/resources.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/upgrade/resources.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata upgrade parameters: - $ref: '#/components/parameters/filterIsShared' responses: '200': $ref: '#/components/responses/upgradeMetadataResources' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' post: summary: Upgrade a Resource description: Upgrade resources that are eligible for an upgrade to v5 format. operationId: upgradeMetadataResources security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/upgrade/resources.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '[{ "id": "97f5415f-2e09-4171-a99e-1908e876662a", "metadata_key_id": "9d9a6672-35d6-4d0f-a807-b90edf25c275", "metadata_key_type": "shared_key", "metadata": "-----BEGIN PGP MESSAGE-----", "modified": "2025-02-18T15:52:17+00:00", "modified_by": "ae48ed02-54ea-4be4-9ae8-229bf8c04739" }]' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/upgrade/resources.json'; const options = { method: 'POST', headers: { authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json' }, body: '[{"id":"97f5415f-2e09-4171-a99e-1908e876662a","metadata_key_id":"9d9a6672-35d6-4d0f-a807-b90edf25c275","metadata_key_type":"shared_key","metadata":"-----BEGIN PGP MESSAGE-----","modified":"2025-02-18T15:52:17+00:00","modified_by":"ae48ed02-54ea-4be4-9ae8-229bf8c04739"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/upgrade/resources.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ [ 'id' => '97f5415f-2e09-4171-a99e-1908e876662a', 'metadata_key_id' => '9d9a6672-35d6-4d0f-a807-b90edf25c275', 'metadata_key_type' => 'shared_key', 'metadata' => '-----BEGIN PGP MESSAGE-----', 'modified' => '2025-02-18T15:52:17+00:00', 'modified_by' => 'ae48ed02-54ea-4be4-9ae8-229bf8c04739' ] ]), CURLOPT_HTTPHEADER => [ "authorization: {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata upgrade parameters: - $ref: '#/components/parameters/filterIsShared' - $ref: '#/components/parameters/containPermissions' responses: '200': $ref: '#/components/responses/upgradeMetadataResources' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' '409': $ref: '#/components/responses/dateDoesntMatch' requestBody: $ref: '#/components/requestBodies/upgradeMetadataResources' /metadata/upgrade/tags.json: get: summary: Get Upgradable Tags description: > > *This endpoint is available since version 5.1.* > *Encrypted metadata for this item is not supported on all clients.* Retrieves a list of tags that are eligible for an upgrade to v5 format. Results are paginated and the page size is fixed at 20. security: - bearerHttpAuthentication: [] operationId: viewMetadataUpgradeTags x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/metadata/upgrade/tags.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/metadata/upgrade/tags.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/upgrade/tags.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata upgrade parameters: - $ref: '#/components/parameters/filterIsShared' responses: '200': $ref: '#/components/responses/upgradeMetadataTags' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' post: summary: Upgrade a tag description: | > *This endpoint is available since version 5.1.* > *Encrypted metadata for this item is not supported on all clients.* Upgrade tags that are eligible for an upgrade to v5 format. operationId: processeMetadataUpgradeTags security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/metadata/upgrade/tags.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '[ { "id": "52ca9f92-4115-4759-a965-89e6b41b36fd", "metadata_key_id": "edf0a845-94ea-4281-8d45-7d64fa06e894", "metadata_key_type": "shared_key", "metadata": "-----BEGIN PGP MESSAGE-----" } ]' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/metadata/upgrade/tags.json'; const options = { method: 'POST', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '[{"id":"52ca9f92-4115-4759-a965-89e6b41b36fd","metadata_key_id":"edf0a845-94ea-4281-8d45-7d64fa06e894","metadata_key_type":"shared_key","metadata":"-----BEGIN PGP MESSAGE-----"}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/metadata/upgrade/tags.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ [ 'id' => '52ca9f92-4115-4759-a965-89e6b41b36fd', 'metadata_key_id' => 'edf0a845-94ea-4281-8d45-7d64fa06e894', 'metadata_key_type' => 'shared_key', 'metadata' => '-----BEGIN PGP MESSAGE-----' ] ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Metadata upgrade parameters: - $ref: '#/components/parameters/filterIsShared' responses: '200': $ref: '#/components/responses/upgradeMetadataTags' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/upgradeMetadataTags' /mfa/verify/{mfaProviderName}.json: get: summary: Check multi-factor authentication. operationId: mfaVerifyCheck description: > Check if MFA validation is needed. `400` means that this kind of MFA is not required. security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/mfa/verify/totp.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/mfa/verify/totp.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/mfa/verify/totp.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Multi-Factor Authentication parameters: - $ref: '#/components/parameters/mfaProviderName' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Attempt multi-factor authentication. operationId: mfaVerifyAttempt security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/mfa/verify/totp.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "totp": "654373" }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/mfa/verify/totp.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"totp":"654373"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/mfa/verify/totp.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'totp' => '654373' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Multi-Factor Authentication requestBody: $ref: '#/components/requestBodies/attempt' parameters: - $ref: '#/components/parameters/mfaProviderName' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/invalidOtp' '401': $ref: '#/components/responses/authenticationRequired' /mfa/verify/error.json: get: summary: Information about MFA requirements. operationId: mfaVerifyError security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/mfa/verify/error.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/mfa/verify/error.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/mfa/verify/error.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Multi-Factor Authentication responses: '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/error' /move/{foreignModel}/{foreignId}.json: put: summary: Move an element. operationId: moveElement x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/move/folder/162e4717-59a2-439b-86c6-fc651e989939.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "folder_parent_id": "58cd7e9d-1c27-4f67-9266-4156dea94e80" }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/move/folder/162e4717-59a2-439b-86c6-fc651e989939.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"folder_parent_id":"58cd7e9d-1c27-4f67-9266-4156dea94e80"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/move/folder/162e4717-59a2-439b-86c6-fc651e989939.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'folder_parent_id' => '58cd7e9d-1c27-4f67-9266-4156dea94e80' ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } security: - bearerHttpAuthentication: [] parameters: - $ref: '#/components/parameters/moveForeignModel' - $ref: '#/components/parameters/foreignId' tags: - Move responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/move' /permissions/resource/{resourceId}.json: get: summary: Get permissions for a resource. operationId: indexPermissionsResource security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/permissions/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/permissions/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/permissions/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Permissions parameters: - $ref: '#/components/parameters/resourceId' - $ref: '#/components/parameters/containGroup' - $ref: '#/components/parameters/containUser' - $ref: '#/components/parameters/containUserProfile' responses: '200': $ref: '#/components/responses/permissions_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /resources.json: get: summary: Get multiple resources. operationId: indexResources security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/resources.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resources.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resources.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Resources parameters: - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containFavorite' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containSecret' - $ref: '#/components/parameters/containResourceType' - $ref: '#/components/parameters/containPermission' - $ref: '#/components/parameters/containPermissions' - $ref: '#/components/parameters/containPermissionsUserProfile' - $ref: '#/components/parameters/containPermissionsGroup' - $ref: '#/components/parameters/filterIsFavorite' - $ref: '#/components/parameters/filterIsSharedWithGroup' - $ref: '#/components/parameters/filterIsOwnedByMe' - $ref: '#/components/parameters/filterIsSharedWithMe' - $ref: '#/components/parameters/filterHasId' - $ref: '#/components/parameters/filterHasParent' - $ref: '#/components/parameters/filterMetadataKeyType' responses: '200': $ref: '#/components/responses/resources_index' '400': $ref: '#/components/responses/metadataKeyTypeFilterNotValid' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Create a resource. operationId: addResource security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/resources.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": "9d9a6672-35d6-4d0f-a807-b90edf25c275", "metadata_key_type": "shared_key", "expired": null, "folder_parent_id": null, "resource_type_id": "dd1f723d-0d1e-513f-8218-4055dc0530d0", "secrets": ["-----BEGIN PGP MESSAGE-----"] }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/resources.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}', 'Content-Type': 'application/json'}, body: JSON.stringify({ metadata: "-----BEGIN PGP MESSAGE-----", metadata_key_id: "9d9a6672-35d6-4d0f-a807-b90edf25c275", metadata_key_type: "shared_key", expired: null, personal: true, folder_parent_id: null, resource_type_id: "dd1f723d-0d1e-513f-8218-4055dc0530d0", secrets: ["-----BEGIN PGP MESSAGE-----"] }) }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resources.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ "metadata" => "-----BEGIN PGP MESSAGE-----", "metadata_key_id" => "9d9a6672-35d6-4d0f-a807-b90edf25c275", "metadata_key_type" => "shared_key", "expired" => null, "folder_parent_id" => null, "resource_type_id" => "dd1f723d-0d1e-513f-8218-4055dc0530d0", "secrets" => [ "-----BEGIN PGP MESSAGE-----" ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> tags: - Resources responses: '200': $ref: '#/components/responses/resources_addAndUpdate' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' requestBody: $ref: '#/components/requestBodies/resourceAddAndUpdate' /resources/{resourceId}.json: get: summary: Get a resource. operationId: viewResource security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Resources parameters: - $ref: '#/components/parameters/resourceId' - $ref: '#/components/parameters/containCreator' - $ref: '#/components/parameters/containFavorite' - $ref: '#/components/parameters/containModifier' - $ref: '#/components/parameters/containSecret' - $ref: '#/components/parameters/containResourceType' - $ref: '#/components/parameters/containPermission' - $ref: '#/components/parameters/containPermissions' - $ref: '#/components/parameters/containPermissionsUserProfile' - $ref: '#/components/parameters/containPermissionsGroup' responses: '200': $ref: '#/components/responses/resources_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' put: summary: Update a resource. description: > If the password you are updating has been shared with 7 users, the `secrets` key will need to be an array of 7 objects. You must encrypt and sign the new plaintext passwords using the recipient public key and the current user secret key. You can then create a list which include one object per user: the `data` key holds the encrypted plaintext password and `user_id` holds the user UUID. operationId: updateResource x-codeSamples: - lang: cURL source: > curl --request PUT \ --url {{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": "0194fec1-65fa-7b6f-935a-9541c1c13281", "metadata_key_type": "shared_key", "resource_type_id": "4bd2c10d-58bd-4ce3-9082-2513dee924ff", "secrets": [{ "id": "f1b79505-2371-422f-88d8-9c6326806b3d", "data": "-----BEGIN PGP MESSAGE-----" }] }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"metadata":"-----BEGIN PGP MESSAGE-----","metadata_key_id":"0194fec1-65fa-7b6f-935a-9541c1c13281","metadata_key_type":"shared_key","resource_type_id":"4bd2c10d-58bd-4ce3-9082-2513dee924ff","secrets":[{"id":"f1b79505-2371-422f-88d8-9c6326806b3d","data":"-----BEGIN PGP MESSAGE-----"}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'metadata' => '-----BEGIN PGP MESSAGE-----', 'metadata_key_id' => '0194fec1-65fa-7b6f-935a-9541c1c13281', 'metadata_key_type' => 'shared_key', 'resource_type_id' => 'a28a04cd-6f53-518a-967c-9963bf9cec51', 'secrets' => [ [ 'id' => 'f1b79505-2371-422f-88d8-9c6326806b3d', 'data' => '-----BEGIN PGP MESSAGE-----' ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } security: - bearerHttpAuthentication: [] parameters: - $ref: '#/components/parameters/resourceId' tags: - Resources responses: '200': $ref: '#/components/responses/resources_addAndUpdate' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/resourceAddAndUpdate' delete: summary: Delete a resource. operationId: deleteResource x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resources/43051c9f-7122-4887-81e8-3b390cf0f04a.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } security: - bearerHttpAuthentication: [] parameters: - $ref: '#/components/parameters/resourceId' tags: - Resources responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /resource-types.json: get: summary: Get multiple resource types. operationId: resourceTypesIndex security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/resource-types.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resource-types.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resource-types.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Resource types parameters: - $ref: '#/components/parameters/containResourcesCount' - $ref: '#/components/parameters/filterIsDeleted' responses: '200': $ref: '#/components/responses/resourceTypes_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /resource-types/{resourceTypeId}.json: get: summary: Get a resource type. operationId: viewResourceType security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Resource types parameters: - $ref: '#/components/parameters/resourceTypeId' responses: '200': $ref: '#/components/responses/resourceTypes_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' delete: summary: Delete a resource type. operationId: deleteResourceType security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/resource-types/43051c9f-7122-4887-81e8-3b390cf0f04a.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Resource types parameters: - $ref: '#/components/parameters/resourceTypeId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' put: summary: Update resource type. operationId: updateResourceType security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/resource-types/05ba5c75-504d-5ad6-819a-83af68867d86.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' --header 'content-type: application/json' \ --data '{ "deleted": null }' - lang: PHP source: > "{{API_BASE_URL}}/resource-types/05ba5c75-504d-5ad6-819a-83af68867d86.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'deleted' => null ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: JavaScript source: > const url = '{{API_BASE_URL}}/resource-types/05ba5c75-504d-5ad6-819a-83af68867d86.json'; const options = { method: 'PUT', headers: { authorization: 'Bearer {{JWT_TOKEN}', 'content-type': 'application/json' }, body: '{"deleted":null}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } tags: - Resource types parameters: - $ref: '#/components/parameters/resourceTypeId' responses: '200': $ref: '#/components/responses/emptyStringBody' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/resourceUpdate' /roles.json: get: summary: Get multiple roles. operationId: indexRoles security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/roles.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/roles.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/roles.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Roles responses: '200': $ref: '#/components/responses/roles_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /secrets/resource/{resourceId}.json: get: summary: View user's secret for a resource. operationId: viewSecret security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/secrets/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/secrets/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/secrets/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Secrets parameters: - $ref: '#/components/parameters/resourceId' responses: '200': $ref: '#/components/responses/secrets_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /settings.json: get: summary: Get the server settings. operationId: indexSettings security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/settings.json - lang: JavaScript source: | const url = '{{API_BASE_URL}}/settings.json'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/settings.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Settings responses: '200': $ref: '#/components/responses/settings_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /share/{foreignModel}/{foreignId}.json: put: summary: Share a resource or folder. operationId: updateShare security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: > curl --request PUT \ --url {{API_BASE_URL}}/share/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "permissions": [ { "id": "540174b9-90db-458c-ae90-e9a1912cc656", "type": 7 } ] }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/share/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"permissions":[{"id":"540174b9-90db-458c-ae90-e9a1912cc656","type":7}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/share/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'permissions' => [ [ 'id' => '540174b9-90db-458c-ae90-e9a1912cc656', 'type' => 7 ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } parameters: - $ref: '#/components/parameters/sharesForeignModel' - $ref: '#/components/parameters/foreignId' tags: - Shares requestBody: $ref: '#/components/requestBodies/shareUpdate' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/updateError' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /share/search-aros.json: get: summary: Get AROs for sharing. operationId: indexShareAros security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/share/search-aros.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/share/search-aros.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/share/search-aros.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } parameters: - $ref: '#/components/parameters/filterSearch' - $ref: '#/components/parameters/containGroupsUsers' - $ref: '#/components/parameters/containGpgkey' - $ref: '#/components/parameters/containRole' tags: - Shares responses: '200': $ref: '#/components/responses/arosIndex' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /share/simulate/{foreignModel}/{foreignId}.json: post: summary: Simulate sharing a resource or folder. operationId: updateShareDryRun security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/share/simulate/resource/42968631-0c51-4405-9f2d-c6700c5057be.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "permissions": [ { "id": "540174b9-90db-458c-ae90-e9a1912cc656", "delete": true } ] }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/share/simulate/resource/42968631-0c51-4405-9f2d-c6700c5057be.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"permissions":[{"id":"540174b9-90db-458c-ae90-e9a1912cc656","delete":true}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/share/simulate/resource/42968631-0c51-4405-9f2d-c6700c5057be.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'permissions' => [ [ 'id' => '540174b9-90db-458c-ae90-e9a1912cc656', 'delete' => True ] ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } parameters: - $ref: '#/components/parameters/sharesForeignModel' - $ref: '#/components/parameters/foreignId' tags: - Shares requestBody: $ref: '#/components/requestBodies/shareUpdateDryRun' responses: '200': $ref: '#/components/responses/updateDryRun' '400': $ref: '#/components/responses/updateError' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /tags.json: get: summary: Get personal tags and shared tags. description: > > *Encrypted metadata for tags is available since version 5.1, and is not supported on all clients.* operationId: indexTags security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/tags.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/tags.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/tags.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Tags responses: '200': $ref: '#/components/responses/tags_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /tags/{resourceOrTagId}.json: put: summary: Update a tag. operationId: updateTag description: > > *Encrypted metadata for tags is available since version 5.1, and is not supported on all clients.* security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/tags/2e5d88cb-9b04-4010-806c-a449315ae4d5.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": "7902f423-decb-4b09-b5e4-d4136f1813ea", "metadata_key_type": "shared_key", "is_shared": true }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/tags/2e5d88cb-9b04-4010-806c-a449315ae4d5.json'; const options = { method: 'PUT', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"metadata":"-----BEGIN PGP MESSAGE-----","metadata_key_id":"7902f423-decb-4b09-b5e4-d4136f1813ea","metadata_key_type":"shared_key","is_shared":true}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/tags/2e5d88cb-9b04-4010-806c-a449315ae4d5.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'metadata' => '-----BEGIN PGP MESSAGE-----', 'metadata_key_id' => '7902f423-decb-4b09-b5e4-d4136f1813ea', 'metadata_key_type' => 'shared_key', 'is_shared' => true ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Tags parameters: - $ref: '#/components/parameters/resourceOrTagId' requestBody: $ref: '#/components/requestBodies/tags_update' responses: '200': $ref: '#/components/responses/tags_update' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' post: summary: Add tags to a resource. operationId: addTagsResource description: > > *Encrypted metadata for tags is available since version 5.1, and is not supported on all clients.* security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/tags/b4651f60-392d-4af7-b204-0f8d26798b9b.json \ --header 'authorization: Bearer {{JWT_TOKEN}}' \ --header 'content-type: application/json' \ --data '{ "tags": [ { "metadata": "-----BEGIN PGP MESSAGE-----", "metadata_key_id": null, "metadata_key_type": "shared_key", "is_shared": true }, { "id": "4879d401-c242-458d-91a0-dba864c36535" } ] }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/tags/b4651f60-392d-4af7-b204-0f8d26798b9b.json'; const options = { method: 'POST', headers: {authorization: 'Bearer {{JWT_TOKEN}}', 'content-type': 'application/json'}, body: '{"tags":[{"metadata":"-----BEGIN PGP MESSAGE-----","metadata_key_id":null,"metadata_key_type":"shared_key","is_shared":true},{"id":"4879d401-c242-458d-91a0-dba864c36535"}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/tags/b4651f60-392d-4af7-b204-0f8d26798b9b.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'tags' => [ [ 'metadata' => '-----BEGIN PGP MESSAGE-----', 'metadata_key_id' => null, 'metadata_key_type' => 'shared_key', 'is_shared' => null ], [ 'id' => '4879d401-c242-458d-91a0-dba864c36535' ] ] ]), CURLOPT_HTTPHEADER => [ "authorization: Bearer {{JWT_TOKEN}}", "content-type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Tags parameters: - $ref: '#/components/parameters/resourceOrTagId' responses: '200': $ref: '#/components/responses/addResource' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' requestBody: $ref: '#/components/requestBodies/addResource' /users.json: get: summary: Get multiple users. operationId: indexUsers security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/users.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/users.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/users.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Users parameters: - $ref: '#/components/parameters/containLastLoggedIn' - $ref: '#/components/parameters/containGroupsUsers' - $ref: '#/components/parameters/containGpgkey' - $ref: '#/components/parameters/containProfile' - $ref: '#/components/parameters/containRole' - $ref: '#/components/parameters/containMissingMetadataKeyIds' - $ref: '#/components/parameters/filterSearch' - $ref: '#/components/parameters/filterHasGroups' - $ref: '#/components/parameters/filterHasAccess' - $ref: '#/components/parameters/filterIsAdmin' - $ref: '#/components/parameters/filterIsActive' responses: '200': $ref: '#/components/responses/users_index' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' post: summary: Create a user. operationId: addUser description: | Only users with `admin` role can create other users. security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request POST \ --url {{API_BASE_URL}}/users.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "username": "ada@passbolt.com", "profile": { "first_name": "Ada", "last_name": "Lovelace" } }' - lang: JavaScript source: | const url = '{{API_BASE_URL}}/users.json'; const options = { method: 'POST', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"username":"ada@passbolt.com","profile":{"first_name":"Ada","last_name":"Lovelace"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/users.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode([ 'username' => 'ada@passbolt.com', 'profile' => [ 'first_name' => 'Ada', 'last_name' => 'Lovelace' ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Users requestBody: $ref: '#/components/requestBodies/userAdd' responses: '200': $ref: '#/components/responses/users_add' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' /users/{userId}.json: get: summary: Get a user. operationId: viewUser security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request GET \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json'; const options = {method: 'GET', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Users parameters: - $ref: '#/components/parameters/userId' - $ref: '#/components/parameters/containMissingMetadataKeyIds' responses: '200': $ref: '#/components/responses/users_view' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '403': $ref: '#/components/responses/accessRestrictedToAdministrators' '404': $ref: '#/components/responses/notFound' put: summary: Update a user. operationId: updateUser description: > Neither the email or the username field which can be updated, and only administrators can update a user's role. security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request PUT \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' \ --header 'Content-Type: application/json' \ --data '{ "profile": { "first_name": "Freddy", "last_name": "Mercury" } }' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json'; const options = { method: 'PUT', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}, body: '{"profile":{"first_name":"Freddy","last_name":"Mercury"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'profile' => [ 'first_name' => 'Freddy', 'last_name' => 'Mercury' ] ]), CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Users parameters: - $ref: '#/components/parameters/userId' responses: '200': $ref: '#/components/responses/users_update' '400': $ref: '#/components/responses/badRequest' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' requestBody: $ref: '#/components/requestBodies/userUpdate' delete: summary: Delete a user. operationId: deleteUser description: > Only a user with an administrator role can delete users. A `user` can not be deleted as long as: - They are the sole owner of a shared resource. - They are a manager of a non empty group. In this case you will need to transfer the ownership of the shared resources and appoint a new manager to the group in order to proceed. security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Users parameters: - $ref: '#/components/parameters/userId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/delete' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' /users/{userId}/dry-run.json: delete: summary: Dry run a user deletion. operationId: dryRunDeleteUser security: - bearerHttpAuthentication: [] x-codeSamples: - lang: cURL source: | curl --request DELETE \ --url {{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831/dry-run.json \ --header 'Authorization: Bearer {{JWT_TOKEN}}' - lang: JavaScript source: > const url = '{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831/dry-run.json'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer {{JWT_TOKEN}}'}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } - lang: PHP source: | "{{API_BASE_URL}}/users/8c640fd5-268c-4ae0-9e35-2f120cf1a831/dry-run.json", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "DELETE", CURLOPT_HTTPHEADER => [ "Authorization: Bearer {{JWT_TOKEN}}" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } tags: - Users parameters: - $ref: '#/components/parameters/userId' responses: '200': $ref: '#/components/responses/nullBody' '400': $ref: '#/components/responses/users_deleteDryRun' '401': $ref: '#/components/responses/authenticationRequired' '404': $ref: '#/components/responses/notFound' tags: - name: Authentication (GPGAuth) description: > The legacy authentication method, using the GPGAuth protocol. Find more [here](https://www.passbolt.com/docs/development/authentication). - name: Authentication (JWT) description: > JWT-based authentication is the preferred way to interact with the Passbolt API. Find more [here](https://www.passbolt.com/docs/development) - name: Avatars description: Query avatar images. - name: Comments description: Manipulate comments for resources. - name: Directory Sync description: Run directory synchronization. - name: Favorites description: > The favorite endpoints are used to add or remove a `Resource` from your favorites. - name: Folders description: Organize your passwords and share them in bulk using folders. - name: GPG keys description: > In order to encrypt information, the server and the clients needs the user's public keys. These OpenPGP endpoints let you query the saved public key data. - name: Groups description: > Organize users in logical groups to make it easier to share resources with them. - name: Healthcheck description: Gather data about the passbolt instance's health. - name: Metadata keys description: Manipulate metadata keys. - name: Metadata private keys description: Manipulate private keys for metadata. - name: Metadata types settings description: >- Retrieve information about the resource types settings selected by the administrators - name: Metadata rotate key description: Gather information about metadata keys that needs to be rotated - name: Metadata session key description: Gather information on the saved encrypted session keys cache - name: Metadata upgrade description: Upgrading elements to the new v5 metadata format - name: Move description: Move a folder or a resource across folders. - name: Multi-Factor Authentication description: | Complete and validate authentication for users with MFA enabled. - name: Permissions description: Query permissions for resources. - name: Resources description: | A resource holds the metadata for its secrets. - name: Resource types description: > Resource-types are used for describing how and what data is stored for a resource and its associated secrets. - name: Roles description: Different categories of users. - name: Secrets description: Secrets associated to resources. - name: Settings description: Retrieve the server settings - name: Shares description: | Share resources and folders to users with an exhaustive permission system. - name: Tags description: Get tags and add tags to resources to categorize them. - name: Users description: | User are entities with the ability to interact with the application. components: securitySchemes: bearerHttpAuthentication: description: Bearer token using a JWT type: http scheme: Bearer bearerFormat: JWT gpgCookieAuthentication: description: >- Session-based authentication. Note that a CSRF token needs to be provided through a header named `X-CSRF-Token`. type: apiKey in: cookie name: passbolt_session schemas: header: type: object required: - id - status - servertime - action - message - url - code properties: id: type: string format: uuid status: type: string enum: - success - error servertime: type: integer example: 1720702619 action: type: string format: uuid message: type: string example: The operation was successful. url: type: string format: uri example: /auth/verify.json code: type: integer example: 200 jwk: type: object required: - kty - alg - use - e - 'n' properties: kty: type: string alg: type: string use: type: string e: type: string 'n': type: string loginRequest: type: object required: - user_id - challenge properties: user_id: type: string format: uuid challenge: type: string description: '`gpg_encrypt(gpg_sign(challenge_message, user_key), server_key)`' loginResponse: type: object required: - challenge properties: challenge: type: string logout: type: object properties: refresh_token: type: string format: uuid refreshRequest: type: object required: - refresh_token - user_id properties: refresh_token: type: string format: uuid user_id: type: string format: uuid refreshResponse: type: object required: - access_token properties: access_token: type: string format: uuid rsa: type: object required: - keydata properties: keydata: type: string login: type: object required: - data properties: data: type: object required: - gpg_auth properties: gpg_auth: type: object required: - keyid properties: keyid: type: string server_verify_token: type: string description: Used for server key verification. user_token_result: type: string description: Used for client key verification. verify: type: object required: - fingerprint - keydata properties: fingerprint: type: string keydata: type: string commentUpdate: type: object required: - content properties: content: type: string commentView: type: object required: - id - parent_id - foreign_key - foreign_model - content - created - modified - created_by - modified_by - user_id properties: id: type: string format: uuid parent_id: type: string format: uuid foreign_key: type: string format: uuid foreign_model: type: string enum: - Resource content: type: string created: type: string format: date-time modified: type: string format: date-time created_by: type: string format: uuid modified_by: type: string format: uuid user_id: type: string format: uuid children: type: array items: $ref: '#/components/schemas/commentView' modifier: $ref: '#/components/schemas/userIndexAndView' creator: $ref: '#/components/schemas/userIndexAndView' userIndexAndView: type: object required: - id - role_id - username - active - deleted - created - modified - disabled properties: is_mfa_enabled: type: boolean id: type: string format: uuid role_id: type: string format: uuid username: type: string active: type: boolean deleted: type: boolean created: type: string format: date-time modified: type: string format: date-time disabled: type: string format: date-time x-nullable: true profile: type: object required: - id - user_id - first_name - last_name - created - modified - avatar properties: id: type: string format: uuid user_id: type: string format: uuid first_name: type: string last_name: type: string created: type: string format: date-time modified: type: string format: date-time avatar: type: object required: - url properties: id: type: string format: uuid profile_id: type: string format: uuid created: type: string format: date-time modified: type: string format: date-time url: type: object required: - medium - small properties: medium: type: string format: url small: type: string format: url groups_users: $ref: '#/components/schemas/groupsUsersIndexAndView' gpgkey: $ref: '#/components/schemas/gpgkey' x-nullable: true role: $ref: '#/components/schemas/role' missing_metadata_key_ids: type: array items: type: string format: uuid last_logged_in: type: string format: date-time x-nullable: true groupsUsersIndexAndView: type: object required: - id - group_id - user_id - is_admin - created properties: id: type: string format: uuid group_id: type: string format: uuid user_id: type: string format: uuid is_admin: type: boolean created: type: string format: date-time user: $ref: '#/components/schemas/userIndexAndView' gpgkey: type: object required: - id - user_id - armored_key - bits - uid - key_id - fingerprint - type - expires - key_created - deleted - created - modified properties: id: type: string format: uuid user_id: type: string format: uuid armored_key: type: string bits: type: integer uid: type: string key_id: type: string fingerprint: type: string type: type: string enum: - RSA - ECC expires: type: string format: date-time x-nullable: true deleted: type: boolean created: type: string format: date-time modified: type: string format: date-time role: type: object required: - id - name - description - created - modified properties: id: type: string format: uuid name: type: string enum: - admin - guest - user description: type: string created: type: string format: date-time modified: type: string format: date-time commentAdd: allOf: - $ref: '#/components/schemas/commentUpdate' - type: object properties: parent_id: type: string format: uuid synchronizeAndSimulate: type: object required: - users properties: users: type: array items: type: object properties: message: type: string model: type: string data: type: object properties: username: type: string profile: type: object properties: first_name: type: string last_name: type: string user_id: type: string created: type: string format: date-time modified: type: string format: date-time id: type: string format: uuid role_id: type: string format: uuid deleted: type: boolean created: type: string format: date-time modified: type: string format: date-time id: type: string format: uuid last_logged_in: type: string format: date-time x-nullable: true action: type: string status: type: string created: type: string format: date-time version: type: string favorite: type: object required: - id - user_id - foreign_key - foreign_model - created - modified properties: id: type: string format: uuid user_id: type: string format: uuid foreign_key: type: string format: uuid foreign_model: type: string enum: - Resource created: type: string format: date-time modified: type: string format: date-time headerWithPagination: type: object required: - id - status - servertime - action - message - url - code - pagination properties: id: type: string format: uuid status: type: string enum: - success - error servertime: type: integer example: 1720702619 action: type: string format: uuid message: type: string example: The operation was successful. url: type: string format: uri example: /auth/verify.json code: type: integer example: 200 pagination: type: object required: - count - page - limit properties: count: type: integer page: type: integer limit: type: integer x-nullable: true permissionLevel: description: | * `1` - Read * `7` - Update * `15` - Owner type: integer enum: - 1 - 7 - 15 groupIndexAndView: type: object required: - id - name - deleted - created - modified - created_by - modified_by properties: id: type: string format: uuid name: type: string deleted: type: boolean created: type: string format: date-time modified: type: string format: date-time created_by: type: string format: uuid modified_by: type: string format: uuid my_group_user: $ref: '#/components/schemas/groupsUsersIndexAndView' groups_users: type: array items: $ref: '#/components/schemas/groupsUsersIndexAndView' user_count: type: integer permissionIndexAndView: type: object required: - id - aco - aco_foreign_key - aro - aro_foreign_key - type - created - modified properties: id: type: string format: uuid aco: type: string enum: - Resource - Folder aco_foreign_key: type: string format: uuid aro: type: string enum: - User - Group aro_foreign_key: type: string format: uuid type: $ref: '#/components/schemas/permissionLevel' created: type: string format: date-time modified: type: string format: date-time user: $ref: '#/components/schemas/userIndexAndView' x-nullable: true group: $ref: '#/components/schemas/groupIndexAndView' x-nullable: true secretIndex: type: object required: - id - user_id - resource_id - data - created - modified properties: id: type: string format: uuid user_id: type: string format: uuid resource_id: type: string format: uuid data: type: string created: type: string format: date-time modified: type: string format: date-time resourceType: type: object required: - id - slug - name - description - definition - deleted - created - modified properties: id: type: string format: uuid slug: type: string description: > * `password-string` - The original passbolt resource type, where the secret is a non empty string. * `password-and-description` - A resource with the password and the description encrypted. * `totp` - A resource with standalone TOTP fields. * `password-description-totp` - A resource with encrypted password, description and TOTP fields. * `v5-default-with-totp` - The new default resource type with a TOTP introduced with v5. * `v5-password-string (Deprecated)` - The original passbolt resource type, kept for backward compatibility reasons. * `v5-totp-standalone` - The new standalone TOTP resource type introduced with v5. * `v5-default` - The new default resource type introduced with v5. enum: - password-string - password-and-description - totp - password-description-totp - v5-default-with-totp - v5-password-string (Deprecated) - v5-totp-standalone - v5-default name: type: string description: type: string definition: type: object description: Schema for the expected data for this kind of resources. deleted: type: string x-nullable: true created: type: string format: date-time modified: type: string format: date-time resourceV4IndexAndView: type: object required: - id - name - username - uri - description - deleted - created - created_by - modified_by - resource_type_id - expired - folder_parent_id - personal properties: id: type: string format: uuid name: type: string username: type: string uri: type: string description: type: string deleted: type: boolean created: type: string format: date-time created_by: type: string format: uuid modified_by: type: string format: uuid resource_type_id: type: string format: uuid expired: type: string format: date-time x-nullable: true folder_parent_id: type: string format: uuid x-nullable: true personal: type: boolean favorite: $ref: '#/components/schemas/favorite' modifier: $ref: '#/components/schemas/userIndexAndView' creator: $ref: '#/components/schemas/userIndexAndView' secrets: type: array items: $ref: '#/components/schemas/secretIndex' resource_type: $ref: '#/components/schemas/resourceType' permission: $ref: '#/components/schemas/permissionIndexAndView' permissions: type: array items: $ref: '#/components/schemas/permissionIndexAndView' e2eeMetadataBased: type: object required: - metadata - metadata_key_id - metadata_key_type properties: metadata: type: string metadata_key_id: type: string format: uuid metadata_key_type: type: string enum: - user_key - shared_key e2eeMetadataBasedId: allOf: - $ref: '#/components/schemas/e2eeMetadataBased' - type: object required: - id properties: id: type: string format: uuid e2eeMetadataBasedCommon: allOf: - $ref: '#/components/schemas/e2eeMetadataBasedId' - type: object required: - created - modified - created_by - modified_by - personal - folder_parent_id properties: created: type: string format: date-time modified: type: string format: date-time created_by: type: string format: uuid modified_by: type: string format: uuid personal: type: boolean folder_parent_id: type: string format: uuid x-nullable: true modifier: $ref: '#/components/schemas/userIndexAndView' creator: $ref: '#/components/schemas/userIndexAndView' permission: $ref: '#/components/schemas/permissionIndexAndView' permissions: type: array items: $ref: '#/components/schemas/permissionIndexAndView' resourceV5IndexAndView: allOf: - $ref: '#/components/schemas/e2eeMetadataBasedCommon' - type: object required: - resource_type_id - expired properties: resource_type_id: type: string format: uuid expired: type: string format: date-time x-nullable: true favorite: $ref: '#/components/schemas/favorite' secrets: type: array items: type: string resource_type: $ref: '#/components/schemas/resourceType' folderV4IndexAndView: type: object required: - id - name - created - modified - created_by - modified_by - folder_parent_id - personal properties: id: type: string format: uuid name: type: string created: type: string format: date-time modified: type: string format: date-time created_by: type: string format: uuid modified_by: type: string format: uuid folder_parent_id: type: string format: uuid x-nullable: true personal: type: boolean modifier: $ref: '#/components/schemas/userIndexAndView' creator: $ref: '#/components/schemas/userIndexAndView' permission: $ref: '#/components/schemas/permissionIndexAndView' permissions: type: array items: $ref: '#/components/schemas/permissionIndexAndView' children_resources: type: array items: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' children_folders: type: array items: anyOf: - $ref: '#/components/schemas/folderV4IndexAndView' - $ref: '#/components/schemas/folderV5IndexAndView' folderV5IndexAndView: allOf: - $ref: '#/components/schemas/e2eeMetadataBasedCommon' - type: object properties: children_resources: type: array items: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' children_folders: type: array items: anyOf: - $ref: '#/components/schemas/folderV4IndexAndView' - $ref: '#/components/schemas/folderV5IndexAndView' groupAdd: type: object required: - name - groups_users properties: name: type: string groups_users: type: array items: type: object required: - user_id - is_admin properties: user_id: type: string format: uuid is_admin: type: boolean groupUpdate: type: object required: - name - groups_users properties: name: type: string groups_users: type: array items: type: object properties: id: type: string format: uuid description: >- GroupUser relationship ID (required for updating existing users or marking for deletion) user_id: type: string format: uuid description: User ID (required for adding new users to the group) is_admin: type: boolean description: Whether the user is a group administrator delete: type: boolean description: Whether to remove the user from the group secrets: type: array items: type: object required: - resource_id - user_id - data properties: resource_id: type: string format: uuid user_id: type: string format: uuid data: type: string groupUpdateDryRun: type: object required: - dry-run properties: dry-run: type: object required: - SecretsNeeded - Secrets properties: SecretsNeeded: type: array items: type: object required: - Secret properties: Secret: type: object required: - resource_id - user_id properties: resource_id: type: string format: uuid user_id: type: string format: uuid Secrets: type: array items: type: object required: - Secret properties: Secret: type: object required: - id - resource_id - user_id - data properties: id: type: string format: uuid resource_id: type: string format: uuid user_id: type: string format: uuid data: type: string groupDeleteDryRunError: type: object properties: resources: type: object properties: sole_owner: type: array items: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' folders: type: object properties: sole_owner: type: array items: anyOf: - $ref: '#/components/schemas/folderV4IndexAndView' - $ref: '#/components/schemas/folderV5IndexAndView' healthcheck: type: object required: - environment - configFile - core - ssl - smtpSettings - gpg - application - database properties: environment: type: object required: - gnupg - info - phpVersion - nextMinPhpVersion - pcre - mbstring - intl - image - tmpWritable - logWritable properties: gnupg: type: boolean info: type: object required: - phpVersion properties: phpVersion: type: string phpVersion: type: boolean nextMinPhpVersion: type: boolean pcre: type: boolean mbstring: type: boolean intl: type: boolean image: type: boolean tmpWritable: type: boolean logWritable: type: boolean configFile: type: object required: - app - passbolt properties: app: type: boolean passbolt: type: boolean core: type: object required: - cache - debugDisabled - salt - info - fullBaseUrl - validFullBaseUrl - fullBaseUrlReachable properties: cache: type: boolean debugDisabled: type: boolean salt: type: boolean info: type: object required: - fullBaseUrl properties: fullBaseUrl: type: string fullBaseUrl: type: boolean validFullBaseUrl: type: boolean fullBaseUrlReachable: type: boolean ssl: type: object required: - info - peerValid - hostValid - notSelfSigned properties: info: type: string peerValid: type: boolean hostValid: type: boolean notSelfSigned: type: boolean smtpSettings: type: object required: - isEnabled - errorMessage - source - isInDb - areEndpointsDisabled - customSslOptions properties: isEnabled: type: boolean errorMessage: type: boolean source: type: string isInDb: type: boolean areEndpointsDisabled: type: boolean customSslOptions: type: boolean gpg: type: object required: - lib - gpgHome - gpgHomeWritable - gpgKeyNotDefault - gpgKeyPublicBlock - gpgKeyPrivateBlock - gpgKeyPublicReadable - gpgKeyPrivateReadable - gpgKeyPrivateFingerprint - gpgKeyPublic - gpgKeyPrivate - gpgKey - info - gpgKeyPublicFingerprint - gpgKeyPublicInKeyring - gpgKeyPublicEmail - canEncrypt - canSign - canEncryptSign - canDecrypt - canDecryptVerify - canVerify - isPublicServerKeyGopengpgCompatible - isPrivateServerKeyGopengpgCompatible properties: lib: type: boolean gpgHome: type: boolean gpgHomeWritable: type: boolean gpgKeyPublicBlock: type: boolean gpgKeyPrivateBlock: type: boolean gpgKeyPublicReadable: type: boolean gpgKeyPrivateReadable: type: boolean gpgKeyPrivateFingerprint: type: boolean gpgKeyPublic: type: boolean gpgKeyPrivate: type: boolean gpgKey: type: boolean info: type: object required: - gpgKeyPrivate - gpgHome properties: gpgKeyPrivate: type: string gpgHome: type: string gpgKeyPublicFingerprint: type: boolean gpgKeyPublicInKeyring: type: boolean gpgKeyPublicEmail: type: boolean canEncrypt: type: boolean canSign: type: boolean canEncryptSign: type: boolean canDecrypt: type: boolean canDecryptVerify: type: boolean canVerify: type: boolean isPublicServerKeyGopengpgCompatible: type: boolean isPrivateServerKeyGopengpgCompatible: type: boolean application: type: object required: - configPath - info - latestVersion - sslForce - sslFullBaseUrl - seleniumDisabled - robotsIndexDisabled - registrationClosed - hostAvailabilityCheckEnabled - jsProd - emailNotificationEnabled - schema properties: configPath: type: string info: type: object required: - remoteVersion - currentVersion properties: remoteVersion: type: string currentVersion: type: string latestVersion: type: boolean sslForce: type: boolean sslFullBaseUrl: type: boolean seleniumDisabled: type: boolean robotsIndexDisabled: type: boolean registrationClosed: type: object required: - isSelfRegistrationPluginEnabled - selfRegistrationProvider - isRegistrationPublicRemovedFromPassbolt properties: isSelfRegistrationPluginEnabled: type: boolean selfRegistrationProvider: type: string x-nullable: true isRegistrationPublicRemovedFromPassbolt: type: boolean hostAvailabilityCheckEnabled: type: boolean jsProd: type: boolean emailNotificationEnabled: type: boolean schema: type: boolean database: type: object required: - supportedBackend - connect - info - tablesCount - defaultContent properties: supportedBackend: type: boolean connect: type: boolean info: type: object required: - tablesCount properties: tablesCount: type: integer tablesCount: type: boolean defaultContent: type: boolean metadataKeyUpdate: required: - fingerprint - armored_key - expired properties: fingerprint: type: string armored_key: type: string expired: type: string format: date-time e2eeDataOnly: required: - data properties: data: type: string e2eeDataUserId: allOf: - $ref: '#/components/schemas/e2eeDataOnly' - type: object required: - user_id properties: user_id: type: string format: uuid x-nullable: true e2eeIdCreatedDataModifiedUserId: allOf: - $ref: '#/components/schemas/e2eeDataUserId' - type: object required: - id - created - modified properties: id: type: string format: uuid created: type: string format: date-time modified: type: string format: date-time metadataPrivateKeysShortIndex: allOf: - $ref: '#/components/schemas/e2eeDataUserId' - type: object required: - created_by - modified_by properties: created_by: type: string format: uuid x-nullable: true modified_by: type: string format: uuid x-nullable: true user_id: x-nullable: false metadataPrivateKeysIndexAndView: allOf: - $ref: '#/components/schemas/metadataPrivateKeysShortIndex' - type: object required: - id - metadata_key_id - created - modified properties: id: type: string format: uuid metadata_key_id: type: string format: uuid created: type: string format: date-time modified: type: string format: date-time metadataKeysIndexAndView: allOf: - $ref: '#/components/schemas/metadataKeyUpdate' - $ref: '#/components/schemas/e2eeIdCreatedDataModifiedUserId' - type: object required: - deleted - created_by - modified_by properties: user_id: x-nullable: false deleted: type: string format: date-time x-nullable: true created_by: type: string format: uuid x-nullable: true modified_by: type: string format: uuid x-nullable: true metadata_private_keys: type: array items: $ref: '#/components/schemas/metadataPrivateKeysIndexAndView' metadataKeyAdd: type: object required: - armored_key - fingerprint - metadata_private_keys properties: armored_key: type: string fingerprint: type: string metadata_private_keys: type: array items: $ref: '#/components/schemas/e2eeDataUserId' e2eeDataUserIdMetadataKeyId: allOf: - $ref: '#/components/schemas/e2eeDataUserId' - type: object required: - metadata_key_id properties: metadata_key_id: type: string format: uuid metadataPrivateKeysAdd: type: array items: allOf: - $ref: '#/components/schemas/e2eeDataUserIdMetadataKeyId' - properties: user_id: x-nullable: false metadataKeysSettingsIndex: type: object required: - allow_usage_of_personal_keys - zero_knowledge_key_share properties: allow_usage_of_personal_keys: type: boolean zero_knowledge_key_share: type: boolean metadataKeysSettingsUpdate: allOf: - $ref: '#/components/schemas/metadataKeysSettingsIndex' - type: object properties: metadata_private_keys: type: array items: $ref: '#/components/schemas/e2eeDataUserIdMetadataKeyId' metadataTypesSettingsIndexAndView: type: object required: - default_resource_types - default_folder_type - default_tag_type - default_comment_type - allow_creation_of_v5_resources - allow_creation_of_v5_folders - allow_creation_of_v5_tags - allow_creation_of_v5_comments - allow_creation_of_v4_resources - allow_creation_of_v4_folders - allow_creation_of_v4_tags - allow_creation_of_v4_comments - allow_v5_v4_downgrade - allow_v4_v5_upgrade properties: default_resource_types: type: string enum: - v4 - v5 default_folder_type: type: string enum: - v4 - v5 default_tag_type: type: string enum: - v4 - v5 default_comment_type: type: string enum: - v4 - v5 allow_creation_of_v5_resources: type: boolean allow_creation_of_v5_folders: type: boolean allow_creation_of_v5_tags: type: boolean allow_creation_of_v5_comments: type: boolean allow_creation_of_v4_resources: type: boolean allow_creation_of_v4_folders: type: boolean allow_creation_of_v4_tags: type: boolean allow_creation_of_v4_comments: type: boolean allow_v5_v4_downgrade: type: boolean allow_v4_v5_upgrade: type: boolean e2eeMetadataBasedIdModifiedModifiedBy: allOf: - $ref: '#/components/schemas/e2eeMetadataBasedId' - type: object required: - modified - modified_by properties: modified: type: string format: date-time modified_by: type: string format: uuid resourceMetadataRotateKey: allOf: - $ref: '#/components/schemas/e2eeMetadataBasedCommon' - type: object required: - resource_type_id properties: resource_type_id: type: string format: uuid error: type: object required: - mfa_providers properties: mfa_providers: type: array items: type: string enum: - totp - yubikey metadataSessionKeyIndexAndView: allOf: - $ref: '#/components/schemas/e2eeIdCreatedDataModifiedUserId' - type: object properties: user_id: x-nullable: false e2eeDataModified: allOf: - $ref: '#/components/schemas/e2eeDataOnly' - type: object required: - modified properties: modified: type: string format: date-time tagV5MetadataRotateKey: allOf: - $ref: '#/components/schemas/e2eeMetadataBased' - type: object required: - id properties: id: type: string format: uuid tagLegacy: type: object required: - id - slug - is_shared properties: id: type: string format: uuid user_id: type: string format: uuid x-nullable: true slug: type: string is_shared: type: boolean tagV5: allOf: - $ref: '#/components/schemas/e2eeMetadataBasedId' - type: object required: - is_shared properties: is_shared: type: boolean mfaAttempt: anyOf: - type: object required: - totp properties: totp: type: string description: One-time code for TOTP-based MFA. remember: type: integer enum: - 0 - 1 - type: object required: - hotp properties: hotp: type: string description: One-time code for Yubikey-based MFA. remember: type: integer enum: - 0 - 1 invalidOtp: anyOf: - type: object required: - totp properties: totp: type: object properties: numeric: type: string minLength: type: string isValidOtp: type: string - type: object required: - hotp properties: hotp: type: object properties: isValidModhex: type: string isValidHotp: type: string move: type: object required: - folder_parent_id properties: folder_parent_id: type: string format: uuid resourceAddAndUpdate: allOf: - $ref: '#/components/schemas/e2eeMetadataBased' - type: object required: - expired - folder_parent_id - resource_type_id - secrets properties: expired: type: string format: date-time x-nullable: true folder_parent_id: type: string format: uuid x-nullable: true resource_type_id: type: string format: uuid secrets: type: array items: type: string resourceTypeIndex: allOf: - $ref: '#/components/schemas/resourceType' - type: object required: - default properties: default: type: boolean resources_count: type: integer resourceTypeUpdate: type: object properties: deleted: type: boolean x-nullable: true index: type: object required: - app - passbolt properties: app: type: object properties: url: type: string locale: type: string passbolt: type: object properties: legal: type: object properties: privacy_policy: type: object properties: url: type: string x-nullable: true terms: type: object properties: url: type: string edition: type: string plugins: type: object properties: jwtAuthentication: type: object properties: enabled: type: boolean accountRecoveryRequestHelp: type: object properties: enabled: type: boolean accountRecovery: type: object properties: enabled: type: boolean selfRegistration: type: object properties: enabled: type: boolean sso: type: object properties: enabled: type: boolean mfaPolicies: type: object properties: enabled: type: boolean ssoRecover: type: object properties: enabled: type: boolean userPassphrasePolicies: type: object properties: enabled: type: boolean inFormIntegration: type: object properties: enabled: type: boolean metadata: type: object properties: version: type: string enabled: type: boolean locale: type: object properties: options: type: array items: type: object properties: locale: type: string label: type: string rememberMe: type: object properties: options: type: object properties: '300': type: string '900': type: string '1800': type: string '3600': type: string '-1': type: string permissionUpdate: type: object properties: id: type: string format: uuid aro: type: string enum: - User - Group aro_foreign_key: type: string format: uuid type: $ref: '#/components/schemas/permissionLevel' delete: type: boolean is_new: type: boolean secretAdd: type: object required: - data properties: user_id: type: string format: uuid data: type: string resource_id: type: string format: uuid shareUpdate: type: object properties: permissions: type: array items: $ref: '#/components/schemas/permissionUpdate' secrets: description: Not required on simulation. type: array items: $ref: '#/components/schemas/secretAdd' shareUpdateError: type: object properties: permissions: type: array items: type: object properties: aco_forein_key: type: object properties: permission_unique: type: string aco_exists: type: string _existsIn: type: string aro_forein_key: type: object properties: aro_exists: type: string _existsIn: type: string shareAros: oneOf: - $ref: '#/components/schemas/userIndexAndView' - $ref: '#/components/schemas/groupIndexAndView' shareUpdateDryRun: type: object required: - added - removed properties: added: type: array items: type: object properties: User: type: object properties: id: type: string format: uuid removed: type: array items: type: object properties: User: type: object properties: id: type: string format: uuid tagIndexAndView: anyOf: - $ref: '#/components/schemas/tagLegacy' - $ref: '#/components/schemas/tagV5' tagV5Update: allOf: - $ref: '#/components/schemas/e2eeMetadataBased' - type: object required: - is_shared properties: is_shared: type: boolean tagAddResource: anyOf: - type: object required: - id properties: id: type: string format: uuid - $ref: '#/components/schemas/tagV5Update' - type: string userAdd: type: object required: - username - profile properties: username: type: string format: email role_id: type: string format: uuid profile: type: object required: - first_name - last_name properties: first_name: type: string last_name: type: string userUpdate: type: object properties: role_id: type: string format: uuid disabled: type: boolean profile: type: object properties: first_name: type: string last_name: type: string avatar: type: object required: - file properties: file: type: string description: Image file in binary format. userDelete: type: object properties: errors: type: object properties: resources: type: object properties: sole_owner: type: array items: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' userDeleteDryRun: type: object properties: errors: type: object properties: groups: type: object properties: sole_manager: type: array items: $ref: '#/components/schemas/groupIndexAndView' folders: type: object properties: sole_owner: type: array items: $ref: '#/components/schemas/folderV5IndexAndView' resources: type: object properties: sole_owner: type: array items: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' groups_to_delete: type: array items: $ref: '#/components/schemas/groupIndexAndView' responses: nullBody: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: 'null' examples: base: value: header: id: f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a status: success servertime: 1721727753 action: e2aa01a9-84ec-55f8-aaed-24ee23259339 message: url: code: 200 body: null authenticationRequired: description: Authentication required. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: base: value: header: id: f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a status: error servertime: 1721727753 action: e2aa01a9-84ec-55f8-aaed-24ee23259339 message: Authentication is required to continue. url: code: 401 body: '' jwks: description: Operation is successful content: application/json: schema: type: object required: - keys properties: keys: type: array items: $ref: '#/components/schemas/jwk' examples: base: value: keys: - kty: RSA alg: RS256 use: sig e: AQAB 'n': sP0CpKdQJF8KgPD9GOLiCssOhi8qHXp0TyyqkWNGWcZD3JTKuuWJhNn... notFound: description: Not found content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The does not exist. url: code: 404 body: '' login: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/loginResponse' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /auth/jwt/login.json code: 200 body: challenge: '-----BEGIN PGP MESSAGE-----' badRequest: description: Bad request content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: &ref_4 value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: url: code: 400 body: '' refresh: description: Operation is successful. A new refresh token is set via a cookie. headers: Set-Cookie: schema: type: string example: refresh_token=12c9392a-ac65-4ccb-b4b3-2c1854ae66dd; HttpOnly content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/refreshResponse' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /auth/jwt/refresh.json code: 200 body: access_token: 90c0d69c-a508-4cb6-a26c-799e52147ac0 rsa: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/rsa' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /auth/jwt/rsa.json code: 200 body: keydata: '-----BEGIN PUBLIC KEY-----' authGpg_login: description: >- Operation is successful. Additional data is sent through cookie and headers. headers: X-GPGAuth-Progress: schema: type: string enum: - stage1 - stage2 - complete X-GPGAuth-User-Auth-Token: schema: type: string X-GPGAuth-Authenticated: schema: type: boolean Set-Cookie: schema: type: string example: passbolt_session=9vknm8fkbqpgj8i1mnk4st332e; HttpOnly content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: 'null' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /auth/login.json code: 200 body: null missingCsrfToken: description: CSRF token is missing or invalid. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: Missing or incorrect CSRF cookie type. url: /auth/logout.json code: 403 body: '' verify: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/verify' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /auth/verify.json code: 200 body: fingerprint: 5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59 keydata: '-----BEGIN PUBLIC KEY-----' stage0: description: Operation is successful. The decrypted challenge is sent via a header. headers: X-GPGAuth-Verify-Response: schema: type: string example: >- gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0 content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: 'null' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /auth/verify.json code: 200 body: null view: description: Operation is successful content: image/jpeg: schema: type: string format: binary update: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/commentView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The comment was successfully updated. url: /comments/41aca4aa-430c-4b60-a1f1-c0de1b52a1ce.json code: 200 body: id: 41aca4aa-430c-4b60-a1f1-c0de1b52a1ce parent_id: null foreign_key: 42968631-0c51-4405-9f2d-c6700c5057be foreign_model: Resource content: no comment created: '2024-09-05T14:15:47+00:00' modified: '2024-09-05T14:43:22+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 index: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/commentView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json code: 200 body: - id: 41aca4aa-430c-4b60-a1f1-c0de1b52a1ce parent_id: null foreign_key: 42968631-0c51-4405-9f2d-c6700c5057be foreign_model: Resource content: no comment created: '2024-09-05T14:15:47+00:00' modified: '2024-09-05T14:43:22+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 children: [] add: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/commentView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The comment was successfully added. url: /comments/resource/42968631-0c51-4405-9f2d-c6700c5057be.json code: 200 body: id: 41aca4aa-430c-4b60-a1f1-c0de1b52a1ce parent_id: null foreign_key: 42968631-0c51-4405-9f2d-c6700c5057be foreign_model: Resource content: no comment created: '2024-09-05T14:15:47+00:00' modified: '2024-09-05T14:43:22+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 synchronizeAndSimulate: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/synchronizeAndSimulate' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: url: code: 200 body: users: - message: >- The user anakin@passbolt.com was successfully added to passbolt. model: Users data: username: anakin@passbolt.com profile: first_name: Anakin last_name: Skywalker user_id: 5c10147b-c955-4972-be35-39859b107cc6 created: '2025-07-21T14:03:58+00:00' modified: '2025-07-21T14:03:58+00:00' id: c763e974-dcd7-4b76-953b-30fc884821bf role_id: cf4dffa8-5bdf-422b-93ce-d727eceb3ea8 deleted: false created: '2025-07-21T14:03:58+00:00' modified: '2025-07-21T14:03:58+00:00' id: 5c10147b-c955-4972-be35-39859b107cc6 last_logged_in: null action: create status: success created: '2025-07-21T14:03:58+00:00' version: '2' - message: >- The user luke@passbolt.com was successfully added to passbolt. model: Users data: username: luke@passbolt.com profile: first_name: Luke last_name: Skywalker user_id: 5c10147b-c955-4972-be35-39859b107cc6 created: '2025-07-21T14:03:58+00:00' modified: '2025-07-21T14:03:58+00:00' id: c763e974-dcd7-4b76-953b-30fc884821bf role_id: cf4dffa8-5bdf-422b-93ce-d727eceb3ea8 deleted: false created: '2025-07-21T14:03:58+00:00' modified: '2025-07-21T14:03:58+00:00' id: 5c10147b-c955-4972-be35-39859b107cc6 last_logged_in: null action: create status: success created: '2025-07-21T14:03:58+00:00' version: '2' groups: [] accessRestrictedToAdministrators: description: Access restricted content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: value: header: id: f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a status: error servertime: 1721727753 action: e2aa01a9-84ec-55f8-aaed-24ee23259339 message: Access restricted to administrators. url: code: 403 body: '' favorites_add: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/favorite' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The resource was marked as favorite. url: >- /favorites/resource/42968631-0c51-4405-9f2d-c6700c5057be.json code: 200 body: id: 90a25878-a6c1-43c1-a983-68d27f2f0be8 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 foreign_key: 42968631-0c51-4405-9f2d-c6700c5057be foreign_model: Resource created: '2024-08-07T13:39:29+00:00' modified: '2024-08-07T13:39:29+00:00' folders_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: anyOf: - $ref: '#/components/schemas/folderV4IndexAndView' - $ref: '#/components/schemas/folderV5IndexAndView' examples: index: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /folders.json code: 200 pagination: count: 2 page: 1 limit: null body: - id: 162e4717-59a2-439b-86c6-fc651e989939 name: Bob created: '2024-07-08T10:13:20+00:00' modified: '2024-07-08T10:13:20+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 folder_parent_id: null personal: true - id: 9eb60ab8-afb9-4daa-bd38-35c7926da577 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: cc8140b3-6ecb-40b5-a977-a5eece53806c metadata_key_type: shared_key created: '2021-04-30T05:56:06+00:00' modified: '2021-04-30T05:56:06+00:00' created_by: f848277c-5398-58f8-a82a-72397af2d450 modified_by: f848277c-5398-58f8-a82a-72397af2d450 folder_parent_id: null personal: true folders_add: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/folderV5IndexAndView' examples: index: &ref_2 value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /folders/27605bac-8aa8-4fe4-a80b-486d8b76c748.json code: 200 body: id: 27605bac-8aa8-4fe4-a80b-486d8b76c748 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: dd1f723d-0d1e-513f-8218-4055dc0530d0 metadata_key_type: shared_key created: '2025-02-19T13:50:53+00:00' modified: '2025-02-19T13:50:53+00:00' created_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 modified_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 folder_parent_id: null personal: true folders_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: anyOf: - $ref: '#/components/schemas/folderV4IndexAndView' - $ref: '#/components/schemas/folderV5IndexAndView' examples: index: *ref_2 folders_update: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/folderV5IndexAndView' examples: index: *ref_2 gpgkeys_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/gpgkey' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /gpgkeys.json code: 200 pagination: count: 1 page: 1 limit: null body: - id: ed4d9ea6-f354-4a74-ad09-4e1dd69041ec user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' bits: 3072 uid: Ada Lovelace key_id: D277E7A2E45418A0 fingerprint: 850C6BDE59E9F126BFB4683BD277E7A2E45418A0 type: RSA expires: null key_created: '2024-07-03T12:53:13+00:00' deleted: false created: '2024-07-03T12:53:52+00:00' modified: '2024-07-03T12:53:52+00:00' gpgkeys_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/gpgkey' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /gpgkeys/ed4d9ea6-f354-4a74-ad09-4e1dd69041ec.json code: 200 body: id: ed4d9ea6-f354-4a74-ad09-4e1dd69041ec user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' bits: 3072 uid: Ada Lovelace key_id: D277E7A2E45418A0 fingerprint: 850C6BDE59E9F126BFB4683BD277E7A2E45418A0 type: RSA expires: null key_created: '2024-07-03T12:53:13+00:00' deleted: false created: '2024-07-03T12:53:52+00:00' modified: '2024-07-03T12:53:52+00:00' groups_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/groupIndexAndView' examples: base: summary: Base without any extra data value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups.json code: 200 body: - id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc name: Groupe B deleted: true created: '2024-07-08T10:13:20+00:00' modified: '2024-07-08T10:13:20+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 withGroupsUsersProfiles: summary: Groups index with users profile value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups.json code: 200 body: - id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc name: Groupe B deleted: true created: '2024-07-08T10:13:20+00:00' modified: '2024-07-08T10:13:20+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 groups_users: - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f group_id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true created: '2024-07-22T16:01:07+00:00' user: id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 role_id: 639b50cf-66f9-4b23-8d55-d0609710cd9d username: ada@passbolt.com active: true deleted: false created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' disabled: null profile: id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 first_name: Ada last_name: Lovelace created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' last_logged_in: null addAndUpdate: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/groupIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups.json code: 200 body: id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc name: Groupe B deleted: false created: '2024-07-08T10:13:20+00:00' modified: '2024-07-08T10:13:20+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 groups_users: - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f group_id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true created: '2024-07-22T16:01:07+00:00' groups_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/groupIndexAndView' examples: base: summary: Base without any extra data value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups.json code: 200 body: id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc name: Groupe B deleted: true created: '2024-07-08T10:13:20+00:00' modified: '2024-07-08T10:13:20+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 withGroupsUsersProfiles: summary: Groups index with users profile value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups.json code: 200 body: id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc name: Groupe B deleted: true created: '2024-07-08T10:13:20+00:00' modified: '2024-07-08T10:13:20+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 groups_users: - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f group_id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true created: '2024-07-22T16:01:07+00:00' user: id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 role_id: 639b50cf-66f9-4b23-8d55-d0609710cd9d username: ada@passbolt.com active: true deleted: false created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' disabled: null profile: id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 first_name: Ada last_name: Lovelace created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' last_logged_in: null updateDryRunSuccess: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/groupUpdateDryRun' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc/dry-run.json code: 200 body: dry-run: SecretsNeeded: [] Secrets: [] updateDryRunError: description: The dry-run failed. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/groupUpdateDryRun' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc/dry-run.json code: 200 body: dry-run: SecretsNeeded: - Secret: resource_id: a736a8aa-7cfe-4466-8294-d130ee23ef88 user_id: 8c640fd5-268c-4ae0-9e35-2f120cf1a831 Secrets: - Secret: resource_id: a736a8aa-7cfe-4466-8294-d130ee23ef88 data: '-----BEGIN PGP MESSAGE-----' emptyArrayBody: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: type: object examples: base: value: header: id: f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a status: success servertime: 1721727753 action: e2aa01a9-84ec-55f8-aaed-24ee23259339 message: url: code: 200 body: [] deleteDryRun: description: The dry-run failed. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/groupDeleteDryRunError' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: >- The group cannot be deleted. The group should not be sole owner of shared content, transfer the ownership to other users. url: /groups/8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc/dry-run.json code: 400 body: errors: resources: sole_owner: - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 expired: null folder_parent_id: null personal: false permissions: - id: 836b7e69-578a-4bd6-aee5-ee23b5753f52 aco: Resource aco_foreign_key: a736a8aa-7cfe-4466-8294-d130ee23ef88 aro: Group aro_foreign_key: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc type: 15 created: '2024-07-22T16:01:25+00:00' modified: '2024-07-31T12:59:28+00:00' group: id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc name: WRC deleted: false created: '2024-07-22T16:01:07+00:00' modified: '2024-07-22T16:01:07+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 user: null healthcheck: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/healthcheck' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /healthcheck.json code: 200 body: environment: gnupg: true info: phpVersion: 8.2.20 phpVersion: true nextMinPhpVersion: true pcre: true mbstring: true intl: true image: true tmpWritable: true logWritable: true configFile: app: true passbolt: false core: cache: true debugDisabled: false salt: true info: fullBaseUrl: https://passbolt.localhost fullBaseUrl: true validFullBaseUrl: true fullBaseUrlReachable: true ssl: info: >- cURL Error (60) SSL certificate problem: self-signed certificate peerValid: false hostValid: false notSelfSigned: false smtpSettings: isEnabled: true errorMessage: false source: env variables isInDb: false areEndpointsDisabled: false customSslOptions: true gpg: lib: true gpgHome: true gpgHomeWritable: true gpgKeyNotDefault: true gpgKeyPublicBlock: true gpgKeyPrivateBlock: true gpgKeyPublicReadable: true gpgKeyPrivateReadable: true gpgKeyPrivateFingerprint: true gpgKeyPublic: true gpgKeyPrivate: true gpgKey: true info: gpgKeyPrivate: /etc/passbolt/gpg/serverkey_private.asc gpgHome: /var/lib/passbolt/.gnupg gpgKeyPublicFingerprint: true gpgKeyPublicInKeyring: true gpgKeyPublicEmail: true canEncrypt: true canSign: true canEncryptSign: true canDecrypt: true canDecryptVerify: true canVerify: true isPublicServerKeyGopengpgCompatible: true isPrivateServerKeyGopengpgCompatible: true applications: configPath: /etc/passbolt/passbolt.php info: remoteVersion: 4.9.1 currentVersion: 4.9.0 latestVersion: false sslForce: false sslFullBaseUrl: true seleniumDisabled: true robotsIndexDisabled: true registrationClosed: isSelfRegistrationPluginEnabled: true selfRegistrationProvider: null isRegistrationPublicRemovedFromPassbolt: true hostAvailabilityCheckEnabled: false jsProd: true emailNotificationEnabled: false schema: true database: supportedBackend: true connect: true info: tablesCount: 31 tablesCount: true defaultContent: true status: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: OK url: /healthcheck/status.json code: 200 body: OK addAndIndex: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/metadataKeysIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1739979997 action: e38db0b5-838d-5f43-8609-92a25843e9d3 message: OK url: /metadata/keys.json?contain%5Bmetadata_private_keys%5D=1 code: 200 body: - id: 2e5d88cb-9b04-4010-806c-a449315ae4d5 fingerprint: 17B5913BC13128674F2A6F31C79A1AB152C3C573 armored_key: |+ -----BEGIN PGP PUBLIC KEY BLOCK----- created: '2025-02-03T09:10:47+00:00' modified: '2025-02-03T09:10:47+00:00' created_by: 5ea1c453-749b-43ca-8606-b85d63ab137f modified_by: 5ea1c453-749b-43ca-8606-b85d63ab137f expired: null deleted: null metadata_private_keys: - metadata_key_id: 2e5d88cb-9b04-4010-806c-a449315ae4d5 user_id: 5ea1c453-749b-43ca-8606-b85d63ab137f data: |+ -----BEGIN PGP MESSAGE----- created: '2025-02-03T09:10:47+00:00' modified: '2025-02-03T09:10:47+00:00' created_by: 5ea1c453-749b-43ca-8606-b85d63ab137f modified_by: 5ea1c453-749b-43ca-8606-b85d63ab137f emptyBody: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: object examples: base: value: header: id: f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a status: success servertime: 1721727753 action: e2aa01a9-84ec-55f8-aaed-24ee23259339 message: url: code: 200 body: {} metadataPrivateKeysUpdate: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/metadataPrivateKeysShortIndex' examples: base: value: user_id: eca7c94a-02ac-4e08-a7e1-035981c34868 data: '-----BEGIN PGP MESSAGE-----' created_by: eca7c94a-02ac-4e08-a7e1-035981c34868 modified_by: 4448fee0-2eef-4d47-b221-2101317f60d1 indexAndUpdateSettings: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/metadataKeysSettingsIndex' examples: base: value: header: id: 1911b18b-cf68-48cf-b69f-ec9dba39aff4 status: success servertime: 1740413047 action: b20e3cc2-e4ea-5b42-804b-7edc9878ef3d message: The operation was successful. url: /metadata/keys/settings.json code: 200 body: allow_usage_of_personal_keys: true zero_knowledge_key_share: false viewMetadataTypesSettings: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/metadataTypesSettingsIndexAndView' examples: base: &ref_3 value: header: id: 0b2c4b00-561b-4d37-a27d-7499dc659b5f status: success servertime: 1740387841 action: 11ffb449-cd7d-5dc0-8dae-501ef3c9e8a7 message: The operation was successful. url: /metadata/types/settings.json code: 200 body: default_resource_types: v5 default_folder_type: v4 default_tag_type: v4 default_comment_type: v4 allow_creation_of_v5_resources: true allow_creation_of_v5_folders: false allow_creation_of_v5_tags: false allow_creation_of_v5_comments: false allow_creation_of_v4_resources: true allow_creation_of_v4_folders: true allow_creation_of_v4_tags: true allow_creation_of_v4_comments: true allow_v5_v4_downgrade: false allow_v4_v5_upgrade: true upgradeMetadataTypesSettings: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/metadataTypesSettingsIndexAndView' examples: base: *ref_3 indexAndAddMetadataRotateKey: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/e2eeMetadataBasedCommon' examples: base: value: header: id: 26c1344a-22ef-4c49-90a0-130a9c82a648 status: success servertime: 1740143504 action: c5969bdd-018f-552b-b20d-01636766a81f message: The operation was successful. url: /metadata/rotate-key/{{MODEL}}.json code: 200 pagination: count: 0 page: 1 limit: 20 body: - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key modified: '2024-07-08T08:06:25+00:00' created: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 deleted: false expired: null folder_parent_id: null personal: true tooManyUpdatedEntities: description: One or more entities were updated content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: One or more entities were updated. url: code: 409 body: '' indexAndAddMetadataRotateKeyResources: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/resourceMetadataRotateKey' examples: base: value: header: id: 26c1344a-22ef-4c49-90a0-130a9c82a648 status: success servertime: 1740143504 action: c5969bdd-018f-552b-b20d-01636766a81f message: The operation was successful. url: /metadata/rotate-key/resources.json code: 200 pagination: count: 0 page: 1 limit: 20 body: - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key modified: '2024-07-08T08:06:25+00:00' created: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 deleted: false expired: null folder_parent_id: null personal: true error: description: MFA is required. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/error' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: MFA authentication is required. url: /mfa/verify/error.json code: 403 body: mfa_providers: - totp metadataSessionKey_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/metadataSessionKeyIndexAndView' examples: base: value: header: id: 26c1344a-22ef-4c49-90a0-130a9c82a648 status: success servertime: 1740143504 action: c5969bdd-018f-552b-b20d-01636766a81f message: The operation was successful. url: /metadata/session-keys.json code: 200 body: - id: 922216c5-fa6c-4487-9e4c-b2a9215f7f17 user_id: bf5dc039-314d-4ac1-938f-c1ad8331e28a data: '-----BEGIN PGP MESSAGE-----' created: '2025-01-18T15:52:17+00:00' modified: '2025-02-18T15:52:17+00:00' metadataSessionKey_add: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/metadataSessionKeyIndexAndView' examples: base: value: header: id: 26c1344a-22ef-4c49-90a0-130a9c82a648 status: success servertime: 1740143504 action: c36e894d-ed63-5434-aa70-4b777f9fdf32 message: The operation was successful. url: /metadata/session-keys.json code: 200 body: id: 5ea1c453-749b-43ca-8606-b85d63ab137f user_id: bf5dc039-314d-4ac1-938f-c1ad8331e28a data: '-----BEGIN PGP MESSAGE-----' created: '2025-03-05T14:22:33+00:00' modified: '2025-03-05T14:22:33+00:00' metadataSessionKey_update: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/e2eeDataModified' examples: base: value: header: id: 26c1344a-22ef-4c49-90a0-130a9c82a648 status: success servertime: 1740143504 action: c5969bdd-018f-552b-b20d-01636766a81f message: The operation was successful. url: /metadata/session-keys/16c1344a-33ae-4c49-90a0-130a9c82a091 code: 200 body: data: '----BEGIN PGP MESSAGE-----' modified: '2025-02-18T15:52:17+00:00' modifiedDateIsNotMatching: description: The modified date is not equal to the persisted session key one content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: url: code: 409 body: '' indexAndAddMetadataRotateKeyTags: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/tagV5MetadataRotateKey' examples: base: value: header: id: 26c1344a-22ef-4c49-90a0-130a9c82a648 status: success servertime: 1740143504 action: c5969bdd-018f-552b-b20d-01636766a81f message: The operation was successful. url: /metadata/rotate-key/tags.json code: 200 pagination: count: 0 page: 1 limit: 20 body: - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key upgradeMetadataFolders: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/folderV4IndexAndView' examples: base: value: header: id: 2b6024fb-2915-47e6-84e6-8988217b14e7 status: success servertime: 1740046035 action: 8d061841-cef0-509a-8ee3-de91c7390d99 message: The operation was successful. url: /metadata/upgrade/folders.json code: 200 pagination: count: 2 page: 1 limit: null body: - personal: true id: 27605bac-8aa8-4fe4-a80b-486d8b76c748 name: folder v4 format created: '2025-02-19T13:50:53+00:00' modified: '2025-02-19T14:36:51+00:00' created_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 modified_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 folder_parent_id: null entityWasUpdated: description: Entity was updated content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: Entity was updated. url: code: 409 body: '' upgradeMetadataResources: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/resourceV4IndexAndView' examples: base: value: header: id: 2b6024fb-2915-47e6-84e6-8988217b14e7 status: success servertime: 1740046035 action: 8d061841-cef0-509a-8ee3-de91c7390d99 message: The operation was successful. url: /metadata/upgrade/resources.json code: 200 pagination: count: 2 page: 1 limit: 20 body: - id: 97f5415f-2e09-4171-a99e-1908e876662a name: password v4 format username: anakin uri: https://passbolt.com description: null deleted: false expired: null created: '2025-02-19T10:34:07+00:00' modified: '2025-02-19T10:34:07+00:00' created_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 modified_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 dateDoesntMatch: description: Not found content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The provided modified date does not match. url: code: 409 body: '' upgradeMetadataTags: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/tagLegacy' examples: base: value: header: id: 2b6024fb-2915-47e6-84e6-8988217b14e7 status: success servertime: 1740046035 action: 8d061841-cef0-509a-8ee3-de91c7390d99 message: The operation was successful. url: /metadata/upgrade/resources.json code: 200 pagination: count: 1 page: 1 limit: 20 body: - id: 97f5415f-2e09-4171-a99e-1908e876662b user_id: null slug: important tag in v4 format is_shared: true invalidOtp: description: Invalid OTP code. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/invalidOtp' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: Something went wrong when validating the one-time password. url: /mfa/verify/totp.json code: 400 body: totp: isValidOtp: This OTP is not valid. permissions_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/permissionIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: >- /permissions/resource/42968631-0c51-4405-9f2d-c6700c5057be.json code: 200 body: - id: c4cc131e-b204-41e3-8e17-0f62be7d1d80 aco: Resource aco_foreign_key: 42968631-0c51-4405-9f2d-c6700c5057be aro: User aro_foreign_key: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 type: 15 created: '2024-07-30T08:48:28+00:00' modified: '2024-07-30T08:48:28+00:00' - id: 4d664f1b-905e-4de4-ad2a-a7dce650565c aco: Resource aco_foreign_key: 42968631-0c51-4405-9f2d-c6700c5057be aro: User aro_foreign_key: c48863da-32d3-48cd-9d47-de2891386423 type: 1 created: '2024-08-08T15:38:26+00:00' modified: '2024-08-08T15:38:26+00:00' resources_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' examples: resourcesWithoutSecret: summary: Resources without any extra data value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /resources.json code: 200 pagination: count: 2 page: 1 limit: null body: - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 deleted: false expired: null folder_parent_id: null personal: true - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac89 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key created: '2024-08-08T08:06:25+00:00' modified: '2024-08-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 deleted: false expired: null folder_parent_id: null personal: true resourcesWithSecret: summary: Resources with secrets included value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /resources.json code: 200 pagination: count: 2 page: 1 limit: null body: - id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac89 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key created: '2024-08-08T08:06:25+00:00' modified: '2024-08-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 expired: null folder_parent_id: null personal: true secrets: - '-----BEGIN PGP MESSAGE-----' - id: dd1f723d-0d1e-513f-8218-4055dc0530d0 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 expired: null folder_parent_id: null personal: true secrets: - '-----BEGIN PGP MESSAGE-----' metadataKeyTypeFilterNotValid: description: metadata_key_type filter is not valid content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: example: *ref_4 resources_addAndUpdate: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' examples: base: value: id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key deleted: false created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 expired: null folder_parent_id: null personal: true resources_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: anyOf: - $ref: '#/components/schemas/resourceV4IndexAndView' - $ref: '#/components/schemas/resourceV5IndexAndView' examples: resourceWithoutSecret: summary: Resource without any extra data value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json code: 200 body: id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key deleted: false created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 expired: null folder_parent_id: null personal: true resourcesWithSecret: summary: Resource with secrets included value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /resources/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json code: 200 body: id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 0194fec1-65fa-7b6f-935a-9541c1c13281 metadata_key_type: shared_key deleted: false created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_type_id: a28a04cd-6f53-518a-967c-9963bf9cec51 expired: null folder_parent_id: null personal: true secrets: - '-----BEGIN PGP MESSAGE-----' resourceTypes_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/resourceTypeIndex' examples: resourceTypes: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /resource-types.json code: 200 body: - id: 669f8c64-242a-59fb-92fc-81f660975fd3 slug: password-and-description name: Password with description description: >- A resource with the password and the description encrypted. definition: resource: type: object required: - name properties: name: type: string maxLength: 255 username: anyOf: - type: string maxLength: 255 - type: 'null' uri: anyOf: - type: string maxLength: 1024 - type: 'null' secret: type: object required: - password properties: password: type: string maxLength: 4096 description: anyOf: - type: string maxLength: 10000 - type: null deleted: null created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' resourceTypes_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/resourceType' examples: resourceType: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /resource-types/669f8c64-242a-59fb-92fc-81f660975fd3.json code: 200 body: id: 669f8c64-242a-59fb-92fc-81f660975fd3 slug: password-and-description name: Password with description description: A resource with the password and the description encrypted. definition: resource: type: object required: - name properties: name: type: string maxLength: 255 username: anyOf: - type: string maxLength: 255 - type: 'null' uri: anyOf: - type: string maxLength: 1024 - type: 'null' secret: type: object required: - password properties: password: type: string maxLength: 4096 description: anyOf: - type: string maxLength: 10000 - type: null created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' emptyStringBody: description: Operation is successful. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: string examples: base: value: header: id: f7be85c0-afb1-4d8e-a9e1-e05abb0bb71a status: success servertime: 1721727753 action: e2aa01a9-84ec-55f8-aaed-24ee23259339 message: url: code: 200 body: '' roles_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/role' examples: index: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /roles.json code: 200 body: - id: 639b50cf-66f9-4b23-8d55-d0609710cd9d name: admin description: Organization administrator created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' - id: 50307b17-a097-483b-b388-4bf262348180 name: guest description: Non logged in user created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' - id: c2f96fb1-611d-466d-80fb-e82beba5ed87 name: user description: Logged in user created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' secrets_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/secretIndex' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /secrets/resource/ae60d89c-f13b-4fb1-b2dc-c8dc806cac88.json code: 200 pagination: count: 2 page: 1 limit: null body: id: c9e3b8e0-5ea9-4f40-a5e9-e3e4d2002be2 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 resource_id: ae60d89c-f13b-4fb1-b2dc-c8dc806cac88 data: '-----BEGIN PGP MESSAGE-----' created: '2024-07-08T08:06:25+00:00' modified: '2024-07-08T08:06:25+00:00' settings_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/index' examples: base: value: header: id: 2103c923-6b0c-42f9-b23f-0cceda9a2963 status: success servertime: 1740993528 action: bef9f3ca-86ef-5c6a-9b38-320e03ceb5df message: The operation was successful. url: /settings.json code: 200 pagination: count: 2 page: 1 limit: null body: app: url: https://{API_BASE_URL} locale: en-UK passbolt: legal: privacy_policy: url: '' terms: url: https://www.passbolt.com/terms edition: pro plugins: jwtAuthentication: enabled: true accountRecoveryRequestHelp: enabled: true accountRecovery: enabled: true selfRegistration: enabled: true sso: enabled: true mfaPolicies: enabled: true ssoRecover: enabled: true userPassPhrasePolicies: enabled: true inFormIntegration: enabled: true metadata: version: 1.0.0 enabled: true locale: options: - locale: de-DE label: Deutsch - locale: en-UK label: English - locale: en-ES label: Español - locale: fr-FR label: Français - locale: it-IT label: Italiano (beta) - locale: ja-JP label: 日本語 - locale: ko-KR label: 한국어 (beta) - locale: lt-LT label: Lietuvių - locale: nl-NL label: Nederlands - locale: pl-PL label: Polski - locale: pt-PR label: Português Brasil (beta) - locale: ro-RO label: Română (beta) - locale: ru-RU label: Pусский (beta) - locale: sv-SE label: Svenska rememberMe: options: '300': 5 minutes '900': 15 minutes '1800': 30 minutes '3600': 1 hour '-1': Until I log out updateError: description: Bad request content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/shareUpdateError' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: Resource metadata key type is invalid. url: /share/resource/42968631-0c51-4405-9f2d-c6700c5057be.json code: 400 body: permissions: aco_foreign_key: permission_unique: >- A permission already exists for the given access control object and access request object. arosIndex: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/shareAros' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /share/search-aros.json code: 200 body: - id: c48863da-32d3-48cd-9d47-de2891386423 role_id: c2f96fb1-611d-466d-80fb-e82beba5ed87 username: ada@passbolt.com active: true deleted: false created: '2024-08-08T12:08:58+00:00' modified: '2024-08-08T12:14:38+00:00' disabled: null groups_users: - id: 95accfa0-5c2c-47af-ba63-dd9efb46f99b group_id: 8fa37ef6-f167-4342-8e1c-3488439cf7d1 user_id: c48863da-32d3-48cd-9d47-de2891386423 is_admin: false created: '2024-08-08T12:25:40+00:00' profile: id: 4d9e9297-b1ec-4aa1-af1c-c6693c3ffe36 user_id: c48863da-32d3-48cd-9d47-de2891386423 first_name: Ada last_name: Lovelace created: '2024-08-08T12:08:58+00:00' modified: '2024-08-08T12:08:58+00:00' avatar: url: medium: https://passbolt.local/img/avatar/user_medium.png small: https://passbolt.local/img/avatar/user.png gpgkey: id: 6f0f6eb6-ed74-4cb0-8872-3e96ee17b6f9 user_id: c48863da-32d3-48cd-9d47-de2891386423 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' bits: 3072 uid: Ada Lovelace key_id: 08EF12596BC6B07B fingerprint: C4D0E64738F9956CDACC6D4808EF12596BC6B07B type: RSA expires: null key_created: '2024-08-08T12:13:42+00:00' deleted: false created: '2024-08-08T12:14:38+00:00' modified: '2024-08-08T12:14:38+00:00' role: id: c2f96fb1-611d-466d-80fb-e82beba5ed87 name: user description: Logged in user created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' last_logged_in: null - user_count: 1 id: 8fa37ef6-f167-4342-8e1c-3488439cf7d1 name: Groupe B deleted: false created: '2024-07-22T16:01:07+00:00' modified: '2024-07-22T16:01:07+00:00' created_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 modified_by: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 updateDryRun: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/shareUpdateDryRun' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: >- /share/simulate/resource/42968631-0c51-4405-9f2d-c6700c5057be.json code: 200 body: changes: added: [] removed: - User: id: c48863da-32d3-48cd-9d47-de2891386423 tags_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/tagIndexAndView' examples: base: value: header: id: 15a7d119-07c7-4fcb-8afc-ee8eba41fdc0 status: success servertime: 1721207029 action: 43efcc1ec-5cc1-5d2a-a16e-234f23b70719 message: The operation was successful. url: /tags.json body: - id: c9e3b8e0-5ea9-4f40-a5e9-e3e4d2002be2 slug: '#sharedTag' is_shared: true - id: 9b3ffebf-f3a2-40dc-9e73-2c9b3a927932 slug: v4 format tag is_shared: false - id: 04b87425-160e-4e31-b42f-89c455650331 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: ed94010c-6a97-488c-a60c-cfc6558f3ed7 metadata_key_type: shared_key is_shared: false tags_update: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/tagV5' examples: base: value: header: id: 15a7d119-07c7-4fcb-8afc-ee8eba41fdc0 status: success servertime: 1721207029 action: 43efcc1ec-5cc1-5d2a-a16e-234f23b70719 message: The operation was successful. url: /tags/04b87425-160e-4e31-b42f-89c455650331.json body: id: 04b87425-160e-4e31-b42f-89c455650331 metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: ed94010c-6a97-488c-a60c-cfc6558f3ed7 metadata_key_type: shared_key is_shared: false addResource: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/tagIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1740497420 action: acef8942-0c23-5de8-92e8-76ed8c5664f2 message: The operation was successful. url: /tags/b4651f60-392d-4af7-b204-0f8d26798b9b.json code: 200 body: - id: 52ca9f92-4115-4759-a965-89e6b41b36fd slug: important is_shared: false - metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: null metadata_key_type: user_key is_shared: false users_index: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/headerWithPagination' body: type: array items: $ref: '#/components/schemas/userIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /users.json code: 200 pagination: count: 1 page: 1 limit: null body: - id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 role_id: 639b50cf-66f9-4b23-8d55-d0609710cd9d active: true deleted: false created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:53:52+00:00' disabled: null groups_users: - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f group_id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true created: '2024-07-22T16:01:07+00:00' profile: id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 first_name: Ada last_name: Lovelace created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' avatar: url: medium: https://passbolt.local/img/avatar/user_medium.png small: https://passbolt.local/img/avatar/use.png gpgkey: id: ed4d9ea6-f354-4a74-ad09-4e1dd69041ec user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' bits: 3072 uid: Ada Lovelace key_id: D277E7A2E45418A0 fingerprint: 850C6BDE59E9F126BFB4683BD277E7A2E45418A0 type: RSA expires: null key_created: '2024-07-03T12:53:13+00:00' deleted: false created: '2024-07-03T12:53:52+00:00' modified: '2024-07-03T12:53:52+00:00' role: id: 639b50cf-66f9-4b23-8d55-d0609710cd9d name: admin description: Organization administrator created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' last_logged_in: null missing_metadata_key_ids: [] users_add: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/userIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: >- The user was successfully added. This user now need to complete the setup. url: /users.json code: 200 body: id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 role_id: 639b50cf-66f9-4b23-8d55-d0609710cd9d active: false deleted: false created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:53:52+00:00' disabled: null groups_users: [] profile: id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 first_name: Ada last_name: Lovelace created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' avatar: url: medium: https://passbolt.local/img/avatar/user_medium.png small: https://passbolt.local/img/avatar/use.png gpgkey: null role: id: c2f96fb1-611d-466d-80fb-e82beba5ed87 name: user description: Logged in user created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' last_logged_in: null users_view: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/userIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The operation was successful. url: /users/8bb80df5-700c-48ce-b568-85a60fc3c8f2.json code: 200 body: is_mfa_enabled: false id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 role_id: 639b50cf-66f9-4b23-8d55-d0609710cd9d active: true deleted: false created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:53:52+00:00' disabled: null groups_users: - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f group_id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true created: '2024-07-22T16:01:07+00:00' profile: id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 first_name: Ada last_name: Lovelace created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' avatar: url: medium: https://passbolt.local/img/avatar/user_medium.png small: https://passbolt.local/img/avatar/use.png gpgkey: id: ed4d9ea6-f354-4a74-ad09-4e1dd69041ec user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' bits: 3072 uid: Ada Lovelace key_id: D277E7A2E45418A0 fingerprint: 850C6BDE59E9F126BFB4683BD277E7A2E45418A0 type: RSA expires: null key_created: '2024-07-03T12:53:13+00:00' deleted: false created: '2024-07-03T12:53:52+00:00' modified: '2024-07-03T12:53:52+00:00' role: id: 639b50cf-66f9-4b23-8d55-d0609710cd9d name: admin description: Organization administrator created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' last_logged_in: null missing_metadata_key_ids: [] users_update: description: Operation is successful content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: type: array items: $ref: '#/components/schemas/userIndexAndView' examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: success servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: The user has been updated successfully. url: /users/8bb80df5-700c-48ce-b568-85a60fc3c8f2.json code: 200 body: id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 role_id: 639b50cf-66f9-4b23-8d55-d0609710cd9d active: true deleted: false created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:53:52+00:00' disabled: null groups_users: - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f group_id: 8a3c5c4e-e931-4e6b-854a-9b2e9afcd3bc user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true created: '2024-07-22T16:01:07+00:00' profile: id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 first_name: Freddy last_name: Mercury created: '2024-07-03T12:52:06+00:00' modified: '2024-07-03T12:52:06+00:00' avatar: url: medium: https://passbolt.local/img/avatar/user_medium.png small: https://passbolt.local/img/avatar/use.png gpgkey: id: ed4d9ea6-f354-4a74-ad09-4e1dd69041ec user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' bits: 3072 uid: Ada Lovelace key_id: D277E7A2E45418A0 fingerprint: 850C6BDE59E9F126BFB4683BD277E7A2E45418A0 type: RSA expires: null key_created: '2024-07-03T12:53:13+00:00' deleted: false created: '2024-07-03T12:53:52+00:00' modified: '2024-07-03T12:53:52+00:00' role: id: 639b50cf-66f9-4b23-8d55-d0609710cd9d name: admin description: Organization administrator created: '2012-07-04T13:39:25+00:00' modified: '2012-07-04T13:39:25+00:00' last_logged_in: null delete: description: The deletion failed. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/userDelete' description: >- Could also be a `string` if the issue is not related to resources or groups. examples: base: value: header: id: e21690a1-c494-4bdc-ad9d-84552a26bf68 status: error servertime: 1740020945 action: 4a1f3ff7-02ff-5120-b08b-e13f4369df3f message: >- The user cannot be deleted. The user should not be sole owner of shared content, transfer the ownership to other users. url: /users/f08012ca-4e2b-3f39-a35c-23d41c10fc20.json code: 400 body: errors: resources: sole_owner: - id: 8e3874ae-4b40-590b-968a-418f704b9d9a metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key expired: null deleted: false created: '2019-04-02T12:05:58+00:00' modified: '2019-04-03T12:05:58+00:00' created_by: f848277c-5398-58f8-a82a-72397af2d450 modified_by: f848277c-5398-58f8-a82a-72397af2d450 permissions: - id: 898ce1d0-601f-5194-976b-147a680dd472 aco: Resource aco_foreign_key: 8e3874ae-4b40-590b-968a-418f704b9d9a aro: User aro_foreign_key: 640ebc06-5ec1-5322-a1ae-6120ed2f3a74 type: 1 created: '2019-04-04T12:06:00+00:00' modified: '2019-04-04T12:06:00+00:00' group: null user: id: 640ebc06-5ec1-5322-a1ae-6120ed2f3a74 role_id: a58de6d3-f52c-5080-b79b-a601a647ac85 username: carol@passbolt.com active: true deleted: false created: '2019-04-02T12:05:44+00:00' modified: '2019-04-03T12:05:44+00:00' profile: id: 48bcd9ac-a520-53e0-b3a4-9da7e57b91aa user_id: 640ebc06-5ec1-5322-a1ae-6120ed2f3a74 first_name: Carol last_name: Shaw created: '2019-04-04T12:05:45+00:00' modified: '2019-04-04T12:05:45+00:00' avatar: id: 8ef95b32-e2a3-4b58-827c-dd67e68cfb48 profile_id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 created: '2024-08-06T14:58:09+00:00' modified: '2024-08-06T14:58:09+00:00' url: medium: >- https://passbolt.local/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb48/medium.jpg small: >- https://passbolt.local/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb48/small.jpg last_logged_in: null users_deleteDryRun: description: The dry-run failed. content: application/json: schema: type: object required: - header - body properties: header: $ref: '#/components/schemas/header' body: $ref: '#/components/schemas/userDeleteDryRun' description: >- Could also be a `string` if the issue is not related to resources or groups. examples: base: value: header: id: 7ff2828c-1092-4897-8e0a-1dc64ada889f status: error servertime: 1721207029 action: 4d0c0996-ce30-4bce-9918-9062ab35c542 message: >- The user cannot be deleted. You need to transfer the user group manager role to other users before deleting this user.You need to transfer the ownership for the shared passwords owned by this user before deleting this user. url: /users/f848277c-5398-58f8-a82a-72397af2d450.json code: 400 body: errors: groups: sole_manager: id: 73479f22-b387-4d4e-b625-b1cc0b7ed116 name: New Group deleted: false created: '2019-04-08T12:10:03+00:00' modified: '2019-04-08T12:10:03+00:00' created_by: d57c10f5-639d-5160-9c81-8a0c6c4ec856 modified_by: d57c10f5-639d-5160-9c81-8a0c6c4ec856 groups_users: - id: 6809e727-1219-4cfa-a201-1d3e997ca351 group_id: 73479f22-b387-4d4e-b625-b1cc0b7ed116 user_id: f848277c-5398-58f8-a82a-72397af2d450 is_admin: true created: '2019-04-08T12:10:03+00:00' user: id: f848277c-5398-58f8-a82a-72397af2d450 role_id: a58de6d3-f52c-5080-b79b-a601a647ac85 username: ada@passbolt.com active: true deleted: false created: '2019-02-04T12:05:44+00:00' modified: '2019-03-04T12:05:44+00:00' profile: id: 99522cc9-0acc-5ae2-b996-d03bded3c0a6 user_id: f848277c-5398-58f8-a82a-72397af2d450 first_name: Ada last_name: Lovelace created: '2019-04-04T12:05:45+00:00' modified: '2019-04-04T12:05:45+00:00' last_logged_in: '' resources: sole_owner: id: 8e3874ae-4b40-590b-968a-418f704b9d9a metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key expired: null deleted: false created: '2019-04-02T12:05:58+00:00' modified: '2019-04-03T12:05:58+00:00' created_by: f848277c-5398-58f8-a82a-72397af2d450 modified_by: f848277c-5398-58f8-a82a-72397af2d450 permissions: - id: 898ce1d0-601f-5194-976b-147a680dd472 aco: Resource aco_foreign_key: 8e3874ae-4b40-590b-968a-418f704b9d9a aro: User aro_foreign_key: 640ebc06-5ec1-5322-a1ae-6120ed2f3a74 type: 1 created: '2019-04-04T12:06:00+00:00' modified: '2019-04-04T12:06:00+00:00' group: null user: id: 640ebc06-5ec1-5322-a1ae-6120ed2f3a74 role_id: a58de6d3-f52c-5080-b79b-a601a647ac85 username: carol@passbolt.com active: true deleted: false created: '2019-04-02T12:05:44+00:00' modified: '2019-04-03T12:05:44+00:00' profile: id: 48bcd9ac-a520-53e0-b3a4-9da7e57b91aa user_id: 640ebc06-5ec1-5322-a1ae-6120ed2f3a74 first_name: Carol last_name: Shaw created: '2019-04-04T12:05:45+00:00' modified: '2019-04-04T12:05:45+00:00' avatar: id: 8ef95b32-e2a3-4b58-827c-dd67e68cfb48 profile_id: 920edf1e-5ce8-4da4-a8fc-21040fe78d09 created: '2024-08-06T14:58:09+00:00' modified: '2024-08-06T14:58:09+00:00' url: medium: >- https://passbolt.local/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb48/medium.jpg small: >- https://passbolt.local/avatars/view/8ef95b32-e2a3-4b58-827c-dd67e68cfb48/small.jpg last_logged_in: null groups_to_delete: - id: 05b68bd2-e4e8-4838-ac21-4661b27fb23b name: Another Group deleted: false created: '2019-04-08T12:44:44+00:00' modified: '2019-04-08T12:44:44+00:00' created_by: d57c10f5-639d-5160-9c81-8a0c6c4ec856 modified_by: d57c10f5-639d-5160-9c81-8a0c6c4ec856 requestBodies: login: description: The user and refresh token for session identification. required: true content: application/json: schema: $ref: '#/components/schemas/loginRequest' examples: base: value: user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 challenge: '-----BEGIN PGP MESSAGE-----' logout: description: The session associated to the refresh token you want to revoke. required: true content: application/json: schema: $ref: '#/components/schemas/logout' examples: revokeOneSession: summary: Only revoke this session. value: refresh_token: ad71952e-7842-599e-a19e-3a82e6974b23 revokeAllSessions: summary: Empty body to revoke all sessions. value: null refresh: description: The user and refresh token for session identification. required: true content: application/json: schema: $ref: '#/components/schemas/refreshRequest' examples: base: value: user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 refresh_token: f8cea352-6bd3-4944-9523-20b31272bef0 authGpg_login: description: The user's key fingerprint and challenge data when required. required: true content: application/json: schema: $ref: '#/components/schemas/login' examples: stage1: summary: Obtain a challenge token value: data: gpg_auth: keyid: 5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59 stage2: summary: Verify client's identity value: data: gpg_auth: keyid: 5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59 user_token_result: >- gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0 verify: description: The user's key fingerprint and an encrypted challenge token. required: true content: application/json: schema: $ref: '#/components/schemas/login' examples: base: value: data: gpg_auth: keyid: 5FB36DE5C8E69DD4DB185DF2BC9F2749E432CB59 server_verify_token: '-----BEGIN PGP MESSAGE-----' commentUpdate: description: The comment you want to update required: true content: application/json: schema: $ref: '#/components/schemas/commentUpdate' examples: base: value: content: no comment commentAdd: description: The comment you want to add required: true content: application/json: schema: $ref: '#/components/schemas/commentAdd' examples: base: value: content: no comment folderAdd: description: The folder you want to create required: true content: application/json: schema: $ref: '#/components/schemas/e2eeMetadataBased' examples: without_parent: summary: Without a parent folder. value: metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: e3dabc04-cfbd-45c1-9f7d-827c61603e20 metadata_key_type: shared_key with_parent: summary: With a parent folder. value: metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: e3dabc04-cfbd-45c1-9f7d-827c61603e20 metadata_key_type: shared_key folder_parent_id: 3a003c3e-d000-4068-a6cf-96e15a41e18f folderUpdate: description: The folder you want to update required: true content: application/json: schema: $ref: '#/components/schemas/e2eeMetadataBased' examples: without_parent: value: metadata: '----BEGIN PGP MESSAGE-----' metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key groupAdd: description: The group you want to create required: true content: application/json: schema: $ref: '#/components/schemas/groupAdd' examples: base: value: name: Groupe B groups_users: - user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true groupUpdate: description: The group you want to update required: true content: application/json: schema: $ref: '#/components/schemas/groupUpdate' examples: base: summary: Update group with mixed operations value: name: WRC groups_users: - user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 is_admin: true - id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f is_admin: false - id: 1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6 delete: true secrets: - resource_id: 4d0c0996-ce30-4bce-9918-9062ab35c542 user_id: 8bb80df5-700c-48ce-b568-85a60fc3c8f2 data: '-----BEGIN PGP MESSAGE-----' - resource_id: 4d0c0996-ce30-4bce-9918-9062ab35c542 user_id: 3b9b9757-1ccb-444a-a3cf-4090364fac4f data: '-----BEGIN PGP MESSAGE-----' metadataKeyAdd: description: The metadata key you want to create required: true content: application/json: schema: $ref: '#/components/schemas/metadataKeyAdd' examples: base: value: fingerprint: 17B5913BC13128674F2A6F31C79A1AB152C3C573 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' metadata_private_keys: - user_id: null data: '-----BEGIN PGP MESSAGE-----' - user_id: 5ea1c453-749b-43ca-8606-b85d63ab137f data: '-----BEGIN PGP MESSAGE-----' metadataKeyUpdate: description: The metadata key you want to update required: true content: application/json: schema: $ref: '#/components/schemas/metadataKeyUpdate' examples: base: value: fingerprint: 17B5913BC13128674F2A6F31C79A1AB152C3C573 armored_key: '-----BEGIN PGP PUBLIC KEY BLOCK-----' expired: '2025-02-25T09:00:00+00:00' metadataPrivateKeysAdd: description: The metadata private keys that you want to create. required: true content: application/json: schema: $ref: '#/components/schemas/metadataPrivateKeysAdd' examples: base: value: - metadata_key_id: d00efe12-0892-4111-b08a-fb42d9e0a5de user_id: eca7c94a-02ac-4e08-a7e1-035981c34868 data: '-----BEGIN PGP MESSAGE-----' - metadata_key_id: 7d316bc3-0cca-4b5d-9d77-3eb9c408f9df user_id: 4448fee0-2eef-4d47-b221-2101317f60d1 data: '-----BEGIN PGP MESSAGE-----' metadataPrivateKeysUpdate: description: The metadata private keys that you want to update. required: true content: application/json: schema: $ref: '#/components/schemas/e2eeDataOnly' examples: base: value: data: '-----BEGIN PGP MESSAGE-----' updateMetadataKeysSettings: description: The metadata key settings you want to update required: true content: application/json: schema: $ref: '#/components/schemas/metadataKeysSettingsUpdate' examples: base: value: allow_usage_of_personal_keys: true zero_knowledge_key_share: false upgradeMetadataTypesSettings: description: The metadata types settings you want to update required: true content: application/json: schema: $ref: '#/components/schemas/metadataTypesSettingsIndexAndView' examples: base: value: default_resource_types: v5 default_folder_type: v4 default_tag_type: v4 default_comment_type: v4 allow_creation_of_v5_resources: true allow_creation_of_v5_folders: false allow_creation_of_v5_tags: false allow_creation_of_v5_comments: false allow_creation_of_v4_resources: true allow_creation_of_v4_folders: true allow_creation_of_v4_tags: true allow_creation_of_v4_comments: true allow_v5_v4_downgrade: false allow_v4_v5_upgrade: true rotateMetadataKeyUpgrade: description: The object you want to rotate the metadata key required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/e2eeMetadataBasedIdModifiedModifiedBy' examples: base: value: - id: 97f5415f-2e09-4171-a99e-1908e876662a metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key metadata: '-----BEGIN PGP MESSAGE-----' modified: '2025-02-18T15:52:17+00:00' modified_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 add: description: The metadata session key you want to add required: true content: application/json: schema: $ref: '#/components/schemas/e2eeDataOnly' examples: base: value: data: '-----BEGIN PGP MESSAGE-----' update: description: The metadata session key you want to update required: true content: application/json: schema: $ref: '#/components/schemas/e2eeDataModified' examples: base: value: data: '----BEGIN PGP MESSAGE-----' modified: '2025-02-18T15:52:17+00:00' rotateMetadataKeyUpgradeTags: description: The tags you want to rotate the metadata key required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/tagV5MetadataRotateKey' examples: base: value: - id: 97f5415f-2e09-4171-a99e-1908e876662a metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key metadata: '-----BEGIN PGP MESSAGE-----' upgradeMetadataFolders: description: The folders you want to upgrade the metadata for to v5 format required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/e2eeMetadataBasedIdModifiedModifiedBy' examples: base: value: - id: 0e840721-58ea-4649-b603-2d9cf4f2213c metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key metadata: '-----BEGIN PGP MESSAGE-----' modified: '2025-02-18T15:52:17+00:00' modified_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 upgradeMetadataResources: description: The resources you want to upgrade the metadata for to v5 format required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/e2eeMetadataBasedIdModifiedModifiedBy' examples: base: value: - id: 97f5415f-2e09-4171-a99e-1908e876662a metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key metadata: '-----BEGIN PGP MESSAGE-----' modified: '2025-02-18T15:52:17+00:00' modified_by: ae48ed02-54ea-4be4-9ae8-229bf8c04739 upgradeMetadataTags: description: The tags you want to upgrade the metadata for to v5 format required: true content: application/json: schema: type: array items: $ref: '#/components/schemas/tagV5' examples: base: value: - id: 97f5415f-2e09-4171-a99e-1908e876662a metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 metadata_key_type: shared_key metadata: '-----BEGIN PGP MESSAGE-----' attempt: description: The code for the MFA attempt. required: true content: application/json: schema: $ref: '#/components/schemas/mfaAttempt' examples: totp: summary: Attempt MFA with TOTP. value: totp: '635742' move: description: The target parent folder ID required: true content: application/json: schema: $ref: '#/components/schemas/move' resourceAddAndUpdate: description: The resource you want to create or update required: true content: application/json: schema: $ref: '#/components/schemas/resourceAddAndUpdate' examples: base: value: folder_parent_id: null personal: true expired: null metadata_key_id: 9d9a6672-35d6-4d0f-a807-b90edf25c275 resource_type_id: dd1f723d-0d1e-513f-8218-4055dc0530d0 metadata_key_type: shared_key metadata: '-----BEGIN PGP MESSAGE-----' secrets: - '-----BEGIN PGP MESSAGE-----' resourceUpdate: description: The resource types you want to update required: true content: application/json: schema: $ref: '#/components/schemas/resourceTypeUpdate' examples: base: value: deleted: null shareUpdate: description: The permissions you want to apply required: true content: application/json: schema: $ref: '#/components/schemas/shareUpdate' examples: addUser: summary: Adding a read permission for a user value: permissions: - aro: User aro_foreign_key: c48863da-32d3-48cd-9d47-de2891386423 type: 1 is_new: true secrets: - data: '-----BEGIN PGP MESSAGE-----' user_id: c48863da-32d3-48cd-9d47-de2891386423 deleteUser: summary: Removing a permission for a user value: permissions: - aro: User aro_foreign_key: c48863da-32d3-48cd-9d47-de2891386423 delete: true secrets: [] updatePermissionLevel: summary: Update a permission level value: permissions: - id: 540174b9-90db-458c-ae90-e9a1912cc656 type: 7 everythingAtOnce: summary: Multiple operations at the same time value: permissions: - aro: User aro_foreign_key: c48863da-32d3-48cd-9d47-de2891386423 type: 1 is_new: true - id: 540174b9-90db-458c-ae90-e9a1912cc656 type: 7 secrets: - data: '-----BEGIN PGP MESSAGE-----' user_id: c48863da-32d3-48cd-9d47-de2891386423 shareUpdateDryRun: description: The permissions you want to apply required: true content: application/json: schema: $ref: '#/components/schemas/shareUpdate' examples: deleteUser: value: permissions: - id: 540174b9-90db-458c-ae90-e9a1912cc656 delete: true tags_update: description: The tag to update. required: true content: application/json: schema: $ref: '#/components/schemas/tagV5Update' examples: base: value: metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: ed94010c-6a97-488c-a60c-cfc6558f3ed7 metadata_key_type: shared_key is_shared: false addResource: description: The tags to set for the resource. required: true content: application/json: schema: $ref: '#/components/schemas/tagAddResource' examples: base: value: tags: - metadata: '-----BEGIN PGP MESSAGE-----' metadata_key_id: null metadata_key_type: shared_key is_shared: true - id: 4879d401-c242-458d-91a0-dba864c36535 userAdd: description: The user you want to create required: true content: application/json: schema: $ref: '#/components/schemas/userAdd' examples: base: value: username: ada@passbolt.com profile: first_name: Ada last_name: Lovelace userUpdate: description: The user you want to update required: true content: application/json: schema: $ref: '#/components/schemas/userUpdate' examples: base: value: profile: first_name: Freddie last_name: Mercury parameters: avatarId: name: avatarId description: ID for the avatar being manipulated. in: path required: true schema: type: string format: uuid avatarFormat: name: avatarFormat description: Format for the avatar being manipulated. in: path required: true schema: type: string enum: - medium.jpg - small.jpg commentId: name: commentId description: ID for the comment being manipulated. in: path required: true schema: type: string format: uuid resourceId: name: resourceId description: ID for the resource being manipulated. in: path required: true schema: type: string format: uuid containCreator: name: contain[creator] description: Add creator to response body. in: query required: false schema: type: integer enum: - 1 - 0 containModifier: name: contain[modifier] description: Add modifier to response body. in: query required: false schema: type: integer enum: - 1 - 0 favoriteId: name: favoriteId description: ID for the favorite being manipulated. in: path required: true schema: type: string format: uuid favoritesForeignModel: name: foreignModel description: Type for the foreign model being set as favorite. in: path required: true schema: type: string enum: - resource foreignId: name: foreignId description: ID for the foreign element being manipulated. in: path required: true schema: type: string format: uuid containChildrenResources: name: contain[children_resources] description: Add children resources to response body. in: query required: false schema: type: integer enum: - 1 - 0 containChildrenFolders: name: contain[children_folders] description: Add children folders to response body. in: query required: false schema: type: integer enum: - 1 - 0 containCreatorProfile: name: contain[creator.profile] description: Add creator and their profile to response body. in: query required: false schema: type: integer enum: - 1 - 0 containModifierProfile: name: contain[modifier.profile] description: Add modifier and their profile to response body. in: query required: false schema: type: integer enum: - 1 - 0 containPermission: name: contain[permission] description: Add permission to response body. in: query required: false schema: type: integer enum: - 1 - 0 containPermissions: name: contain[permissions] description: Add permissions to response body. in: query required: false schema: type: integer enum: - 1 - 0 containPermissionsUserProfile: name: contain[permissions.user.profile] description: Add user profile to permissions in response body. in: query required: false schema: type: integer enum: - 1 - 0 containPermissionsGroup: name: contain[permissions.group] description: Add group to permissions in response body. in: query required: false schema: type: integer enum: - 1 - 0 filterHasId: name: filter[has-id] description: Only return elements filtered by their id. in: query required: false schema: type: string format: uuid filterHasParent: name: filter[has-parent] description: Only return elements filtered by parent folder. in: query required: false schema: type: string format: uuid filterSearch: name: filter[search] description: Filter using a keyword or a string. in: query required: false schema: type: string folderId: name: folderId description: ID for the folder being manipulated. in: path required: true schema: type: string format: uuid cascade: name: cascade description: Delete element and its children elements. in: query required: false schema: type: integer enum: - 1 - 0 filterModifiedAfter: name: filter[modified-after] description: Only return elements modified after a timestamp. in: query required: false schema: type: string filterIsDeleted: name: filter[is-deleted] description: Only return deleted elements. in: query required: false schema: type: integer enum: - 1 - 0 gpgkeyId: name: gpgkeyId description: ID for the GPG key being manipulated. in: path required: true schema: type: string format: uuid containMyGroupUser: name: contain[my_group_user] description: Add `my_group_user` to groups in response body. in: query required: false schema: type: integer enum: - 1 - 0 containGroupsUsers: name: contain[groups_users] description: Add group users to groups in response body. in: query required: false schema: type: integer enum: - 1 - 0 containGroupsUsersUser: name: contain[groups_users.user] description: Add group users' user data to groups in response body. in: query required: false schema: type: integer enum: - 1 - 0 containGroupsUsersUserProfile: name: contain[groups_users.user.profile] description: Add group users' user profiles to groups in response body. in: query required: false schema: type: integer enum: - 1 - 0 containGroupsUsersUserGpgkey: name: contain[groups_users.user.gpgkey] description: Add group users' user gpg key to groups in response body. in: query required: false schema: type: integer enum: - 1 - 0 filterHasUsers: name: filter[has-users] description: Only return elements filtered by users. in: query required: false schema: type: array items: type: string format: uuid description: User UUID filterHasManagers: name: filter[has-managers] description: Only return elements filtered by managers. in: query required: false schema: type: array items: type: string format: uuid description: User UUID groupId: name: groupId description: ID for the group being manipulated. in: path required: true schema: type: string format: uuid containUsers: name: contain[users] description: Add users to response body. in: query required: false schema: type: integer enum: - 1 - 0 filterDeleted: name: filter[deleted] description: Filter for deleted elements. in: query required: false schema: type: integer enum: - 1 - 0 filterExpired: name: filter[expired] description: Filter for expired elements. in: query required: false schema: type: integer enum: - 1 - 0 containMetadataPrivateKeys: name: contain[metadata_private_keys] description: Add metadata private keys in response. in: query required: false schema: type: integer enum: - 1 - 0 metadataKeyId: name: metadataKeyId description: The metadata key identifier being manipulated. in: path required: true schema: type: string format: uuid metadataPrivateKeyId: name: metadataPrivateKeyId description: ID for the metadata private key manipulated. in: path required: true schema: type: string format: uuid sessionKeyId: name: sessionKeyId description: ID for the session key being manipulated in: path required: true schema: type: string format: uuid filterIsShared: name: filter[is-shared] description: Only return shared items. in: query required: false schema: type: boolean mfaProviderName: name: mfaProviderName description: Name for the MFA provider. in: path schema: type: string enum: - totp - yubikey moveForeignModel: name: foreignModel description: Type for the foreign model being moved. in: path required: true schema: type: string enum: - resource - folder containGroup: name: contain[group] description: Add group to response body. in: query required: false schema: type: integer enum: - 1 - 0 containUser: name: contain[user] description: Add user to response body. in: query required: false schema: type: integer enum: - 1 - 0 containUserProfile: name: contain[user.profile] description: Add user profile to user data in response body. in: query required: false schema: type: integer enum: - 1 - 0 containFavorite: name: contain[favorite] description: Add favorite to response body. in: query required: false schema: type: integer enum: - 1 - 0 containSecret: name: contain[secret] description: Add secrets to response body. in: query required: false schema: type: integer enum: - 1 - 0 containResourceType: name: contain[resource-type] description: Add resource type to response body. in: query required: false schema: type: integer enum: - 1 - 0 filterIsFavorite: name: filter[is-favorite] description: Only return favorite elements. in: query required: false schema: type: boolean filterIsSharedWithGroup: name: filter[is-shared-with-group] description: Only return elements shared with group. in: query required: false schema: type: string format: uuid description: Group UUID filterIsOwnedByMe: name: filter[is-owned-by-me] description: Only return elements owned by yourself. in: query required: false schema: type: boolean filterIsSharedWithMe: name: filter[is-shared-with-me] description: Only return elements shared to yourself and you are not owner. in: query required: false schema: type: boolean filterMetadataKeyType: name: filter[metadata_key_type] description: Only return elements that match the metadata key type in: query required: false schema: type: string format: uuid containResourcesCount: name: contain[resources_count] description: >- Get the number of count of resources associated to this type of resource. in: query required: false schema: type: integer enum: - 1 - 0 resourceTypeId: name: resourceTypeId description: ID for the resource type being manipulated. in: path required: true schema: type: string format: uuid sharesForeignModel: name: foreignModel description: Type for the foreign model being shared. in: path required: true schema: type: string enum: - resource - folder containGpgkey: name: contain[gpgkey] description: Add GPG key data to response body. in: query required: false schema: type: integer enum: - 1 - 0 containRole: name: contain[role] description: Add role to response body. in: query required: false schema: type: integer enum: - 1 - 0 resourceOrTagId: name: resourceOrTagId description: >- The tag (for `PUT`) or resource (for `POST`) identifier being manipulated. in: path required: true schema: type: string format: uuid containLastLoggedIn: name: contain[last_logged_in] description: Add last logged in to response body. in: query required: false schema: type: integer enum: - 1 - 0 containProfile: name: contain[profile] description: Add profile to response body. in: query required: false schema: type: integer enum: - 1 - 0 containMissingMetadataKeyIds: name: contain[missing_metadata_key_ids] description: Add missing metadata key IDs to response body. in: query required: false schema: type: integer enum: - 1 - 0 filterHasGroups: name: filter[has-groups] description: Only return elements filtered by groups. in: query required: false schema: type: array items: type: string format: uuid description: Group UUID filterHasAccess: name: filter[has-access] description: Only return elements where specified users have access. in: query required: false schema: type: array items: type: string format: uuid description: User UUID filterIsAdmin: name: filter[is-admin] description: Only return admin users. in: query required: false schema: type: boolean filterIsActive: name: filter[is-active] description: Only return active elements. in: query required: false schema: type: boolean userId: name: userId description: >- ID for the user being manipulated. Can be set to `me` when viewing a user. in: path required: true schema: type: string format: uuid