Skip to content

#2 Separate out WSAPI endpoints for INSERT and DELETE#4

Merged
MikeTaylor merged 1 commit intomainfrom
2-separate-endpoints
Mar 25, 2026
Merged

#2 Separate out WSAPI endpoints for INSERT and DELETE#4
MikeTaylor merged 1 commit intomainfrom
2-separate-endpoints

Conversation

@MikeTaylor
Copy link
Copy Markdown
Collaborator

The original WSAPI design for inserting and deleting records was too clever by half. It modeled CCMS's INSERT and DELETE commands as a single operation, POST to /cyclops/sets/{setName}, and invited you to post an object containing parameters including op which could be "add" or "remove". It would have required a permissionsDesired check dependent on the operation.

Much better to let Okapi handle all that. I have redone the module descriptor, the RAML, the schemas and the sample data to provide two separate endpoints:

  • /cyclops/sets/{setName}/add
  • /cyclops/sets/{setName}/remove

clever by half. It modeled CCMS's INSERT and DELETE commands as a
single operation, POST to `/cyclops/sets/{setName}`, and invited you
to post an object containing parameters including `op` which could be
"add" or "remove". It would have required a `permissionsDesired` check
dependent on the operation.

Much better to let Okapi handle all that. I have redone the module
descriptor, the RAML, the schemas and the sample data to provide two
separate endpoints:

    /cyclops/sets/{setName}/add
    /cyclops/sets/{setName}/remove
@MikeTaylor MikeTaylor merged commit f82a3c8 into main Mar 25, 2026
4 checks passed
@MikeTaylor MikeTaylor deleted the 2-separate-endpoints branch March 25, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant