aps_issues_request
Issue raw HTTP requests to the ACC Issues API for full control over endpoints, custom filters, attribute definitions, and attribute mappings. Use when simplified tools do not cover your needs. Requires project ID without 'b.' prefix.
Instructions
Call any ACC Issues API endpoint (construction/issues/v1). This is the raw / power‑user tool – it returns the full API response. Prefer the simplified tools (aps_issues_list, aps_issues_get, etc.) for everyday use. Use this when you need full control: custom filters, attribute definitions, attribute mappings, or endpoints not covered by simplified tools.
⚠️ Project IDs for the Issues API must NOT have the 'b.' prefix. If you have a Data Management project ID like 'b.abc123', use 'abc123'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | HTTP method. | |
| path | Yes | API path relative to developer.api.autodesk.com (e.g. 'construction/issues/v1/projects/{projectId}/issues'). Must include the version prefix (construction/issues/v1). | |
| query | No | Optional query parameters as key/value pairs (e.g. { "filter[status]": "open", "limit": "50" }). | |
| body | No | Optional JSON body for POST/PATCH requests. | |
| region | No | Data centre region (x-ads-region header). Defaults to US. |
Implementation Reference
- src/index.ts:378-422 (registration)Tool registration and input schema definition for 'aps_issues_request' - defines name, description, and inputSchema (method, path, query, body, region) in the TOOLS array.
{ name: "aps_issues_request", description: "Call any ACC Issues API endpoint (construction/issues/v1). " + "This is the raw / power‑user tool – it returns the full API response. " + "Prefer the simplified tools (aps_issues_list, aps_issues_get, etc.) for everyday use. " + "Use this when you need full control: custom filters, attribute definitions, attribute mappings, " + "or endpoints not covered by simplified tools.\n\n" + "⚠️ Project IDs for the Issues API must NOT have the 'b.' prefix. " + "If you have a Data Management project ID like 'b.abc123', use 'abc123'.", inputSchema: { type: "object" as const, properties: { method: { type: "string", enum: ["GET", "POST", "PATCH", "DELETE"], description: "HTTP method.", }, path: { type: "string", description: "API path relative to developer.api.autodesk.com " + "(e.g. 'construction/issues/v1/projects/{projectId}/issues'). " + "Must include the version prefix (construction/issues/v1).", }, query: { type: "object", description: "Optional query parameters as key/value pairs " + "(e.g. { \"filter[status]\": \"open\", \"limit\": \"50\" }).", additionalProperties: { type: "string" }, }, body: { type: "object", description: "Optional JSON body for POST/PATCH requests.", }, region: { type: "string", enum: ["US", "EMEA", "AUS", "CAN", "DEU", "IND", "JPN", "GBR"], description: "Data centre region (x-ads-region header). Defaults to US.", }, }, required: ["method", "path"], }, }, - src/index.ts:1189-1215 (handler)Handler function for 'aps_issues_request' tool - extracts method/path/query/body/region from args, validates path, builds headers, and calls apsDmRequest to execute the raw Issues API call.
// ── aps_issues_request ────────────────────────────────────── if (name === "aps_issues_request") { const method = (args.method as string) ?? "GET"; const path = args.path as string; const pathErr = validateIssuesPath(path); if (pathErr) return fail(pathErr); const query = args.query as Record<string, string> | undefined; const body = args.body as Record<string, unknown> | undefined; const region = args.region as string | undefined; const t = await token(); const headers: Record<string, string> = { ...issuesHeaders(region), }; if ((method === "POST" || method === "PATCH") && body !== undefined) { headers["Content-Type"] = "application/json"; } const data = await apsDmRequest( method as "GET" | "POST" | "PATCH" | "DELETE", path, t, { query, body, headers }, ); return json(data); } - src/aps-issues-helpers.ts:265-270 (helper)Helper validator validateIssuesPath() used by the aps_issues_request handler to validate the path parameter.
export function validateIssuesPath(path: string): string | null { if (!path || typeof path !== "string") return "path is required and must be a non‑empty string."; if (path.includes("..")) return "path must not contain '..'."; return null; } - src/index.ts:1178-1182 (helper)Helper function issuesHeaders() used by the handler to build x-ads-region header for Issues API calls.
function issuesHeaders(region?: string): Record<string, string> { const h: Record<string, string> = {}; if (region) h["x-ads-region"] = region; return h; }