Files
scylladb/api/api-doc/hinted_handoff.json
Piotr Dulikowski 7e3966c03e api: add HTTP API for hint sync points
Adds HTTP endpoints for manipulating hint sync points:

- /hinted_handoff/sync_point (POST) - creates a new sync point for
  hints towards nodes listed in the `target_hosts` parameter
- /hinted_handoff/sync_point (GET) - checks the status of the sync
  point. If a non-zero `timeout` parameter is given, it waits until the
  sync point is reached or the timeout expires.
2021-08-09 09:24:36 +02:00

201 lines
6.5 KiB
JSON

{
"apiVersion":"0.0.1",
"swaggerVersion":"1.2",
"basePath":"{{Protocol}}://{{Host}}",
"resourcePath":"/hinted_hand_off_manager",
"produces":[
"application/json"
],
"apis":[
{
"path":"/hinted_handoff/sync_point",
"operations":[
{
"method":"POST",
"summary":"Creates a hints sync point. It can be used to wait until hints between given nodes are replayed. A sync point allows you to wait for hints accumulated at the moment of its creation - it won't wait for hints generated later. A sync point is described entirely by its ID - there is no state kept server-side, so there is no need to delete it.",
"type":"string",
"nickname":"create_hints_sync_point",
"produces":[
"application/json"
],
"parameters":[
{
"name":"target_hosts",
"description":"A list of nodes towards which hints should be replayed. Multiple hosts can be listed by separating them with commas. If not provided or empty, the point will resolve when current hints towards all nodes in the cluster are sent.",
"required":false,
"allowMultiple":false,
"type":"string",
"paramType":"query"
}
]
},
{
"method":"GET",
"summary":"Get the status of a hints sync point, possibly waiting for it to be reached.",
"type":"string",
"enum":[
"DONE",
"IN_PROGRESS"
],
"nickname":"get_hints_sync_point",
"produces":[
"application/json"
],
"parameters":[
{
"name":"id",
"description":"The ID of the hint sync point which should be checked or waited on",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"query"
},
{
"name":"timeout",
"description":"Timeout in seconds after which the query returns even if hints are still being replayed. No value or 0 will cause the query to return immediately. A negative value will cause the query to wait until the sync point is reached",
"required":false,
"allowMultiple":false,
"type":"long",
"paramType":"query"
}
]
}
]
},
{
"path":"/hinted_handoff/hints",
"operations":[
{
"method":"GET",
"summary":"List all the endpoints that this node has hints for.",
"type":"array",
"items":{
"type":"string"
},
"nickname":"list_endpoints_pending_hints",
"produces":[
"application/json"
],
"parameters":[
]
},
{
"method":"DELETE",
"summary":"Truncate all the hints",
"type":"void",
"nickname":"truncate_all_hints",
"produces":[
"application/json"
],
"parameters":[
{
"name":"host",
"description":"Optional String rep. of endpoint address to delete hints for",
"required":false,
"allowMultiple":false,
"type":"string",
"paramType":"query"
}
]
}
]
},
{
"path":"/hinted_handoff/schedule",
"operations":[
{
"method":"POST",
"summary":"force hint delivery to an endpoint",
"type":"void",
"nickname":"schedule_hint_delivery",
"produces":[
"application/json"
],
"parameters":[
{
"name":"host",
"description":" String rep. of endpoint address",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"query"
}
]
}
]
},
{
"path":"/hinted_handoff/pause",
"operations":[
{
"method":"POST",
"summary":"pause hints delivery",
"type":"void",
"nickname":"pause_hints_delivery",
"produces":[
"application/json"
],
"parameters":[
{
"name":"pause",
"description":"pause status",
"required":true,
"allowMultiple":false,
"type":"boolean",
"paramType":"query"
}
]
}
]
},
{
"path": "/hinted_handoff/metrics/create_hint/{addr}",
"operations": [
{
"method": "GET",
"summary": "Get create hint count",
"type": "long",
"nickname": "get_create_hint_count",
"produces": [
"application/json"
],
"parameters": [
{
"name": "addr",
"description": "The peer address",
"required": true,
"allowMultiple": false,
"type": "string",
"paramType": "path"
}
]
}
]
},
{
"path": "/hinted_handoff/metrics/not_stored_hints/{addr}",
"operations": [
{
"method": "GET",
"summary": "Get not stored hints count",
"type": "long",
"nickname": "get_not_stored_hints_count",
"produces": [
"application/json"
],
"parameters": [
{
"name": "addr",
"description": "The peer address",
"required": true,
"allowMultiple": false,
"type": "string",
"paramType": "path"
}
]
}
]
}
]
}