Provision an Organization for Envelope Encryption
curl --request POST \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actor": "admin@example.com",
"reason": "Initial encryption setup"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision"
payload := strings.NewReader("{\n \"actor\": \"admin@example.com\",\n \"reason\": \"Initial encryption setup\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({actor: 'admin@example.com', reason: 'Initial encryption setup'})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision"
payload = {
"actor": "admin@example.com",
"reason": "Initial encryption setup"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"aead_primary_key_id": 1,
"kek_path": "org-00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"prf_primary_key_id": 1,
"status": "active"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Provision an Organization for Envelope Encryption
POST
/
v2
/
organizations
/
{organization_id}
/
encryption
/
provision
Provision an Organization for Envelope Encryption
curl --request POST \
--url https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actor": "admin@example.com",
"reason": "Initial encryption setup"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision"
payload := strings.NewReader("{\n \"actor\": \"admin@example.com\",\n \"reason\": \"Initial encryption setup\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({actor: 'admin@example.com', reason: 'Initial encryption setup'})
};
fetch('https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v2/organizations/{organization_id}/encryption/provision"
payload = {
"actor": "admin@example.com",
"reason": "Initial encryption setup"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"aead_primary_key_id": 1,
"kek_path": "org-00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"prf_primary_key_id": 1,
"status": "active"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
JWT bearer token issued by the identity provider.
Headers
Bearer token; only required when the auth plugin is enabled
Path Parameters
Organization ID (UUID)
Body
application/json
Response
Created
Required range:
x >= 0Example:
1
Example:
"org-00000000-0000-0000-0000-000000000000"
Example:
"00000000-0000-0000-0000-000000000000"
Required range:
x >= 0Example:
1
Example:
"active"
Was this page helpful?

