ENDPOINT

You can upload IFC files to Anker through a POST request.


fetch(<https://ifc.ankerdb.com/import/{{project_id}>}, {
    headers: { Authorization: `Bearer ${token}` },
    method: "POST",
    body: multipartForm,
  });

FORM PARAMETERS

const formData = new FormData();
formData.append("file", {"name": <filename>}); //file name
const config = {
  project_id = <project_id>;
  path = ""; //default, required
  entities = {
    include: ["IfcElement", "IfcTypeObject"] as string[],
  }; //default, required
  psets = { include: [] as string[] }; //if empty, all are imported
  files = [] as IFCFile[]; //actual files
}
formData.append("config", JSON.stringify(config));

PATH PARAMETERS

The {{project_id}} can be found in the url below -

Untitled

AUTHORIZATION

You need a header in your request called “Authorization”, with a token value. Please reach out to [email protected] or [email protected] to access your token.

Authorization: Bearer {{token}}