{"swagger":"2.0","info":{"description":"SMITE'2 Perception API for video (aka 4GTec). It is intended to be used in the Smite2 project, specifically for video recording and extract functions.","version":"1.4","title":"4Gtec","contact":{"email":"romain.veran@4g-technology.eu"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"Config","description":"Functions to connect / disconnect from the server but also to configure the authorized users on it."},{"name":"Record","description":"Functions to start / stop recording cameras but also to see the status of cameras."},{"name":"Replay","description":"Functions to search for available cameras and recordings but also to extract these recordings in different ways."}],"paths":{"/login":{"get":{"tags":["Config"],"summary":"Allows to login to the server, gives access to others commands.","description":" - Use example 1 : To login. \n http://[ip address]:8080/4G/api/login?id=user&password=root \n ","operationId":"server_login","produces":["application/json"],"parameters":[{"name":"id","in":"query","description":"The user id.","required":true,"type":"string"},{"name":"password","in":"query","description":"The user password.","required":true,"type":"string"}],"responses":{"200":{"description":"Operation is successful : the user is logged.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.config_controller"}},"/logout":{"get":{"tags":["Config"],"summary":"Allows to logout to the server.","description":" - Use example 1 : To logout. \n http://[ip address]:8080/4G/api/logout \n ","operationId":"server_logout","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Operation is successful : the user is disconnected.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.config_controller"}},"/config":{"get":{"tags":["Config"],"summary":"Allows to configure the authorized users on the server but also to see autorized users.","description":" - Use example 1 : To display autorized users. \n http://[ip address]:8080/4G/api/config \n - Use example 2 : To add a new user. \n http://[ip address]:8080/4G/api/config?parameter=add_log(user2-passw2) \n - Use example 3 : To remove a user. \n http://[ip address]:8080/4G/api/config?parameter=rm_log(user2) \n ","operationId":"server_config","produces":["application/json"],"parameters":[{"name":"parameter","in":"query","description":"The parameter to send to the server.","required":false,"type":"string"}],"responses":{"200":{"description":"Operation is successful, users are displayed, a user are added or removed.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.config_controller"}},"/list/cameras":{"get":{"tags":["Replay"],"summary":"Searches cameras with available records.","description":"To get the list of cameras that have any record available.\n - Use example 1 : \n http://[ip address]:8080/4G/api/list/cameras ","operationId":"list_of_cameras","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Operation is successful, a list of cameras is returned.","schema":{"$ref":"#/definitions/Camera_id"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/list/{camera_id}/records":{"get":{"tags":["Replay"],"summary":"Returns the list of available records of the camera.","description":"\n - Use example 1 : To get the list of available records of camera0.\n http://[ip address]:8080/4G/api/list/camera0/records ","operationId":"list_of_records","produces":["application/json"],"parameters":[{"name":"camera_id","in":"path","description":"The camera id.","required":true,"type":"string"},{"name":"fastread","in":"query","description":"If it is set to 'True', it increase the read speed and accuracy by using the list.txt generated in each day folder.","required":false,"type":"boolean","default":true}],"responses":{"200":{"description":"Operation is successful, a list of records is returned.","schema":{"$ref":"#/definitions/Records_list"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/record/{camera_id}/status":{"get":{"tags":["Record"],"summary":"Returns the status of the camera defined by the id.","description":" - Use example 1 : To see camera0 status. \n http://[ip address]:8080/4G/api/record/camera0/status \n ","operationId":"get_status","produces":["application/json"],"parameters":[{"name":"camera_id","in":"path","description":"The camera id.","required":true,"type":"string"}],"responses":{"200":{"description":"Operation is successful, the camera status is returned.","schema":{"$ref":"#/definitions/Status_reply"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.record_controller"}},"/record/{camera_id}/start":{"get":{"tags":["Record"],"summary":"To start the recording of the camera defined by the id.","description":" - Use example 1 : Start the recording of camera0. \n http://[ip address]:8080/4G/api/record/camera0/start?url=rtsp%3A%2F%2Fadmin%3A12345%40192.168.51.165%2FStreaming%2Fchannels%2F1 \n - Use example 2 : Start the recording of camera1. \n http://[ip address]:8080/4G/api/record/camera1/start?url=rtsp%3A%2F%2Fadmin%3Aadmin%40192.168.51.175%3A80%2F0&transport=tcp \n ","operationId":"start_record","produces":["application/json"],"parameters":[{"name":"camera_id","in":"path","description":"The camera id.","required":true,"type":"string"},{"name":"url","in":"query","description":"The camera url.","required":true,"type":"string"},{"name":"transport","in":"query","description":"Option to force transport type.\n - Values : tcp, udp, udp_multicast, http ","required":false,"type":"string"}],"responses":{"200":{"description":"Operation is successful, the camera is recording.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.record_controller"}},"/record/{camera_id}/stop":{"get":{"tags":["Record"],"summary":"Stop the recording of the camera defined by the id.","description":" - Use example 1 : To stop the recording of camera0. \n http://[ip address]:8080/4G/api/record/camera0/stop ","operationId":"stop_record","produces":["application/json"],"parameters":[{"name":"camera_id","in":"path","description":"The camera id.","required":true,"type":"string"}],"responses":{"200":{"description":"Operation is successful","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.record_controller"}},"/replay/{camera_id}/start":{"get":{"tags":["Replay"],"summary":"Start the replay of the camera defined by the id.","description":" - Use example 1 : To start the replay of camera0. \n http://[ip address]:8080/4G/api/replay/camera0/start?replay_name=rpl1&mux=h264&codec=h264&chuncksize=1&chunktime=0.01&start=20180814T113011Z&stop=20180814T1140 ","operationId":"start_replay","parameters":[{"name":"camera_id","in":"path","description":"The camera id.","required":true,"type":"string"},{"name":"replay_name","in":"query","description":"The replay name.","required":true,"type":"string"},{"name":"start","in":"query","description":"Replay start date and time.","required":true,"type":"string"},{"name":"stop","in":"query","description":"Replay end date and time.","required":false,"type":"string"},{"name":"format","in":"query","description":"To change video bitrate(kb) and resolution.\n - values : D1, 4cif, 2cif, dcif, cif, qcif","required":false,"type":"string"},{"name":"res","in":"query","description":"To change video resolution.","required":false,"type":"string"},{"name":"bitrate","in":"query","description":"To change video bitrate(kb).","required":false,"type":"integer"},{"name":"framerate","in":"query","description":"To change video framerate.","required":false,"type":"integer"},{"name":"codec","in":"query","description":"To change video codec.\n - values : h264, hevc","required":true,"type":"string"},{"name":"mux","in":"query","description":"To change video container.\n - values : h264, hevc ","required":false,"type":"string"},{"name":"chunksize","in":"query","description":"To change chunksize(bytes).","default":1024,"required":false,"type":"integer"},{"name":"chunktime","in":"query","description":"To change time(seconds) between each chunk read.","default":0,"required":false,"type":"number"}],"responses":{"200":{"description":"Operation is successful, the replay is started."},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/replay/{replay_name}/pause":{"get":{"tags":["Replay"],"summary":"Pause the replay of the camera defined by the replay_name.","description":" - Use example 1 : To pause the replay1. \n http://[ip address]:8080/4G/api/replay/replay1/pause ","operationId":"pause_replay","parameters":[{"name":"replay_name","in":"path","description":"The replay name.","required":true,"type":"string"}],"responses":{"200":{"description":"Operation is successful, the replay is paused.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/replay/{replay_name}/run":{"get":{"tags":["Replay"],"summary":"Run the replay of the camera defined by the replay_name.","description":" - Use example 1 : To run the replay1. \n http://[ip address]:8080/4G/api/replay/replay1/run ","operationId":"run_replay","parameters":[{"name":"replay_name","in":"path","description":"The replay name.","required":true,"type":"string"}],"responses":{"200":{"description":"Operation is successful, the replay is running.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/replay/{replay_name}/stop":{"get":{"tags":["Replay"],"summary":"Stop the replay of the camera defined by the replay_name.","description":" - Use example 1 : To stop the replay1. \n http://[ip address]:8080/4G/api/replay/replay1/stop ","operationId":"stop_replay","parameters":[{"name":"replay_name","in":"path","description":"The replay name.","required":true,"type":"string"}],"responses":{"200":{"description":"Operation is successful, the replay is stopped.","schema":{"$ref":"#/definitions/Success"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/extract/{camera_id}":{"get":{"tags":["Replay"],"summary":"Extracts a part of the video recordings of the camera defined by the id.","description":"\n - Use exemple 1 : To get an extract of camera0 called extavi from 2018-08-14 11:38:20 to 2018-08-14 11:40:11 with : pipe = True, mux = avi.\n http://[ip address]:8080/4G/api/extract/camera0?name=extavi&codec=h264&pipe=True&mux=avi&start=20180814T113820Z&stop=20180814T114011Z\n - Use exemple 1 : To get an extract of camera0 called extmp4 from 2018-08-14 11:38:20 to 2018-08-14 11:40:11 with : pipe = False, mux = mp4.\n http://[ip address]:8080/4G/api/extract/camera0?name=extmp4&codec=h264&pipe=False&mux=mp4&start=20180814T113820Z&stop=20180814T114011Z ","operationId":"extract_video","parameters":[{"name":"camera_id","in":"path","description":"The camera id.\n - Correct example : camera0","required":true,"type":"string"},{"name":"name","in":"query","description":"The extract name.\n - Correct example : extract1","required":false,"type":"string"},{"name":"pipe","in":"query","description":" The extract mode, direct if pipe is set to 'True' and pipe can't be used with mp4 mux.","default":false,"required":false,"type":"boolean"},{"name":"start","in":"query","description":"The extract start date and time with format : yymmddThhmmssmsmsmsZ.\n - Correct example : 2018-08-14 13:22:11 \n 20180814T132211Z\n - Correct example : 2018-08-14 13:22:11.555 \n 20180814T132211555Z\n ","required":false,"type":"string"},{"name":"stop","in":"query","description":"The extract end date and time with format : yymmddThhmmssmsmsmsZ.\n - Correct example : 2018-08-15 14:30:22 \n 20180815T143022Z\n - Correct example : 2018-08-15 14:30:22.365 \n 20180815T143022365Z\n ","required":false,"type":"string"},{"name":"format","in":"query","description":"To change video bitrate(kb) and resolution.\n - values : D1, 4cif, 2cif, dcif, cif, qcif ","required":false,"type":"string"},{"name":"res","in":"query","description":"To change video resolution.\n - Correct example : 1280×720 or 1280x-1","required":false,"type":"string"},{"name":"bitrate","in":"query","description":"To change video bitrate(kb).\n - Correct example : 400","required":false,"type":"integer"},{"name":"framerate","in":"query","description":"To change video framerate.\n - Correct example : 25","required":false,"type":"integer"},{"name":"codec","in":"query","description":"To change video codec.\n - values : h264, hevc ","required":true,"type":"string"},{"name":"mux","in":"query","description":"To change video container.\n - values : h264, hevc, avi, mp4 ","required":false,"type":"string"},{"name":"chunksize","in":"query","description":"To change chunksize(bytes), it is only used in pipe mode.\n - Correct example : 1024","default":"1024*1024","required":false,"type":"integer"},{"name":"chunktime","in":"query","description":"To change time(seconds) between each chunk read.\n - Correct example : 0.01","default":0,"required":false,"type":"number"},{"name":"ondisk","in":"query","description":"If set to True, it accelerate raw extraction but use temporary additional disk space.","default":false,"required":false,"type":"boolean"}],"responses":{"200":{"description":"Operation is successful"},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}},"/extract/{camera_id}/image":{"get":{"tags":["Replay"],"summary":"Extracts an image of the video recordings of the camera defined by the id.","description":"\n - Use exemple 1 : To extract an image from camera0 recordings. http://[ip address]:8080/4G/api/extract/camera0/image?name=myimage&format=jpg&stop=20180814T114022080Z","operationId":"extract_image","parameters":[{"name":"camera_id","in":"path","description":"The camera id.","required":true,"type":"string"},{"name":"stop","in":"query","description":"The extract image date and time position.","required":true,"type":"string"},{"name":"name","in":"query","description":"The image name.","required":false,"type":"string"},{"name":"format","in":"query","description":"Image format.\n - values : tiff, png, jpg","default":"jpg","required":false,"type":"string"}],"responses":{"200":{"description":"Operation is successful, an image is returned."},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"Not Found","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/Error"}}},"x-swagger-router-controller":"swagger_server.controllers.replay_controller"}}},"definitions":{"Camera_id":{"type":"object","required":["detail","id","status","title"],"properties":{"id":{"type":"array","items":{"type":"string"}},"detail":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"}},"example":{"id":["id","id"],"detail":"detail","title":"title","status":200}},"Records_list":{"type":"object","required":["detail","records","status","title"],"properties":{"records":{"type":"array","items":{"type":"string"}},"detail":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"}},"example":{"records":["records","records"],"detail":"detail","title":"title","status":200}},"Status_reply":{"type":"object","required":["detail","id","state","status","title"],"properties":{"id":{"type":"string"},"state":{"type":"string"},"detail":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"}},"example":{"id":"id","state":"state","detail":"detail","title":"title","status":200}},"Success":{"type":"object","required":["detail","status","title"],"properties":{"detail":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"}},"example":{"detail":"detail","title":"title","status":200}},"Error":{"type":"object","required":["detail","status","title"],"properties":{"detail":{"type":"string"},"status":{"type":"integer"},"title":{"type":"string"}}}},"host":"virtserver.swaggerhub.com","basePath":"/veran1337/4G-Technology/1.4","schemes":["https","http"]}