Setting API Level for THETA S and THETA V Applications

The default API for the THETA S is compliant with OSC 1.0 (THETA API v2.0). The THETA V only supports OSC 2.0, the THETA API v2.1.

If you application uses OSC 1.0, you should change it to OSC 2.0 (THETA API v2.0) so that it works with both the THETA S and the THETA V.

Identify THETA S or THETA V with apiLevel

You can find the apiLevel with GET /osc/info

https://developers.theta360.com/en/docs/v2.1/api_reference/protocols/info.html

If the apiLevel returns [1, 2], the camera is a THETA S and you’ll need to change the API to v2.0.

For THETA S

You can change the API of a THETA S with this method:

start session

POST /osc/commands/execute 
{ 
    "name": "camera.startSession", 
    "parameters": {} 
}

response

{ 
    "name": "camera.startSession", 
    "state": "done", 
    "results": { 
        "sessionId": "SID_0001", 
        "timeout": 180 
    } 
}

specify API version

POST /osc/commands/execute 
{ 
    "name": "camera.setOptions", 
    "parameters": { 
        "sessionId": "SID_0001", 
        "options": { 
            "clientVersion": 2 
        } 
    } 
}

Response

{ 
    "name": "camera.setOptions", 
    "state": "done"
}
1 Like

POST /osc/state

Will also give you the current API level and it also returns a host of other useful information as well.

2 Likes