> For the complete documentation index, see [llms.txt](https://developer.fotokite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.fotokite.com/fotokite-api/recordings.md).

# Recordings

## Get video recordings

> A recording is a collection of video files (color and thermal) and metadata files.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["read"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"schemas":{"Recording":{"type":"object","description":"Represents a video recording, including video files and metadata.","required":["recording_id","is_being_recorded","videos"],"properties":{"recording_id":{"type":"string","description":"Identifier of the recording."},"is_being_recorded":{"type":"boolean","description":"Whether this recording is currently being recorded."},"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoFile"}}}},"VideoFile":{"description":"Represents a video file in a recording, including metadata.","type":"object","required":["type","recording_id","file_id","size","is_recording"],"properties":{"type":{"$ref":"#/components/schemas/VideoStreamType"},"recording_id":{"type":"string","description":"ID of the video recording"},"file_id":{"type":"string","description":"Identifier of the video file. Used for downloading."},"size":{"type":"integer","format":"int64"},"is_recording":{"type":"boolean"}}},"VideoStreamType":{"type":"string","description":"Video stream type. Possible values: * `Color` - regular color video stream. * `Thermal` - thermal video stream.\n"}}},"paths":{"/v1/recordings":{"get":{"summary":"Get video recordings","description":"A recording is a collection of video files (color and thermal) and metadata files.","tags":["Recordings"],"responses":{"200":{"description":"List of video recordings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Recording"}}}}}}}}}}
```

## Get video recorder state

> Returns the current video recorder state.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["read"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"schemas":{"RecordingsState":{"type":"object","description":"Current state of the video recorder.","required":["available_space","total_space","is_recording"],"properties":{"recording_id":{"type":"string","description":"ID of the recording."},"started_recording_timestamp":{"type":"string","format":"date-time","description":"Last time a recording was started since boot, or zero otherwise."},"stopped_recording_timestamp":{"type":"string","format":"date-time","description":"Last time a recording was stopped, or current time if recording."},"is_recording":{"type":"boolean","description":"Whether the recorder is currently running."},"recording_seconds":{"type":"integer","format":"int32","description":"Number of seconds the current recording has been running."},"available_space":{"type":"integer","description":"Bytes available to store video recordings","format":"int64","minimum":0},"occupied_space":{"type":"integer","description":"Bytes currently occupied by video recordings","format":"int64","minimum":0},"total_space":{"type":"integer","description":"Total bytes available for video recordings","format":"int64","minimum":0}}}}},"paths":{"/v1/recordings/state":{"get":{"summary":"Get video recorder state","description":"Returns the current video recorder state.","tags":["Recordings"],"responses":{"200":{"description":"Current recorder state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingsState"}}}}}}}}}
```

## Get video recording

