Models and Revisions
upload a model revision use the create revision endpoint to upload an ifc file valid file formats are ifc ifczip the upload parameters can be sent either in the bimsync params request header or as a part of the request body prepare upload parameters set the necessary fields of the json object { "comment" "comment describing the revision", "filename" "filename ifc", "model" "67a33d878bj7461f4352a64e1aef961h" } optional callback uri if you want to receive a notification when the revision is processed, set the callbackuri field { "callbackuri" "https //example com/callback", "comment" "comment describing the revision", "filename" "filename ifc", "model" "67a33d878bj7461f4352a64e1aef961h" } catenda will issue an http get request to the callback uri with the following query parameters token contains a revision status id result with value success or error make request with the parameters in the header set the value to the bimsync params request header, attach the file to the request and set the content type header to application/ifc curl x post \\ 'https //api catenda com/v2/projects/{project id}/revisions/' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your access token' \\ \ header 'content type application/ifc' \\ \ header 'bimsync params {"callbackuri" "https //example com/callback","comment" "optional comment describing the revision","filename" "filename ifc","model" "67a33d878bj7461f4352a64e1aef961h"}' \\ \ data binary '@/path/to/filename ifc' non ascii characters in filename and comment can be sent as raw utf 8 — a filename of blåbær ifc and a comment of blåbær 建物 are read correctly, with no percent encoding do not percent encode individual field values on this route filename is percent decoded but comment is not, so a percent encoded comment is stored as its encoded text ( bl%c3%a5b%c3%a6r ), and a filename that genuinely contains a percent sign is altered ( 100%20final ifc is read as 100 final ifc ) to send a value that must contain a literal percent sign, pass the parameters in the request body instead make request with the parameters in the body send the parameters as a bimsync params part and the file as a file part, with the content type header set to multipart/form data part bodies are read as utf 8, so filenames and comments containing non ascii characters can be sent as they are — no percent encoding values are taken verbatim on this route, so a filename that genuinely contains a percent sign, such as 100%20final ifc , is stored exactly as written on the header route the same filename would be read as 100 final ifc order matters send the bimsync params part before the file part the upload is streamed straight through rather than held in memory, so parameters arriving after the file cannot be read and the request is rejected with a 400 clients that build the request in the order shown below get this for free curl x post \\ 'https //api catenda com/v2/projects/{project id}/revisions/' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your access token' \\ \ form 'bimsync params={"comment" "blåbær 建物","filename" "blåbær ifc","model" "67a33d878bj7461f4352a64e1aef961h"};type=application/json' \\ \ form 'file=@/path/to/blåbær ifc' note that curl sets content type multipart/form data and its boundary itself when form is used, so do not set that header yourself download a model revision use the get revision endpoint to download a model revision make request set the accept header to application/ifc curl x get \\ 'https //api catenda com/v2/projects/{project id}/revisions/{revision id}' \\ \ header 'accept application/ifc' \\ \ header 'authorization bearer your access token'