Skip to content

fix: correct DDL and webhook endpoint metadata (v2.0.1) - #8

Merged
fsans merged 3 commits into
developfrom
fix/ddl-webhook
Jul 2, 2026
Merged

fsans merged 3 commits into
developfrom
fix/ddl-webhook

Conversation

@fsans

@fsans fsans commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • DDL endpoints: FileMaker_Tables / FileMaker_Indexes addFields, deleteTable, deleteField, createIndex, deleteIndex now use slash-separated paths (FileMaker_Tables/{tableName}) instead of OData key-parentheses (FileMaker_Tables('{tableName}')), which FMS rejects with error -1010. createIndex now takes the table in the URL and { indexName: <fieldName> } in the body; deleteIndex uses FileMaker_Indexes/{table}/{field}.
  • Webhook endpoints: reads (Webhook.GetAll, Webhook.Get) are GET; the webhook id goes in the URL as an OData function argument (Webhook.Get(1)); the delete endpoint is Webhook.Delete (not Webhook.Remove); Webhook.Invoke requires a { rowIDs: [...] } body.
  • Types: added WebhookInvokeParams and WebhookCreateResult, a webhookID field on WebhookData (FMS's actual primary key), and an optional id parameter on webhookPath(). WebhookOperation now uses Delete instead of Remove.
  • Mirrored the fixes across @fms-odata/spec-ts, fms-odata-spec-py, the JSON capabilities manifest, and docs/09-webhooks.md + docs/10-schema-modification.md.
  • Bumped both packages and the manifest to 2.0.1 (patch — bug fixes to existing metadata).

Verified against live FileMaker Server 26.0.1 and the official Claris OData guide (https://help.claris.com/en/odata-guide/content/webhook-options.html), cross-referenced with the reference implementation at https://github.com/fsans/fms-odata-webhooks.

Test plan

  • npm run typecheck and npm run build in packages/fms-odata-spec-ts — clean
  • pytest in packages/fms-odata-spec-py — 191 passed (was 173; +18 new assertions covering corrected paths/methods, WebhookInvokeParams, WebhookCreateResult, webhookID field, id-in-path webhookPath)
  • schema/fms-odata-capabilities.json validated as well-formed JSON
  • Live curl re-verification against FMS 26.0.1 (already done during discovery; optional re-run on merge)

fsans added 3 commits July 2, 2026 17:45
DDL endpoints (FileMaker_Tables / FileMaker_Indexes) used OData
key-parentheses format that FMS rejects with error -1010; switched to
slash-separated paths. createIndex now takes the table in the URL and
{ indexName: <fieldName> } in the body; deleteIndex uses
FileMaker_Indexes/{table}/{field}.

Webhook endpoints had wrong methods and URL patterns: reads (GetAll,
Get) are GET, the id goes in the URL as a function argument
(Webhook.Get(1)), the delete endpoint is Webhook.Delete (not Remove),
and Webhook.Invoke requires a { rowIDs: [...] } body.

Mirrored the fixes across @fms-odata/spec-ts, fms-odata-spec-py, the
JSON capabilities manifest, and docs/09 + docs/10. Added
WebhookInvokeParams and WebhookCreateResult types, a webhookID field on
WebhookData, and an optional id parameter on webhookPath(). Bumped both
packages and the manifest to 2.0.1.

Verified against live FileMaker Server 26.0.1 and the official Claris
OData guide. TS typecheck/build clean; Python pytest 191 passed.
The JSON manifest was missing contentType for 11 endpoints that require
JSON request bodies, while the TS and Python packages correctly declared
them. Added application/json to createRecord, updateRecord,
updateRecordRef, runScript, runScriptById, updateContainerBase64,
createTable, addFields, createIndex, createWebhook, and invokeWebhook.
batch already had multipart/mixed. The manifest now matches the TS
source of truth in src/endpoints.ts exactly.
The previous contentType commit claimed the manifest matched the TS
source exactly, but it omitted alsoMethods for 4 endpoints. Added
["PUT"] to createRecord, updateRecord, updateContainerBase64, and
addFields to match src/endpoints.ts. The manifest now matches the TS
source of truth for both contentType and alsoMethods.

Note: getSystemTable exists in the TS FM_ENDPOINTS array but is absent
from the manifest endpoints block; this is a pre-existing inconsistency
on develop (not introduced here) and is left for a separate fix.
@fsans
fsans merged commit fefe374 into develop Jul 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant