Zum Inhalt springen

Anwendung abrufen GET ​

Ruf die Details einer bestimmten Anwendung über ihre eindeutige Kennung ab.

Endpunkt ​

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

Authentifizierung ​

Erforderlich

Füge einen dieser Header in deine Anfrage ein:

Anfrage ​

Pfadparameter ​

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

Beispielanfrage ​

bash
curl -X GET "https://api.pocketalert.app/v1/applications/sozb3yswlwoqdd1l1msi1nnh" \
  -H "Token: your-api-key"
javascript
const tid = 'sozb3yswlwoqdd1l1msi1nnh';

const response = await fetch(`https://api.pocketalert.app/v1/applications/${tid}`, {
  headers: {
    'Token': 'your-api-key'
  }
});

const application = await response.json();
console.log(application);
python
import requests

tid = 'sozb3yswlwoqdd1l1msi1nnh'

response = requests.get(
    f'https://api.pocketalert.app/v1/applications/{tid}',
    headers={'Token': 'your-api-key'}
)

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

return $response->json();

Antwort ​

Erfolgreiche Antwort ​

200 OK

Gibt das Anwendungsobjekt zurück

FeldTypBeschreibung
tidstringEindeutige Kennung der Anwendung
namestringName der Anwendung
is_activebooleanOb die Anwendung aktiv ist
created_atstringZeitstempel der Erstellung
json
{
  "tid": "sozb3yswlwoqdd1l1msi1nnh",
  "name": "Production Monitoring",
  "is_active": true,
  "created_at": "18.09.2023 02:29:02"
}

Fehlerantworten ​

StatusBeschreibung
401Nicht autorisiert — Token ungültig oder fehlt
404Nicht gefunden — Anwendung existiert nicht

Pocket Alert Dokumentation