Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[api] Add cohorts to project info #8774

Merged
merged 6 commits into from
Aug 16, 2023
Merged

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Jun 12, 2023

The API documentation says you can create a visit by sending a PUT request to the visit label including all of the visit meta data that the endpoint returns, but there's no way to get a list of cohorts which is part of the required data for creating a new visit.

This makes the following changes to v0.0.4-dev in order to support the creation of visits through the API without resorting to out-of-band information:

  1. Adds cohorts to /projects/$projectname (similarly to how there's a visits key)
  2. Renames the "Battery" key to "Cohort" in v0.0.4-dev (since it's no longer a SubprojectID.)

Ideally, cohorts would be more comprehensively supported by the API, but this is the minimal that seems to be required in order to create visits through the API and is consistent with how projects visits are handled.

@driusan driusan added Add to Release Notes PR change should be highlighted in Release notes (important security, features and bugfixes) API PR or issue introducing/requiring modifications to the API code labels Jun 12, 2023
@driusan driusan force-pushed the APIProjectCohorts branch 2 times, most recently from 1fa3f7e to 32552d3 Compare June 13, 2023 12:20
@driusan driusan added the Blocked PR awaiting the merge, resolution or rejection of an other Pull Request label Jun 13, 2023
@driusan
Copy link
Collaborator Author

driusan commented Jun 13, 2023

This should probably not go in without #8778. Might wait until after the release.

@driusan driusan removed the Blocked PR awaiting the merge, resolution or rejection of an other Pull Request label Jun 20, 2023
@driusan driusan changed the base branch from 25.0-release to main June 20, 2023 17:31
The API documentation says you can create a visit by sending a PUT
request to the visit label including all of the visit meta data that
the endpoint returns, but there's no way to get a list of cohorts which
is part of the required data for creating a new visit.

This makes the following changes to v0.0.4-dev in order to support the
creation of visits through the API without resorting to out-of-band information:
1. Adds cohorts to /projects/$projectname (similarly to how there's a visits
   key)
2. Renames the "Battery" key to "Cohort" in v0.0.4-dev (since it's no longer
   a SubprojectID in LORIS.)

Ideally, cohorts would be more comprehensively supported by the API, but this
is the minimal that seems to be required in order to create visits through the
API and is consistent with how projects visits are handled.
Copy link
Collaborator

@ridz1208 ridz1208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@driusan driusan merged commit a3abcc8 into aces:main Aug 16, 2023
19 checks passed
@ridz1208 ridz1208 added this to the 26.0.0 milestone Nov 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Add to Release Notes PR change should be highlighted in Release notes (important security, features and bugfixes) API PR or issue introducing/requiring modifications to the API code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants