Vendor-Specific

API level 1 of the OSC API Specification focuses on image type, and video support is added in API level 2. Camera manufacturers are encouraged to define custom commands and/or extend the parameter set of standard commands if needed. These are known as Vendor Commands and Vendor Parameters.

The name of the Vendor-specific commands and parameters must be alphanumeric and prefixed with an underscore ( _ ).

Vendor-specific functionality can happen in four places as follows:

Example

Request (API 1)
POST /osc/commands/execute HTTP/1.1
Host: [camera ip address]:[httpPort]
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: {CONTENT_LENGTH}
X-XSRF-Protected: 1

{
    "name": "camera.setOptions",
    "parameters": {
        "sessionId": "12ABC3",
        "iso": 200,
        "exposureCompensation": -2,
        "captureMode": "_video"
    }
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: {CONTENT_LENGTH}
X-Content-Type-Options: nosniff

{
    "name": "camera.setOptions",
    "state": "done"
}
Request
POST /osc/commands/execute HTTP/1.1
Host: [camera ip address]:[httpPort]
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: {CONTENT_LENGTH}
X-XSRF-Protected: 1

{
    "name": "camera._startRecording",
    "parameters": {
        "sessionId": "12ABC3",
        ...
    }
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: {CONTENT_LENGTH}
X-Content-Type-Options: nosniff

{
    "name": "camera._startRecording",
    "state": "done"
}