@@ -22,28 +22,41 @@ Request Parameters:
2222| Name | Located in | Description | Required | Type |
2323| ---------------- | ---------- | ------------------------------- | -------- | ------- |
2424| id | path | ID of the unstructured data | Yes | string |
25+ | X-MSTR-ProjectID | header | Project ID | Yes | string |
2526| X-MSTR-AuthToken | header | Authentication token | Yes | string |
2627| fileName | form-data | Name of the file being uploaded | No | string |
2728| fileLocation | form-data | Location of the file | No | string |
28- | fileType | form-data | Type of the file | No | string |
29+ | fileType | form-data | Type of the file | No | integer |
2930| fileSize | form-data | Size of the file in bytes | No | integer |
3031| file | form-data | The file to upload | Yes | binary |
3132
33+ File Type Mapping (the ` fileType ` parameter must be a numeric value):
34+
35+ | File Type | Content Type | Value |
36+ | --------- | ------------ | ----- |
37+ | PDF | PDF | 0 |
38+ | WORD | DOCX | 1 |
39+ | HTML | HTML | 2 |
40+ | MARKDOWN | MD | 3 |
41+ | TEXT | TXT | 4 |
42+ | EMAIL | EMAIL | 5 |
43+
3244Sample Curl:
3345
3446``` bash
3547# Replace with your actual values
3648curl -X PUT ' https://demo.microstrategy.com/MicroStrategyLibrary/api/nuggets/4B7EF8B549D2D32E941C3E9B7E0CD754' \
49+ -H ' X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
3750-H ' X-MSTR-AuthToken: pqu5mkrcbv4461hh5qprr9j5ve' \
3851-F ' file=@/path/to/your/document.pdf' \
3952-F ' fileName=document.pdf' \
40- -F ' fileType=application/pdf ' \
53+ -F ' fileType=0 ' \
4154-F ' fileSize=1024000'
4255```
4356
4457Sample Response:
4558
46- HTTP Status: 202 Accepted
59+ HTTP Status: 200 OK
4760
4861``` json
4962{
@@ -54,7 +67,7 @@ HTTP Status: 202 Accepted
5467
5568Notes:
5669
57- - This API returns a 202 Accepted response, indicating that the file upload has been accepted and will be processed asynchronously .
70+ - This API returns a 200 OK response, indicating that the request was successful .
5871- The unstructured data status will update to "Unloaded" initially and then processed in the background.
5972- You can check the processing status of the unstructured data using a separate status endpoint.
6073- The file should be uploaded as multipart/form-data.
0 commit comments