.env
file with the name WRITER_API_KEY
.POST /v1/files
Parameter | Type | Description |
---|---|---|
content | string | The content of the file. See the Python SDK and the JavaScript SDK for more details about how to pass the file contents. |
content_disposition | string | The content disposition of the file. |
content_type | string | The MIME type of the file. The file upload supports txt , doc , docx , ppt , pptx , jpg , png , eml , html , pdf , srt , csv , xls , and xlsx file extensions. |
Field | Type | Description |
---|---|---|
id | string | The ID of the file. |
created_at | string | The date and time the file was created in ISO 8601 format. |
name | string | The name of the file. |
graph_ids | array[string] | The IDs of the Knowledge Graphs the file is attached to. |
status | string | The processing status of the file. |
GET /v1/files
Parameter | Type | Description |
---|---|---|
graph_id | string | Filter files by the graph they are attached to. |
status | string | Filter files by status. |
file_types | string | Filter files by extension type. Separate multiple values by commas. For example, txt,pdf,docx . |
file_types
parameter is not yet available in the Python and Node SDKs. It will be available in version 2.3.0.Field | Type | Description |
---|---|---|
data | array[object] | An array of file objects. |
data[].id | string | The ID of the file. |
data[].created_at | string | The date and time the file was created in ISO 8601 format. |
data[].name | string | The name of the file. |
data[].graph_ids | array[string] | The IDs of the Knowledge Graphs the file is attached to. |
data[].status | string | The status of the file. |
has_more | boolean | Whether there are more files to fetch. |
first_id | string | The ID of the first file in the response. |
last_id | string | The ID of the last file in the response. |
GET /v1/files/{fileId}
Parameter | Description |
---|---|
fileId | The ID of the file to get. |
DELETE /v1/files/{fileId}
Parameter | Description |
---|---|
fileId | The ID of the file to delete. |