Filaments

Correct how much of a spool remains by applying a signed delta.

Wraps the same logic as the MCP adjust_material_remaining tool. The result cannot go below zero or above the spool's original capacity, and a spool with no starting amount cannot be adjusted. delta must be finite, non-zero and at most 2,000,000 in magnitude (g / mm / ml). beforeGrams and afterGrams are grams whatever unit delta is in.

post/api/Filaments/{id}/adjustments

Request

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

idstring uuid required

The ID of the filament.

Request body

sourcestring nullable

The unit of delta: weight (grams), length (millimeters) or volume (milliliters). Case-insensitive.

deltanumber double

Signed amount in the unit of source. Positive adds, negative removes. Must be finite, not 0, and at most 2,000,000 in magnitude.

notesstring nullable

Optional note, at most 1000 characters (checked in the action so the 400 carries a code).

Response

The remaining weight before and after, in grams.

beforeGramsnumber double

Grams remaining before the adjustment.

afterGramsnumber double

Grams remaining after the adjustment.

Changes

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