postman/hightrusted-capture.postman_collection.json
Stefan Schmidt-Egermann ad6687ce5d
feat: initial postman content (v0.1.0)
- Postman Collection v2.1 mit allen Endpoints
- Environment-Template für api_key + base_url
- Tests pro Request (Status, Schema-Checks)
2026-04-25 12:26:08 +02:00

265 lines
8.9 KiB
JSON

{
"info": {
"name": "hightrusted CAPTURE API",
"description": "Forensische Web-Captures mit qualifiziertem Zeitstempel nach RFC 3161 / eIDAS Art. 41.\n\n**Authentifizierung:** Bearer-Token. Setze die Variable `api_key` im Environment.\n\n**API-Key holen:** https://capture.hightrusted.net/dashboard/api-keys\n\n**Doku:** https://capture.hightrusted.net/api/docs",
"version": "1.0.0",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "bearer",
"bearer": [
{ "key": "token", "value": "{{api_key}}", "type": "string" }
]
},
"variable": [
{
"key": "base_url",
"value": "https://capture.hightrusted.net/api/v1",
"type": "string"
}
],
"item": [
{
"name": "Captures",
"item": [
{
"name": "Capture erstellen — synchron",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status 200', () => pm.response.to.have.status(200));",
"const json = pm.response.json();",
"pm.test('Hat id und status', () => {",
" pm.expect(json.id).to.be.a('string');",
" pm.expect(json.status).to.equal('ready');",
"});",
"pm.test('Hat verify_url', () => {",
" pm.expect(json.verify_url).to.match(/^https:\\/\\/verify\\.hightrusted\\.net/);",
"});",
"pm.collectionVariables.set('last_capture_id', json.id);"
]
}
}
],
"request": {
"method": "POST",
"header": [
{ "key": "Content-Type", "value": "application/json" }
],
"body": {
"mode": "raw",
"raw": "{\n \"url\": \"https://example.com\"\n}"
},
"url": {
"raw": "{{base_url}}/captures",
"host": ["{{base_url}}"],
"path": ["captures"]
},
"description": "Erstellt eine Capture und wartet bis zu 30 s auf das fertige PDF."
}
},
{
"name": "Capture erstellen — asynchron",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status 202', () => pm.response.to.have.status(202));",
"const json = pm.response.json();",
"pm.test('Status ist queued', () => pm.expect(json.status).to.equal('queued'));",
"pm.collectionVariables.set('async_capture_id', json.id);"
]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"url\": \"https://example.com\",\n \"mode\": \"async\",\n \"reference\": \"case-2026-001\"\n}"
},
"url": {
"raw": "{{base_url}}/captures",
"host": ["{{base_url}}"],
"path": ["captures"]
}
}
},
{
"name": "Capture erstellen — webhook",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"url\": \"https://example.com\",\n \"mode\": \"webhook\",\n \"webhook_url\": \"https://your-domain.tld/webhooks/capture\",\n \"reference\": \"case-2026-001\",\n \"viewport\": { \"width\": 1920, \"height\": 1080 }\n}"
},
"url": {
"raw": "{{base_url}}/captures",
"host": ["{{base_url}}"],
"path": ["captures"]
},
"description": "Capture starten, Server liefert das fertige Ergebnis per HTTP-POST aus."
}
},
{
"name": "Capture-Status abrufen",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status 200', () => pm.response.to.have.status(200));",
"const json = pm.response.json();",
"pm.test('Hat id', () => pm.expect(json.id).to.be.a('string'));"
]
}
}
],
"request": {
"method": "GET",
"url": {
"raw": "{{base_url}}/captures/{{last_capture_id}}",
"host": ["{{base_url}}"],
"path": ["captures", "{{last_capture_id}}"]
}
}
},
{
"name": "Captures auflisten",
"request": {
"method": "GET",
"url": {
"raw": "{{base_url}}/captures?limit=25&status=ready",
"host": ["{{base_url}}"],
"path": ["captures"],
"query": [
{ "key": "limit", "value": "25" },
{ "key": "status", "value": "ready" }
]
}
}
},
{
"name": "PDF herunterladen",
"request": {
"method": "GET",
"url": {
"raw": "{{base_url}}/captures/{{last_capture_id}}/pdf",
"host": ["{{base_url}}"],
"path": ["captures", "{{last_capture_id}}", "pdf"]
},
"description": "Liefert PDF/A-3 mit eingebettetem RFC-3161-Zeitstempel.\n\nIn Postman: \"Send and Download\" verwenden, um das PDF zu speichern."
}
}
]
},
{
"name": "Verify",
"item": [
{
"name": "Verifikation per Capture-ID",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status 200', () => pm.response.to.have.status(200));",
"const json = pm.response.json();",
"pm.test('valid ist Boolean', () => pm.expect(json.valid).to.be.a('boolean'));",
"pm.test('Hat audit_log', () => pm.expect(json.audit_log).to.be.an('object'));"
]
}
}
],
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"source\": \"{{last_capture_id}}\"\n}"
},
"url": {
"raw": "{{base_url}}/verify",
"host": ["{{base_url}}"],
"path": ["verify"]
},
"description": "Verifikation ist KOSTENLOS — keine Quota-Belastung."
}
},
{
"name": "Verifikation per Verify-URL",
"request": {
"method": "POST",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": {
"mode": "raw",
"raw": "{\n \"source\": \"https://verify.hightrusted.net/c/REPLACE_ME\"\n}"
},
"url": {
"raw": "{{base_url}}/verify",
"host": ["{{base_url}}"],
"path": ["verify"]
}
}
},
{
"name": "Verifikation per PDF-Upload",
"request": {
"method": "POST",
"body": {
"mode": "formdata",
"formdata": [
{ "key": "pdf", "type": "file", "src": [] }
]
},
"url": {
"raw": "{{base_url}}/verify",
"host": ["{{base_url}}"],
"path": ["verify"]
},
"description": "Lädt eine lokale PDF hoch und verifiziert sie. Funktioniert auch ohne API-Key (Verify ist öffentlich)."
}
}
]
},
{
"name": "Account",
"item": [
{
"name": "Eigenen Verbrauch abrufen",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status 200', () => pm.response.to.have.status(200));",
"const json = pm.response.json();",
"pm.test('Hat plan', () => pm.expect(json.plan).to.be.a('string'));",
"pm.test('Hat used_calls', () => pm.expect(json.used_calls).to.be.a('number'));"
]
}
}
],
"request": {
"method": "GET",
"url": {
"raw": "{{base_url}}/usage",
"host": ["{{base_url}}"],
"path": ["usage"]
}
}
}
]
}
]
}