Files & Folders

This snippet is intended for users who'd like to retrieve specific item information and create and upload files and folders within Project Insight.

	
     
curl -X GET \
  http://yourdomain.com/api/file-item/{ITEM_GUID} \
  -H 'api-token:{API-TOKEN} ' \
  -H 'cache-control: no-cache' \

When creating file items in Project Insight, you'll need to specify the file content to be upload. Note: You'll need to set a Base64 Encoded file or set the file stream (FileContentsAsStream property on the model).

	
     
curl -X POST \
  http://yourdomain.com/api/file-item \
  -H 'api-token:{API-TOKEN} ' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
	"ItemContainer_Id":"{ITEM_CONTAINER_GUID}",
	"Name":"Testing File Upload",
	"UploadedFile":{
		"FileName":"File_Upload_Test.txt",
		"FileContentsBase64Encoded":"{Base64_Encoded_Value}"
	}
}'

Online 12/11/2017