POST /api/v1/interference ​

operationId: analyzeInterference

Reports exact gaps and overlap volumes for visible, non-cutter shapes, subject to 128-shape and 512-candidate limits. Exceeding either cap returns 413 limit_exceeded.

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}—

Request body ​

Required.

application/json ​

json
{
  "type": "object",
  "properties": {
    "ids": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "\\S",
          "description": "Whitespace is trimmed; IDs must be unique after trimming."
        },
        {
          "type": "array",
          "minItems": 1,
          "description": "IDs are trimmed and must be unique after trimming.",
          "items": {
            "type": "string",
            "pattern": "\\S"
          }
        }
      ]
    },
    "clearance": {
      "type": "number",
      "minimum": 0,
      "description": "Maximum exact surface gap in millimetres; defaults to zero."
    }
  },
  "additionalProperties": true
}

Responses ​

200 — Successful response. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "shapesChecked",
    "candidatePairsChecked",
    "clearance",
    "method",
    "pairs"
  ],
  "properties": {
    "shapesChecked": {
      "type": "integer",
      "minimum": 0
    },
    "candidatePairsChecked": {
      "type": "integer",
      "minimum": 0
    },
    "clearance": {
      "type": "number",
      "minimum": 0
    },
    "method": {
      "type": "string",
      "enum": [
        "OCCT exact distance and common volume; AABB candidate prefilter"
      ]
    },
    "pairs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "a",
          "b",
          "gap",
          "overlapVolume",
          "precision"
        ],
        "properties": {
          "a": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "b": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "gap": {
            "type": "number",
            "minimum": 0
          },
          "overlapVolume": {
            "type": "number",
            "minimum": 0
          },
          "precision": {
            "type": "string",
            "enum": [
              "exact",
              "tessellated"
            ]
          }
        },
        "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": [
        "api_disabled",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

401 — Authentication failed. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "api_disabled",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

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",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

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": [
        "api_disabled",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

413 — Request exceeds the supported size or item limit. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "limit_exceeded"
      ]
    },
    "limit": {
      "type": "integer"
    },
    "given": {
      "type": "integer"
    }
  },
  "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": [
        "api_disabled",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

500 — Server-side failure. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "api_disabled",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

503 — Server-side failure. ​

Content type: application/json

json
{
  "type": "object",
  "required": [
    "error",
    "code"
  ],
  "properties": {
    "error": {
      "type": "string"
    },
    "code": {
      "type": "string",
      "enum": [
        "api_disabled",
        "unauthorized",
        "storage_unconfigured",
        "invalid_project_id",
        "invalid_shape_id",
        "invalid_body",
        "invalid_request",
        "project_not_found",
        "project_exists",
        "project_busy",
        "revision_mismatch",
        "shape_not_found",
        "shape_locked",
        "unsupported_kind",
        "unsupported_format",
        "unapplicable_fields",
        "too_many_shapes",
        "limit_exceeded",
        "geometry_failed",
        "cad_failed",
        "internal_error"
      ]
    },
    "revision": {
      "type": "number"
    }
  },
  "additionalProperties": true
}

Source ​

Route handler source · OpenAPI JSON · REST API guide


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