1. API Operations
  2. Get targets

Deprecated

You are viewing a deprecated version of our API Reference. Please visit the up-to-date documentation.

Get targets

This operation returns the list of targets belonging to the current user, including their names.


Request

Parameters
Parameter
op
Type
string
required
true

Get the list of targets. The value is "get_targets".

Parameter
limit
Type
integer
required
true

Limit the number of returned targets.

Parameter
workspace_id
Type
integer

Only show the targets in this workspace. To find the IDs of your workspaces, use the get_workspaces method.

{
  "op": "get_targets",
  "limit": 3
}

Response

Attributes
Attribute
op_status
Type
string

The status of the operation. The value can be "success" or "fail".

Attribute
targets
Type
array

The list of targets for the current user. Returned in case of a successful operation.

Attribute
error
Type
string

Error message. Returned in case of a failed operation.

{
  "op_status": "success",
  "targets": [
    {
      "target_id": 8785534,
      "name": "176.28.50.165",
      "target_description": "IP target",
      "workspace_id": 36489826
    },
    {
      "target_id": 9796332,
      "name": "testphp.vulnweb.com",
      "target_description": "Random description",
      "workspace_id": 42809779
    },
    {
      "target_id": 65442312,
      "name": "http://testphp.vulnweb.com/",
      "target_description": "Here is another description",
      "workspace_id": 42809779
    }
  ]
}