Workspaces
Operations done on Workspaces
Base URL
https://app.pentest-tools.com/api/v2
Authorization
Use the "API key" from the profile page as the token
- Method
- get
- Path
- /workspaces
Responses
500Internal server error
Request
GET
/workspacescurl --request GET \
--url https://app.pentest-tools.com/api/v2/workspaces \
--header 'accept: application/json' \
--header 'authorization: Bearer {token}'
Response
[
{
"id": 7534842,
"name": "My Workspace",
"description": "My Workspace description",
"scan_count": 10,
"target_count": 4
}
]
OK
- Method
- post
- Path
- /workspaces
Request parameters
- Content type
- application/x-www-form-urlencoded
object
- Property
- name
- Type
- string
- required
- Yes
- Property
- description
- Type
- string
Responses
400Invalid parameters
409Workspace already exists
500Internal server error
Request
POST
/workspacescurl --request POST \
--url https://app.pentest-tools.com/api/v2/workspaces \
--header 'accept: application/json' \
--header 'authorization: Bearer {token}'
Response
{
"created_id": 420323
}
Created
- Method
- get
- Path
- /workspaces/{id}
Path parameters
- Property
- id
- Type
- integer
- required
- Yes
id of workspace to get
Responses
500Internal server error
Request
GET
/workspaces/{id}curl --request GET \
--url https://app.pentest-tools.com/api/v2/workspaces/{id} \
--header 'accept: application/json' \
--header 'authorization: Bearer {token}'
Response
{
"id": 7534842,
"name": "My Workspace",
"description": "My Workspace description",
"scan_count": 10,
"target_count": 4
}
OK
- Method
- put
- Path
- /workspaces/{id}
Path parameters
- Property
- id
- Type
- integer
- required
- Yes
id of workspace to get
Request parameters
- Content type
- application/json
object
- Property
- name
- Type
- string
- Property
- description
- Type
- string
Responses
204No content
400Invalid or missing both parameters.
409Workspace with the same name already exists
422Invalid field format.
Request
PUT
/workspaces/{id}curl --request PUT \
--url https://app.pentest-tools.com/api/v2/workspaces/{id} \
--header 'accept: application/json' \
--header 'authorization: Bearer {token}'
Response
No Body
No content
- Method
- delete
- Path
- /workspaces/{id}
Delete workspace
Deletes a workspace and all of its assets.
Path parameters
- Property
- id
- Type
- integer
- required
- Yes
id of workspace to get
Responses
204Deleted successfully
409Cannot delete current workspace
500Internal server error
Request
DELETE
/workspaces/{id}curl --request DELETE \
--url https://app.pentest-tools.com/api/v2/workspaces/{id} \
--header 'accept: application/json' \
--header 'authorization: Bearer {token}'
Response
No Body
Deleted successfully