---
title: "Receive a print event from the OctoPrint Webhooks plugin."
method: POST
path: "/api/Octoprint"
tags: ["Octoprint"]
---

# Receive a print event from the OctoPrint Webhooks plugin.

`POST /api/Octoprint`

## Request

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

Called by the OctoPrint-Webhooks plugin, not by hand. Set it up as described at
https://www.3dprintlog.com/docs/octoprint-webhook, authenticating with a personal API key.
            
The body is form data. `deviceIdentifier` must be the id of one of the caller's printers. A
`Print Started` event creates a print in the Printing status. `Print Done` marks it Success,
and `Print Failed` or `Error` mark it Failed.

## Query parameters

- `Extra` PrintLogApiModelsDTOsOctoprintOctoprintWebhookExtraDto: The event's payload from OctoPrint, sent as the JSON-encoded `Extra` form field.
  - `name` string, nullable: The file name. `example.gcode` marks the plugin's test webhook, which only checks the printer and logs nothing.
  - `path` string, nullable
  - `time` number, double, nullable: Elapsed print time in seconds, on `Print Done` and `Print Failed`.
- `Job` PrintLogApiModelsDTOsOctoprintOctoprintWebhookJobDto: OctoPrint's current job, sent as the JSON-encoded `Job` form field.
  - `file` PrintLogApiModelsDTOsOctoprintOctoprintWebhookJobFileDto
    - `name` string, nullable
  - `estimatedPrintTime` number, double, nullable: OctoPrint's estimate from analysing the file, in seconds.
  - `averagePrintTime` number, double, nullable: The average of previous prints of this file, in seconds.
  - `lastPrintTime` number, double, nullable: The previous print of this file, in seconds.
  - `filament` PrintLogApiModelsDTOsOctoprintOctoprintWebhookMetaAnalysisFilamentDto
    - `tool0` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
      - `length` number, double: Estimated length in millimeters.
      - `volumn` number, double
    - `tool1` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
      - `length` number, double: Estimated length in millimeters.
      - `volumn` number, double
    - `tool2` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
      - `length` number, double: Estimated length in millimeters.
      - `volumn` number, double
    - `tool3` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
      - `length` number, double: Estimated length in millimeters.
      - `volumn` number, double
    - `tool4` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
      - `length` number, double: Estimated length in millimeters.
      - `volumn` number, double
- `Meta` PrintLogApiModelsDTOsOctoprintOctoprintWebhookMetaDto: The file's metadata, sent as the JSON-encoded `Meta` form field.
  - `hash` string, nullable: SHA1 Hash of the file.
  - `analysis` PrintLogApiModelsDTOsOctoprintOctoprintWebhookMetaAnalysisDto
    - `filament` PrintLogApiModelsDTOsOctoprintOctoprintWebhookMetaAnalysisFilamentDto
      - `tool0` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
        - `length` number, double: Estimated length in millimeters.
        - `volumn` number, double
      - `tool1` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
        - `length` number, double: Estimated length in millimeters.
        - `volumn` number, double
      - `tool2` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
        - `length` number, double: Estimated length in millimeters.
        - `volumn` number, double
      - `tool3` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
        - `length` number, double: Estimated length in millimeters.
        - `volumn` number, double
      - `tool4` PrintLogApiModelsDTOsOctoprintOctoprintWebhookFilamentUsageDto: One extruder's estimated filament use, from OctoPrint's file analysis.
        - `length` number, double: Estimated length in millimeters.
        - `volumn` number, double

## Response `200`

Returned if the webhook was handled successfully.

## Other responses

- `400`: Returned if required data is missing in the webhook (like the DeviceIdentifier, etc).
- `401`: Returned if the user is not authenticated.
- `403`: Returned if the current user cannot access the printer specified.

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
