GET restapi/personal/courses/resources/{resourceId}/v1

Gets the resource, the course where the resource is located and the current person's role in the course.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
resourceId

The resource identifier.

integer

Required

Body Parameters

None.

Response Information

Resource Description

Itslearning.RestApi.Entities.Personal.Course.CourseResourceWithRole
NameDescriptionTypeAdditional information
CourseCode

Code of the course.

string

None.

CourseTitle

Title of the course.

string

None.

ContextRole

The context role for the current person .

Itslearning.RestApi.Entities.PersonContextRole

None.

Title

Title of element.

string

None.

ElementId

Id of element.

integer

None.

ElementType

Type of element.

Itslearning.RestApi.Entities.ElementType

None.

CourseId

Id of a course where the element is located.

integer

None.

Url

Url to the itslearning web page for the element.

string

None.

ContentUrl

Url to the content itslearning web page for the element.

string

None.

IconUrl

Url to element icon.

string

None.

Active

Whether element/folder is active or inactive.

boolean

None.

LearningToolId

Identifier of learning tool (Assignment extension, test extension etc.). It's 0 for native itslearning elements.

integer

None.

AddElementUrl

Url to itslearning to add new element. It's empty if user doesn't have permissions to add new element.

string

None.

Homework

Marks the element as homework.

boolean

None.

Path

The resource's path in the course folder tree.

string

None.

LearningObjectId

ID of learning object

integer

None.

LearningObjectInstanceId

ID of learning object instance

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "CourseCode": "sample string 1",
  "CourseTitle": "sample string 2",
  "ContextRole": 1,
  "Title": "sample string 3",
  "ElementId": 4,
  "ElementType": "Unknown",
  "CourseId": 5,
  "Url": "sample string 6",
  "ContentUrl": "sample string 7",
  "IconUrl": "sample string 8",
  "Active": true,
  "LearningToolId": 10,
  "AddElementUrl": "sample string 11",
  "Homework": true,
  "Path": "sample string 13",
  "LearningObjectId": 14,
  "LearningObjectInstanceId": 15
}

application/xml, text/xml

Sample:
<CourseResourceWithRole xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities.Personal.Course">
  <Active xmlns="">true</Active>
  <AddElementUrl xmlns="">sample string 11</AddElementUrl>
  <ContentUrl xmlns="">sample string 7</ContentUrl>
  <CourseId xmlns="">5</CourseId>
  <ElementId xmlns="">4</ElementId>
  <ElementType xmlns="">Unknown</ElementType>
  <Homework xmlns="">true</Homework>
  <IconUrl xmlns="">sample string 8</IconUrl>
  <LearningObjectId xmlns="">14</LearningObjectId>
  <LearningObjectInstanceId xmlns="">15</LearningObjectInstanceId>
  <LearningToolId xmlns="">10</LearningToolId>
  <Path xmlns="">sample string 13</Path>
  <Title xmlns="">sample string 3</Title>
  <Url xmlns="">sample string 6</Url>
  <ContextRole>Member</ContextRole>
  <CourseCode>sample string 1</CourseCode>
  <CourseTitle>sample string 2</CourseTitle>
</CourseResourceWithRole>