cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

upload a file on Thingworx using Postman

etemiz
1-Newbie

upload a file on Thingworx using Postman

Hi everybody,

can someone please tell me how to upload a file on Thingworx with Postman. I created a FileRepository Thing and tried to upload the file via POST method in Postman.

I tried following urls:

URL: .../Thingworx/FileRepositories/<MyFileRepositoryThing>/

URL: .../Thingworx/FileRepositories/<MyFileRepositoryThing>/<self created folder>/

URL: .../Thingworx/Things/<MyFileRepositoryThing>/

header:

appKey

Content-Type(tried even differrent types)

Body:

file : XML

Maybe I'm doing it all wrong. It would be great if someone could help.

1 ACCEPTED SOLUTION

Accepted Solutions
cbuse
12-Amethyst
(To:etemiz)

Hi,


Use the following URL: .../Thingworx/Things/<MyFileRepositoryThing>/Services/SaveBinary

Use application/json for content type and place appKey in the header

Use JSON payload as follows:

{

    "content" : "<paste Base64 encoding of the file contents here>",

     "path" : "xmlFile.xml"

}

Best regards,

Cristina

View solution in original post

1 REPLY 1
cbuse
12-Amethyst
(To:etemiz)

Hi,


Use the following URL: .../Thingworx/Things/<MyFileRepositoryThing>/Services/SaveBinary

Use application/json for content type and place appKey in the header

Use JSON payload as follows:

{

    "content" : "<paste Base64 encoding of the file contents here>",

     "path" : "xmlFile.xml"

}

Best regards,

Cristina

Top Tags