curl --request POST \
--url https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate"
headers = {
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-organization-id': '<x-organization-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate",
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 <token>",
"x-organization-id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"keyType": "user_bound",
"boundEmail": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"scopes": [
"*"
],
"secret": "<string>",
"lastUsedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}Rotate API access key
Revokes the existing secret access key value and issues a replacement for the same API access key credential name, type, and scopes. The new secret access key value is returned only once.
curl --request POST \
--url https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate"
headers = {
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-organization-id': '<x-organization-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate",
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 <token>",
"x-organization-id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us-east-1.livingsecurity.ai/api/v1/access-keys/{id}/rotate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"keyType": "user_bound",
"boundEmail": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"createdByUserId": "<string>",
"scopes": [
"*"
],
"secret": "<string>",
"lastUsedAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}承認
Short-lived bearer access token issued for a Living Security API access key. Send as Authorization: Bearer .
ヘッダー
Organization context for multi-tenant operations
パスパラメータ
API access key identifier to rotate
レスポンス
Stable API access key identifier
Human-readable name for the API access key credential, usually the owning integration or automation
Credential type for the API access key. user_bound keys are associated with the creating user's identity; service_account keys are intended for non-human service integrations.
user_bound, service_account Email address associated with the API access key credential when the credential is user-bound
API access key status
active, revoked Timestamp when the API access key credential was created
Identifier of the user who created this API access key
Permission scopes assigned to this API access key
["*"]
One-time secret access key value. Store it immediately; it cannot be retrieved after creation or rotation.
Last time the API access key was used
Expiration timestamp for the API access key credential
このページは役に立ちましたか?

