Prints

Link a connector's job to a print that is already Printing.

For connectors that report a job the slicer uploader, the Cura plugin or a hand entry has already logged. Find the print with GET /api/Prints/claimable, then claim it instead of creating a second one. Sets externalSource and externalId (same rules as on create), the connection named by connectionInstanceId when it is yours, and startDate when the print has none, and fileHash (as on create) when the print has none: a hash it already has, such as OctoPrint's SHA-1, is kept. The print keeps its title, notes, usage rows and how it was created. Finish it with POST /api/Prints/{id}/complete.

Only your own print can be claimed, only while it is Printing (2) and not yet linked to a job. Claiming again with the same pair returns the print unchanged, so retries are safe. A different pair, a print that is no longer Printing, or a pair already on another of your prints is a 409; in the last case printId in the body names that print. After a claim, POST /api/Prints with the same pair returns this print rather than creating one.

post/api/Prints/{id}/claim

Request

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

externalSourcestring nullable

The connector claiming the print, e.g. moonraker. Same rules as on create.

externalIdstring nullable

The job's identity in PrintLogApi.Models.DTOs.Print.ClaimPrintDto.ExternalSource. Matched case-insensitively, as on create.

connectionInstanceIdstring nullable

The instanceId of the claiming connection, so the print shows "Logged automatically by" it. An id that is not one of yours is ignored, never rejected.

startDatestring date-time nullable

When the job started. Applied only when the print has no start date yet.

fileHashstring nullable

The file's identity, as on create (40 hex digits). Applied only when the print has no hash yet, so an OctoPrint SHA-1 already on it is kept.

Response

The claimed 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.