Skip to main content
Skip table of contents

Lens Commands

Last updated: 2026/1/7 22:19:57

Path To

Name

Description/Function

/api/lens

/focus

Get the current focus value.

/api/lens

/focus/auto

Enable auto focus on the lens.

/api/lens

/focus/far

Focus the lens far.

/api/lens

/focus/isauto

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

/api/lens

/focus/limit

Gets the AF limits set in the sysProp.

/api/lens

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

Set focus limit in AF.

/api/lens

/focus/manual

Enable manual focus on the lens.

/api/lens

/focus/near

Focus the lens near.

/api/lens

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

Set AF region upon click events.

/api/lens

/focus/toggle

Toggle the focus between auto and manual.

/api/lens

/focus/{value}

Set the focus value.

/api/lens

/ois/disable

Disable Optical Image Stabalization.

/api/lens

/ois/enable

Enable Optical Image Stabalization.

/api/lens

/ois/isenabled

Get a value indicating whether Optical Image Stabalization is enabled.

/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

/ptz/stop

Stops all continuous PTZ actions.

/api/lens

/tilt/down/

Activates a tilt down action and specifies the speed.

/api/lens

/tilt/down/{speed}

Activates a tilt down action and specifies the speed.

/api/lens

/tilt/up

Activates a tilt up action and specifies the speed.

/api/lens

/tilt/up/{speed}

Activates a tilt up action and specifies the speed.

/api/lens

/type

Get the lens type.

/api/lens

/zoom

Get the zoom level.

/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

Description

Get the current focus value.

Method

Get

Example

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

Parameter(s):

֍ Value: Value to focus to.

Response

A representing the asynchronous operation.

Response Type

Decimal

Response Example

CODE
0.45

/focus/auto

Description

Enable auto focus on the lens.

Method

Get

Example

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

Response

None

/focus/far

Description

Focus the lens far.

Method

Get

Example

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

Response

The lens position.

Response Type

Decimal

Response Example

CODE
0.45

/focus/isauto

Description

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

/focus/limit

Description

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

object

Response Example

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

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

Description

Set focus limit in AF.

Method

Get

Example

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

Parameter(s):

֍ FarLimit: Values between 511

֍ NearLimit: Values between 416 to 0

Response

None

/focus/manual

Description

Enable manual focus on the lens.

Method

Get

Example

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

Response

None

/focus/near

Description

Focus the lens near.

Method

Get

Example

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

Response

The lens position.

Response Type

Decimal

Response Example

CODE
0.55

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

Description

Set AF region upon click events.

Method

Get

Example

CODE
http://IP_ADDRESS:8080/api/lens/focus/region/10/15

Parameter(s):

֍ X: x coordinates.

֍ Y: y coordinates.

Response

None

/focus/toggle

Description

Toggle the focus between auto and manual.

Method

Get

Example

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

Response

None

/focus/{value}

Description

Set the focus value.

Method

Get

Example

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

Parameter(s):

֍ Value: Values between 0.1 to 9.8

Response

A representing the asynchronous operation.

Response Type

Decimal

Response Example

CODE
0.1

/ois/disable

Description

Disable Optical Image Stabalization.

Method

Get

Example

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

Response

None

/ois/enable

Description

Enable Optical Image Stabalization.

Method

Get

Example

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

Response

None

/ois/isenabled

Description

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
$body

/pan/left

Description

Activates a pan left action.

Method

Get

Example

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

Response

None

/pan/left/{speed}

Description

Activates a pan left with a specific speed.

Method

Get

Example

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

Parameter(s):

֍ Speed: Values between 0 to 100

Response

None

/pan/right

Description

Activates a pan right action.

Method

Get

Example

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

Response

None

/pan/right/{speed}

Description

Activates a pan right action and specifies the speed.

Method

Get

Example

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

Parameter(s):

֍ Speed: Values between 0 to 100

Response

None

/ptz/stop

Description

Stops all continuous PTZ actions.

Method

Get

Example

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

Response

None

/tilt/down/

Description

Activates a tilt down action and specifies the speed.

Method

Get

Example

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

Response

None

/tilt/down/{speed}

Description

Activates a tilt down action and specifies the speed.

Method

Get

Example

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

Parameter(s):

֍ Speed: Values between 0 to 100

Response

None

/tilt/up

Description

Activates a tilt up action and specifies the speed.

Method

Get

Example

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

Response

None

/tilt/up/{speed}

Description

Activates a tilt up action and specifies the speed.

Method

Get

Example

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

Parameter(s):

֍ Speed: Values between 0 to 100

Response

None

/type

Description

Get the lens type.

Method

Get

Example

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

Response

The lens type.

Response Type

Text

Response Example

CODE
Stock

/zoom

Description

Get the zoom level.

Method

Get

Example

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

Response

Current zoom position.

Response Type

Decimal

Response Example

CODE
1

/zoom/in

Description

Zoom the lens in.

Method

Get

Example

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

Response

Current zoom position.

Response Type

Decimal

Response Example

CODE
2

/zoom/out

Description

Zoom the lens out.

Method

Get

Example

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

Response

Current zoom position.

Response Type

Decimal

Response Example

CODE
1

/zoom/{value}

Description

Set the zoom level.

Method

Get

Example

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

Parameter(s):

֍ Value: Values between 1 to 10

Response

A representing the asynchronous operation.

Response Type

Decimal

Response Example

CODE
1

JavaScript errors detected

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

If this problem persists, please contact our support.