POST api/StudentServices/AssignContent
Assign content to a student. returns the Assignment ID for future reference, and also returns assignment details needed for launch.
Request Information
URI Parameters
None.
Body Parameters
ContentAssignmentPost| Name | Description | Type | Additional information | 
|---|---|---|---|
| Student | Student will be created or updated, based on the uniqueness of the Username. | CreateStudentPost | None. | 
| ResourceKey | Identifier for what piece of content to assign to the student. | string | None. | 
| ExpirationDate | last day that the student will have access to the assignment | date | None. | 
| StudentReturnURL | Optional: Fully Qualified Domain that the student will be redirected to when they save or finish the assignment | string | None. | 
| GradeSyncURL | Optional: if included, a POST will be made to this URL when the student finishes the assignment with a "AssignmentStatus" JSON object, before redirecting to the StudentReturnURL (or the student portal home page if that was not included) | string | None. | 
| Key | Key to Access API provided by GMetrix | string | None. | 
Request Formats
application/json, text/json
{
  "Key": "sample string 1",
  "Student": {
    "FirstName": "sample string 1",
    "LastName": "sample string 2",
    "Password": "sample string 3",
    "EmailAddress": "sample string 4",
    "StudentNumber": "sample string 5",
    "StudentId": 6,
    "Username": "sample string 7",
    "AccessCode": "sample string 8",
    "ReferenceInfo": "sample string 9",
    "Claims": [
      {
        "Key": "sample string 1",
        "Value": "sample string 2"
      },
      {
        "Key": "sample string 1",
        "Value": "sample string 2"
      }
    ],
    "Key": "sample string 10"
  },
  "ResourceKey": "sample string 1",
  "ExpirationDate": "2025-10-25T19:46:35.9616277-07:00",
  "StudentReturnURL": "sample string 3",
  "GradeSyncURL": "sample string 4"
}
        application/xml, text/xml
<ContentAssignmentPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ManagementServicesApi.Models">
  <Key>sample string 1</Key>
  <ExpirationDate>2025-10-25T19:46:35.9616277-07:00</ExpirationDate>
  <GradeSyncURL>sample string 4</GradeSyncURL>
  <ResourceKey>sample string 1</ResourceKey>
  <Student>
    <Key>sample string 10</Key>
    <AccessCode>sample string 8</AccessCode>
    <Claims xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
      <d3p1:KeyValuePairOfstringstring>
        <d3p1:key>sample string 1</d3p1:key>
        <d3p1:value>sample string 2</d3p1:value>
      </d3p1:KeyValuePairOfstringstring>
      <d3p1:KeyValuePairOfstringstring>
        <d3p1:key>sample string 1</d3p1:key>
        <d3p1:value>sample string 2</d3p1:value>
      </d3p1:KeyValuePairOfstringstring>
    </Claims>
    <ReferenceInfo>sample string 9</ReferenceInfo>
    <StudentId>6</StudentId>
    <Username>sample string 7</Username>
    <EmailAddress>sample string 4</EmailAddress>
    <FirstName>sample string 1</FirstName>
    <LastName>sample string 2</LastName>
    <Password>sample string 3</Password>
    <StudentNumber>sample string 5</StudentNumber>
  </Student>
  <StudentReturnURL>sample string 3</StudentReturnURL>
</ContentAssignmentPost>
        application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
AssignmentSuccess| Name | Description | Type | Additional information | 
|---|---|---|---|
| Assignment | Assignment | None. | |
| Successful | boolean | None. | |
| MsgSuccess | string | None. | 
Response Formats
application/json, text/json
{
  "Assignment": {
    "AssignmentId": 1,
    "ExpirationDate": "2025-10-25T19:46:35.9773326-07:00",
    "Score": 3.0,
    "AccessURL": "sample string 4",
    "Resource": {
      "Key": "sample string 1",
      "Name": "sample string 2",
      "Type": 3,
      "TypeName": "sample string 4"
    },
    "StudentStatus": {
      "Status": 1,
      "StatusName": "Finished"
    },
    "CultureTag": "sample string 5"
  },
  "Successful": true,
  "MsgSuccess": "sample string 2"
}
        application/xml, text/xml
<AssignmentSuccess xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ManagementServices.Repositories.Response">
  <MsgSuccess>sample string 2</MsgSuccess>
  <Successful>true</Successful>
  <Assignment>
    <AccessURL>sample string 4</AccessURL>
    <AssignmentId>1</AssignmentId>
    <CultureTag>sample string 5</CultureTag>
    <ExpirationDate>2025-10-25T19:46:35.9773326-07:00</ExpirationDate>
    <Resource>
      <Key>sample string 1</Key>
      <Name>sample string 2</Name>
      <Type>3</Type>
      <TypeName>sample string 4</TypeName>
    </Resource>
    <Score>3</Score>
    <StudentStatus>
      <Status>1</Status>
    </StudentStatus>
  </Assignment>
</AssignmentSuccess>