### Get Hardware Info Request Source: https://gopro.github.io/OpenGoPro/http This snippet demonstrates how to request hardware information from the camera using a GET request. ```curl curl --request GET \ --url http://10.5.5.9:8080/gopro/camera/info ``` -------------------------------- ### Get Camera Setting (Option 0, Setting 168) Source: https://gopro.github.io/OpenGoPro/http This example shows how to retrieve the current value for setting 168 (Scheduled Capture) using Curl. The camera's IP and port should be correctly configured. ```Shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=168' ``` -------------------------------- ### Start Preview Stream Source: https://gopro.github.io/OpenGoPro/http Starts the camera's preview stream, sending MPEG Transport Stream data via UDP. ```APIDOC ## Start Preview Stream ### Description Starts the camera's preview stream, sending MPEG Transport Stream data via UDP on the specified port. The stream format (AVC/HEVC) depends on the camera model. ### Method GET ### Endpoint /gopro/camera/stream/start ### Parameters #### Query Parameters - **port** (integer) - Optional - Port to use for Preview Stream. Not supported on Hero 11 Black Mini, Hero 11 Black, Hero 10 Black, Hero 9 Black. ### Request Example ```bash curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/stream/start?port=8556' ``` ### Response #### Success Response (200) Request was successfully received by the camera. ##### Response Schema: application/json ```json { } ``` ``` -------------------------------- ### Start Webcam Stream with Parameters Source: https://gopro.github.io/OpenGoPro/http This curl command starts the webcam stream with specified resolution, field-of-view, port, and protocol. Ensure the camera and network configuration support these parameters. ```Shell curl --request GET --url 'http://10.5.5.9:8080/gopro/webcam/start?res=12&fov=0&port=8556&protocol=RTSP' ``` -------------------------------- ### Get Camera Client Info Source: https://gopro.github.io/OpenGoPro/http Use this endpoint to retrieve client information from the camera. This is a simple GET request. ```curl curl --request GET --url http://10.5.5.9:8080/gopro/camera/analytics/set_client_info ``` -------------------------------- ### Media List Response Example Source: https://gopro.github.io/OpenGoPro/http An example of the JSON response structure for the media list endpoint, showing details of media files and their properties. ```json { * "id": "1554375628411872255", * "media": [ * { * "d": "100GOPRO", * "fs": [ * { * "cre": 1696600109, * "glrv": 817767, * "ls": -1, * "mod": 1696600109, * "n": "GOPR0001.JPG", * "raw": 1, * "s": 2806303 } ] } ] } ``` -------------------------------- ### Media Info Response Example Source: https://gopro.github.io/OpenGoPro/http Example JSON response containing metadata for a photo or video file. This includes various attributes of the media. ```json { "ao": "auto", "avc_profile": 0, "cl": 0, "cre": 1692992748, "ct": 0, "dur": 42, "eis": 0, "fov": "string", "fps": 1001, "fps_denom": 30000, "gumi": "12345678998765443211234567899875", "h": 1080, "hc": 99, "hi": [ 1500, 4700 ], "lc": 0, "ls": -1, "mos": [ "string" ], "mp": 0, "prjn": 0, "profile": 255, "progr": 0, "pta": 0, "rot": 0, "s": 1234567890, "subsample": 0, "tr": 0, "us": 0, "w": 1920 } ``` -------------------------------- ### Get Date/Time Request Source: https://gopro.github.io/OpenGoPro/http This snippet shows how to make a GET request to the camera to retrieve the current date and time. ```curl curl --request GET \ --url http://10.5.5.9:8080/gopro/camera/get_date_time ``` -------------------------------- ### Start Webcam Stream Source: https://gopro.github.io/OpenGoPro/http Starts the webcam stream on the GoPro camera. Allows configuration of resolution, field-of-view, port, and streaming protocol. ```APIDOC ## GET /gopro/webcam/start ### Description Starts the webcam stream on the GoPro camera. Allows configuration of resolution, field-of-view, port, and streaming protocol. ### Method GET ### Endpoint http://10.5.5.9:8080/gopro/webcam/start ### Parameters #### Query Parameters - **res** (integer) - Optional - Webcam Resolution. Example: res=12 (1080p) - **fov** (integer) - Optional - Webcam Field-of-View. Example: fov=0 (Wide) - **port** (integer) - Optional - Port to use for Webcam Stream. Defaults to 8554. Not supported on: Hero 11 Black Mini, Hero 10 Black, Hero 9 Black. - **protocol** (string) - Optional - Streaming protocol to use. Enum: "RTSP", "TS". Not supported on: Hero 11 Black Mini, Hero 11 Black, Hero 10 Black, Hero 9 Black. ### Request Example ```curl curl --request GET --url 'http://10.5.5.9:8080/gopro/webcam/start?res=12&fov=0&port=8556&protocol=RTSP' ``` ### Response #### Success Response (200) Request was successfully received by the camera. ##### Response Schema: application/json object #### Error Response (501) Operation not supported on camera model. ``` -------------------------------- ### Webcam Preview Response (JSON) Source: https://gopro.github.io/OpenGoPro/http This is a sample empty JSON response indicating a successful request to start the webcam preview. ```json { } ``` -------------------------------- ### Get Available Presets Request Source: https://gopro.github.io/OpenGoPro/docs/ble/presets Use this Protobuf request to get available presets and preset groups from the camera. It allows specifying statuses to be notified about and whether to include hidden presets. ```protobuf message RequestGetPresetStatus { repeated EnumRegisterPresetStatus register_preset_status = 1; repeated EnumRegisterPresetStatus unregister_preset_status = 2; optional bool use_constant_setting_ids = 3; optional bool include_hidden = 4; } ``` -------------------------------- ### RequestSetLiveStreamMode Source: https://gopro.github.io/OpenGoPro/docs/ble/live_streaming Requests the device to start a live stream with the specified configuration. ```APIDOC ## POST /api/v1/livestream/mode ### Description Requests the device to start a live stream with the specified configuration. ### Method POST ### Endpoint /api/v1/livestream/mode ### Parameters #### Request Body - **url** (string) - Required - RTMP(S) URL used for live stream - **encode** (bool) - Required - Save media to sdcard while streaming? - **window_size** (EnumWindowSize) - Required - Resolution to use for live stream - **cert** (bytes) - Optional - Certificate for servers that require it in PEM format - **minimum_bitrate** (int32) - Optional - Minimum desired bitrate (may or may not be honored) - **maximum_bitrate** (int32) - Optional - Maximum desired bitrate (may or may not be honored) - **starting_bitrate** (int32) - Optional - Starting bitrate - **lens** (EnumLens) - Optional - Lens to use for live stream ### Response #### Success Response (200) - **result** (EnumResultGeneric) - Generic pass/fail/error info ``` -------------------------------- ### Get Camera Setting (Generic) Source: https://gopro.github.io/OpenGoPro/http Use this curl command to query a generic camera setting. Replace 'option' and 'setting' with specific values. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=3600&setting=32' ``` -------------------------------- ### Get Available Presets Source: https://gopro.github.io/OpenGoPro/http Retrieves all currently available presets, optionally including hidden ones. This is useful for understanding the preset configuration of the camera. ```Shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/presets/get?include-hidden=0' ``` -------------------------------- ### Get Webcam Version Response (JSON) Source: https://gopro.github.io/OpenGoPro/http Sample JSON response detailing webcam version information. 'max_lens_support' and 'usb_3_1_compatible' indicate hardware capabilities. ```json { * "max_lens_support": true, * "usb_3_1_compatible": true, * "version": 0 } ``` -------------------------------- ### Get Open GoPro Version Source: https://gopro.github.io/OpenGoPro/http Fetches the current version of the Open GoPro API running on the camera. This is useful for compatibility checks. ```shell curl --request GET --url http://10.5.5.9:8080/gopro/version ``` -------------------------------- ### Set Livestream Mode Source: https://gopro.github.io/OpenGoPro/docs/ble/live_streaming Configures the camera to enter livestreaming mode. This is a prerequisite before starting the actual stream. ```APIDOC ## Set Livestream Mode ### Description Configures the camera to enter livestreaming mode. The current livestream mode can be queried using 'Get Livestream Status'. ### Method Protobuf ### Endpoint N/A (Protobuf command) ### Parameters This operation is typically invoked via a Protobuf message. Specific fields for configuration would be detailed in the Protobuf definition, but are not explicitly listed in this documentation snippet. ``` -------------------------------- ### Get Hypersmooth Setting Source: https://gopro.github.io/OpenGoPro/http Use this endpoint to query the current Hypersmooth setting of the camera. The 'option' parameter specifies the desired Hypersmooth mode. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=4&setting=135' ``` -------------------------------- ### Get Framing Setting Source: https://gopro.github.io/OpenGoPro/http Use this endpoint to query the current framing setting of the camera. The 'option' parameter specifies the desired framing mode. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=2&setting=193' ``` -------------------------------- ### Start Webcam Preview (Shell + Curl) Source: https://gopro.github.io/OpenGoPro/http Use this command to initiate the webcam preview stream. Ensure Wired USB Control is disabled for USB connections. ```curl curl --request GET --url http://10.5.5.9:8080/gopro/webcam/preview ``` -------------------------------- ### Response Sample for Settings Source: https://gopro.github.io/OpenGoPro/http This is a sample JSON response containing camera settings. It includes various configuration parameters with their current values. ```json { "settings": { "2": 1, "3": 0, "5": 0, "30": 11, "32": 4, "43": 0, "59": 0, "83": 0, "88": 0, "91": 0, "108": 0, "121": 0, "122": 0, "123": 31, "125": 0, "128": 13, "134": 0, "135": 0, "156": 1, "157": 0, "167": 2, "168": 0, "171": 0, "172": 0, "175": 0, "176": 100, "178": 0, "179": 1, "180": 0, "182": 0, "183": 0, "184": 0, "186": 0, "187": 0, "189": 0, "190": 0, "191": 0, "192": 0, "193": 0, "194": 0, "196": 0, "216": 70, "219": 0, "223": 0, "227": 0, "232": 0, "233": 0, "234": 0, "236": 0, "237": 0 }, "status": { "1": 0, "2": 0, "6": 0, "8": 0, "9": 0, "10": 0, "11": 0, "13": 0, "17": 0, "19": 0, "20": 0, "21": 0, "22": 0, "23": 0, "24": 0, "26": 0, "27": 0, "28": 0, "29": "string", "30": "string", "31": 0, "32": 0, "33": -1, "34": 0, "35": 0, "38": 0, "39": 0, "41": 0, "42": 0, "45": 0, "49": 0, "54": 0, "55": 0, "56": 0, "58": 0, "59": 0, "60": 0, "65": 0, "66": 0, "67": 0, "68": 0, "69": 0, "70": 0, "74": 0, "75": 0, "76": 0, "77": 0, "78": 0, "81": 0, "82": 0, "83": 0, "85": 0, "86": 0, "88": 0, "89": 0, "93": 0, "94": 0, "95": 0, "96": 0, "97": 0, "98": 0, "101": 0, "102": 0, "103": 0, "105": 0, "106": 0, "107": 0, "108": 0, "110": 0, "111": 0, "112": 0, "113": 0, "114": 0, "115": 0, "116": 0, "117": 0, "118": 0, "122": "string" } } ``` -------------------------------- ### RequestCreateCOHNCert Source: https://gopro.github.io/OpenGoPro/docs/ble/protocol/protobuf Creates the Camera On the Home Network SSL/TLS certificate. Can override existing certificates. ```APIDOC ## RequestCreateCOHNCert ### Description Create the Camera On the Home Network SSL/TLS certificate. Returns a ResponseGeneric with the status of the creation ### Method POST ### Endpoint /CreateCOHNCert ### Parameters #### Request Body - **override** (bool) - Required - Override current provisioning and create new cert ``` -------------------------------- ### Control Camera Shutter Source: https://gopro.github.io/OpenGoPro/http Start or stop the camera's encoding process. Use 'start' to begin and 'stop' to end. ```curl curl --request GET --url http://10.5.5.9:8080/gopro/camera/shutter/start ``` -------------------------------- ### Start Preview Stream with Port Source: https://gopro.github.io/OpenGoPro/http This cURL command initiates the camera's preview stream on a specified port. Ensure the client is configured to receive UDP data on this port. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/stream/start?port=8556' ``` -------------------------------- ### Get Media Info Source: https://gopro.github.io/OpenGoPro/http Retrieves metadata for a specific media file on the camera. Use this to get details like creation time, file size, dimensions, and more. ```curl curl --request GET --url 'http://10.5.5.9:8080/gopro/media/info?path=100GOPRO/GOPR0002.JPG' ``` -------------------------------- ### Setup Language (Setting 223) Source: https://gopro.github.io/OpenGoPro/http Sets or queries the camera's display language. Supports multiple language options via an enum-based 'option' parameter. ```APIDOC ## GET /gopro/camera/setting?setting=223 ### Description Sets or queries the camera's display language. Supports multiple language options via an enum-based 'option' parameter. ### Method GET ### Endpoint `/gopro/camera/setting` ### Parameters #### Query Parameters - **option** (integer) - Required - The desired language option. Enum values correspond to different languages (e.g., 0 for English - US, 8 for a specific language). - **setting** (integer) - Required - The ID for Setup Language (223). ### Request Example ```bash curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=8&setting=223' ``` ### Response #### Success Response (200) - **option** (integer) - The current setting's option value. The response is empty if a setting was successfully set. #### Response Example ```json { "option": 0 } ``` ``` -------------------------------- ### Track Battery BLE Notification Example Source: https://gopro.github.io/OpenGoPro/docs/faq Example demonstrating how to track battery status using BLE notifications in the Python SDK. This is useful for receiving asynchronous information from the camera. ```python from open_gopro.gopro_ble_api import GoProBleApi from open_gopro.gopro_constants import BleUuid from open_gopro.util import setup_logging def track_battery(gopro: GoProBleApi): """Tracks battery percentage via BLE notifications.""" def battery_update_handler(data: bytes): # Battery percentage is encoded as a single byte percentage = data[0] print(f"Battery: {percentage}%") gopro.ble_communication.register_for_notification(BleUuid.BATTERY_LEVEL, battery_update_handler) print("Registered for battery level notifications.") # Keep the script running to receive notifications try: while True: pass except KeyboardInterrupt: print("Exiting.") if __name__ == "__main__": setup_logging() gopro_ble = GoProBleApi() try: gopro_ble.connect() track_battery(gopro_ble) except Exception as e: print(f"Error: {e}") finally: gopro_ble.disconnect() ``` -------------------------------- ### post/gopro/cohn/cert/create Source: https://gopro.github.io/OpenGoPro/http Creates SSL/TLS certificates for Camera On the Home Network (COHN). Optionally overrides existing certificates. ```APIDOC ## POST /gopro/cohn/cert/create ### Description Creates the Camera On the Home Network (COHN) SSL/TLS certificates. The created certificate(s) can be obtained via Get COHN Certificate and used for SSL/TLS communications. If `override` is set to 1, an existing Root CA cert will be replaced with a newly-generated one. ### Method POST ### Endpoint http://10.5.5.9:8080/gopro/cohn/cert/create ### Parameters #### Request Body - **override** (integer) - Optional - Enum: 0, 1. If 1, replace existing Root CA cert with a newly-generated one. ### Request Example ```json { "example": { "override": 0 } } ``` ### Response #### Success Response (200) - (object) - An empty JSON object is returned upon success. ### Response Example ```json { "example": "{}" } ``` ``` -------------------------------- ### Get Camera State Source: https://gopro.github.io/OpenGoPro/http Retrieves all current camera settings and statuses. ```APIDOC ## Get Camera State ### Description Retrieves all current camera settings and statuses. ### Method GET ### Endpoint /gopro/camera/state ### Request Example ```bash curl --request GET --url http://10.5.5.9:8080/gopro/camera/state ``` ### Response #### Success Response (200) Success. Lists of settings and statuses. ##### Response Schema: application/json ```json { "settings": {}, "status": {} } ``` ``` -------------------------------- ### Setup Screen Saver (Setting 219) Source: https://gopro.github.io/OpenGoPro/http Configures or queries the camera's screen saver timeout. Options range from 'Never' to specific minute intervals. ```APIDOC ## GET /gopro/camera/setting?setting=219 ### Description Configures or queries the camera's screen saver timeout. Options range from 'Never' to specific minute intervals. ### Method GET ### Endpoint `/gopro/camera/setting` ### Parameters #### Query Parameters - **option** (integer) - Required - The desired screen saver option (e.g., 0 for Never, 1 for 1 Min, 2 for 2 Min). - **setting** (integer) - Required - The ID for Setup Screen Saver (219). ### Request Example ```bash curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=219' ``` ### Response #### Success Response (200) - **option** (integer) - The current setting's option value. The response is empty if a setting was successfully set. #### Response Example ```json { "option": 0 } ``` ``` -------------------------------- ### RequestGetCOHNStatus Source: https://gopro.github.io/OpenGoPro/docs/ble/protocol/protobuf Gets the current COHN status and can register for asynchronous updates. ```APIDOC ## RequestGetCOHNStatus ### Description Get the current COHN status. Response: NotifyCOHNStatus Additionally, asynchronous updates can also be registered to return more NotifyCOHNStatus when a value changes. ### Method GET ### Endpoint /GetCOHNStatus ### Parameters #### Request Body - **register_cohn_status** (bool) - Optional - 1 to register for status updates, 0 to unregister. ``` -------------------------------- ### Set Pairing State Protobuf Source: https://gopro.github.io/OpenGoPro/docs/ble/control Finishes the initial pairing process to clear the pairing screen on the camera UI. Requires a Feature ID, Action ID, and UUID. ```APIDOC ## Set Pairing State Protobuf ### Description Finishes the initial pairing process to clear the pairing screen on the camera UI. ### Request * **Feature ID:** `0x03` * **Action ID:** `0x01` * **UUID:** Network Management Command * **Message:** `RequestPairingFinish` #### Fields * `result` (EnumPairingFinishState) - Required - Pairing state to set. * `phoneName` (string) - Required - This must be a non-empty string but does not affect functionality. ### Response * **Feature ID:** `0x03` * **Action ID:** `0x81` * **UUID:** Network Management Response * **Message:** `ResponseGeneric` #### Fields * `result` (EnumResultGeneric) - Generic pass/fail/error information. ``` -------------------------------- ### Get/Set Camera Setting (General) Source: https://gopro.github.io/OpenGoPro/http This endpoint allows for querying or setting a specific camera setting. The 'setting' parameter identifies the setting to interact with, and the 'option' parameter (when provided) specifies the desired value. ```APIDOC ## GET /gopro/camera/setting ### Description Allows querying or setting a specific camera setting. If 'option' is not provided, the current setting's option is queried. Otherwise, the setting is updated to the specified option. ### Method GET ### Endpoint `/gopro/camera/setting` ### Parameters #### Query Parameters - **setting** (integer) - Required - The identifier for the camera setting. - **option** (integer) - Optional - The desired value for the setting. ### Request Example ```curl curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=192' ``` ### Response #### Success Response (200) - **option** (integer) - The current setting's option. The response is empty if the setting was successfully updated. #### Error Response (403) The attempt to set the setting option failed. This response shows the current possible options. #### Response Example (200) ```json { "option": 0 } ``` ``` -------------------------------- ### RequestCOHNCert Source: https://gopro.github.io/OpenGoPro/docs/ble/protocol/protobuf Retrieves the COHN certificate. This is used to get the current certificate status. ```APIDOC ## RequestCOHNCert ### Description Get the COHN certificate. Returns a ResponseCOHNCert ### Method POST ### Endpoint /COHNCert ### Response #### Success Response (200) - **certificate** (bytes) - The COHN certificate data. ``` -------------------------------- ### get/gopro/camera/analytics/set_client_info Source: https://gopro.github.io/OpenGoPro/http Retrieves client information for camera analytics. This is a GET request to the specified endpoint. ```APIDOC ## GET /gopro/camera/analytics/set_client_info ### Description Retrieves client information for camera analytics. ### Method GET ### Endpoint http://10.5.5.9:8080/gopro/camera/analytics/set_client_info ### Response #### Success Response (200) - (object) - An empty JSON object is returned upon success. ### Response Example ```json { "example": "{}" } ``` ``` -------------------------------- ### Set/Query Camera Setting Option (General) Source: https://gopro.github.io/OpenGoPro/http Use this endpoint to set or query a specific camera setting option. The 'setting' parameter identifies the setting, and 'option' specifies the desired value or queries the current value. ```Shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=108' ``` -------------------------------- ### Set Video Resolution Option Source: https://gopro.github.io/OpenGoPro/http Use this endpoint to set the video resolution option for the camera. If the 'option' parameter is omitted, the current setting will be queried. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=1&setting=2' ``` -------------------------------- ### RequestGetLiveStreamStatus Source: https://gopro.github.io/OpenGoPro/docs/ble/protocol/protobuf Gets the current livestream status and allows registration for future status changes. ```APIDOC ## RequestGetLiveStreamStatus ### Description Get the current livestream status (and optionally register for future status changes) Response: NotifyLiveStreamStatus Notification: NotifyLiveStreamStatus ### Method GET ### Endpoint /GetLiveStreamStatus ### Parameters #### Request Body - **register_live_stream_status** (EnumRegisterLiveStreamStatus) - Optional - Array of live stream statuses to be notified about. - **unregister_live_stream_status** (EnumRegisterLiveStreamStatus) - Optional - Array of live stream statuses to stop being notified about. ``` -------------------------------- ### Get Camera Setting (Option 0, Setting 184) Source: https://gopro.github.io/OpenGoPro/http This snippet demonstrates how to query a specific camera setting using Curl. Ensure the camera is accessible at the specified IP address and port. ```Shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=184' ``` -------------------------------- ### COHN Certificate Content Source: https://gopro.github.io/OpenGoPro/http Example of the content of a COHN SSL certificate. This is a plain text response. ```text -----BEGIN CERTIFICATE----- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -----END CERTIFICATE----- ``` -------------------------------- ### Get Camera Name Source: https://gopro.github.io/OpenGoPro/http Retrieves the current name of the GoPro camera. This can be used to identify the camera on a network. ```shell curl --request GET --url http://10.5.5.9:8080/gopro/camera/name ``` -------------------------------- ### Get/Set Camera Setting (General) Source: https://gopro.github.io/OpenGoPro/http Allows querying or setting a general camera setting. The 'option' parameter specifies the desired setting value, and 'setting' identifies the specific setting to modify. ```APIDOC ## GET /gopro/camera/setting ### Description Queries or sets a general camera setting. If the 'option' parameter is not provided, the current setting's option will be queried. Otherwise, the setting will be updated to the specified option. ### Method GET ### Endpoint `/gopro/camera/setting` ### Parameters #### Query Parameters - **option** (integer) - Optional - The desired setting value. - **setting** (integer) - Required - The identifier for the specific setting to query or modify. ### Request Example ```bash curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=3600&setting=32' ``` ### Response #### Success Response (200) - **option** (integer) - The current setting's option. The response is empty if a setting was successfully set. #### Response Example ```json { "option": 0 } ``` #### Error Response (403) The attempt to set the setting option failed. This response may show the current possible options. ``` -------------------------------- ### Get COHN Certificate Source: https://gopro.github.io/OpenGoPro/http This endpoint retrieves the COHN SSL certificate. The response content type is text/plain. ```curl curl --request POST --url http://10.5.5.9:8080/GoProRootCA.crt ``` -------------------------------- ### Query Auto Power Down Response Source: https://gopro.github.io/OpenGoPro/http Example JSON response when querying the current Auto Power Down setting. ```json { "option": 0 } ``` -------------------------------- ### Enter Webcam Preview Source: https://gopro.github.io/OpenGoPro/http Enables the webcam preview stream on supported GoPro models. This command can be used over USB or WiFi, with specific model limitations noted for WiFi connections. ```APIDOC ## Enter Webcam Preview ### Description Starts the webcam preview stream. This feature is available over USB and WiFi, though WiFi support is restricted on certain Hero models. ### Method GET ### Endpoint /gopro/webcam/preview ### Responses #### Success Response (200) Request was successfully received by the camera. ##### Response Schema: application/json object #### Error Response (501) Operation not supported on camera model. ### Request Example ```curl curl --request GET --url http://10.5.5.9:8080/gopro/webcam/preview ``` ### Response Example (200) ```json { } ``` ``` -------------------------------- ### Sleep Camera Source: https://gopro.github.io/OpenGoPro/http Puts the camera into a low-power sleep state. This is a GET request to the system sleep command endpoint. ```APIDOC ## Sleep Camera ### Description Puts the camera into a low-power sleep state. ### Method GET ### Endpoint /gp/gpControl/command/system/sleep ### Responses #### Success Response (200) An empty JSON object indicating the command was received. #### Response Example ```json { } ``` ``` -------------------------------- ### Initiate Simple OTA Update Source: https://gopro.github.io/OpenGoPro/http Initiates a simple Over-The-Air firmware update by sending the firmware file and its SHA1 hash. This endpoint is used for direct-to-SD card updates. ```shell curl --request POST --url http://10.5.5.9:8080/gp/gpUpdate --header 'content-type: multipart/form-data' ``` -------------------------------- ### GET /gp/gpControl/command/system/sleep Source: https://gopro.github.io/OpenGoPro/http Puts the camera into a suspended state, leaving the WIFI/BLE radios on so it can be woken up via network calls. ```APIDOC ## GET /gp/gpControl/command/system/sleep ### Description Puts the camera into a suspended state, leaving the WIFI/BLE radios on so it can be woken up via network calls. ### Method GET ### Endpoint http://10.5.5.9:8080/gp/gpControl/command/system/sleep ### Responses #### Success Response (200) Request was successfully received by the camera. ### Response Example { } ``` -------------------------------- ### Set Shutter Source: https://gopro.github.io/OpenGoPro/http Controls the camera's shutter to start or stop recording. Applicable to various GoPro models. ```APIDOC ## GET /gopro/camera/shutter/{mode} ### Description Starts or stops the camera's encoding process, effectively controlling recording. ### Method GET ### Endpoint http://10.5.5.9:8080/gopro/camera/shutter/{mode} ### Parameters #### Path Parameters - **mode** (string) - Required - Enum: "start", "stop". Specifies whether to start or stop the encoding. ### Request Example ```curl curl --request GET --url http://10.5.5.9:8080/gopro/camera/shutter/start ``` ### Response #### Success Response (200) - **{}** (object) - An empty object indicating success. #### Response Example ```json { } ``` ``` -------------------------------- ### Get Last Captured Media Request Source: https://gopro.github.io/OpenGoPro/http This snippet shows how to request the path of the last captured media file from the camera. ```curl curl --request GET \ --url http://10.5.5.9:8080/gopro/media/last_captured ``` -------------------------------- ### Set Automatic Wi-Fi Access Point Source: https://gopro.github.io/OpenGoPro/http Enable or disable the camera's Wi-Fi access point to start automatically on boot. Query the current setting by omitting the option parameter. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=236' ``` -------------------------------- ### Get/Set Camera Setting Source: https://gopro.github.io/OpenGoPro/http Allows querying or setting a specific camera setting. The 'setting' parameter identifies the setting, and the 'option' parameter (when provided) sets the desired value. If 'option' is omitted, the current value of the setting is returned. ```APIDOC ## GET /gopro/camera/setting ### Description Retrieves or sets a specific camera setting. Use the `setting` parameter to identify the setting and the `option` parameter to set a new value. If `option` is not provided, the current value of the setting is returned. ### Method GET ### Endpoint `/gopro/camera/setting` #### Query Parameters - **setting** (integer) - Required - The identifier for the camera setting. - **option** (integer) - Optional - The desired value for the setting. If omitted, the current option is queried. ### Request Example ``` curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=108' ``` ### Response #### Success Response (200) - **option** (integer) - The current setting's option. This field is present when querying the setting's current value. #### Response Example ```json { "option": 0 } ``` #### Error Response (403) The attempt to set the setting option failed. This response shows the current possible options. ``` -------------------------------- ### Get Media Thumbnail Source: https://gopro.github.io/OpenGoPro/http Retrieves a thumbnail image for a specified media file. This is useful for displaying previews of photos or videos. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/media/thumbnail?path=100GOPRO/GOPR0002.JPG' ``` -------------------------------- ### Get Media Screennail Source: https://gopro.github.io/OpenGoPro/http Fetches a low-resolution preview image (screennail) for a given media file. Screenails are only available for photos. ```curl curl --request GET --url 'http://10.5.5.9:8080/gopro/media/screennail?path=100GOPRO/GOPR0002.JPG' ``` -------------------------------- ### GET /gopro/media/turbo_transfer Source: https://gopro.github.io/OpenGoPro/http Configures Turbo Transfer mode for faster media downloads over WiFi. This mode should only be used during media offload. ```APIDOC ## GET /gopro/media/turbo_transfer ### Description Configures Turbo Transfer mode for faster media downloads over WiFi. This mode should only be used during media offload. It is recommended to check for and disable Turbo Transfer on connection. ### Method GET ### Endpoint http://10.5.5.9:8080/gopro/media/turbo_transfer ### Parameters #### Query Parameters - **prequired** (integer) - Required/Optional - 0 to disable, 1 to enable ### Responses #### Success Response (200) Request was successfully received by the camera. ### Response Example { } ``` -------------------------------- ### Set Photo Output Source: https://gopro.github.io/OpenGoPro/http This section describes how to set the Photo Output. The 'option' parameter determines the output format (e.g., Standard, Raw, HDR). ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=125' ``` -------------------------------- ### Set Camera Date and Time Source: https://gopro.github.io/OpenGoPro/http Use this endpoint to set the camera's date, time, timezone, and daylight saving time status. Ensure the date and time formats are correct. ```curl curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/set_date_time?date=2023_12_31&time=21_12_13&tzone=-480&dst=0' ``` -------------------------------- ### Get COHN Certificate Source: https://gopro.github.io/OpenGoPro/docs/ble/cohn Retrieves the COHN certificate from the camera. Supported by MAX 2, HERO13 Black, and HERO12 Black. ```APIDOC ## Get COHN Certificate ### Description Gets the COHN certificate. ### Method Protobuf Query ### Request - **Feature ID:** `0xF5` - **Action ID:** `0x6E` - **UUID:** Query - **Message:** `RequestCOHNCert` ### Response - **Feature ID:** `0xF5` - **Action ID:** `0xEE` - **UUID:** Query Response - **Message:** `ResponseCOHNCert` - **Fields:** - `result` (EnumResultGeneric) - Required - Was request successful? - `cert` (string) - Required - Root CA cert (ASCII text) ``` -------------------------------- ### Set Media Format Source: https://gopro.github.io/OpenGoPro/http Sets the media format for the camera. Use 'option' parameter to specify the desired format, e.g., 13 for Time Lapse Video. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=13&setting=128' ``` -------------------------------- ### Get Media List Source: https://gopro.github.io/OpenGoPro/http Fetches a list of all media files on the camera. This endpoint returns structured JSON data, including details for grouped media items. ```shell curl --request GET --url http://10.5.5.9:8080/gopro/media/list ``` -------------------------------- ### Stop Webcam Stream Source: https://gopro.github.io/OpenGoPro/http This curl command stops the currently active webcam stream. This is a simple GET request to the stop endpoint. ```Shell curl --request GET --url http://10.5.5.9:8080/gopro/webcam/stop ``` -------------------------------- ### Set 360 Photo Files Extension Source: https://gopro.github.io/OpenGoPro/http Configures the file extension for 360 photos. Use option 0 for .JPG or option 1 for .36P. If the option parameter is omitted, the current setting is queried. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=196' ``` -------------------------------- ### Get Media File Thumbnail Source: https://gopro.github.io/OpenGoPro/http Fetches the thumbnail image for a given media file. This is useful for displaying previews of media content. ```APIDOC ## GET /gopro/media/thumbnail ### Description Fetches the thumbnail image for a given media file. ### Method GET ### Endpoint http://10.5.5.9:8080/gopro/media/thumbnail ### Parameters #### Query Parameters - **path** (string) - Required - The path to the media file (e.g., 100GOPRO/GOPR0002.JPG). ### Response #### Success Response (200) Thumbnail image data. ##### Response Schema: application/octet-stream string ``` -------------------------------- ### Get Media Telemetry Source: https://gopro.github.io/OpenGoPro/http Fetches telemetry data for a specific media file. Use this to retrieve detailed information about a photo or video. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/media/telemetry?path=100GOPRO/GOPR0002.JPG' ``` -------------------------------- ### Set/Query Camera Setting (General) Source: https://gopro.github.io/OpenGoPro/http Use this cURL command to set or query a general camera setting. Replace 'option' and 'setting' with the desired values. A 200 response indicates success, while a 403 indicates failure. ```shell curl --request GET --url 'http://10.5.5.9:8080/gopro/camera/setting?option=0&setting=176' ```