-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api/instruments] Add endpoint that allows you to add instruments to a battery #8868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think bypassing the test_battery is advisable. Was it the ask?
@@ -480,7 +481,10 @@ Where the instruments array represents the instruments that were administered fo | |||
candidate at that visit. InstrumentNames are the short names and the forms for them | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ask for the Meta object? Just the instruments would be enough no?
{
"Instruments": [...]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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 |
This implements a
/candidates/{id}/{visit}/instruments
POST
endpoint which allows you to programmatically add an instrument to a candidate's battery through the LORIS API.The
POST
endpoint 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.