forked from Netflix/Priam
-
Notifications
You must be signed in to change notification settings - Fork 0
REST API
kheremos edited this page Sep 16, 2014
·
43 revisions
REST API Reference
It will depend on how you deploy your application.
In our case, we use it with following prefix: “http://127.0.0.1:8080/Priam/REST”
E.g. to invoke get_token, which is under “/v1/cassconfig”, the call is “http://127.0.0.1:8080/Priam/REST/v1/cassconfig/get_token”
| API | Description | Query params |
|---|---|---|
| /v1/cassconfig/get_seeds | Gets a list of seeds. One per zone/Rack | |
| /v1/cassconfig/get_token | Get token for the node | |
| /v1/cassconfig/is_replace_token | Returns true if this node is replace another node with the same token | |
| /v1/cassconfig/double_ring | Double the ring |
| API | Description | Query params |
|---|---|---|
| /v1/cassadmin/start | Starts Cassandra process | |
| /v1/cassadmin/stop | Stop Cassandra process |
| API | Description | Query params |
|---|---|---|
| /v1/cassadmin/info | Get info (nodetool info) in json format | |
| /v1/cassadmin/ring/KEYSPACE | Get ring (nodetool ring) in json format. | Provide a Keyspace parameter |
| /v1/cassadmin/flush | flushes all keyspaces | |
| /v1/cassadmin/compact | Run compaction | |
| /v1/cassadmin/cleanup | Run cleanup | |
| /v1/cassadmin/repair | Run repair (nodetool repair) | |
| /v1/cassadmin/refresh?keyspaces= | KEYSPACES: Comma seperated list of keyspaces | |
| /v1/cassadmin/version | Show release version | |
| /v1/cassadmin/tpstats | Show Thread pool stats | |
| /v1/cassadmin/compactionstats | Show Compaction stats | |
| /v1/cassadmin/disablegossip | Disable gossip | |
| /v1/cassadmin/enablegossip | Enable gossip | |
| /v1/cassadmin/disablethrift | Disable Thrift | |
| /v1/cassadmin/enablethrift | Enable Thrift | |
| /v1/cassadmin/statusthrift | Show Thrift Status | |
| /v1/cassadmin/gossipinfo | Show Gossip Info | |
| /v1/cassadmin/netstats?host= | Show Net Stats | HOST (optional) |
| /v1/cassadmin/move?token= | Move | Provide New Token |
| /v1/cassadmin/scrub?keyspaces=&cfnames= | Run Scrub | KEYSPACES,CFNAMES |
| /v1/cassadmin/cfhistograms?keyspaces=&cfnames= | Run CF Histogram | KEYSPACES,CFNAMES |
| API | Description | Query params |
|---|---|---|
| /v1/backup/do_snapshot | Runs snapshot backup | |
| /v1/backup/restore | Restore from last backup up to now | |
| /v1/backup/restore?daterange=start_,endDate_ | Restore data between the start and end time | Start and End Date(“yyyyMMddHHmm”). |
| /v1/backup/restore?daterange=start_,endDate_(or default)®ion=region_ | Restore data between the start and end time for specific region | start_ and endDate_(“yyyyMMddHHmm”). Default day-1. region_ : DC or region. Defaults to current region. |
| /v1/backup/restore?daterange=start_,endDate_(or default)&token=token_ | Restore data between the start and end time | start_ and endDate_(“yyyyMMddHHmm”). Default day-1. Defaults to current region. token_: Override current token. |
| /v1/backup/restore?daterange=start_,endDate_(or default)&keyspaces=keyspaces_ | Restore data for the specified Keyspaces | Provide comma separated list of keyspaces. |
| /v1/backup/incremental_restore | Incremental Restore | |
| /v1/backup/list?daterange=default&filter=filter_ | Show the list of backup files | Date range can be ‘default’ or empty which will select date range between yesterday and today, Valid Filter types are : SNAP, SST & META |
| /v1/backup/list?daterange=start_,endDate_&filter=filter_ | Show the list of backup files. | Start and end date(“yyyyMMddHHmm”), Valid Filter types are : SNAP, SST & META |
| /v1/backup/list | Returns a json formatted list of files in the backup |