Zum Inhalt springen

Anwendung aktualisieren PUT ​

Aktualisiere die Details einer bestehenden Anwendung.

Endpunkt ​

PUT https://api.pocketalert.app/v1/applications/{tid}

Authentifizierung ​

Erforderlich

Füge einen dieser Header in deiner Anfrage hinzu:

Anfrage ​

Pfadparameter ​

ParameterTypErforderlichBeschreibung
tidstring✅Eindeutige Kennung der Anwendung
HeaderErforderlichBeschreibung
Content-Type✅application/json
Token✅Dein API-Schlüssel
Authorization✅Bearer <jwt-token>

Body-Parameter ​

ParameterTypErforderlichBeschreibung
namestring✅Neuer Name der Anwendung

Beispielanfrage ​

bash
curl -X PUT "https://api.pocketalert.app/v1/applications/sozb3yswlwoqdd1l1msi1nnh" \
  -H "Token: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Application Name"
  }'
javascript
const tid = 'sozb3yswlwoqdd1l1msi1nnh';

const response = await fetch(`https://api.pocketalert.app/v1/applications/${tid}`, {
  method: 'PUT',
  headers: {
    'Token': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'New Application Name'
  })
});

const result = await response.json();
python
import requests

tid = 'sozb3yswlwoqdd1l1msi1nnh'

response = requests.put(
    f'https://api.pocketalert.app/v1/applications/{tid}',
    headers={
        'Token': 'your-api-key',
        'Content-Type': 'application/json'
    },
    json={'name': 'New Application Name'}
)

print(response.json())
php
$tid = 'iemkz2tlbakj4lgns961ohx0o';
$response = Http::withHeaders([
    'Token' => 'your-api-key',
])->put('https://api.pocketalert.app/v1/applications/'.$tid, [
    'name' => 'Updated Name',
]);

return $response->json();

Antwort ​

Erfolgreiche Antwort ​

200 OK

Anwendung erfolgreich aktualisiert

json
{
  "data": "success"
}

Fehlerantworten ​

StatusBeschreibung
401Nicht autorisiert — Token ungültig oder fehlt
404Nicht gefunden — Anwendung existiert nicht
400Ungültige Anfrage — fehlerhafter Request-Body

Pocket Alert Dokumentation