> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/managebac/public-rest-apis/v2p1/year-groups.md).

# Year Groups

A Year Group is a collection of student memberships in a cohort that share the same Program.

## Get Service Learning Categories for Students in a Year Group

> Retrieves Service Learning category activities for all students in a year group. Each student's\
> response includes their categorized activities with approval status, supervisor details, activity type,\
> date range, and associated learning outcomes. Results are paginated and can be filtered by student IDs.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."},{"name":"Projects","description":"This group refers to endpoints related to projects."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ServiceLearningCategoriesStudentsResponse":{"type":"object","properties":{"students":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLearningCategoryStudent"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["students","meta"]},"ServiceLearningCategoryStudent":{"type":"object","properties":{"id":{"type":"integer"},"identifier":{"type":"string","nullable":true},"component":{"$ref":"#/components/schemas/ServiceLearningCategoryStudentComponent"}},"required":["id","component"]},"ServiceLearningCategoryStudentComponent":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLearningCategory"}}},"required":["items"]},"ServiceLearningCategory":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"$ref":"#/components/schemas/ServiceLearningCategoryStatus"},"status_annotations":{"$ref":"#/components/schemas/ServiceLearningCategoryStatusAnnotations"},"supervisor":{"$ref":"#/components/schemas/ServiceLearningCategorySupervisor"},"activity_type":{"type":"string"},"start_date":{"type":"string","nullable":true,"format":"date"},"end_date":{"type":"string","nullable":true,"format":"date"},"learning_outcomes":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLearningCategoryLearningOutcome"}},"slug":{"type":"string"}},"required":["id","name","status","slug"]},"ServiceLearningCategoryStatus":{"type":"object","properties":{"post_approved":{"type":"boolean"},"pre_approved":{"type":"boolean"},"progress":{"type":"object","properties":{"title":{"type":"string","enum":["approved","completed","to_be_determined"]}},"required":["title"]}},"required":["post_approved","pre_approved","progress"]},"ServiceLearningCategoryStatusAnnotations":{"type":"object","properties":{"incomplete":{"type":"boolean"},"rejected":{"type":"boolean"},"reviewed":{"type":"boolean"}},"required":["incomplete","rejected","reviewed"]},"ServiceLearningCategorySupervisor":{"type":"object","nullable":true,"properties":{"name":{"type":"string"},"email":{"type":"string"},"title":{"type":"string"},"contact_number":{"type":"string"}}},"ServiceLearningCategoryLearningOutcome":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name"]},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"next_page":{"type":"integer","nullable":true},"prev_page":{"type":"integer","nullable":true},"total_pages":{"type":"integer"},"total_count":{"type":"integer"},"per_page":{"type":"integer"}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Always returns \"Access Denied\" when authentication fails. Check that your API token is valid and enabled."}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"A human-readable message indicating which resource could not be found, including the model name and the ID that was looked up."}}}}},"paths":{"/v2p1/year-groups/{id}/projects/sl/categories/students":{"get":{"summary":"Get Service Learning Categories for Students in a Year Group","operationId":"listYearGroupServiceLearningCategoriesStudents","tags":["Year Groups","Projects","Service Learning"],"description":"Retrieves Service Learning category activities for all students in a year group. Each student's\nresponse includes their categorized activities with approval status, supervisor details, activity type,\ndate range, and associated learning outcomes. Results are paginated and can be filtered by student IDs.\n","parameters":[{"name":"id","in":"path","description":"The unique numeric identifier of the year group.","schema":{"type":"integer"},"required":true},{"name":"student_ids[]","in":"query","description":"Filter by student IDs","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Number of results per page (max 500)","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLearningCategoriesStudentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Get Service Learning Outcomes for Students in a Year Group

