[api/instruments] Add endpoint that allows you to add instruments to a battery#8868
Merged
[api/instruments] Add endpoint that allows you to add instruments to a battery#8868
Conversation
xlecours
requested changes
Nov 28, 2023
Contributor
xlecours
left a comment
There was a problem hiding this comment.
I don't think bypassing the test_battery is advisable. Was it the ask?
| SHOULD all be retrievable through the `project` portion of the API. | ||
|
|
||
| PUT / PATCH / POST are not currently supported for candidate instruments. | ||
| POST accepts data of the same format. Any instruments in the Instrument key not currently in the visit test battery will be added to |
Contributor
There was a problem hiding this comment.
Why ask for the Meta object? Just the instruments would be enough no?
{
"Instruments": [...]
}
Collaborator
Author
There was a problem hiding this comment.
The Meta object is generally required in all our endpoints for 1. symmetric 2. as a double check to ensure a bug didn't send it to the wrong endpoint, isn't it?
Collaborator
Author
|
Yes, the ask is to bypass the test battery and add an instrument that was administered which isn't part of the battery. It also is an atomic operation for the API that you can build "populate the test battery" out of but the inverse it not true |
ridz1208
approved these changes
Jan 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements a
/candidates/{id}/{visit}/instrumentsPOSTendpoint which allows you to programmatically add an instrument to a candidate's battery through the LORIS API.The
POSTendpoint takes input in the same format asGET, but adds any missing instruments to the battery instead of simple returning the existing test battery. It returns the new battery.