🤖 New in SPACE GASS 14.51 — the MCP server lets your AI agent build, analyse and design your models. Get started →
SpaceGass API
SPACE GASS API

Job lifecycle management — create, open, save, close, and check status


Get Job

GET
/api/v1
/job

Gets the current job (there is only one).

Sub-resources are managed via their own endpoints:

  • Headings: GET/PATCH /job/headings
  • Settings: GET /job/settings
  • Units: GET /job/units (read-only)
  • Errors: GET/DELETE /job/errors
  • Model summary: GET /job/status

Get Job › Responses

Returns the job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).
​JobHeadings

Read DTO for job headings (text properties).

​JobSettings

Read DTO for job-level settings. Groups configuration properties that apply to the job as a whole.

​Units

Unit settings for the current job.


Get Job Headings

GET
/api/v1
/job/headings

Gets the job headings (project heading, designer initials, notes).

Get Job Headings › Responses

Returns the job headings

Read DTO for job headings (text properties).
projectHeading
​string | null

Project heading

heading
​string | null

Job heading

designerInitials
​string | null

Designer initials

notes
​string | null

Job notes


Update Job Headings

PATCH
/api/v1
/job/headings

Updates the job headings (project heading, designer initials, notes).

Update Job Headings › Request Body

Write DTO for updating job headings via PATCH /job/headings. Omit a field to leave it unchanged.
projectHeading
​string | null · maxLength: 50

Project heading. Omit to leave unchanged.

heading
​string | null · maxLength: 50

Job heading. Omit to leave unchanged.

designerInitials
​string | null · maxLength: 3

Designer initials. Omit to leave unchanged.

notes
​string | null · maxLength: 1024

Job notes. Omit to leave unchanged.

Update Job Headings › Responses

Returns the updated headings

Read DTO for job headings (text properties).
projectHeading
​string | null

Project heading

heading
​string | null

Job heading

designerInitials
​string | null

Designer initials

notes
​string | null

Job notes


Get Job Status

GET
/api/v1
/job/status

Returns the current job and its file/session state. Same response shape as new, open, and save for consistency.

Use this to determine:

  • Whether a job is currently loaded (state.isOpen)
  • Whether it needs saving (state.isModified)
  • Whether to provide a filePath when saving (state.isNew)
  • What's in the model (model.nodes, model.members, etc.)
  • Whether analysis results exist (analysis.hasStaticResults, etc.)
  • Whether steel design results exist (steelDesign.hasMemberDesignResults, etc.)

Get Job Status › Responses

Returns the job and status

Full job status response including the current job, session state, structure summary, and loads summary. Returned by lifecycle operations (new, open, save, status) and GET /job/status.
​Job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).

​JobState

Current session/file state of the job.

​StructureSummary

Summary counts of structural entities in the current job — geometry, boundary conditions, and section/material properties.

​LoadsSummary

Summary counts of load-related entities in the current job — load case management and all applied load types.

Summary of which analysis types have stored results for the current job.

​SteelDesignSummary

Summary of steel design data and results for the current job — the number of steel member design groups, and which steel design types have stored results.

accessMode
​AccessMode · enum

Current operational mode of the API.

Enum values:
ReadWrite
ReadOnly
NoAccess

Close Job

POST
/api/v1
/job/close

Closes the current job session and unloads from memory.

Idempotent: if no job is currently open, returns 200 with the current state (isOpen=false) without error.

Unsaved changes are discarded. Call POST /job/save before closing to persist changes.

The .sg file on disk is never deleted or modified. Returns the file resource state after close (isOpen will be false).

Close Job › Responses

Returns the state confirming the job is closed

Current session/file state of the job.
isOpen
​boolean

Whether a job is currently loaded in memory.

isNew
​boolean

Whether this is a new job that has never been saved. If true, provide a filePath when calling POST /save.

isModified
​boolean

Whether the job has unsaved modifications.

openedAt
​string | null · date-time

When the job was opened (null if not open).

​JobFile

File information for the current job.


New Job

POST
/api/v1
/job/new

Creates a new blank job with default configuration.

If a job is currently open, returns 409 Conflict — close the current job first using POST /job/close.

New Job › Responses

New blank job created

Full job status response including the current job, session state, structure summary, and loads summary. Returned by lifecycle operations (new, open, save, status) and GET /job/status.
​Job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).

​JobState

Current session/file state of the job.

​StructureSummary

Summary counts of structural entities in the current job — geometry, boundary conditions, and section/material properties.

​LoadsSummary

Summary counts of load-related entities in the current job — load case management and all applied load types.

Summary of which analysis types have stored results for the current job.

​SteelDesignSummary

Summary of steel design data and results for the current job — the number of steel member design groups, and which steel design types have stored results.

accessMode
​AccessMode · enum

Current operational mode of the API.

Enum values:
ReadWrite
ReadOnly
NoAccess

New Job From Template

POST
/api/v1
/job/new-from-template

Creates a new job from an uploaded .sgbase template file.

The template data is loaded but treated as a new job — no file path is set. Use POST /job/save with a filePath to save to a new location.

If a job is currently open, returns 409 Conflict — close the current job first using POST /job/close.

Example usage with curl:

Code
curl -X POST "/api/v1/job/new-from-template" \ -F "template=@/path/to/template.sgbase"

New Job From Template › Request Body optional

template
​binary · application/octet-stream · required

.sgbase template file uploaded as multipart/form-data

New Job From Template › Responses

New job created from template

Full job status response including the current job, session state, structure summary, and loads summary. Returned by lifecycle operations (new, open, save, status) and GET /job/status.
​Job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).

​JobState

Current session/file state of the job.

