Dokumentation / Proxys / Endpunkt
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.json

Verwende 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#

ParameterOrtPflichtBeschreibung
operation_idqueryNein
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.

FeldTypPflichtBeschreibung
textstringJa
default_protocolunionNein
columnsarrayNein
tagsarrayNein
group_idstring | nullNein
ip_checkerstring | nullNein
skip_duplicatesbooleanNein
accept_ambiguousbooleanNein
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"
          }
        }
      }
    }
  }
}

Suche nach Headless, MCP, Cookies oder einem API-Endpunkt.

↑ ↓ NavigierenEnter ÖffnenEsc Schließen