POST
/api/v1/proxies/import
Proxy-Zeilen importieren; Ergebnis je Zeile, nichts wird still verworfen
Anfrage#
POSIX-Shell · curl
curl --fail-with-body --request POST \
"$ADBR_API_URL/api/v1/proxies/import" \
-H "Authorization: Bearer $ADBR_API_TOKEN" \
-H "Content-Type: application/json" \
--data @request.jsonVerwende lokale Adresse und Token aus API & MCP. Ersetze Pfadplatzhalter wie {id} durch tatsächliche IDs. Erstelle request.json anhand des folgenden Körperschemas, bevor du den Befehl ausführst.
Authentifizierung und Rechte#
Authentifizierung: Bearer-Token
Scopes: proxies:write
Alle aufgeführten Scopes sind erforderlich; admin erfüllt Scope-Prüfungen. Kontorechte, Anfrageinhalt, Tresorzustand und Ressourcenrechte können weitere Voraussetzungen setzen.
Parameter#
| Parameter | Ort | Pflicht | Beschreibung |
|---|---|---|---|
operation_id | query | Nein |
Vollständige Parameterschemas
OpenAPI JSON
[
{
"schema": {
"type": "string",
"pattern": "^[a-zA-Z0-9-]{16,64}$"
},
"in": "query",
"name": "operation_id",
"required": false
}
]Anfragekörper#
Erforderlich.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
text | string | Ja | |
default_protocol | union | Nein | |
columns | array | Nein | |
tags | array | Nein | |
group_id | string | null | Nein | |
ip_checker | string | null | Nein | |
skip_duplicates | boolean | Nein | |
accept_ambiguous | boolean | Nein |
Vollständiges Körperschema
OpenAPI JSON
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 5000000
},
"default_protocol": {
"anyOf": [
{
"type": "string",
"enum": [
"http"
]
},
{
"type": "string",
"enum": [
"https"
]
},
{
"type": "string",
"enum": [
"socks4"
]
},
{
"type": "string",
"enum": [
"socks4a"
]
},
{
"type": "string",
"enum": [
"socks5"
]
},
{
"type": "string",
"enum": [
"socks5h"
]
},
{
"type": "string",
"enum": [
"ssh"
]
}
]
},
"columns": {
"type": "array",
"items": {
"type": "string",
"maxLength": 40
},
"maxItems": 20
},
"tags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"maxItems": 30
},
"group_id": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 64
},
"ip_checker": {
"type": [
"string",
"null"
],
"maxLength": 32
},
"skip_duplicates": {
"type": "boolean"
},
"accept_ambiguous": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
}Antworten#
200 · Standardantwort
OpenAPI JSON
{
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"lines",
"created",
"duplicates",
"ambiguous",
"invalid"
],
"properties": {
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"line",
"status",
"id",
"existing_id",
"error",
"warnings"
],
"properties": {
"line": {
"type": "integer"
},
"status": {
"type": "string"
},
"id": {
"type": [
"null",
"string"
]
},
"existing_id": {
"type": [
"null",
"string"
]
},
"error": {
"type": [
"null",
"string"
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"created": {
"type": "integer"
},
"duplicates": {
"type": "integer"
},
"ambiguous": {
"type": "integer"
},
"invalid": {
"type": "integer"
}
}
}
}
}
}default · HTTP-Fehlerhülle. Status und error.code bezeichnen den Fehler.
OpenAPI JSON
{
"description": "HTTP error envelope. The status and error.code identify the failure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}Allgemeine Authentifizierungs- und Transportfehler können zusätzlich zu den dokumentierten Antworten auftreten.
OpenAPI-Definition#
Vollständige Operationsdefinition
OpenAPI JSON
{
"summary": "Proxy-Zeilen importieren; Ergebnis je Zeile, nichts wird still verworfen",
"tags": [
"Proxys"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 5000000
},
"default_protocol": {
"anyOf": [
{
"type": "string",
"enum": [
"http"
]
},
{
"type": "string",
"enum": [
"https"
]
},
{
"type": "string",
"enum": [
"socks4"
]
},
{
"type": "string",
"enum": [
"socks4a"
]
},
{
"type": "string",
"enum": [
"socks5"
]
},
{
"type": "string",
"enum": [
"socks5h"
]
},
{
"type": "string",
"enum": [
"ssh"
]
}
]
},
"columns": {
"type": "array",
"items": {
"type": "string",
"maxLength": 40
},
"maxItems": 20
},
"tags": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 50
},
"maxItems": 30
},
"group_id": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 64
},
"ip_checker": {
"type": [
"string",
"null"
],
"maxLength": 32
},
"skip_duplicates": {
"type": "boolean"
},
"accept_ambiguous": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
},
"parameters": [
{
"schema": {
"type": "string",
"pattern": "^[a-zA-Z0-9-]{16,64}$"
},
"in": "query",
"name": "operation_id",
"required": false
}
],
"x-required-scopes": [
"proxies:write"
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"lines",
"created",
"duplicates",
"ambiguous",
"invalid"
],
"properties": {
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"line",
"status",
"id",
"existing_id",
"error",
"warnings"
],
"properties": {
"line": {
"type": "integer"
},
"status": {
"type": "string"
},
"id": {
"type": [
"null",
"string"
]
},
"existing_id": {
"type": [
"null",
"string"
]
},
"error": {
"type": [
"null",
"string"
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"created": {
"type": "integer"
},
"duplicates": {
"type": "integer"
},
"ambiguous": {
"type": "integer"
},
"invalid": {
"type": "integer"
}
}
}
}
}
},
"default": {
"description": "HTTP error envelope. The status and error.code identify the failure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}