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:
Token: <your-api-key>— Hol ihn dir unter API-SchlüsselAuthorization: Bearer <jwt-token>— Von Anmeldung
Anfrage
Pfadparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
tid | string | ✅ | Eindeutige Kennung der Anwendung |
Header
| Header | Erforderlich | Beschreibung |
|---|---|---|
Content-Type | ✅ | application/json |
Token | ✅ | Dein API-Schlüssel |
Authorization | ✅ | Bearer <jwt-token> |
Body-Parameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
name | string | ✅ | 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
| Status | Beschreibung |
|---|---|
401 | Nicht autorisiert — Token ungültig oder fehlt |
404 | Nicht gefunden — Anwendung existiert nicht |
400 | Ungültige Anfrage — fehlerhafter Request-Body |