> Retrieves Service Learning outcomes progress for all students in a year group. Each student's\
> response includes their progress on each defined learning outcome, with counts of activities linked\
> to each outcome. Results are paginated and can be filtered by student IDs.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."},{"name":"Projects","description":"This group refers to endpoints related to projects."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ServiceLearningOutcomesStudentsResponse":{"type":"object","properties":{"students":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLearningOutcomeStudent"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["students","meta"]},"ServiceLearningOutcomeStudent":{"type":"object","properties":{"id":{"type":"integer"},"identifier":{"type":"string","nullable":true},"status":{"type":"string","description":"The student's assigned SL status title (or translated standard CAS label). Falls back to the school's default status (or \"To Be Determined\" on the standard scale) when none is assigned; always present, never null."},"overall_progress":{"type":"string","description":"Normalized status slug. Falls back to \"to_be_determined\" when no status is assigned; always present, never null.","enum":["excellent","on_track","concern","to_be_determined","cas-approved","cas-completed","cas-rejected","cas-needs-approval","wait-listed","cas-review-sent","cas-reviewed","cas-incomplete"]},"component":{"$ref":"#/components/schemas/ServiceLearningOutcomeStudentComponent"}},"required":["id","status","overall_progress","component"]},"ServiceLearningOutcomeStudentComponent":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLearningOutcome"}}},"required":["items"]},"ServiceLearningOutcome":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"},"completed":{"type":"boolean"},"experiences_with_reflection":{"type":"integer"},"total_experiences":{"type":"integer"},"slug":{"type":"string"}},"required":["id","title","completed","experiences_with_reflection","total_experiences","slug"]},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"next_page":{"type":"integer","nullable":true},"prev_page":{"type":"integer","nullable":true},"total_pages":{"type":"integer"},"total_count":{"type":"integer"},"per_page":{"type":"integer"}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Always returns \"Access Denied\" when authentication fails. Check that your API token is valid and enabled."}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"A human-readable message indicating which resource could not be found, including the model name and the ID that was looked up."}}}}},"paths":{"/v2p1/year-groups/{id}/projects/sl/outcomes/students":{"get":{"summary":"Get Service Learning Outcomes for Students in a Year Group","operationId":"listYearGroupServiceLearningOutcomesStudents","tags":["Year Groups","Projects","Service Learning"],"description":"Retrieves Service Learning outcomes progress for all students in a year group. Each student's\nresponse includes their progress on each defined learning outcome, with counts of activities linked\nto each outcome. Results are paginated and can be filtered by student IDs.\n","parameters":[{"name":"id","in":"path","description":"The unique numeric identifier of the year group.","schema":{"type":"integer"},"required":true},{"name":"student_ids[]","in":"query","description":"Filter by student IDs","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"Number of results per page (max 500)","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLearningOutcomesStudentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Get Service Learning settings for a Year Group

