133 lines
3.1 KiB
YAML
133 lines
3.1 KiB
YAML
get:
|
|
tags:
|
|
- Bot list
|
|
security:
|
|
- ApiKeyAuth: []
|
|
summary: Retrieve rows from the bot list
|
|
description: Retrieve rows from the bot list
|
|
responses:
|
|
'200':
|
|
description: Retrieve rows from the bot list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
description: Rows
|
|
'400':
|
|
$ref: ../responses/BadRequest.yaml
|
|
'401':
|
|
$ref: ../responses/Unauthorized.yaml
|
|
'402':
|
|
$ref: ../responses/PaymentRequired.yaml
|
|
'500':
|
|
$ref: ../responses/InternalError.yaml
|
|
x-code-samples:
|
|
- lang: PHP
|
|
source: >-
|
|
$ch = curl_init();
|
|
|
|
curl_setopt($ch, CURLOPT_URL,
|
|
'http://example.com/admin_api/v1/botlist');
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
echo curl_exec($ch);
|
|
put:
|
|
tags:
|
|
- Bot list
|
|
security:
|
|
- ApiKeyAuth: []
|
|
summary: Update the bot list
|
|
description: Update the bot list
|
|
requestBody:
|
|
description: Update the bot list
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../schemas/BotListRequest.yaml
|
|
responses:
|
|
'200':
|
|
description: Update the bot list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
count:
|
|
type: integer
|
|
'400':
|
|
$ref: ../responses/BadRequest.yaml
|
|
'401':
|
|
$ref: ../responses/Unauthorized.yaml
|
|
'402':
|
|
$ref: ../responses/PaymentRequired.yaml
|
|
'500':
|
|
$ref: ../responses/InternalError.yaml
|
|
x-code-samples:
|
|
- lang: PHP
|
|
source: >-
|
|
$ch = curl_init();
|
|
|
|
curl_setopt($ch, CURLOPT_URL,
|
|
'http://example.com/admin_api/v1/botlist');
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
|
|
|
|
|
|
$params = [
|
|
|
|
'value' => "3.3.3.3\n5.5.5.5"
|
|
|
|
];
|
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
|
|
|
|
echo curl_exec($ch);
|
|
delete:
|
|
tags:
|
|
- Bot list
|
|
security:
|
|
- ApiKeyAuth: []
|
|
summary: Clear the bot list
|
|
description: Clear the bot list
|
|
responses:
|
|
'200':
|
|
description: Clear the bot list
|
|
'400':
|
|
$ref: ../responses/BadRequest.yaml
|
|
'401':
|
|
$ref: ../responses/Unauthorized.yaml
|
|
'402':
|
|
$ref: ../responses/PaymentRequired.yaml
|
|
'500':
|
|
$ref: ../responses/InternalError.yaml
|
|
x-code-samples:
|
|
- lang: PHP
|
|
source: >-
|
|
$ch = curl_init();
|
|
|
|
curl_setopt($ch, CURLOPT_URL,
|
|
'http://example.com/admin_api/v1/botlist');
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Api-Key: your-api-key'));
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
|
|
|
|
echo curl_exec($ch);
|