PUT
/api/v1/profiles/{id}/cookies
Cookies importieren (JSON, Netscape, Name=Wert, Base64, storageState); Einspielen über den Browser, nie per Datei
Anfrage#
POSIX-Shell · curl
curl --fail-with-body --request PUT \
"$ADBR_API_URL/api/v1/profiles/{id}/cookies" \
-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: cookies: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 | |
id | path | Ja |
Vollständige Parameterschemas
OpenAPI JSON
[
{
"schema": {
"type": "string",
"pattern": "^[a-zA-Z0-9-]{16,64}$"
},
"in": "query",
"name": "operation_id",
"required": false
},
{
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"in": "path",
"name": "id",
"required": true
}
]Anfragekörper#
Erforderlich.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
cookies | — | Ja | Cookies als Text (JSON, Netscape, Name=Wert, Base64) oder als JSON-Array |
format | union | Nein | |
domain | string | Nein | |
mode | union | Nein | |
ignore_errors | boolean | Nein | |
skip_expired | boolean | Nein |
Vollständiges Körperschema
OpenAPI JSON
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"cookies"
],
"properties": {
"cookies": {
"description": "Cookies als Text (JSON, Netscape, Name=Wert, Base64) oder als JSON-Array"
},
"format": {
"anyOf": [
{
"type": "string",
"enum": [
"auto"
]
},
{
"type": "string",
"enum": [
"json"
]
},
{
"type": "string",
"enum": [
"netscape"
]
},
{
"type": "string",
"enum": [
"header"
]
},
{
"type": "string",
"enum": [
"storage_state"
]
},
{
"type": "string",
"enum": [
"base64"
]
}
]
},
"domain": {
"type": "string",
"minLength": 1,
"maxLength": 253
},
"mode": {
"anyOf": [
{
"type": "string",
"enum": [
"merge"
]
},
{
"type": "string",
"enum": [
"replace"
]
}
]
},
"ignore_errors": {
"type": "boolean"
},
"skip_expired": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
}Antworten#
200 · Standardantwort
OpenAPI JSON
{
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"format",
"encoding",
"received",
"imported",
"skipped_expired",
"errors",
"state",
"access",
"failed",
"held_for_start",
"pending_reason"
],
"properties": {
"format": {
"type": "string"
},
"encoding": {
"type": "string"
},
"received": {
"type": "integer"
},
"imported": {
"type": "integer"
},
"skipped_expired": {
"type": "integer"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"name",
"code",
"message"
],
"properties": {
"index": {
"type": "integer"
},
"name": {
"type": [
"null",
"string"
]
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
},
"state": {
"type": "string"
},
"access": {
"type": [
"null",
"string"
]
},
"failed": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"domain",
"message"
],
"properties": {
"name": {
"type": "string"
},
"domain": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
},
"held_for_start": {
"type": "integer"
},
"pending_reason": {
"type": [
"null",
"string"
]
}
}
}
}
}
}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": "Cookies importieren (JSON, Netscape, Name=Wert, Base64, storageState); Einspielen über den Browser, nie per Datei",
"tags": [
"Cookies"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"cookies"
],
"properties": {
"cookies": {
"description": "Cookies als Text (JSON, Netscape, Name=Wert, Base64) oder als JSON-Array"
},
"format": {
"anyOf": [
{
"type": "string",
"enum": [
"auto"
]
},
{
"type": "string",
"enum": [
"json"
]
},
{
"type": "string",
"enum": [
"netscape"
]
},
{
"type": "string",
"enum": [
"header"
]
},
{
"type": "string",
"enum": [
"storage_state"
]
},
{
"type": "string",
"enum": [
"base64"
]
}
]
},
"domain": {
"type": "string",
"minLength": 1,
"maxLength": 253
},
"mode": {
"anyOf": [
{
"type": "string",
"enum": [
"merge"
]
},
{
"type": "string",
"enum": [
"replace"
]
}
]
},
"ignore_errors": {
"type": "boolean"
},
"skip_expired": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
},
"parameters": [
{
"schema": {
"type": "string",
"pattern": "^[a-zA-Z0-9-]{16,64}$"
},
"in": "query",
"name": "operation_id",
"required": false
},
{
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"in": "path",
"name": "id",
"required": true
}
],
"x-required-scopes": [
"cookies:write"
],
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"format",
"encoding",
"received",
"imported",
"skipped_expired",
"errors",
"state",
"access",
"failed",
"held_for_start",
"pending_reason"
],
"properties": {
"format": {
"type": "string"
},
"encoding": {
"type": "string"
},
"received": {
"type": "integer"
},
"imported": {
"type": "integer"
},
"skipped_expired": {
"type": "integer"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"required": [
"index",
"name",
"code",
"message"
],
"properties": {
"index": {
"type": "integer"
},
"name": {
"type": [
"null",
"string"
]
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
},
"state": {
"type": "string"
},
"access": {
"type": [
"null",
"string"
]
},
"failed": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"domain",
"message"
],
"properties": {
"name": {
"type": "string"
},
"domain": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
},
"held_for_start": {
"type": "integer"
},
"pending_reason": {
"type": [
"null",
"string"
]
}
}
}
}
}
},
"default": {
"description": "HTTP error envelope. The status and error.code identify the failure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}