POST api/TaskManager/EditRules

Request Information

URI Parameters

None.

Body Parameters

SaveRulesDto
NameDescriptionTypeAdditional information
id

integer

None.

rules_name

string

None.

dept_id

integer

None.

dept_name

string

None.

addEmpsList

Collection of integer

None.

delEmpsList

Collection of integer

None.

rulesChapterList

Collection of SaveRulesChapterDto

None.

Request Formats

application/json, text/json

Sample:
{
  "id": 1,
  "rules_name": "sample string 2",
  "dept_id": 3,
  "dept_name": "sample string 4",
  "addEmpsList": [
    1,
    2
  ],
  "delEmpsList": [
    1,
    2
  ],
  "rulesChapterList": [
    {
      "id": 1,
      "chapter_name": "sample string 2",
      "subsectionList": [
        {
          "id": 1,
          "subsection_name": "sample string 2",
          "watch_minutes": 3,
          "subsection_content": "sample string 4"
        },
        {
          "id": 1,
          "subsection_name": "sample string 2",
          "watch_minutes": 3,
          "subsection_content": "sample string 4"
        }
      ]
    },
    {
      "id": 1,
      "chapter_name": "sample string 2",
      "subsectionList": [
        {
          "id": 1,
          "subsection_name": "sample string 2",
          "watch_minutes": 3,
          "subsection_content": "sample string 4"
        },
        {
          "id": 1,
          "subsection_name": "sample string 2",
          "watch_minutes": 3,
          "subsection_content": "sample string 4"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<SaveRulesDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LearnAPI.ViewModel">
  <addEmpsList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </addEmpsList>
  <delEmpsList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </delEmpsList>
  <dept_id>3</dept_id>
  <dept_name>sample string 4</dept_name>
  <id>1</id>
  <rulesChapterList>
    <SaveRulesChapterDto>
      <chapter_name>sample string 2</chapter_name>
      <id>1</id>
      <subsectionList>
        <SaveSubsectionDto>
          <id>1</id>
          <subsection_content>sample string 4</subsection_content>
          <subsection_name>sample string 2</subsection_name>
          <watch_minutes>3</watch_minutes>
        </SaveSubsectionDto>
        <SaveSubsectionDto>
          <id>1</id>
          <subsection_content>sample string 4</subsection_content>
          <subsection_name>sample string 2</subsection_name>
          <watch_minutes>3</watch_minutes>
        </SaveSubsectionDto>
      </subsectionList>
    </SaveRulesChapterDto>
    <SaveRulesChapterDto>
      <chapter_name>sample string 2</chapter_name>
      <id>1</id>
      <subsectionList>
        <SaveSubsectionDto>
          <id>1</id>
          <subsection_content>sample string 4</subsection_content>
          <subsection_name>sample string 2</subsection_name>
          <watch_minutes>3</watch_minutes>
        </SaveSubsectionDto>
        <SaveSubsectionDto>
          <id>1</id>
          <subsection_content>sample string 4</subsection_content>
          <subsection_name>sample string 2</subsection_name>
          <watch_minutes>3</watch_minutes>
        </SaveSubsectionDto>
      </subsectionList>
    </SaveRulesChapterDto>
  </rulesChapterList>
  <rules_name>sample string 2</rules_name>
</SaveRulesDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

BaseResponse
NameDescriptionTypeAdditional information
msg

string

None.

code

integer

None.

total

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "msg": "sample string 1",
  "code": 2,
  "total": 3
}

application/xml, text/xml

Sample:
<BaseResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LearnAPI">
  <code>2</code>
  <msg>sample string 1</msg>
  <total>3</total>
</BaseResponse>