GET /api/v1/measurements ​

operationId: listMeasurements

This operation is described by the generated OpenAPI contract.

Authentication ​

Provide either authentication method:

  • Bearer token (Authorization: Bearer <token>).
  • API token in the X-SketchForge-Token header.

Parameters ​

NameInRequiredSchemaDescription
projectIdqueryYes{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]*$","maxLength":120}Whitespace is trimmed before validation. ID starts with a letter or digit and contains only letters, digits, underscores, and hyphens.
shapeIdqueryYes{"type":"string","minLength":1}Whitespace is trimmed; the remaining value must not be empty.

Request body ​

No request body.

Responses ​

200 — Successful response. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "measurements"
  ],
  "properties": {
    "measurements": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "entity",
          "index",
          "geometryType",
          "length",
          "area",
          "radius",
          "diameter",
          "sweepDegrees",
          "radiusUnavailable"
        ],
        "properties": {
          "entity": {
            "type": "string",
            "enum": [
              "edge",
              "face"
            ]
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "geometryType": {
            "type": "string"
          },
          "length": {
            "type": [
              "number",
              "null"
            ]
          },
          "area": {
            "type": [
              "number",
              "null"
            ]
          },
          "radius": {
            "type": [
              "number",
              "null"
            ]
          },
          "diameter": {
            "type": [
              "number",
              "null"
            ]
          },
          "sweepDegrees": {
            "type": [
              "number",
              "null"
            ]
          },
          "radiusUnavailable": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "notCircular",
              "ellipseHasNoSingleRadius",
              "degenerateCurve",
              "notCurved",
              "radiusVariesOverSurface",
              "radiusNotReportedByKernel",
              "degenerateSurface",
              null
            ]
          }
        }
      }
    }
  }
}

400 — Invalid request. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "invalid_project_id",
        "invalid_shape_id"
      ]
    }
  },
  "additionalProperties": false
}

401 — Authentication failed. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "unauthorized"
      ]
    }
  },
  "additionalProperties": false
}

404 — Resource not found or API disabled. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "api_disabled",
        "project_not_found",
        "shape_not_found"
      ]
    }
  },
  "additionalProperties": false
}

409 — The project is busy or the request conflicts with current state. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "project_busy",
        "revision_mismatch"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": false
}

500 — Server-side failure. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "cad_failed",
        "internal_error"
      ]
    }
  },
  "additionalProperties": false
}

503 — Server-side failure. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "storage_unconfigured"
      ]
    }
  },
  "additionalProperties": false
}

Source ​

Route handler source · OpenAPI JSON · REST API guide


Documentation version: 1.30.0 · Repository revision: 1cb9fee8dff4d394684c229dd67a21da539d167f · View source