Skip to main content
Skip table of contents

Lens Commands

Last updated: 2025/5/22 18:42:41

Path To

Name

Description/Function

/api/lens

/focus/limit/{farLimit}/{nearLimit}

Set focus limit in AF.

/api/lens

/focus/auto

Enable auto focus on the lens.

/api/lens

/focus/manual

Enable manual focus on the lens.

/api/lens

/focus/far

Focus the lens far.

/api/lens

/focus/near

Focus the lens near.

/api/lens

/focus/limit

Gets the AF limits set in the sysProp.

/api/lens

/focus/region/{x}/{y}

Set AF region upon click events.

/api/lens

/focus

Get the current focus value.

/api/lens

/type

Get the lens type.

/api/lens

/zoom

Get the zoom level.

/api/lens

/focus/toggle

Toggle the focus between auto and manual.

/api/lens

/focus/isauto

Gets a value indicating whether the lens is in auto focus.

/api/lens

/ois/isenabled

Get a value indicating whether OIS is enabled.

/api/lens

/ois/disable

Disable OIS.

/api/lens

/ois/enable

Enable OIS.

/api/lens

/pan/left

Activates a pan left action.

/api/lens

/pan/left/{speed}

Activates a pan left with a specific speed.

/api/lens

/pan/right

Activates a pan right action.

/api/lens

/pan/right/{speed}

Activates a pan right action and specifies the speed.

/api/lens

/focus/{value}

Set the focus value.

/api/lens

/ptz/stop

Stops all continuous PTZ actions.

/api/lens

/tilt/down/{speed}

Activates a tilt down action and specifies the speed.

/api/lens

/tilt/down/

Activates a tilt down action and specifies the speed.

/api/lens

/tilt/up/{speed}

Activates a tilt up action and specifies the speed.

/api/lens

/tilt/up

Activates a tilt up action and specifies the speed.

/api/lens

/zoom/in

Zoom the lens in.

/api/lens

/zoom/out

Zoom the lens out.

/api/lens

/zoom/{value}

Set the zoom level.

/focus/limit/{farLimit}/{nearLimit}

Function

Set focus limit in AF.

Parameter.. farLimit

Set limit for far.

Parameter.. nearLimit

Set limit for near.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/limit/{farLimit}/{nearLimit}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/focus/auto

Function

Enable auto focus on the lens.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/auto

Response

Status code 200, for completed operation being preformed.

Response Type

none

Response Example

CODE
Response OK(200)

/focus/manual

Function

Enable manual focus on the lens.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/manual

Response

Status code 200, for completed operation being preformed.

Response Type

none

Response Example

CODE
Response OK(200)

/focus/far

Function

Focus the lens far.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/far

Response

The lens position.

Response Type

number

Response Example

CODE
2.62

/focus/near

Function

Focus the lens near.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/near

Response

The lens position.

Response Type

number

Response Example

CODE
2.72

/focus/limit

Function

Gets the AF limits set in the sysProp.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/limit

Response

Far and near values.

Response Type

JSON

Response Example

CODE
{
    "Far Limit": 511,
    "Near Limit": 0
}

/focus/region/{x}/{y}

Function

Set AF region upon click events.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/region/{x}/{y}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/focus

Function

Get the current focus value.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus

Response

The focus value

Response Type

number

Response Example

CODE
2.72

/type

Function

Get the lens type.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/type

Response

The lens type.

Response Type

string

Response Example

CODE
Stock

/zoom

Function

Get the zoom level.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/zoom

Response

Current zoom position.

Response Type

number

Response Example

CODE
1

/focus/toggle

Function

Toggle the focus between auto and manual.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/toggle

Response

Status code 200, for completed operation being preformed.

Response Type

none

Response Example

CODE
Response OK(200)

/focus/isauto

Function

Gets a value indicating whether the lens is in auto focus.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/isauto

Response

True if the lens is in auto focus. False if it's in auto focus.

Response Type

boolean

Response Example

CODE
true

/ois/isenabled

Function

Get a value indicating whether Optical Image Stabalization is enabled.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/ois/isenabled

Response

True if Optical Image Stabalization is enabled.

Response Type

boolean

Response Example

CODE
true

/ois/disable

Function

Disable Optical Image Stabalization.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/ois/disable

Response

Status code 200, for completed operation being preformed.

Response Type

none

Response Example

CODE
Response OK(200)

/ois/enable

Function

Enable Optical Image Stabalization.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/ois/enable

Response

Status code 200, for completed operation being preformed.

Response Type

Response Example

CODE
$body

/pan/left

Function

Activates a pan left action.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/pan/left

Response

Status code 200, for completed operation being preformed.

Response Type

Response Example

CODE
$body

/pan/left/{speed}

Function

Activates a pan left with a specific speed.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/pan/left/{speed}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/pan/right

Function

Activates a pan right action.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/pan/right

Response

Status code 200, for completed operation being preformed.

Response Type

Response Example

CODE
$body

/pan/right/{speed}

Function

Activates a pan right action and specifies the speed.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/pan/right/{speed}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/focus/{value}

Function

Set the focus value.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/{value}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/ptz/stop

Function

Stops all continuous PTZ actions.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/ptz/stop

Response

Status code 200, for completed operation being preformed.

Response Type

Response Example

CODE
$body

/tilt/down/{speed}

Function

Activates a tilt down action and specifies the speed.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/tilt/down/{speed}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/tilt/down/

Function

Activates a tilt down action and specifies the speed.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/tilt/down/

Response

Status code 200, for completed operation being preformed.

Response Type

Response Example

CODE
$body

/tilt/up/{speed}

Function

Activates a tilt up action and specifies the speed.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/tilt/up/{speed}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available

/tilt/up

Function

Activates a tilt up action and specifies the speed.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/tilt/up

Response

Status code 200, for completed operation being preformed.

Response Type

Response Example

CODE
$body

/zoom/in

Function

Zoom the lens in.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/zoom/in

Response

Current zoom position.

Response Type

Response Example

CODE
$body

/zoom/out

Function

Zoom the lens out.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/zoom/out

Response

Current zoom position.

Response Type

Response Example

CODE
$body

/zoom/{value}

Function

Set the zoom level.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/zoom/{value}

Response

None

Response Type

Not Available

Response Example

CODE
Not Available
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.