Targets

Operations done on Targets

Base URL

https://app.pentest-tools.com/api/v2


Method
get
Path
/targets

Query parameters

Property
workspace_id
Type
integer

ID of the workspace to show targets from

Property
type
Type
string

the type of target

Property
limit
Type
integer

the maximum number of targets to return

Property
page
Type
integer

the page number to return

Responses

Authorization

Use the "API key" from the profile page as the token

Bearer

Request

GET
/targets
curl --request GET \
  --url https://app.pentest-tools.com/api/v2/targets \
  --header 'accept: application/json' \
  --header 'authorization: Bearer {token}'

Method
post
Path
/targets

Request parameters

Content type
application/x-www-form-urlencoded
object
Property
name
Type
string
required
Yes
Property
description
Type
string
Property
workspace_id
Type
integer

Responses

403Can't create target because it is blacklisted, the user has too many targets or the license is invalid
404Workspace ID is not valid
409Target already exists
422Target is in a wrong format

Authorization

Use the "API key" from the profile page as the token

Bearer

Request

POST
/targets
curl --request POST \
  --url https://app.pentest-tools.com/api/v2/targets \
  --header 'accept: application/json' \
  --header 'authorization: Bearer {token}'

Method
get
Path
/targets/{id}

Path parameters

Property
id
Type
integer
required
Yes

id of target to get

Responses

Authorization

Use the "API key" from the profile page as the token

Bearer

Request

GET
/targets/{id}
curl --request GET \
  --url https://app.pentest-tools.com/api/v2/targets/{id} \
  --header 'accept: application/json' \
  --header 'authorization: Bearer {token}'