Prints

Create a new Print.

title is required, and printerId is the id of one of the caller's printers. Durations are in seconds and filament amounts in milligrams. status is an integer (1 Pending, 2 Printing, 3 Success, 4 Cancelled, 5 Failed, 6 PartialSuccess), and viewStatus is 1 Public, 2 Unlisted or 3 Private.

Connectors should send externalSource (e.g. moonraker) and externalId (their job id) together. Re-sending a pair you already used returns that print with 200 instead of creating a duplicate, so retries and backfills are safe. On such a replay only the fields a connector owns are applied (status, the durations, the filament totals and the usage rows), and only when sent; the title, notes and every other field keep any edits the user made. A replay with status Pending or Printing, or with no status, onto a finished print changes nothing and returns the print as it is, so a start retried after the finish cannot undo it. mcp is reserved.

fileHash is optional: 40 hex digits (20 bytes) identifying the G-code file, either its SHA-1 or a connector's own identity for it. A replay never changes it.

post/api/Prints

Request

  • Base URL: https://api.3dprintlog.com
  • URL: https://api.3dprintlog.com/api/Prints
  • 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

Request body

printerIdinteger
estimatedPrintTimeInSecondsinteger nullable
estimatedFilamentUsageMginteger nullable
printTimeInSecondsinteger nullable
filamentUsageMginteger nullable

Filament usage in milligrams

filamentTypestring nullable
notesstring nullable
urlstring nullable
titlestring required
fileNamestring nullable
startDatestring date-time nullable
status1 | 2 | 3 | 4 | 5 | 6

Sent as an integer: 1 = Pending, 2 = Printing, 3 = Success, 4 = Cancelled, 5 = Failed, 6 = PartialSuccess.

viewStatus1 | 2 | 3

Sent as an integer: 1 = Public, 2 = Unlisted, 3 = Private.

allowCommentsboolean
projectIdstring uuid nullable

Assign to an existing project. Takes precedence over NewProjectName.

newProjectNamestring nullable

Create a new project inline and assign this print to it. Ignored if ProjectId is set.

curaSettingIdstring uuid nullable

The CuraSetting this print was prefilled from, when it came through the slicer plugin. Only provenance: the slicer name and version are copied onto the print. An id that is missing (purged) or owned by someone else is ignored, never rejected.

externalSourcestring nullable

The system a connector logged this print from, e.g. moonraker, octoprint. Send together with PrintLogApi.Models.DTOs.Print.AddPrintDTO.ExternalId: a pair the caller already used returns the existing print with 200 instead of creating a duplicate.

externalIdstring nullable

The job's identity in PrintLogApi.Models.DTOs.Print.AddPrintDTO.ExternalSource, unique per user and source. Matched case-insensitively: ABc1 replays a print created as abC1.

connectionInstanceIdstring nullable

The instanceId of the connection (PUT /api/Connections/{instanceId}) logging this print, so it shows "Logged automatically by" that connection. An id that is not one of yours is ignored, never rejected.

fileHashstring nullable

The file's identity, 40 hex digits (20 bytes): the SHA-1 of the G-code, or a connector's own identity for the file that is the same for every job of it and changes when it is re-sliced (printlog-bridge#40). Your prints with the same hash are prints of the same file.

Response

Returned when externalSource/externalId matched one of your prints, containing that print.

idinteger
titlestring nullable
startDatestring date-time nullable
printerIdinteger
estimatedPrintTimeInSecondsinteger nullable
estimatedFilamentUsageMginteger nullable
printTimeInSecondsinteger nullable
filamentUsageMginteger nullable

Filament usage in milligrams

filamentTypestring nullable
notesstring nullable
urlstring nullable
fileNamestring nullable
createdByUserIdinteger
allowCommentsboolean
allowFileDownloadsboolean
status1 | 2 | 3 | 4 | 5 | 6

Sent as an integer: 1 = Pending, 2 = Printing, 3 = Success, 4 = Cancelled, 5 = Failed, 6 = PartialSuccess.

viewStatus1 | 2 | 3

Sent as an integer: 1 = Public, 2 = Unlisted, 3 = Private.

projectIdstring uuid nullable
externalSourcestring nullable

The connector that logged this print, if any. Read-only; shown to the creator only.

externalIdstring nullable

The job's id in PrintLogApi.Models.DTOs.Print.PrintDetailDTO.ExternalSource. Read-only; shown to the creator only.

connectionDisplayNamestring nullable

The display name of the connection that logged this print, for "Logged automatically by …". Null when no connection logged it or it has been deleted. Shown to the creator only.

Changes

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