Read.Terms
Reads the terms which are not deleted and which the requester has access to. If organisation level access is used, only terms belonging to the selected organisations will be returned. Otherwise it will return all terms that are not deleted. Optionally it is possible to get the terms for a course by specifying the course id or course sync key.
Input parameters
Name | Description | Type | Mandatory/Optional |
---|---|---|---|
SiteId | Site where action will be executed. | Integer | Optional |
VendorId | VendorId. Currently not used. | Text | Optional |
PageIndex | Index of the requested page. This defaults to 0. | Integer | Optional |
PageSize | Size of the requested page. The default and limit is 100. | Integer | Optional |
CourseId | Identifier of the course to get the terms for. NOTE: You are not allowed to enter both CourseId and CourseSyncKey. | Integer | Optional |
CourseSyncKey | SyncKey of the course to get the terms for. NOTE: You are not allowed to enter both CourseId and CourseSyncKey. | String | Optional |
Example request
<
soapenv
:Envelope
xmlns:soapenv
=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tem
=
"http://tempuri.org/"
xmlns:its
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities"
xmlns:its1
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ReadTerms"
>
<
soapenv
:Header/>
<
soapenv
:Body>
<
tem
:ReadTerms>
<
tem
:request>
<
its
:PageIndex>0</
its
:PageIndex>
<
its
:PageSize>100</
its
:PageSize>
<
its1
:CourseSyncKey>TestCourse</
its1
:CourseSyncKey>
</
tem
:request>
</
tem
:ReadTerms>
</
soapenv
:Body>
</
soapenv
:Envelope>
Output parameters
Name | Description | Type |
---|---|---|
TermId | Identifier of the term | Integer |
Name | Name of the term | String |
Description | Description of the term | String |
StartDate | Date when the term starts | Date |
EndDate | Date when the term ends | Date |
OrganisationId | Identifier of the organisation the term belongs to | Integer |
OrganisationName | Name of the organisation the term belongs to | String |
OrganisationSyncKey | SyncKey of the organisation the term belongs to | String |
SyncKey | SyncKey of the term | String |
Example response
<
s
:Envelope
xmlns:s
=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:u
=
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>
<
s
:Header>
<
o
:Security
s:mustUnderstand
=
"1"
xmlns:o
=
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>
<
u
:Timestamp
u:Id
=
"_0"
>
<
u
:Created>2012-12-07T12:28:39.083Z</
u
:Created>
<
u
:Expires>2012-12-07T12:33:39.083Z</
u
:Expires>
</
u
:Timestamp>
</
o
:Security>
</
s
:Header>
<
s
:Body>
<
ReadTermsResponse
xmlns
=
"http://tempuri.org/"
>
<
ReadTermsResult
xmlns:a
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ReadTerms"
xmlns:i
=
"http://www.w3.org/2001/XMLSchema-instance"
>
<
CurrentPageIndex
xmlns
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities"
>0</
CurrentPageIndex
>
<
PageSize
xmlns
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities"
>100</
PageSize
>
<
Total
xmlns
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities"
>2</
Total
>
<
a
:Terms>
<
a
:Term>
<
a
:Description>Description of term1</
a
:Description>
<
a
:EndDate>2012-12-07T00:00:00</
a
:EndDate>
<
a
:Name>Term1</
a
:Name>
<
a
:OrganisationId>2</
a
:OrganisationId>
<
a
:OrganisationName>School A</
a
:OrganisationName>
<
a
:OrganisationSyncKey>SchoolA</
a
:OrganisationSyncKey>
<
a
:StartDate>2012-12-05T00:00:00</
a
:StartDate>
<
a
:SyncKey/>
<
a
:TermId>1</
a
:TermId>
</
a
:Term>
<
a
:Term>
<
a
:Description>Description of term2</
a
:Description>
<
a
:EndDate>2012-12-09T00:00:00</
a
:EndDate>
<
a
:Name>Term2</
a
:Name>
<
a
:OrganisationId>3</
a
:OrganisationId>
<
a
:OrganisationName>School B</
a
:OrganisationName>
<
a
:OrganisationSyncKey>SchoolB</
a
:OrganisationSyncKey>
<
a
:StartDate>2012-12-05T00:00:00</
a
:StartDate>
<
a
:SyncKey>123</
a
:SyncKey>
<
a
:TermId>2</
a
:TermId>
</
a
:Term>
</
a
:Terms>
</
ReadTermsResult
>
</
ReadTermsResponse
>
</
s
:Body>
</
s
:Envelope>
Error states
The service will return an empty array if there are no terms the requester has access to. In the following cases it will return an error:
- The requested course does not exist.
- The requested course has been deleted.
- The requested course exists, but belongs to an organisation the requester does not have access to.
- The requester supplied both a CourseId and CourseSyncKey.