API-Anwendungsfälle
Voraussetzungen
pip install aiohttp1. Einen Anhang für einen Betroffenenanfrage erstellen
import aiohttp
import asyncio
async def create_attachment(workspace_id, api_key, attachment_data):
url = f"https://api.dastra.eu/v1/ws/{workspace_id}/datasubjectattachments"
headers = {
"Content-Type": "application/json",
"X-Api-Key": api_key
}
async with aiohttp.ClientSession() as session:
async with session.post(url, json=attachment_data, headers=headers) as response:
return await response.json()
# Beispiel-Verwendung
workspace_id = "votre_workspace_id"
api_key = "votre_api_key"
attachment_data = {
# Füllen Sie die Daten Ihres Anhangs aus
"dataSubjectRequestId": "id_de_la_demande",
"fileName": "exemple.pdf",
"fileContent": "contenu_encodé_base64"
}
response = asyncio.run(create_attachment(workspace_id, api_key, attachment_data))
print(response)2. Eine Nachricht mit Anhang in einer Betroffenenanfrage senden
3. Neue Anfragen nach Filtern abrufen
Fazit
Zuletzt aktualisiert
War das hilfreich?