mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
update: update docs for add/update source health check for particular…
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10542 GitOrigin-RevId: 147a0310ac85a593e762f1c579367b4f08d4bc50
This commit is contained in:
parent
b47cf27f9b
commit
556ac7c768
@ -75,34 +75,28 @@ hasura metadata apply
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="api" label="API">
|
<TabItem value="api" label="API">
|
||||||
|
|
||||||
You can add _health check_ for a database using the
|
You can add/update _health check_ for a database using the
|
||||||
[pg_add_source](/api-reference/metadata-api/source.mdx#metadata-pg-add-source) Metadata API.
|
[pg_update_source](/api-reference/metadata-api/source.mdx#metadata-pg-update-source) Metadata API.
|
||||||
|
|
||||||
```http {17-24}
|
```http {7-18}
|
||||||
POST /v1/metadata HTTP/1.1
|
POST /v1/metadata HTTP/1.1
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
X-Hasura-Role: admin
|
X-Hasura-Role: admin
|
||||||
|
|
||||||
{
|
{
|
||||||
"type":"pg_add_source",
|
{
|
||||||
"args":{
|
"type": "pg_update_source",
|
||||||
"name":"<db_name>",
|
"args": {
|
||||||
"replace_configuration":true,
|
"name": "default",
|
||||||
"configuration":{
|
"health_check": {
|
||||||
"connection_info":{
|
"test": {
|
||||||
"database_url":{
|
"sql": "SELECT 1"
|
||||||
"from_env":"<DATABASE_URL_ENV>"
|
},
|
||||||
}
|
"interval": 100,
|
||||||
|
"timeout": 2,
|
||||||
|
"retries": 3,
|
||||||
|
"retry_interval": 2
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"health_check": {
|
|
||||||
"test": {
|
|
||||||
"sql": "SELECT 1"
|
|
||||||
},
|
|
||||||
"interval": 300,
|
|
||||||
"timeout": 5,
|
|
||||||
"retries": 3,
|
|
||||||
"retry_interval": 5
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user