๐Ÿค– 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

Read-only file inspection (no open job required)


Preview Job File

GET
/api/v1
/file/preview

This endpoint extracts metadata appended to SPACE GASS job files:

  • Version: SPACE GASS version used to save the file
  • Licensee: Licensed user name when file was saved
  • Designer: Computer name where file was saved
  • Preview image: Screenshot of the model when saved (if available)

Note: Older files may not have this metadata. Metadata fields will be null in that case.

Example usage with curl:

Code
curl -X GET "/api/v1/file/preview?filePath=C:\path\to\job.sg&includeImage=true"

Preview Job File โ€บ query Parameters

filePath
โ€‹string

Full path to the SPACE GASS job file (.sg or .sgbase), for example C:\Models\Job.sg; a relative path, such as one starting with '~', returns an empty preview

includeImage
โ€‹boolean

If true, includes the preview image (base64 encoded). Defaults to false.

Default: false

Preview Job File โ€บ Responses

Returns preview information

Information extracted from a SPACE GASS job file (.sg or .sgbase). Contains metadata appended to the file when saved.
filePath
โ€‹string | null

The file path that was queried

fileName
โ€‹string | null

The file name without path

fileSizeBytes
โ€‹integerย ยทย int64

File size in bytes

lastModified
โ€‹string | nullย ยทย date-time

Last modified date of the file

version
โ€‹string | null

The SPACE GASS version that was used to save the file

licenseeName
โ€‹string | null

The licensee name that was used when saving the file

designer
โ€‹string | null

The designer name when the file was saved

projectHeading
โ€‹string | null

The project heading/title

jobHeading
โ€‹string | null

The job heading/title

notes
โ€‹string | null

Job notes

dateSaved
โ€‹string | null

Date and time the file was saved

computerName
โ€‹string | null

Computer name where the file was saved

userName
โ€‹string | null

User name who saved the file

compression
โ€‹string | null

Compression type used when saving the file

hasPreviewImage
โ€‹boolean

Whether a preview image is available

previewImageBase64
โ€‹string | null

The preview image as a base64-encoded PNG string. Only populated if includeImage parameter is true.

previewImageDataUrl
โ€‹string | nullย ยทย readOnly

The preview image as a Data URL (data:image/png;base64,...). Can be used directly in HTML img src attribute. Only available if includeImage parameter is true and image exists.


List Sample Files

GET
/api/v1
/file/samples

Returns all available SPACE GASS sample project files. Each sample includes metadata and an optional preview image. A sample is listed without a filePath (the installation path is not exposed). Open one by its fileName with POST /api/v1/job/open-sample.

Samples are opened as new unsaved jobs โ€” use Save As to persist changes.

Example usage with curl:

Code
curl -X GET "/api/v1/file/samples?includeImages=true"

List Sample Files โ€บ query Parameters

includeImages
โ€‹boolean

If true, includes preview images (base64 encoded). Defaults to false.

Default: false

List Sample Files โ€บ Responses

Returns list of sample files

Information extracted from a SPACE GASS job file (.sg or .sgbase). Contains metadata appended to the file when saved.
filePath
โ€‹string | null

The file path that was queried

fileName
โ€‹string | null

The file name without path

fileSizeBytes
โ€‹integerย ยทย int64

File size in bytes

lastModified
โ€‹string | nullย ยทย date-time

Last modified date of the file

version
โ€‹string | null

The SPACE GASS version that was used to save the file

licenseeName
โ€‹string | null

The licensee name that was used when saving the file

designer
โ€‹string | null

The designer name when the file was saved

projectHeading
โ€‹string | null

The project heading/title

jobHeading
โ€‹string | null

The job heading/title

notes
โ€‹string | null

Job notes

dateSaved
โ€‹string | null

Date and time the file was saved

computerName
โ€‹string | null

Computer name where the file was saved

userName
โ€‹string | null

User name who saved the file

compression
โ€‹string | null

Compression type used when saving the file

hasPreviewImage
โ€‹boolean

Whether a preview image is available

previewImageBase64
โ€‹string | null

The preview image as a base64-encoded PNG string. Only populated if includeImage parameter is true.

previewImageDataUrl
โ€‹string | nullย ยทย readOnly

The preview image as a Data URL (data:image/png;base64,...). Can be used directly in HTML img src attribute. Only available if includeImage parameter is true and image exists.


Get File Opening Status

GET
/api/v1
/file/status

Checks whether a SPACE GASS job file can be opened, without opening it. "Recovery files" below are the temporary working files SPACE GASS keeps while a job is open; when a session ends abnormally they are left behind and contain that session's unsaved changes.

Status values:

  • NotFound: no job file exists at the specified path
  • ReadyToOpen: can be opened normally โ€” not locked, no unsaved changes
  • Locked: another user or process currently has the file open
  • RecoveryFilesOnly: only recovery files exist โ€” the .sg file itself is missing (restore it to open the job)
  • UnsavedChanges: recovery files with unsaved changes from an abnormal shutdown exist alongside the file
  • LockedWithUnsavedChanges: locked and recovery files with unsaved changes also exist
  • Unknown: the status could not be determined โ€” the file or the temporary folder may be inaccessible

Only ReadyToOpen can be opened without a forceOption. Locked, UnsavedChanges and LockedWithUnsavedChanges require a forceOption on POST job/open; NotFound and RecoveryFilesOnly cannot be opened at the checked path. canOpenSafely is true only for ReadyToOpen; availableRecoveryOptions lists the forceOption values that will succeed (empty when none will).

Get File Opening Status โ€บ query Parameters

filePath
โ€‹string

Full path to the SPACE GASS job file (.sg), for example C:\Models\Job.sg; a relative path, such as one starting with '~', reports NotFound

Get File Opening Status โ€บ Responses

Returns the file opening status

Status information about a SPACE GASS file's readiness for opening.
filePath
โ€‹string | null

The file path that was checked

status
โ€‹JobFileOpeningStatusย ยทย enum

Openability of a SPACE GASS job file, as returned by GET file/status. Only ReadyToOpen opens without a forceOption; Locked, UnsavedChanges and LockedWithUnsavedChanges require one on POST job/open. NotFound and RecoveryFilesOnly cannot be opened at the checked path โ€” no .sg file exists there.

Enum values:
NotFound
ReadyToOpen
Locked
RecoveryFilesOnly
UnsavedChanges
LockedWithUnsavedChanges
Unknown
description
โ€‹string | null

Human-readable description of the status

recommendedAction
โ€‹string | null

Recommended action to take based on the status

canOpenSafely
โ€‹boolean

Whether the file can be opened safely without force options

availableRecoveryOptions
โ€‹array | null

The recovery options that can be supplied as forceOption on POST job/open for this file's current status.

Enum values:
None
OpenPreviousSaved
OpenUnsavedMostRecent
Example: ["OpenUnsavedMostRecent","OpenPreviousSaved"]