> 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.submissions.GetSubmissions

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

Returns the details including the score for submission(s).

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Assignment ID (`assignmentId`) | number | The ID of the assignment. |
| Course ID (`courseId`) | number | The ID of the course. |
| Anonymous ID (`isAnonymous`) | toggle | A flag to indicate if the user ID submission request is for an anonymous user or known user ID. |
| User ID (`userId`) | number | The ID of the user that submitted the assignment or the anonymous ID. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| submissions (`Submissions`) | array | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.canvas.submissions.GetSubmissions",
  "author": "Harsha Surisetty <harsha@client.io>",
  "description": "Returns the details including the score for submission(s).",
  "private": false,
  "auth": {
    "service": "appmixer:canvas"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "assignmentId": {
            "type": "number"
          },
          "courseId": {
            "type": "number"
          },
          "isAnonymous": {
            "type": "boolean"
          },
          "userId": {
            "type": "number"
          }
        },
        "required": [
          "courseId",
          "assignmentId",
          "userId"
        ]
      },
      "inspector": {
        "inputs": {
          "assignmentId": {
            "type": "number",
            "index": 1,
            "label": "Assignment ID",
            "tooltip": "The ID of the assignment."
          },
          "courseId": {
            "type": "number",
            "index": 2,
            "label": "Course ID",
            "tooltip": "The ID of the course.",
            "source": {
              "url": "/component/appmixer/canvas/courses/ListCourses?outPort=out",
              "data": {
                "transform": "./ListCourses#toSelectArray"
              }
            }
          },
          "isAnonymous": {
            "type": "toggle",
            "index": 3,
            "label": "Anonymous ID",
            "tooltip": "A flag to indicate if the user ID submission request is for an anonymous user or known user ID."
          },
          "userId": {
            "type": "number",
            "index": 4,
            "label": "User ID",
            "tooltip": "The ID of the user that submitted the assignment or the anonymous ID."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "submissions",
          "value": "Submissions",
          "schema": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "assignmentId": {
                  "type": "string",
                  "title": "Assignment ID",
                  "example": "33333"
                },
                "userId": {
                  "type": "string",
                  "title": "User ID",
                  "example": "22222"
                },
                "graderId": {
                  "type": "string",
                  "title": "Grader ID",
                  "example": "44444"
                },
                "documentId": {
                  "type": "string",
                  "title": "Document ID",
                  "example": "55555"
                },
                "submittedAt": {
                  "type": "string",
                  "title": "Submitted At",
                  "example": "2024-01-15T10:30:00Z"
                },
                "score": {
                  "type": "string",
                  "title": "Score",
                  "example": "95"
                },
                "attempt": {
                  "type": "string",
                  "title": "Attempt",
                  "example": "2024-01-15T10:30:00Z"
                },
                "submissionBody": {
                  "type": "string",
                  "title": "Submission Body",
                  "example": "Submitted assignment text content"
                },
                "grade": {
                  "type": "string",
                  "title": "Grade",
                  "example": "A"
                },
                "gradeCurrentFlag": {
                  "type": "string",
                  "title": "Grade Current Flag",
                  "example": "true"
                },
                "submissionPreviewUrl": {
                  "type": "string",
                  "title": "Submission Preview URL",
                  "example": "https://canvas.example.com/submissions/12345"
                },
                "submissionUrl": {
                  "type": "string",
                  "title": "Submission URL",
                  "example": "https://canvas.example.com/submissions/12345"
                },
                "submissionLateFlag": {
                  "type": "string",
                  "title": "Submission Late Flag",
                  "example": "2024-01-15T10:30:00Z"
                },
                "assignmentVisible": {
                  "type": "string",
                  "title": "Assignment Visible",
                  "example": "true"
                },
                "submissionStatus": {
                  "type": "string",
                  "title": "Submission Status",
                  "example": "submitted"
                }
              }
            },
            "example": [
              {
                "assignmentId": "33333",
                "userId": "22222",
                "graderId": "44444",
                "documentId": "55555",
                "submittedAt": "2024-01-15T10:30:00Z",
                "score": "95",
                "attempt": "2024-01-15T10:30:00Z",
                "submissionBody": "Submitted assignment text content",
                "grade": "A",
                "gradeCurrentFlag": "true",
                "submissionPreviewUrl": "https://canvas.example.com/submissions/12345",
                "submissionUrl": "https://canvas.example.com/submissions/12345",
                "submissionLateFlag": "2024-01-15T10:30:00Z",
                "assignmentVisible": "true",
                "submissionStatus": "submitted"
              }
            ]
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
