> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.canvas.enrollments.GetEnrollments

- Component: `appmixer.canvas.enrollments.GetEnrollments`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.canvas 1.1.2](https://connectors.appmixer.com/connector/appmixer.canvas/1.1.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.canvas/1.1.2/component/appmixer.canvas.enrollments.GetEnrollments>

Returns the details for a user enrolled in a course(s).

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Course ID (`courseId`) | number | The Course ID that is used to collect enrollments. |
| Enrollment Status (`enrollmentStatus`) | text | Option to filter enrollments by a list of filter statuses. |
| Teacher ID (`teacherId`) | number | The ID of the teacher who made the enrollment. |
| Grading Period ID (`gradingPeriodId`) | number | The ID of the grading period for the enrollment. |
| Enrollment Term ID (`enrollmentTermId`) | number | The ID of the term for the enrollment. |
| Enrollment Type (`enrollmentType`) | text | Optional filter to limit enrollmnets to a specific type of enrollment. If not populated it should return all enrollment types. Options are: 'StudentEnrollment', 'TeacherEnrollment','TaEnrollment', 'DesignerEnrollment', 'ObserverEnrollment'. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Enrollments (`enrollments`) | array | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.canvas.enrollments.GetEnrollments",
  "author": "Harsha Surisetty <harsha@client.io>",
  "description": "Returns the details for a user enrolled in a course(s).",
  "private": false,
  "auth": {
    "service": "appmixer:canvas"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "courseId": {
            "type": "number"
          },
          "enrollmentStatus": {
            "type": "string"
          },
          "teacherId": {
            "type": "number"
          },
          "gradingPeriodId": {
            "type": "number"
          },
          "enrollmentTermId": {
            "type": "number"
          },
          "enrollmentType": {
            "type": "string"
          }
        },
        "required": [
          "courseId"
        ]
      },
      "inspector": {
        "inputs": {
          "courseId": {
            "type": "number",
            "index": 1,
            "label": "Course ID",
            "tooltip": "The Course ID that is used to collect enrollments.",
            "source": {
              "url": "/component/appmixer/canvas/courses/ListCourses?outPort=out",
              "data": {
                "transform": "./ListCourses#toSelectArray"
              }
            }
          },
          "enrollmentStatus": {
            "type": "text",
            "index": 2,
            "label": "Enrollment Status",
            "tooltip": "Option to filter enrollments by a list of filter statuses."
          },
          "teacherId": {
            "type": "number",
            "index": 3,
            "label": "Teacher ID",
            "tooltip": "The ID of the teacher who made the enrollment."
          },
          "gradingPeriodId": {
            "type": "number",
            "index": 4,
            "label": "Grading Period ID",
            "tooltip": "The ID of the grading period for the enrollment."
          },
          "enrollmentTermId": {
            "type": "number",
            "index": 5,
            "label": "Enrollment Term ID",
            "tooltip": "The ID of the term for the enrollment."
          },
          "enrollmentType": {
            "type": "text",
            "index": 6,
            "label": "Enrollment Type",
            "tooltip": "Optional filter to limit enrollmnets to a specific type of enrollment. If not populated it should return all enrollment types. Options are: 'StudentEnrollment', 'TeacherEnrollment','TaEnrollment', 'DesignerEnrollment', 'ObserverEnrollment'."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Enrollments",
          "value": "enrollments",
          "schema": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "enrollmentId": {
                  "type": "string",
                  "title": "Enrollment ID",
                  "example": "67890"
                },
                "courseId": {
                  "type": "string",
                  "title": "Course ID",
                  "example": "12345"
                },
                "courseSectionId": {
                  "type": "string",
                  "title": "Course Section ID",
                  "example": "99001"
                },
                "userId": {
                  "type": "string",
                  "title": "User ID",
                  "example": "22222"
                },
                "userName": {
                  "type": "string",
                  "title": "User Name",
                  "example": "John Doe"
                },
                "observerUserId": {
                  "type": "string",
                  "title": "Observer User ID",
                  "example": "22222"
                },
                "observerName": {
                  "type": "string",
                  "title": "Observer Name",
                  "example": "Jane Smith"
                },
                "createdDate": {
                  "type": "string",
                  "title": "Created Date",
                  "example": "2024-01-15T10:30:00Z"
                },
                "updatedDate": {
                  "type": "string",
                  "title": "Updated Date",
                  "example": "2024-01-15T10:30:00Z"
                },
                "startedDate": {
                  "type": "string",
                  "title": "Started Date",
                  "example": "2024-01-15T10:30:00Z"
                },
                "endedDate": {
                  "type": "string",
                  "title": "Ended Date",
                  "example": "2024-01-15T10:30:00Z"
                }
              }
            },
            "example": [
              {
                "enrollmentId": "67890",
                "courseId": "12345",
                "courseSectionId": "99001",
                "userId": "22222",
                "userName": "John Doe",
                "observerUserId": "22222",
                "observerName": "Jane Smith",
                "createdDate": "2024-01-15T10:30:00Z",
                "updatedDate": "2024-01-15T10:30:00Z",
                "startedDate": "2024-01-15T10:30:00Z",
                "endedDate": "2024-01-15T10:30:00Z"
              }
            ]
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
