Read.Projects.ForPerson
This method allows you to retrieve projects properties belonging specific person. If organisation level access is used, only persons belonging to the selected organisations can viewed. Additionally it is possible to include all courses properties or just a basic set of properties. Please note that if you choose to include all properties the performance impact on the server is higher, so only request these properties if you actually need them.
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. | Integer | Optional (defaults to 0) |
PageSize | Size of the requested page. | Integer | Optional (defaults to 100) |
Id | Identifier of a person entity. Refer to IdType to the impact of this setting. | Integer | Mandatory |
IdType | The type of the identifier specified by Id. NOTE1: Only projects connected to organisations you have access to will be returned. NOTE2: If IdType is Username and this user is deleted, return error with message "Person with specified PersonId/PersonSyncKey/Username is not valid." | Enum of:
| Mandatory |
IncludeAdditionalData | If set to true, the result set will contain all project properties. If set to false, the AdditionalData output parameter will always be null. | Boolean | Optional (defaults to false) |
Output parameters
Name | Description | Type |
---|---|---|
CurrentPageIndex | The index of the current page. | Integer |
PageSize | The size of the current page. | Integer |
Total | The total number of items which meet the input parameters. | Integer |
Projects | Array of projects containing one row for each project in the page. | Project[] |
| Identifier of the project. | Integer |
| Project title. | String |
| Project description. | String |
| Date of the project last updated. | DateTime |
| Identifier of the organisation. | Integer |
| Organisation title. | String |
| SyncKey of the organisation. | String |
| Node containing all the additional data. This is only populated if the input parameter IncludeAdditionalData is set to true. | Custom |
| The date at which the project was created. | DateTime |
| The PersonId of the project creator. | Integer |
| The date at which this project was last accessed by requested person | DateTime |
| Whether requested person has visited this project | Boolean |
| URL to the calender feed | String |
Example #1 - select all projects for person by PersonId
<
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.ReadProjects.ForPerson"
>
<
soapenv
:Header/>
<
soapenv
:Body>
<
tem
:ReadProjectsForPerson>
<
tem
:request>
<
its1
:Id>2</
its1
:Id>
<
its1
:IdType>PersonId</
its1
:IdType>
</
tem
:request>
</
tem
:ReadProjectsForPerson>
</
soapenv
:Body>
</
soapenv
:Envelope>
<
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>2014-01-15T06:11:28.475Z</
u
:Created>
<
u
:Expires>2014-01-15T06:16:28.475Z</
u
:Expires>
</
u
:Timestamp>
</
o
:Security>
</
s
:Header>
<
s
:Body>
<
ReadProjectsForPersonResponse
xmlns
=
"http://tempuri.org/"
>
<
ReadProjectsForPersonResult
xmlns:a
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ReadProjects.ForPerson"
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
:Projects>
<
a
:ProjectForPerson>
<
a
:AdditionalData
i:nil
=
"true"
/>
<
a
:LastUpdated>2013-12-30T14:07:37</
a
:LastUpdated>
<
a
:OrganisationID>1</
a
:OrganisationID>
<
a
:OrganisationName>Site</
a
:OrganisationName>
<
a
:OrganisationSyncKey>sync_key</
a
:OrganisationSyncKey>
<
a
:ProjectDescription>description</
a
:ProjectDescription>
<
a
:ProjectID>1</
a
:ProjectID>
<
a
:ProjectTitle>Some project</
a
:ProjectTitle>
</
a
:ProjectForPerson>
<
a
:ProjectForPerson>
<
a
:AdditionalData
i:nil
=
"true"
/>
<
a
:LastUpdated>2013-12-30T14:07:12</
a
:LastUpdated>
<
a
:OrganisationID>1</
a
:OrganisationID>
<
a
:OrganisationName>Site</
a
:OrganisationName>
<
a
:OrganisationSyncKey>sync_key</
a
:OrganisationSyncKey>
<
a
:ProjectDescription>project description</
a
:ProjectDescription>
<
a
:ProjectID>2</
a
:ProjectID>
<
a
:ProjectTitle>Test project</
a
:ProjectTitle>
</
a
:ProjectForPerson>
</
a
:Projects>
</
ReadProjectsForPersonResult
>
</
ReadProjectsForPersonResponse
>
</
s
:Body>
</
s
:Envelope>
Example #2 - select one project with extended information for person by Username
<
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.ReadProjects.ForPerson"
>
<
soapenv
:Header/>
<
soapenv
:Body>
<
tem
:ReadProjectsForPerson>
<
tem
:request>
<
its
:PageSize>1</
its
:PageSize>
<
its1
:Id>stud4</
its1
:Id>
<
its1
:IdType>Username</
its1
:IdType>
<
its1
:IncludeAdditionalData>true</
its1
:IncludeAdditionalData>
</
tem
:request>
</
tem
:ReadProjectsForPerson>
</
soapenv
:Body>
</
soapenv
:Envelope>
<
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>2014-01-15T06:16:29.772Z</
u
:Created>
<
u
:Expires>2014-01-15T06:21:29.772Z</
u
:Expires>
</
u
:Timestamp>
</
o
:Security>
</
s
:Header>
<
s
:Body>
<
ReadProjectsForPersonResponse
xmlns
=
"http://tempuri.org/"
>
<
ReadProjectsForPersonResult
xmlns:a
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities.ReadProjects.ForPerson"
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"
>1</
PageSize
>
<
Total
xmlns
=
"http://schemas.datacontract.org/2004/07/Itslearning.Integration.ContentImport.Model.ServiceEntities"
>2</
Total
>
<
a
:Projects>
<
a
:ProjectForPerson>
<
a
:AdditionalData>
<
a
:Created>2013-12-27T10:57:38</
a
:Created>
<
a
:CreatedBy>2</
a
:CreatedBy>
<
a
:IsVisited>true</
a
:IsVisited>
<
a
:LastAccessed>2014-01-14T12:24:33</
a
:LastAccessed>
<
a
:ProjectCalenderFeedURL>
<![CDATA[webcal://localhost/Calendar/CalendarFeed.ashx?LocationType=2&LocationID=2&PersonId=6&CustomerId=1&ChildId=0&Guid=6f053f31ea854a82a1c40c50a710f4e2&Culture=nb-NO]]>
</
a
:ProjectCalenderFeedURL>
</
a
:AdditionalData>
<
a
:LastUpdated>2013-12-30T14:07:12</
a
:LastUpdated>
<
a
:OrganisationID>1</
a
:OrganisationID>
<
a
:OrganisationName>Site</
a
:OrganisationName>
<
a
:OrganisationSyncKey>sync_key</
a
:OrganisationSyncKey>
<
a
:ProjectDescription>project description</
a
:ProjectDescription>
<
a
:ProjectID>2</
a
:ProjectID>
<
a
:ProjectTitle>Test project</
a
:ProjectTitle>
</
a
:ProjectForPerson>
</
a
:Projects>
</
ReadProjectsForPersonResult
>
</
ReadProjectsForPersonResponse
>
</
s
:Body>
</
s
:Envelope>
Error states
The following cases will return an error:
- The requested person does not exists.
- The requested person has been deleted.
- The requested person exists, but belongs to an organisation the requester does not have access to.