Skip to content

Process

Process is base concept when working with xeoServices. It encapsulate business logic for given type. User creates process then they can poll for its status (alternatively webhook can be used).

Available processes types

  • glb-xkt - Converts GLB file to XKT file
  • ifc-xkt - Converts IFC file to XKT file
  • ifc-ids-validate - Validate IFC file against Information Delivery Specification (IDS)
  • ifc-model-check - Validate IFC file against common issues, like does objects has filled names, material names, descriptions...

Create process

Request

bash
curl --request POST \
  --url https://converter.xeovision.io/process \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <token>' \
  --data '{
  "type": "ifc-xkt",
  "downloadUrl": "https://raw.githubusercontent.com/xeokit/xeokit-sdk/master/assets/models/ifc/Duplex.ifc" //
}'

Response

json
{ 
  "id": "5dcee47f-0ed7-4a26-ad4f-d93519ad05b8"
}

Get process status

Request

bash
curl --request GET \
  --url https://converter.xeovision.io/process/5dcee47f-0ed7-4a26-ad4f-d93519ad05b8 \
  --header 'Authorization: Bearer <token>'

Response

json
{
  "id": "5dcee47f-0ed7-4a26-ad4f-d93519ad05b8",
  "status": "process_completed",
  "type": "ifc-xkt",
  "viewerUrl": "https://sos-ch-gva-2.exo.io/...", 
  "updatedAt": "2024-07-10T09:30:02.712Z",
  "createdAt": "2024-07-10T09:30:00.784Z",
  "processOutputs": [
    {
      "id": "2ed9805d-443d-48b4-b2cb-77b5e8ecb637",
      "key": "8678cd12-5959-4172-8b43-db887c665ed5",
      "fileName": "glb-xkt.log",
      "fileType": "log",
      "fileSize": "1577",
      "updatedAt": "2024-07-10T09:30:02.703Z",
      "createdAt": "2024-07-10T09:30:02.703Z",
      "url": "https://sos-ch-gva-2.exo.io/..."
    },
    {
      "id": "53c8fac6-dc12-4d14-b60d-02c9ae014447",
      "key": "ec7aa964-dd6b-46c7-9bb0-f92a0c9ede05",
      "fileName": "ifc-glb.log",
      "fileType": "log",
      "fileSize": "535",
      "updatedAt": "2024-07-10T09:30:02.705Z",
      "createdAt": "2024-07-10T09:30:02.705Z",
      "url": "https://sos-ch-gva-2.exo.io/..."
    },
    {
      "id": "ee3bf3df-6117-4146-ad6e-be95eaf98cf7",
      "key": "88a66a4b-4c6d-47a7-a1ce-942627b39665",
      "fileName": "metadata.db",
      "fileType": "db",
      "fileSize": "200704",
      "updatedAt": "2024-07-10T09:30:02.706Z",
      "createdAt": "2024-07-10T09:30:02.706Z",
      "url": "https://sos-ch-gva-2.exo.io/..."
    },
    {
      "id": "59854b3e-5fd6-4bcb-8020-1a6c26b9b077",
      "key": "3dcf4efa-c39b-456b-b301-13d645972385",
      "fileName": "output.metadata.json",
      "fileType": "json",
      "fileSize": "104760",
      "updatedAt": "2024-07-10T09:30:02.708Z",
      "createdAt": "2024-07-10T09:30:02.708Z",
      "url": "https://sos-ch-gva-2.exo.io/..."
    },
    {
      "id": "d7efe3df-6ed1-4d10-ab7d-e6a1e395ff47",
      "key": "36c439d7-d6a4-442c-a940-cdad9086a645",
      "fileName": "output.xkt", 
      "fileType": "xkt", 
      "fileSize": "125805",
      "updatedAt": "2024-07-10T09:30:02.710Z",
      "createdAt": "2024-07-10T09:30:02.710Z",
      "url": "https://sos-ch-gva-2.exo.io/..."
    }
  ]
}

Process event - eventsWebhook

When creating process user can assign an optional eventsWebhook

bash
curl --request POST \
  --url https://converter.xeovision.io/process \
  --header 'Content-Type: application/json' \
  --header 'Authorization: <token>' \
  --data '{
    "type": "ifc-xkt",
    "downloadUrl": "https://raw.githubusercontent.com/xeokit/xeokit-sdk/master/assets/models/ifc/Duplex.ifc"
    "eventsWebhook": { //
      "url": "https://my-app", //
      "method": "POST", //
      "headers": { //
        "": "" //
    } // [!code highlight]
  }
}'

If Webhook is assign, the service starts sending process lifecycle events to provided eventsWebhook.url. This option might be a good replacement for polling getting process data

Powered by xeokit and exoscale