Add target

This operation creates a new target, with an optional description.


Request parameters

NameTypeDescriptionValue
opStringAdd a new targetadd_target
nameStringThe name of the new target
descriptionString(optional) Set this description for the new target
workspace_idInteger(optional) Add the target to this workspace

Request example

{
  "op": "add_target",
  "name": "http://demo.pentest-tools.com",
  "workspace_id": 5425246
}

Response parameters

NameTypeDescriptionValue
op_statusStringThe status of the operation- success
- fail
target_idIntegerThe id of the newly created target.
(Returned in case of a successful operation)
errorStringError message.
(Returned in case of a failed operation)
- invalid target
- invalid workspace
detailsStringError details.
(Returned in case of an invalid target error)

Response example

{
  "op_status": "success",
  "target_id": 7583
}