GET /api/v1/edges ​

operationId: listEdges

Lists the shape's edges in the index order used by fillet and chamfer requests; indexes can change when topology changes.

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": [
    "edges"
  ],
  "properties": {
    "edges": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "index",
          "length",
          "curveType",
          "midpoint",
          "filletable"
        ],
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based position used by fillet and chamfer requests."
          },
          "length": {
            "type": "number",
            "minimum": 0
          },
          "curveType": {
            "type": "string",
            "description": "Curve kind reported by the CAD kernel, or unknown when unavailable."
          },
          "midpoint": {
            "type": "object",
            "required": [
              "x",
              "y",
              "z"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "z": {
                "type": "number"
              }
            },
            "additionalProperties": false
          },
          "filletable": {
            "type": "boolean",
            "description": "Whether the edge has two adjacent faces and can be treated."
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}

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
}

422 — Request is valid JSON but cannot be applied. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "cad_failed"
      ]
    }
  },
  "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