​StructureSummary

Summary counts of structural entities in the current job — geometry, boundary conditions, and section/material properties.

​LoadsSummary

Summary counts of load-related entities in the current job — load case management and all applied load types.

Summary of which analysis types have stored results for the current job.

​SteelDesignSummary

Summary of steel design data and results for the current job — the number of steel member design groups, and which steel design types have stored results.

accessMode
​AccessMode · enum

Current operational mode of the API.

Enum values:
ReadWrite
ReadOnly
NoAccess

Open Job

POST
/api/v1
/job/open

Opens a job from a local .sg file.

If a job is currently open, returns 409 Conflict — close the current job first using POST /job/close.

For normal open, omit forceOption (or set to null). If the file has unsaved temporary files from a previous session, provide a forceOption:

  • OpenPreviousSaved: Discard unsaved changes, open last saved version
  • OpenUnsavedMostRecent: Preserve unsaved changes, recover from abnormal shutdown

Example request to recover unsaved work:

Code
POST /api/v1/job/open { "filePath": "C:\\path\\to\\job.sg", "forceOption": "OpenUnsavedMostRecent" }

Open Job › Request Body

Request DTO for opening a job file.
filePath
​string · minLength: 1 · required

Full path to the .sg job file to open, for example C:\Models\Job.sg. A relative path, such as one starting with '~', is rejected.

forceOption
​JobForceAccessOption · enum

Options for forcing access to a job file that is in a locked or unsaved state. Used when temporary files exist from a previous session that was not properly closed.

Enum values:
None
OpenPreviousSaved
OpenUnsavedMostRecent

Open Job › Responses

Returns the opened job and status

Full job status response including the current job, session state, structure summary, and loads summary. Returned by lifecycle operations (new, open, save, status) and GET /job/status.
​Job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).

​JobState

Current session/file state of the job.

​StructureSummary

Summary counts of structural entities in the current job — geometry, boundary conditions, and section/material properties.

​LoadsSummary

Summary counts of load-related entities in the current job — load case management and all applied load types.

Summary of which analysis types have stored results for the current job.

​SteelDesignSummary

Summary of steel design data and results for the current job — the number of steel member design groups, and which steel design types have stored results.

accessMode
​AccessMode · enum

Current operational mode of the API.

Enum values:
ReadWrite
ReadOnly
NoAccess

Open Sample Project

POST
/api/v1
/job/open-sample

Opens a sample SPACE GASS project as a new unsaved job. The sample data is loaded but treated as a new job — use Save As to persist changes.

If a job is currently open, returns 409 Conflict — close the current job first using POST /job/close.

Use GET /api/v1/file/samples to list the available samples by file name.

Example request:

Code
POST /api/v1/job/open-sample { "fileName": "Portal Frame.SG" }

Open Sample Project › Request Body

Request DTO for opening a sample project as a new unsaved job.
fileName
​string · minLength: 1 · required

Sample file name (e.g. "Portal Frame.SG"). Use GET /api/v1/file/samples to list available samples.

Open Sample Project › Responses

Returns the opened job and status

Full job status response including the current job, session state, structure summary, and loads summary. Returned by lifecycle operations (new, open, save, status) and GET /job/status.
​Job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).

​JobState

Current session/file state of the job.

​StructureSummary

Summary counts of structural entities in the current job — geometry, boundary conditions, and section/material properties.

​LoadsSummary

Summary counts of load-related entities in the current job — load case management and all applied load types.

Summary of which analysis types have stored results for the current job.

​SteelDesignSummary

Summary of steel design data and results for the current job — the number of steel member design groups, and which steel design types have stored results.

accessMode
​AccessMode · enum

Current operational mode of the API.

Enum values:
ReadWrite
ReadOnly
NoAccess

Save Job

POST
/api/v1
/job/save

Saves the current job. Provide a filePath to save to a new location (Save As), or omit it to save to the current location.

If the job is new (never saved) and no filePath is provided, returns 409 Conflict.

Returns 201 Created on first save (new job), 200 OK on subsequent saves.

Save Job › Request Body optional

Request DTO for saving a job.
filePath
​string | null

Full path of the target file, for example C:\Models\Job.sg. Omit to save to current location. Required if the job is new (never saved before). A relative path, such as one starting with '~', is rejected.

Save Job › Responses

Job saved successfully

Full job status response including the current job, session state, structure summary, and loads summary. Returned by lifecycle operations (new, open, save, status) and GET /job/status.
​Job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).

​JobState

Current session/file state of the job.

​StructureSummary

Summary counts of structural entities in the current job — geometry, boundary conditions, and section/material properties.

​LoadsSummary

Summary counts of load-related entities in the current job — load case management and all applied load types.

Summary of which analysis types have stored results for the current job.

​SteelDesignSummary

Summary of steel design data and results for the current job — the number of steel member design groups, and which steel design types have stored results.

accessMode
​AccessMode · enum

Current operational mode of the API.

Enum values:
ReadWrite
ReadOnly
NoAccess

Clear Job Data

DELETE
/api/v1
/job/data

Clears all model data while keeping current configuration (units, settings). Returns the job object with zeroed model summary counts.

Clear Job Data › query Parameters

force
​boolean

Must be true to confirm clearing. If false or omitted, operation is rejected for safety.

Default: false

Clear Job Data › Responses

Job data cleared, returns updated job

Read DTO for job responses. Model counts and file state are available via GET /job/status (JobStatusDto).
​JobHeadings

Read DTO for job headings (text properties).

​JobSettings

Read DTO for job-level settings. Groups configuration properties that apply to the job as a whole.

​Units

Unit settings for the current job.