Upload File

This request uploads a parameter file to a configuration session. The difference between this request and the Upload New File request is that this one needs a specified file ID, and it will upload the file there, overwriting if another one is already uploaded with the same ID.

Endpoints

  • PUT /configsessions/{sessionID}/files/{fileID}

Url

sessionID

The ID of the configuration session

fileID

The ID of the file for later identification

Header

content-type

The MIME type of the file. Only certain file types are accepted, depending on the CAD system.

Authorization

Bearer {token}

X-API-KEY

{API key}

Body

raw

The file data

Response

The token (file ID) that can be used as a parameter value, in a JSON format.

see format in the example below

Remark

The difference between this request and the Upload New File request is that this one needs a specified file ID, and it will upload the file there, overwriting if another one is already uploaded with the same ID.

Example request


 PUT https://api.paramate.trinckle.com/configsessions/305bdb5c-cf8f-4256-9180-fe050d119f03/files/bWFpbjp0ZXN0
 -H Authorization: Bearer eyJhbGciOiJIUzI1Ni ... 3H8gC1k2DIKNEeJpb72yvmdY
 -H X-API-KEY: 5b260091e8a03ab9af7716af0d71474a
 [raw file data]

 

Output


 HTTP/1.1 202 Accepted
 {
   "token": "bWFpbjpvYmplY3Q="
 }