+
Skip to content

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
@driusan driusan force-pushed the APIProjectCohorts branch from 32552d3 to 379e286 Compare June 20, 2023 17:32
driusan added 4 commits August 8, 2023 08:43
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.
@driusan driusan force-pushed the APIProjectCohorts branch from 379e286 to b54d680 Compare August 8, 2023 12:43
@driusan driusan force-pushed the APIProjectCohorts branch from cf5fc3d to 6e5bf86 Compare August 8, 2023 13:28
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载