GET restapi/personal/person/{personId}/relatedpersons/v1?relationType={relationType}
Gets the relation between persons with detailed info about related person and relation type.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| personId |
The id of the person we want the relation information for. |
integer |
Required |
| relationType |
Type of the relation. |
Itslearning.RestApi.Entities.RelationType |
Required |
Body Parameters
None.
Response Information
Resource Description
Collection of Itslearning.RestApi.Entities.RelatedPerson| Name | Description | Type | Additional information |
|---|---|---|---|
| Person |
Related person. |
Itslearning.RestApi.Entities.PersonSimple |
None. |
| RelationType |
Relation type between persons. |
Itslearning.RestApi.Entities.RelationType |
None. |
| RelationInfo |
Extra information about the relation. |
Itslearning.RestApi.Entities.RelationInfo |
None. |
Response Formats
application/json, text/json
Sample:
[
{
"Person": {
"PersonId": 1,
"FirstName": "sample string 2",
"LastName": "sample string 3",
"FullName": "sample string 4",
"ProfileUrl": "sample string 5",
"AdditionalInfo": "sample string 6",
"ProfileImageUrl": "sample string 7",
"ProfileImageUrlSmall": "sample string 8"
},
"RelationType": "Teacher",
"RelationInfo": {
"Courses": [
{
"CourseId": 1,
"Title": "sample string 2",
"FriendlyName": "sample string 3",
"CourseColor": "sample string 4",
"CourseFillColor": "sample string 5",
"CourseCode": "sample string 6"
},
{
"CourseId": 1,
"Title": "sample string 2",
"FriendlyName": "sample string 3",
"CourseColor": "sample string 4",
"CourseFillColor": "sample string 5",
"CourseCode": "sample string 6"
}
]
}
},
{
"Person": {
"PersonId": 1,
"FirstName": "sample string 2",
"LastName": "sample string 3",
"FullName": "sample string 4",
"ProfileUrl": "sample string 5",
"AdditionalInfo": "sample string 6",
"ProfileImageUrl": "sample string 7",
"ProfileImageUrlSmall": "sample string 8"
},
"RelationType": "Teacher",
"RelationInfo": {
"Courses": [
{
"CourseId": 1,
"Title": "sample string 2",
"FriendlyName": "sample string 3",
"CourseColor": "sample string 4",
"CourseFillColor": "sample string 5",
"CourseCode": "sample string 6"
},
{
"CourseId": 1,
"Title": "sample string 2",
"FriendlyName": "sample string 3",
"CourseColor": "sample string 4",
"CourseFillColor": "sample string 5",
"CourseCode": "sample string 6"
}
]
}
}
]
application/xml, text/xml
Sample:
<ArrayOfRelatedPerson xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Itslearning.RestApi.Entities">
<RelatedPerson>
<Person>
<AdditionalInfo xmlns="">sample string 6</AdditionalInfo>
<FirstName xmlns="">sample string 2</FirstName>
<FullName xmlns="">sample string 4</FullName>
<LastName xmlns="">sample string 3</LastName>
<PersonId xmlns="">1</PersonId>
<ProfileImageUrl xmlns="">sample string 7</ProfileImageUrl>
<ProfileImageUrlSmall xmlns="">sample string 8</ProfileImageUrlSmall>
<ProfileUrl xmlns="">sample string 5</ProfileUrl>
</Person>
<RelationInfo>
<Courses>
<PersonCourseBase xmlns="">
<CourseCode>sample string 6</CourseCode>
<CourseColor>sample string 4</CourseColor>
<CourseFillColor>sample string 5</CourseFillColor>
<CourseId>1</CourseId>
<FriendlyName>sample string 3</FriendlyName>
<Title>sample string 2</Title>
</PersonCourseBase>
<PersonCourseBase xmlns="">
<CourseCode>sample string 6</CourseCode>
<CourseColor>sample string 4</CourseColor>
<CourseFillColor>sample string 5</CourseFillColor>
<CourseId>1</CourseId>
<FriendlyName>sample string 3</FriendlyName>
<Title>sample string 2</Title>
</PersonCourseBase>
</Courses>
</RelationInfo>
<RelationType>Teacher</RelationType>
</RelatedPerson>
<RelatedPerson>
<Person>
<AdditionalInfo xmlns="">sample string 6</AdditionalInfo>
<FirstName xmlns="">sample string 2</FirstName>
<FullName xmlns="">sample string 4</FullName>
<LastName xmlns="">sample string 3</LastName>
<PersonId xmlns="">1</PersonId>
<ProfileImageUrl xmlns="">sample string 7</ProfileImageUrl>
<ProfileImageUrlSmall xmlns="">sample string 8</ProfileImageUrlSmall>
<ProfileUrl xmlns="">sample string 5</ProfileUrl>
</Person>
<RelationInfo>
<Courses>
<PersonCourseBase xmlns="">
<CourseCode>sample string 6</CourseCode>
<CourseColor>sample string 4</CourseColor>
<CourseFillColor>sample string 5</CourseFillColor>
<CourseId>1</CourseId>
<FriendlyName>sample string 3</FriendlyName>
<Title>sample string 2</Title>
</PersonCourseBase>
<PersonCourseBase xmlns="">
<CourseCode>sample string 6</CourseCode>
<CourseColor>sample string 4</CourseColor>
<CourseFillColor>sample string 5</CourseFillColor>
<CourseId>1</CourseId>
<FriendlyName>sample string 3</FriendlyName>
<Title>sample string 2</Title>
</PersonCourseBase>
</Courses>
</RelationInfo>
<RelationType>Teacher</RelationType>
</RelatedPerson>
</ArrayOfRelatedPerson>