Skip to content

one big api call (post) #16880

Answered by candlerb
lavazza2017 asked this question in Q&A
Jul 11, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Not really... welcome to REST APIs.

Some systems with very complex APIs are able to do this, e.g. Salesforce which has sObject Tree, composite and composite graph endpoints. But arguably that's no longer following the REST model any more. Even they couldn't decide how to structure their API, which is why there are multiple endpoints for doing essentially the same thing.

If you frequently need to create the same set of items (e.g. tenant + site + racks) then you could write a custom script for it, and then invoke it via the API. This would have the advantage of running within a single database transaction, so is all-or-nothing.

But if you're going to write a custom script, you may as well …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lavazza2017
Comment options

Answer selected by lavazza2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants