Skip to content
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] 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 Release: Add to release notes PR whose changes should be highlighted in the release notes Area: API PR or issue related to the API 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 State: Blocked PR or issue awaiting an external event such as the merge or another PR to proceed 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 State: Blocked PR or issue awaiting an external event such as the merge or another PR to proceed 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
@ridz1208 ridz1208 added this to the 26.0.0 milestone Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: API PR or issue related to the API Release: Add to release notes PR whose changes should be highlighted in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants