Sending data
After doing all of that, we can finally upload the desired file.
To do so we must first go to the directory that contains the file you wish to upload.
cd C:\Your\Directory
Then we can upload the file.
For Linux
curl -X POST "<Your API URL>/pub/project/<Your Project ID>/file?teamId=<Your Workgroup ID>" -H "accept: application/json" -H "Authorization: Bearer <Your generated Token>" -H "Content-Type: multipart/form-data" -F "file=@<Your File Name>;type=text/csv"
For Windows
curl -X POST "<Your API URL>/pub/project/<Your Project ID>/file?teamId=<Your Workgroup ID>" -H "accept: application/json" -H "Authorization: Bearer <Your generated Token>" -H "Content-Type: multipart/form-data" -F "file=@<Your File Name>;type=text/csv"
If the command has worked, it will return the following line:
{"id":<Project ID>,"name":"<File Name>","status":{"status":"PROCESSING","progress":0.0},"creationDate":"2023-11-09T11:00:51.455Z"}