Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: pentest-tools.com REST HTTP Loggers API
version: 1.0.1.1
description: Operations done on HTTP Loggers
servers:
- url: https://api.pentest-tools.com/api/v2
description: Recommended (auto-routes by API key region)
- url: https://app-us.pentest-tools.com/api/v2
description: US region (direct)
- url: https://app.pentest-tools.com/api/v2
description: Europe region (direct)
security:
- bearerAuth: []
tags:
- name: http_loggers
x-displayName: HTTP Loggers
description: Operations done on HTTP Loggers
paths:
/http_loggers:
parameters:
- name: workspace_id
in: query
description: ID of the workspace to show HTTP loggers from. If not set, all of them will be returned.
schema:
type: integer
get:
summary: Get all HTTP loggers
operationId: get_loggers
tags:
- http_loggers
responses:
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
200:
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/HttpLogger'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
post:
summary: Create a HTTP logger
operationId: create_logger
tags:
- http_loggers
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/HttpLogger'
responses:
201:
headers:
location:
schema:
type: string
format: uri
pattern: /http_loggers/[0-9]+
description: The path to the newly created logger
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/CreatedResourceResponse'
description: Created
422:
description: Invalid parameters
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
/http_loggers/{id}:
parameters:
- name: id
in: path
description: id of the logger
required: true
schema:
type: integer
get:
summary: Get logger information by ID
operationId: get_logger
tags:
- http_loggers
description: Get logger information by ID. To see the requests made to the logger, see `/http_loggers/{id}/data`
responses:
200:
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/HttpLogger'
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
delete:
summary: Delete a logger
operationId: delete_logger
tags:
- http_loggers
responses:
204:
description: Deleted successfully
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
/http_loggers/{id}/data:
parameters:
- name: id
in: path
description: id of the logger
required: true
schema:
type: integer
get:
summary: Get the data for a logger
operationId: get_logger_data
tags:
- http_loggers
description: Get a list of requests made to the logger
responses:
200:
description: OK
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
type: object
properties:
requests:
type: array
items:
$ref: '#/components/schemas/HttpLoggerData'
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
delete:
summary: Clear the data for a logger
operationId: clear_logger
tags:
- http_loggers
description: Delete all the requests made to the HTTP logger.
responses:
204:
description: Deleted successfully
401:
$ref: '#/components/responses/UnauthorizedError'
403:
$ref: '#/components/responses/ForbiddenError'
404:
$ref: '#/components/responses/ObjectNotFoundError'
429:
$ref: '#/components/responses/TooManyRequestsError'
500:
description: Internal server error
components:
responses:
ObjectNotFoundError:
description: The object with the given ID was not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
UnauthorizedError:
description: API key is missing or invalid
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ForbiddenError:
description: You can"t perform this action.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
TooManyRequestsError:
description: Too many requests made in a short period of time
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
HttpLoggerData:
type: object
properties:
id:
type: integer
description: the unique identifier of the data entry
example: 321443
ip_address:
type: string
format: ipv4
description: The source IP of the request
example: 212.65.54.23
request_method:
type: string
description: The HTTP method used to make the request. [Here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) is a list of possible values
url_params:
type: string
description: The parameters used in the request
example: username=jamesbond
user_agent:
type: string
description: The user agent used in the request
example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48
os:
type: string
description: The OS of the user who did the request
example: Windows 10 x64
http_headers:
type: array
items:
type: string
description: The list of HTTP headers used in the request
request_body_type:
type:
- string
- 'null'
enum:
- binary
- text
- null
description: The type of data held in the request body. This is `null` for empty bodies
request_body_base64:
type: string
description: The body of the request, base64 encoded. This is an empty string for empty bodies
request_date:
type: string
format: date-time
example: '2021-06-14 15:40:52'
ErrorResponse:
type: object
additionalProperties: false
properties:
status:
type: integer
example: 401
message:
type: string
example: No API key specified
CreatedResourceResponse:
type: object
properties:
created_id:
type: integer
example: 420323
HttpLogger:
type: object
properties:
id:
type: integer
description: the ID of the HTTP request logger
readOnly: true
label:
type: string
description: A unique label for the HTTP request logger
example: mypentest
handler_url:
type: string
format: url
readOnly: true
description: The URL used to populate the data for the HTTP request logger
example: https://pentest-tools.com/logger/55iIAkDkGn
active_days:
type: integer
minimum: 0
readOnly: true
description: The number of days left before the HTTP request logger becomes read only
example: 42
num_requests:
type: integer
minimum: 0
readOnly: true
description: The number of requests made for the logger
example: 32
requests_left:
deprecated: true
type: integer
minimum: 0
readOnly: true
description: The number of requests left before the logger becomes read only. This is always 100.
example: 100
required:
- label
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Use the "API key" from the [profile page](https://app.pentest-tools.com/account/api) as the token