curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{pid}/ingest-keys/{id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ip_allowlist": [
"203.0.113.0/24",
"2001:db8::/32"
]
}
'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
expires_at: '2023-11-07T05:31:56Z',
ip_allowlist: ['203.0.113.0/24', '2001:db8::/32']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/ingest-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/ingest-keys/{id}"
payload = {
"name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ip_allowlist": ["203.0.113.0/24", "2001:db8::/32"]
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ip_allowlist": [
"<string>"
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}Rename an ingest key, or set its expiry or IP allowlist
Top-level alias: PATCH /admin/api/ingest-keys/. Write role required. Send at least one of name, expires_at and ip_allowlist. dataset_default and require_signature are fixed at creation. A revoked or expired key cannot be changed (409) - nothing revives a dead credential. On a rotated key, moving expires_at moves the end of the overlap. Audited as update_ingest_key with each change’s from and to.
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{pid}/ingest-keys/{id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ip_allowlist": [
"203.0.113.0/24",
"2001:db8::/32"
]
}
'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
expires_at: '2023-11-07T05:31:56Z',
ip_allowlist: ['203.0.113.0/24', '2001:db8::/32']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/ingest-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/ingest-keys/{id}"
payload = {
"name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ip_allowlist": ["203.0.113.0/24", "2001:db8::/32"]
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"name": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"ip_allowlist": [
"<string>"
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>"
}Authorizations
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Project id (UUID) belonging to the caller workspace.
Ingest key id.
Body
1 - 80When the key stops authenticating, at ingest and on /v1/stream alike. Must be in the future; null means never. A key past it answers 404 'Unknown ingest key', exactly like a revoked one.
IP addresses or CIDR ranges allowed to use this credential, validated exactly as the workspace and project allowlists are. [] or null removes the restriction (stored as null). A request must pass every allowlist that is set: this one, the project's and the workspace's. Refused requests get 403 'Source IP not allowed' and an ingest_ip_blocked audit row.
64An IPv4 or IPv6 address, or a CIDR range.
["203.0.113.0/24", "2001:db8::/32"]