Files
scylladb/api/api-doc/stream_manager.json
Amnon Heiman 3889e068de API: Adding the stream_manager swagger definition
This adds the stream_manager swagger definition file. It is based on the
StreamManagerMBean definition and the return class based on StreamState
class and its sub classes.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-10 01:02:26 +03:00

175 lines
4.8 KiB
JSON

{
"apiVersion":"0.0.1",
"swaggerVersion":"1.2",
"basePath":"{{Protocol}}://{{Host}}",
"resourcePath":"/stream_manager",
"produces":[
"application/json"
],
"apis":[
{
"path":"/stream_manager/",
"operations":[
{
"method":"GET",
"summary":"Returns the current state of all ongoing streams.",
"type":"array",
"items":{
"type":"stream_state"
},
"nickname":"get_current_streams",
"produces":[
"application/json"
],
"parameters":[
]
}
]
}
],
"models":{
"stream_state":{
"id":"stream_state",
"description":"Current snapshot of streaming progress",
"properties":{
"plan_id":{
"type":"string",
"description":"Plan UUID"
},
"description":{
"type":"string",
"description":"The stream description"
},
"sessions":{
"type":"array",
"description":"The sessions info",
"items":{
"type":"stream_info"
}
}
}
},
"stream_info":{
"id":"stream_info",
"description":"Stream session info",
"properties":{
"peer":{
"type":"string",
"description":"The peer"
},
"session_index":{
"type":"int",
"description":"The session index"
},
"connecting":{
"type":"string"
},
"receiving_summaries":{
"type":"array",
"items":{
"type":"stream_summary"
},
"description":"Receiving summaries"
},
"sending_summaries":{
"type":"array",
"items":{
"type":"stream_summary"
},
"description":"Sending summaries"
},
"state":{
"type":"string",
"description":"Current session state",
"enum":[
"INITIALIZED",
"PREPARING",
"STREAMING",
"WAIT_COMPLETE",
"COMPLETE",
"FAILED"
]
},
"receiving_files":{
"type":"array",
"items":{
"type":"progress_info_mapper"
},
"description":"Receiving files"
},
"sending_files":{
"type":"array",
"items":{
"type":"progress_info_mapper"
},
"description":"Sending files"
}
}
},
"stream_summary":{
"id":"stream_summary",
"description":"Stream summary info",
"properties":{
"cf_id":{
"type":"string",
"description":"The ID"
},
"files":{
"type":"int",
"description":"Number of files to transfer. Can be 0 if nothing to transfer for some streaming request."
},
"total_size":{
"type":"long"
}
}
},
"progress_info_mapper":{
"id":"progress_info_mapper",
"description":"A mapping between file and its progress info",
"properties":{
"key":{
"type":"string",
"description":"The key"
},
"value":{
"type":"progress_info",
"description":"The progress info"
}
}
},
"progress_info":{
"id":"progress_info",
"description":"File transfer progress",
"properties":{
"peer":{
"type":"string",
"description":"The peer address"
},
"session_index":{
"type":"int",
"description":"The session index"
},
"file_name":{
"type":"string",
"description":"The file name"
},
"direction":{
"type":"string",
"description":"The file name",
"enum":[
"OUT",
"IN"
]
},
"current_bytes":{
"type":"long",
"description":"The current bytes"
},
"total_bytes":{
"type":"long",
"description":"The total bytes"
}
}
}
}
}