Zum Hauptinhalt springen

Anhänge

Basis-URL: https://app.neuroflash.com/api/attachment-service

Anhang hochladen​

POST/conversations/{conversation_id}/attachments

Pfadparameter​

ParameterTypErforderlichBeschreibung
conversation_idstringJa

Anfrage-Body​

FeldTypErforderlichBeschreibung
base64ContentobjectNeinBase64-codierter Dateiinhalt. Gegenseitig ausschließend mit contentUrl; genau einer der beiden muss angegeben werden. Maximale dekodierte Dateigröße beträgt 10 MB.
contentUrlobjectNeinHTTP(S)-URL, von der der Dateiinhalt heruntergeladen wird. Gegenseitig ausschließend mit base64Content; genau einer der beiden muss angegeben werden. Maximale heruntergeladene Dateigröße beträgt 10 MB.
mimeTypeobjectNeinMIME-Typ der Datei. Optional für textbasierte Formate: Wenn weggelassen oder auf text/plain gesetzt, wird der Typ aus der Dateinamenerweiterung abgeleitet. Für Binärformate ist es erforderlich und muss dem Dateiinhalt entsprechen.
filenamestringJaUrsprünglicher Dateiname des Anhangs.

Antwort​

FeldTypBeschreibung
idstring
conversationIdstring
createdByUserIdstring
fileTypestring
fileSizeinteger
fileNamestring
createdAtstring
updatedAtstring
base64Contentobject
plaintextContentobject
_linksobject
contentstring

Beispiel​

curl -X POST "https://app.neuroflash.com/api/attachment-service/conversations/{conversation_id}/attachments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base64Content": {},
"contentUrl": {},
"mimeType": {},
"filename": "string"
}'

Antwort:

{
"id": "string",
"conversationId": "string",
"createdByUserId": "string",
"fileType": "string",
"fileSize": 0,
"fileName": "string",
"createdAt": "string",
"updatedAt": "string",
"base64Content": {},
"plaintextContent": {},
"_links": {
"content": "string"
}
}

Anhänge auflisten​

GET/conversations/{conversation_id}/attachments

Pfadparameter​

ParameterTypErforderlichBeschreibung
conversation_idstringJa

Abfrageparameter​

ParameterTypStandardBeschreibung
pageinteger1Seitenzahl (1-basiert)
sizeinteger20Anzahl der Elemente pro Seite
excludedFieldsstring—

Antwort​

FeldTypBeschreibung
dataarray<object>
idstring
conversationIdstring
createdByUserIdstring
fileTypestring
fileSizeinteger
fileNamestring
createdAtstring
updatedAtstring
base64Contentobject
plaintextContentobject
_linksobject
contentstring
pageobject
sizeinteger
totalElementsinteger
totalPagesinteger
currentPageinteger

Beispiel​

curl "https://app.neuroflash.com/api/attachment-service/conversations/{conversation_id}/attachments" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Antwort:

{
"data": [
{
"id": "string",
"conversationId": "string",
"createdByUserId": "string",
"fileType": "string",
"fileSize": 0,
"fileName": "string",
"createdAt": "string",
"updatedAt": "string",
"base64Content": {},
"plaintextContent": {},
"_links": {
"content": "string"
}
}
],
"page": {
"size": 0,
"totalElements": 0,
"totalPages": 0,
"currentPage": 0
}
}

Anhang löschen​

DELETE/conversations/{conversation_id}/attachments/{attachment_id}

Pfadparameter​

ParameterTypErforderlichBeschreibung
conversation_idstringJa
attachment_idstringJa

Beispiel​

curl -X DELETE "https://app.neuroflash.com/api/attachment-service/conversations/{conversation_id}/attachments/{attachment_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Antwort:

{}

Anhang abrufen​

GET/attachments/{attachment_id}

Pfadparameter​

ParameterTypErforderlichBeschreibung
attachment_idstringJa

Abfrageparameter​

ParameterTypStandardBeschreibung
excludedFieldsstring—

Antwort​

FeldTypBeschreibung
idstring
conversationIdstring
createdByUserIdstring
fileTypestring
fileSizeinteger
fileNamestring
createdAtstring
updatedAtstring
base64Contentobject
plaintextContentobject
_linksobject
contentstring

Beispiel​

curl "https://app.neuroflash.com/api/attachment-service/attachments/{attachment_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Antwort:

{
"id": "string",
"conversationId": "string",
"createdByUserId": "string",
"fileType": "string",
"fileSize": 0,
"fileName": "string",
"createdAt": "string",
"updatedAt": "string",
"base64Content": {},
"plaintextContent": {},
"_links": {
"content": "string"
}
}