> Returns a video recording. A video recording is a collection of video files (color and thermal) and metadata.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["read"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"schemas":{"Recording":{"type":"object","description":"Represents a video recording, including video files and metadata.","required":["recording_id","is_being_recorded","videos"],"properties":{"recording_id":{"type":"string","description":"Identifier of the recording."},"is_being_recorded":{"type":"boolean","description":"Whether this recording is currently being recorded."},"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoFile"}}}},"VideoFile":{"description":"Represents a video file in a recording, including metadata.","type":"object","required":["type","recording_id","file_id","size","is_recording"],"properties":{"type":{"$ref":"#/components/schemas/VideoStreamType"},"recording_id":{"type":"string","description":"ID of the video recording"},"file_id":{"type":"string","description":"Identifier of the video file. Used for downloading."},"size":{"type":"integer","format":"int64"},"is_recording":{"type":"boolean"}}},"VideoStreamType":{"type":"string","description":"Video stream type. Possible values: * `Color` - regular color video stream. * `Thermal` - thermal video stream.\n"},"Error":{"type":"object","description":"A generic error object.","required":["code","message"],"properties":{"code":{"description":"Unique error code.","type":"string"},"message":{"description":"User readable message of the error","type":"string"}}}},"responses":{"NotFound":{"description":"File Not Found. Endpoint does not exist at all or the object referred to is not known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/recordings/{recording_id}":{"get":{"summary":"Get video recording","description":"Returns a video recording. A video recording is a collection of video files (color and thermal) and metadata.","tags":["Recordings"],"responses":{"200":{"description":"Details of the video recording","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recording"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## Delete video recording

> Deletes a video recording. A video recording is a collection of video files (color and thermal) and metadata.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["control"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"responses":{"CommandSuccess":{"description":"The command was sent successfully"},"WrongInput":{"description":"Request parameter doesn't meet criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"File Not Found. Endpoint does not exist at all or the object referred to is not known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadGateway":{"description":"Bad Gateway. The service is not able to communicate with an upstream service it depends on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"The service is not ready yet. Usually this means that service didn't gather all the necessary information from subsystems.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"A generic error object.","required":["code","message"],"properties":{"code":{"description":"Unique error code.","type":"string"},"message":{"description":"User readable message of the error","type":"string"}}}}},"paths":{"/v1/recordings/{recording_id}":{"delete":{"summary":"Delete video recording","description":"Deletes a video recording. A video recording is a collection of video files (color and thermal) and metadata.","tags":["Recordings"],"responses":{"200":{"$ref":"#/components/responses/CommandSuccess"},"400":{"$ref":"#/components/responses/WrongInput"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```

## Download video

> Returns a specific video of a recording.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["read"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"responses":{"WrongInput":{"description":"Request parameter doesn't meet criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"File Not Found. Endpoint does not exist at all or the object referred to is not known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RangeNotSatisfiable":{"description":"Requested Range Not Satisfiable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadGateway":{"description":"Bad Gateway. The service is not able to communicate with an upstream service it depends on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"The service is not ready yet. Usually this means that service didn't gather all the necessary information from subsystems.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"A generic error object.","required":["code","message"],"properties":{"code":{"description":"Unique error code.","type":"string"},"message":{"description":"User readable message of the error","type":"string"}}}}},"paths":{"/v1/recordings/{recording_id}/{file_id}":{"get":{"summary":"Download video","description":"Returns a specific video of a recording.","tags":["Recordings"],"responses":{"200":{"description":"Full file content","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"Partial file content","headers":{"Accept-Ranges":{"description":"The range unit supported by the server.","schema":{"type":"string"}},"Content-Length":{"description":"Length of the response body in bytes.","schema":{"type":"integer","format":"int64"}},"Content-Range":{"description":"Content byte range in the response.","schema":{"type":"string","pattern":"^bytes \\d+-\\d+/\\d+$"}}},"content":{"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/WrongInput"},"404":{"$ref":"#/components/responses/NotFound"},"416":{"$ref":"#/components/responses/RangeNotSatisfiable"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```

## Start video recording

> Starts a video recording. A video recording is a collection of video files (color and thermal) and metadata.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["control"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"responses":{"CommandSuccess":{"description":"The command was sent successfully"},"WrongInput":{"description":"Request parameter doesn't meet criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ControlCommandBlocked":{"description":"Control is not allowed because somebody else is controlling the System.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowedInCurrentState":{"description":"The operation is not allowed in current state. Example: Rotation is not allowed during landing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadGateway":{"description":"Bad Gateway. The service is not able to communicate with an upstream service it depends on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"The service is not ready yet. Usually this means that service didn't gather all the necessary information from subsystems.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InsufficientStorage":{"description":"Insufficient Storage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"A generic error object.","required":["code","message"],"properties":{"code":{"description":"Unique error code.","type":"string"},"message":{"description":"User readable message of the error","type":"string"}}}}},"paths":{"/v1/recordings/control/start":{"post":{"summary":"Start video recording","description":"Starts a video recording. A video recording is a collection of video files (color and thermal) and metadata.","tags":["Recordings"],"responses":{"201":{"$ref":"#/components/responses/CommandSuccess"},"400":{"$ref":"#/components/responses/WrongInput"},"403":{"$ref":"#/components/responses/ControlCommandBlocked"},"409":{"$ref":"#/components/responses/NotAllowedInCurrentState"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"507":{"$ref":"#/components/responses/InsufficientStorage"}}}}}}
```

## Stop video recording

> Stops the current video recording.

```json
{"openapi":"3.0.4","info":{"title":"Fotokite API","version":"1.0.0"},"servers":[{"url":"http://192.168.2.100:3128/api","description":"API service running on the system"},{"url":"http://{hostname_or_ip}/api","description":"Unencrypted API anywhere, for development use","variables":{"hostname_or_ip":{"default":"localhost:3128"}}},{"url":"https://{hostname_or_ip}/api","description":"Encrypted API accessible from outside the Sigma network","variables":{"hostname_or_ip":{"default":"fotokite-sigma.local"}}},{"url":"https://{gsname}.sigma.fotokite-system.com/api","description":"Hostname used for TLS certificates. The API is not reachable there, unless a local DNS override is set.","variables":{"gsname":{"default":"G2628RH"}}}],"security":[{"TokenAuth":["control"]}],"components":{"securitySchemes":{"TokenAuth":{"description":"Plugin authentication using Bearer token. For more details, see [Fotokite API Documentation](https://developer.fotokite.com/~/changes/46/getting-started#authentication).\n","type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"http://192.168.2.100:3128/api/v1/auth/token/request","scopes":{"read":"Grants access to retrieve system data and information.","control":"Allows sending commands to control the system.","can_override":"Allows to make `handoff/control/override` call to override current controlling client.","experimental":"Enables access to experimental API features.","internal":"Fotokite-internal functions. Not for third-party use."}}}}},"responses":{"CommandSuccess":{"description":"The command was sent successfully"},"WrongInput":{"description":"Request parameter doesn't meet criteria","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ControlCommandBlocked":{"description":"Control is not allowed because somebody else is controlling the System.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowedInCurrentState":{"description":"The operation is not allowed in current state. Example: Rotation is not allowed during landing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadGateway":{"description":"Bad Gateway. The service is not able to communicate with an upstream service it depends on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"The service is not ready yet. Usually this means that service didn't gather all the necessary information from subsystems.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InsufficientStorage":{"description":"Insufficient Storage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"A generic error object.","required":["code","message"],"properties":{"code":{"description":"Unique error code.","type":"string"},"message":{"description":"User readable message of the error","type":"string"}}}}},"paths":{"/v1/recordings/control/stop":{"post":{"summary":"Stop video recording","description":"Stops the current video recording.","tags":["Recordings"],"responses":{"201":{"$ref":"#/components/responses/CommandSuccess"},"400":{"$ref":"#/components/responses/WrongInput"},"403":{"$ref":"#/components/responses/ControlCommandBlocked"},"409":{"$ref":"#/components/responses/NotAllowedInCurrentState"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"507":{"$ref":"#/components/responses/InsufficientStorage"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.fotokite.com/fotokite-api/recordings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
