POST training/courses

Request Information

URI Parameters

None.

Body Parameters

CourseDetail
NameDescriptionTypeAdditional information
Code

string

None.

Credits

integer

None.

Description

string

None.

Medical

boolean

None.

NQF

NQF

None.

PassSymbol

string

None.

Priority

string

None.

ID

integer

None.

Cost

decimal number

None.

Course

string

None.

CourseType

TrainingCourseType

None.

Duration

CourseDuration

None.

Internal

boolean

None.

ReferenceNumber

string

None.

Validity

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "code": "sample string 1",
  "credits": 1,
  "description": "sample string 2",
  "medical": true,
  "nqf": {
    "code": "sample string 1",
    "id": 2,
    "title": "sample string 3"
  },
  "passSymbol": "sample string 3",
  "priority": "sample string 4",
  "id": 1,
  "cost": 1.1,
  "course": "sample string 5",
  "courseType": null,
  "duration": {
    "days": 1,
    "hours": 2,
    "months": 3,
    "weeks": 4
  },
  "internal": true,
  "referenceNumber": "sample string 6",
  "validity": 1
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'myREST.Models.Training.TrainingCourseType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'myREST.Models.Training.TrainingCourseType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CourseDetail'.

Response Information

Resource Description

CourseDetail
NameDescriptionTypeAdditional information
Code

string

None.

Credits

integer

None.

Description

string

None.

Medical

boolean

None.

NQF

NQF

None.

PassSymbol

string

None.

Priority

string

None.

ID

integer

None.

Cost

decimal number

None.

Course

string

None.

CourseType

TrainingCourseType

None.

Duration

CourseDuration

None.

Internal

boolean

None.

ReferenceNumber

string

None.

Validity

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "code": "sample string 1",
  "credits": 1,
  "description": "sample string 2",
  "medical": true,
  "nqf": {
    "code": "sample string 1",
    "id": 2,
    "title": "sample string 3"
  },
  "passSymbol": "sample string 3",
  "priority": "sample string 4",
  "id": 1,
  "cost": 1.1,
  "course": "sample string 5",
  "courseType": null,
  "duration": {
    "days": 1,
    "hours": 2,
    "months": 3,
    "weeks": 4
  },
  "internal": true,
  "referenceNumber": "sample string 6",
  "validity": 1
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Type 'myREST.Models.Training.TrainingCourseType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Type 'myREST.Models.Training.TrainingCourseType' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.