curl --request POST \
--url https://aquila.attaxr.com/api/auth/api-key/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({keyId: '<string>'})
};
fetch('https://aquila.attaxr.com/api/auth/api-key/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/auth/api-key/update"
payload = { "keyId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"userId": "<string>",
"enabled": true,
"rateLimitEnabled": true,
"requestCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"start": "<string>",
"prefix": "<string>",
"refillInterval": 123,
"refillAmount": 123,
"lastRefillAt": "2023-11-07T05:31:56Z",
"rateLimitTimeWindow": 123,
"rateLimitMax": 123,
"remaining": 123,
"lastRequest": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"metadata": {},
"permissions": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Update an existing API key by ID
Update an existing API key by ID
curl --request POST \
--url https://aquila.attaxr.com/api/auth/api-key/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"keyId": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({keyId: '<string>'})
};
fetch('https://aquila.attaxr.com/api/auth/api-key/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/auth/api-key/update"
payload = { "keyId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"userId": "<string>",
"enabled": true,
"rateLimitEnabled": true,
"requestCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"start": "<string>",
"prefix": "<string>",
"refillInterval": 123,
"refillAmount": 123,
"lastRefillAt": "2023-11-07T05:31:56Z",
"rateLimitTimeWindow": 123,
"rateLimitMax": 123,
"remaining": 123,
"lastRequest": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"metadata": {},
"permissions": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Personal API key sent as a bearer token.
Body
The id of the Api Key
The configuration ID to use for the API key lookup. If not provided, the default configuration will be used.
The id of the user which the api key belongs to. server-only. Eg: "some-user-id"
The name of the key
Whether the Api Key is enabled or not
The number of remaining requests
The refill amount
The refill interval
Expiration time of the Api Key in seconds
Whether the key has rate limiting enabled.
The duration in milliseconds where each request is counted. server-only. Eg: 1000
Maximum amount of requests allowed within a window. Once the maxRequests is reached, the request will be rejected until the timeWindow has passed, at which point the timeWindow will be reset. server-only. Eg: 100
Update the permissions on the API Key. server-only.
Show child attributes
Show child attributes
Response
API key updated successfully
ID
The owner of the user id
Sets if key is enabled or disabled
Whether the key has rate limiting enabled
The number of requests made within the rate limit time window
created at
updated at
The name of the key
Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.
The API Key prefix. Stored as plain text.
The interval in milliseconds between refills of the remaining count. Example: 3600000 // refill every hour (3600000ms = 1h)
The amount to refill
The last refill date
The duration in milliseconds
Maximum amount of requests allowed within a window
Remaining requests (every time api key is used this should updated and should be updated on refill as well)
When last request occurred
Expiry date of a key
Extra metadata about the apiKey
Permissions for the api key (stored as JSON string)

