HTTP Loggers

Operations done on HTTP Loggers

Base URL

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

Authorization

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


Method
get
Path
/http_loggers

Query parameters

Property
workspace_id
Type
integer

ID of the workspace to show HTTP loggers from. If not set, all of them will be returned.

Responses

500Internal server error

Request

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

Response

[
  {
    "id": 1,
    "label": "mypentest",
    "handler_url": "https://pentest-tools.com/logger/55iIAkDkGn",
    "active_days": 42,
    "num_requests": 32,
    "request_left": 68
  }
]

OK


Method
post
Path
/http_loggers

Query parameters

Property
workspace_id
Type
integer

ID of the workspace to show HTTP loggers from. If not set, all of them will be returned.

Request parameters

Content type
application/x-www-form-urlencoded
object
Property
label
Type
string
required
Yes

A unique label for the HTTP request logger

Responses

400Invalid parameters
409A logger with the same label already exists
500Internal server error

Request

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

Response

{
  "created_id": 420323
}

Created


Method
get
Path
/http_loggers/{id}

Get logger information by ID

Get logger information by ID. To see the requests made to the logger, see /http_loggers/{id}/data

Path parameters

Property
id
Type
integer
required
Yes

id of the logger

Responses

500Internal server error

Request

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

Response

{
  "id": 1,
  "label": "mypentest",
  "handler_url": "https://pentest-tools.com/logger/55iIAkDkGn",
  "active_days": 42,
  "num_requests": 32,
  "request_left": 68
}

OK


Method
delete
Path
/http_loggers/{id}

Path parameters

Property
id
Type
integer
required
Yes

id of the logger

Responses

204Deleted successfully
500Internal server error

Request

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

Response

No Body

Deleted successfully


Method
get
Path
/http_loggers/{id}/data

Get the data for a logger

Get a list of requests made to the logger

Path parameters

Property
id
Type
integer
required
Yes

id of the logger

Responses

500Internal server error

Request

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

Response

{
  "requests": []
}

OK


Method
delete
Path
/http_loggers/{id}/data

Clear the data for a logger

Delete all the requests made to the HTTP logger.

Path parameters

Property
id
Type
integer
required
Yes

id of the logger

Responses

204Deleted successfully
500Internal server error

Request

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

Response

No Body

Deleted successfully