POST api/assignment/Create

if assignment.LineID is 0 then add else update

Request Information

URI Parameters

None.

Body Parameters

infom assignment

AssignmentModel
NameDescriptionTypeAdditional information
LineID

integer

None.

CourseID

integer

None.

Title

string

None.

Contents

string

None.

Stop

boolean

None.

AcceptUntil

date

None.

BeginDate

date

None.

CreateDate

date

None.

CreateByUser

string

None.

UpdateDate

date

None.

UpdateByUser

string

None.

FileAttach

string

None.

IsDisplayScore

integer

None.

IsDisplayAssign

integer

None.

IsAssignmentGroup

integer

None.

ScoreRate

integer

None.

Link

string

None.

IdfileAttach

integer

None.

IdLink

integer

None.

IsBonusPoint

boolean

None.

ChecksumParam

ChecksumParamModel

None.

dsCourse

Collection of integer

None.

dsCourseCode

string

None.

SubjectCodeCourse

string

None.

IsAssignmentMore

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "lineID": 1,
  "courseID": 2,
  "title": "sample string 3",
  "contents": "sample string 4",
  "stop": true,
  "acceptUntil": "2024-12-04T13:36:52.5686634+07:00",
  "beginDate": "2024-12-04T13:36:52.5686634+07:00",
  "createDate": "2024-12-04T13:36:52.5686634+07:00",
  "createByUser": "sample string 9",
  "updateDate": "2024-12-04T13:36:52.5686634+07:00",
  "updateByUser": "sample string 10",
  "fileAttach": "sample string 11",
  "isDisplayScore": 12,
  "isDisplayAssign": 13,
  "isAssignmentGroup": 14,
  "scoreRate": 15,
  "link": "sample string 16",
  "idfileAttach": 17,
  "idLink": 18,
  "isBonusPoint": true,
  "checksumParam": {
    "checksumEdit": "sample string 1",
    "checksumDelete": "sample string 2",
    "checksumRequest": "sample string 3",
    "checksumRequest2": "sample string 4"
  },
  "dsCourse": [
    1,
    2
  ],
  "dsCourseCode": "sample string 19",
  "subjectCodeCourse": "sample string 20",
  "isAssignmentMore": true
}

text/html

Sample:
{"lineID":1,"courseID":2,"title":"sample string 3","contents":"sample string 4","stop":true,"acceptUntil":"2024-12-04T13:36:52.5686634+07:00","beginDate":"2024-12-04T13:36:52.5686634+07:00","createDate":"2024-12-04T13:36:52.5686634+07:00","createByUser":"sample string 9","updateDate":"2024-12-04T13:36:52.5686634+07:00","updateByUser":"sample string 10","fileAttach":"sample string 11","isDisplayScore":12,"isDisplayAssign":13,"isAssignmentGroup":14,"scoreRate":15,"link":"sample string 16","idfileAttach":17,"idLink":18,"isBonusPoint":true,"checksumParam":{"checksumEdit":"sample string 1","checksumDelete":"sample string 2","checksumRequest":"sample string 3","checksumRequest2":"sample string 4"},"dsCourse":[1,2],"dsCourseCode":"sample string 19","subjectCodeCourse":"sample string 20","isAssignmentMore":true}

application/xml, text/xml

Sample:
<AssignmentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/App.Model.ViewModel">
  <AcceptUntil>2024-12-04T13:36:52.5686634+07:00</AcceptUntil>
  <BeginDate>2024-12-04T13:36:52.5686634+07:00</BeginDate>
  <ChecksumParam>
    <ChecksumDelete>sample string 2</ChecksumDelete>
    <ChecksumEdit>sample string 1</ChecksumEdit>
    <ChecksumRequest>sample string 3</ChecksumRequest>
    <ChecksumRequest2>sample string 4</ChecksumRequest2>
  </ChecksumParam>
  <Contents>sample string 4</Contents>
  <CourseID>2</CourseID>
  <CreateByUser>sample string 9</CreateByUser>
  <CreateDate>2024-12-04T13:36:52.5686634+07:00</CreateDate>
  <FileAttach>sample string 11</FileAttach>
  <IdLink>18</IdLink>
  <IdfileAttach>17</IdfileAttach>
  <IsAssignmentGroup>14</IsAssignmentGroup>
  <IsAssignmentMore>true</IsAssignmentMore>
  <IsBonusPoint>true</IsBonusPoint>
  <IsDisplayAssign>13</IsDisplayAssign>
  <IsDisplayScore>12</IsDisplayScore>
  <LineID>1</LineID>
  <Link>sample string 16</Link>
  <ScoreRate>15</ScoreRate>
  <Stop>true</Stop>
  <SubjectCodeCourse>sample string 20</SubjectCodeCourse>
  <Title>sample string 3</Title>
  <UpdateByUser>sample string 10</UpdateByUser>
  <UpdateDate>2024-12-04T13:36:52.5686634+07:00</UpdateDate>
  <dsCourse xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:long>1</d2p1:long>
    <d2p1:long>2</d2p1:long>
  </dsCourse>
  <dsCourseCode>sample string 19</dsCourseCode>
</AssignmentModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.