result = client.webhooks.set_signing_secret()
secret = result.data.signing_secret
const result = await client.webhooks.setSigningSecret();
const secret = result.data?.signingSecret;
curl -X POST 'https://api.hydradb.com/webhooks/indexing/signing-secret' \
-H "Authorization: Bearer $HYDRADB_API_KEY" \
-H "API-Version: 2"
{
"data": {
"generated": true,
"message": "Success",
"signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
},
"error": null,
"meta": {
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234",
"warnings": [
{
"code": "acl_ignored_by_connector_enforcement",
"collections": [
"team_docs",
"engineering"
],
"message": "This connector enforces ACL, so the request's acl was ignored."
}
]
},
"success": true
}{
"data": null,
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"deprecated_since": "2.0.1",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database",
"retry_after_seconds": 1,
"retryable": true
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}{
"data": null,
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"deprecated_since": "2.0.1",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database",
"retry_after_seconds": 1,
"retryable": true
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}Webhooks
Set Signing Secret
Generate or replace the signing secret used to sign webhook deliveries.
POST
/
webhooks
/
indexing
/
signing-secret
result = client.webhooks.set_signing_secret()
secret = result.data.signing_secret
const result = await client.webhooks.setSigningSecret();
const secret = result.data?.signingSecret;
curl -X POST 'https://api.hydradb.com/webhooks/indexing/signing-secret' \
-H "Authorization: Bearer $HYDRADB_API_KEY" \
-H "API-Version: 2"
{
"data": {
"generated": true,
"message": "Success",
"signing_secret": "whsec_EXAMPLE_ONLY_THIS_IS_NOT_A_REAL_SIGNING_KEY"
},
"error": null,
"meta": {
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234",
"warnings": [
{
"code": "acl_ignored_by_connector_enforcement",
"collections": [
"team_docs",
"engineering"
],
"message": "This connector enforces ACL, so the request's acl was ignored."
}
]
},
"success": true
}{
"data": null,
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"deprecated_since": "2.0.1",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database",
"retry_after_seconds": 1,
"retryable": true
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}{
"data": null,
"detail": {
"deprecated": true,
"deprecated_field": "tenant_id",
"deprecated_since": "2.0.1",
"error_code": "VALIDATION_ERROR",
"message": "Request validation failed",
"preferred_field": "database",
"retry_after_seconds": 1,
"retryable": true
},
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d"
},
"success": false
}Generates a signing secret for an existing webhook, or replaces it with the
A supplied signing secret must contain at least 16 characters. Rotation takes effect immediately, so if you supply your own, configure your receiver to accept it before making this call. See Manage the signing secret.
To enable signing when you register a webhook, use
signing_secret you supply. The signing secret is returned once in data.signing_secret; store it securely, since it cannot be read back.
result = client.webhooks.set_signing_secret()
secret = result.data.signing_secret
const result = await client.webhooks.setSigningSecret();
const secret = result.data?.signingSecret;
curl -X POST 'https://api.hydradb.com/webhooks/indexing/signing-secret' \
-H "Authorization: Bearer $HYDRADB_API_KEY" \
-H "API-Version: 2"
generate_signing_secret: true on Register Webhook. If no webhook is registered, this endpoint returns 404.
Related resources
- Verify the signature: check signatures on your receiver and rotate the secret
- Send Test Delivery: check signature verification
- Disable Signing: delete the signing secret
Authorizations
Body
application/json
Omit the body to have a secret generated for you
Response
OK
Show child attributes
Show child attributes
Example:
{
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234",
"warnings": [
{
"code": "acl_ignored_by_connector_enforcement",
"collections": ["team_docs", "engineering"],
"message": "This connector enforces ACL, so the request's acl was ignored."
}
]
}
Was this page helpful?
