Prints

Record a print's slicer settings from a connector.

For connectors that read the G-code a print came from. Send configBlock, the ; key = value settings the slicer wrote (at most 512 KiB), with header, the start of the file through ; HEADER_BLOCK_END (at most 64 KiB), which names the slicer and its version. OrcaSlicer, PrusaSlicer, Bambu Studio, FLSun Slicer and Anycubic Slicer Next are read; Anycubic Slicer Next only with its header. When there is no block, send metadata, the summary Moonraker extracts; its slicer is then required. With a block, metadata only fills in what the block lacks: the version, and the slicer when there is no header.

The print gets its slicer and version, and the settings note the Slic3r uploader would write, added to the print's notes under a --- Slicer settings (…) --- heading. The user's own notes are kept. How the print was logged (source, externalSource) does not change. Host and credential settings (print_host, printhost_*, anything with apikey, password, token, secret or user in its name, post_process) are removed before anything is parsed or stored; the block itself is never stored.

Sending again is safe: it replaces the settings and the note an earlier call recorded. A print whose settings came from the Cura plugin or the Slic3r uploader keeps them, and the call is a 409; hasSlicerSettings on GET /api/Prints/claimable says so up front. Errors never change the print. Only your own print's settings can be sent.

post/api/Prints/{id}/slicer-settings

Request

  • Base URL: https://api.3dprintlog.com
  • URL: https://api.3dprintlog.com/api/Prints/{id}/slicer-settings
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://3dprintlog.auth0.com/authorize, token URL https://3dprintlog.auth0.com/oauth/token)
    • API key in header X-Api-Key
    • API key in query parameter api_key

Path parameters

idinteger required

The ID of the print.

Request body

configBlockstring nullable

The settings block the slicer wrote into the G-code, as text: the ; key = value comment lines. OrcaSlicer, Anycubic Slicer Next and PrusaSlicer write it at the end of the file (Orca: from ; EXECUTABLE_BLOCK_END; PrusaSlicer: from the ; filament used totals through ; prusaslicer_config = end). Bambu Studio and FLSun Slicer write it near the top, after ; HEADER_BLOCK_END through ; CONFIG_BLOCK_END. Toolpaths may be included but are never needed. At most 512 KiB.

headerstring nullable

The start of the file through ; HEADER_BLOCK_END (PrusaSlicer: its first line). It names the slicer and its version; without it the version is unknown and the slicer is a best guess from the settings. Anycubic Slicer Next can only be told apart from OrcaSlicer by its header. At most 64 KiB.

Response

What was recorded.

printIdinteger
slicerstring nullable

The print's slicer now: cura, prusaslicer, orcaslicer, bambustudio, anycubic, flsun or other.

slicerVersionstring nullable

The slicer's version, or null when neither the header nor the metadata gave one.

sourcestring nullable

What the settings came from: configBlock, or metadata when there was no block or it held no settings.

isRecognizedboolean nullable

For a settings block: true when the header named the slicer, false when it was guessed from the settings. Null for metadata.

settingsCountinteger

How many settings were stored, after credential and host settings were removed.

replacedboolean

True when this replaced settings an earlier call recorded.

noteAppendedboolean

True when the settings note is in the print's notes. False only when adding it would take the notes past the 50,000 characters the print form accepts; the settings are stored anyway.

notestring nullable

The rendered settings note.

Changes

No recorded changes to this operation across all 1 revision of this API.