Restore Hub API
POST
https://api.restorehub.net /api/v1/api-keys Create a new API key (requires '*' wildcard scope)
Required scope: api-keys:write
Request body
application/json
namestringrequiredscopesstring[]requiredexpiresAtstring{
"name": "string",
"scopes": [
"string"
],
"expiresAt": "2024-01-01T00:00:00Z"
}Code samples
cURL
curl -X POST "https://api.restorehub.net/api/v1/api-keys" \
-H "Content-Type: application/json" \
-d '{"name":"string","scopes":["string"],"expiresAt":"2024-01-01T00:00:00Z"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}PUT
https://api.restorehub.net /api/v1/api-keys/{id} Update an API key (requires '*' wildcard scope; cannot modify the key in use)
Required scope: api-keys:write
Parameters
idstringpathrequiredRequest body
application/json
namestringscopesstring[]expiresAtstringisActiveboolean{
"name": "string",
"scopes": [
"string"
],
"expiresAt": "2024-01-01T00:00:00Z",
"isActive": true
}Code samples
cURL
curl -X PUT "https://api.restorehub.net/api/v1/api-keys/{id}" \
-H "Content-Type: application/json" \
-d '{"name":"string","scopes":["string"],"expiresAt":"2024-01-01T00:00:00Z","isActive":true}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}DELETE
https://api.restorehub.net /api/v1/api-keys/{id} Revoke an API key (requires '*' wildcard scope; cannot delete the key in use)
Required scope: api-keys:write
Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://api.restorehub.net/api/v1/api-keys/{id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
{}400 Validation failed
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}401 Unauthorized — missing or invalid API key
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}403 Forbidden — missing required scope
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}404 Not found
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}429 Rate limit exceeded
{
"error": "string",
"code": "string",
"details": {},
"requiredScope": "string",
"yourScopes": [
"string"
]
}Updated