> Retrieves Service Learning (or Community Engagement) settings and component configuration for a year group.\
> Returns the program title, description, abbreviation, and two components: categories (engagement types with\
> their labels, initials, and color codes) and outcomes (learning outcomes with titles and descriptions).\
> Returns 404 if the year group does not support Service Learning (e.g. IB Diploma groups).<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."},{"name":"Projects","description":"This group refers to endpoints related to projects."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"ServiceLearningSettings":{"type":"object","properties":{"service_learning":{"type":"object","properties":{"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"abbreviation":{"type":"string","nullable":true},"components":{"type":"array","items":{"$ref":"#/components/schemas/ServiceLearningComponent"}}},"required":["components"]}},"required":["service_learning"]},"ServiceLearningComponent":{"type":"object","properties":{"slug":{"type":"string"},"label":{"type":"string"},"types":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ServiceLearningCategoryType"}},"outcomes":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ServiceLearningConfiguredOutcome"}}},"required":["slug","label"]},"ServiceLearningCategoryType":{"type":"object","properties":{"id":{"type":"integer"},"label":{"type":"string"},"initial":{"type":"string"},"color_code":{"type":"string"}},"required":["id","label"]},"ServiceLearningConfiguredOutcome":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":"string"}},"required":["id","title"]},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Always returns \"Access Denied\" when authentication fails. Check that your API token is valid and enabled."}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"A human-readable message indicating which resource could not be found, including the model name and the ID that was looked up."}}}}},"paths":{"/v2p1/year-groups/{id}/projects/sl":{"get":{"summary":"Get Service Learning settings for a Year Group","operationId":"getYearGroupServiceLearning","tags":["Year Groups","Projects","Service Learning"],"description":"Retrieves Service Learning (or Community Engagement) settings and component configuration for a year group.\nReturns the program title, description, abbreviation, and two components: categories (engagement types with\ntheir labels, initials, and color codes) and outcomes (learning outcomes with titles and descriptions).\nReturns 404 if the year group does not support Service Learning (e.g. IB Diploma groups).\n","parameters":[{"name":"id","in":"path","description":"The unique numeric identifier of the year group.","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLearningSettings"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Get all Year Groups

> Retrieves basic information for all Year Groups, including the group name,\
> program, program\_code, grade level, and student IDs for members.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p1/year-groups":{"get":{"summary":"Get all Year Groups","operationId":"listYearGroups","tags":["Year Groups"],"description":"Retrieves basic information for all Year Groups, including the group name,\nprogram, program_code, grade level, and student IDs for members.\n","parameters":[{"name":"modified_since","in":"query","description":"A timestamp to filter results by modification date.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"An integer defining which page to display.","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"An integer defining the number of records to display per page.","required":false,"schema":{"type":"string"}},{"name":"archived","in":"query","description":"A boolean that, if set to true, returns only archived groups.","required":false,"schema":{"type":"boolean"}},{"name":"student_ids","in":"query","required":false,"description":"List of student ids. Accepts repeated params or a comma-separated string.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"}}}}}}
```

## Get Students for a Year Group

> Retrieves all students belonging to a year group, as specified by the year group ID.\
> Returns student details including email, name, program, grade, and parent IDs.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p1/year-groups/{id}/students":{"get":{"summary":"Get Students for a Year Group","operationId":"listStudentsFromYearGroups","tags":["Year Groups"],"description":"Retrieves all students belonging to a year group, as specified by the year group ID.\nReturns student details including email, name, program, grade, and parent IDs.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"An integer defining which page to display.","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"An integer defining the number of records to display per page.","required":false,"schema":{"type":"string"}},{"name":"student_ids","in":"query","required":false,"schema":{"description":"List of student ids. Accepts repeated params or a comma-separated string.","type":"array","items":{"type":"integer"},"style":"form","explode":true}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Add Students to a Year Group

> Adds a list of student IDs to a year group, as specified by the year group ID.\
> Students who are already members of the group will not be duplicated.\
> \
> A student may only belong to one active year group at a time, so any student added here is\
> removed from their other active year groups. Adding a student to an archived year group does\
> not affect their active year group membership.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p1/year-groups/{id}/add_students":{"post":{"summary":"Add Students to a Year Group","operationId":"addStudentToYearGroup","tags":["Year Groups"],"description":"Adds a list of student IDs to a year group, as specified by the year group ID.\nStudents who are already members of the group will not be duplicated.\n\nA student may only belong to one active year group at a time, so any student added here is\nremoved from their other active year groups. Adding a student to an archived year group does\nnot affect their active year group membership.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"student_ids":{"description":"An array of student IDs to be added to a year group","type":"array","items":{"type":"integer"}}},"required":["student_ids"]}}}}}}}}
```

## Remove Students from a Year Group

> Removes a list of student IDs from a year group, as specified by the year group ID.\
> Students not currently in the group will be silently ignored.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p1/year-groups/{id}/remove_students":{"post":{"summary":"Remove Students from a Year Group","operationId":"removeStudentToYearGroup","tags":["Year Groups"],"description":"Removes a list of student IDs from a year group, as specified by the year group ID.\nStudents not currently in the group will be silently ignored.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"student_ids":{"description":"An array of Student IDs to remove from the Year Group","type":"array","items":{"type":"integer"}}},"required":["student_ids"]}}}}}}}}
```

## Get Advisors

> Retrieves the Homeroom, CAS, EE, TOK, and Project-based Learning advisors\
> for a Year Group, specified by its ID. Returns advisor IDs and role abbreviations.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2P1","version":"v2p1"},"tags":[{"name":"Year Groups","description":"A Year Group is a collection of student memberships in a cohort that share the same Program."}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2p1/year-groups/{id}/advisors":{"get":{"summary":"Get Advisors","operationId":"listAdvisorsFromYearGroup","tags":["Year Groups"],"description":"Retrieves the Homeroom, CAS, EE, TOK, and Project-based Learning advisors\nfor a Year Group, specified by its ID. Returns advisor IDs and role abbreviations.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```
