Guide
A simulation must belong to a project and use a model.
Flow to create a simulation (new project, new model)
sequenceDiagram autonumber Client ->> API: POST /archiwind/v1/projects API -->> Client: 201 Created, returning $project_id Client ->> API: POST /archiwind/v1/models API -->> Client: 201 Created, returning $model_id and each file's signed upload URL Client ->> File Server: Upload file #35;1 Client ->> File Server: Upload file #35;N Client ->> API: POST /archiwind/v1/models/${model_id}/finalise API -->> Client: 200 OK Client ->> API: POST /archiwind/v1/simulations using $project_id and $model_id API -->> Client: 201 Created
Flow to create a simulation (existing project, new model)
sequenceDiagram autonumber Client ->> API: GET /archiwind/v1/projects API -->> Client: 200 OK, returning all projects with their $project_id Client ->> API: POST /archiwind/v1/models API -->> Client: 201 Created, returning $model_id and each file's signed upload URL Client ->> File Server: Upload file #35;1 Client ->> File Server: Upload file #35;N Client ->> API: POST /archiwind/v1/models/${model_id}/finalise API -->> Client: 200 OK Client ->> API: POST /archiwind/v1/simulations using $project_id and $model_id API -->> Client: 201 Created
Upload files to File Server
To upload a file to the File Server, you must issue an HTTP PUT request with the full file in the body and the header Content-Length
matching its size.
Example:
curl -X PUT "$UPLOAD_URL" --upload-file /path/to/file.obj