Update a credential (LOCAL-only)
curl --request PATCH \
--url https://sta.sandbox.lerian.net/v1/credentials/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"operatorId": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sta.sandbox.lerian.net/v1/credentials/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"operatorId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '<string>', operatorId: '<string>'})
};
fetch('https://sta.sandbox.lerian.net/v1/credentials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sta.sandbox.lerian.net/v1/credentials/{id}"
payload = {
"description": "<string>",
"operatorId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"credentialId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "ERR-0001",
"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"
}Update a credential (LOCAL-only)
Corrects operatorId and description only. A password change is NOT accepted here — use POST /v1/credentials//rotate. PATCH semantics: only present fields change. Emits credential.updated via audit_outbox in one tx.
PATCH
/
v1
/
credentials
/
{id}
Update a credential (LOCAL-only)
curl --request PATCH \
--url https://sta.sandbox.lerian.net/v1/credentials/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"operatorId": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sta.sandbox.lerian.net/v1/credentials/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"operatorId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: '<string>', operatorId: '<string>'})
};
fetch('https://sta.sandbox.lerian.net/v1/credentials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sta.sandbox.lerian.net/v1/credentials/{id}"
payload = {
"description": "<string>",
"operatorId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"credentialId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"code": "ERR-0001",
"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"
}Authorizations
JWT bearer token issued by the identity provider.
Path Parameters
Credential UUID
Example:
"018f3b2a-0c1d-7a2b-9e4f-1a2b3c4d5e6f"
Was this page helpful?

