PwsGetDepartmentList

Overview


This web service retrieves a list of department summary records (PwsDepartmentSummary), based on specified search criteria. You can specify which department or departments to retrieve either by specifying a set of search criteria, or by specifying a specific department (PwsDepartmentRef). 

Request Format


PwsGetDepartmentList Request

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.


SessionTicket

String

Yes


Click here for more information.

ARNkL4C1bp7KLtsSXQW6/g==

DepartmentIdentity

PwsDepartmentRef

No


For this service, the caller may specify a department identity to retrieve a specific department summary. If a department identity is not specified all departments fitting the other specified criteria will be returned.


MaxRowsToReturn

Int32

No


The maximum number of departments to be returned. This value is disregarded if a department is specified in DepartmentIdentity.

5

QueryString

String (255)

No


A search string to narrow down the results. A department will be included in the results if the search string matches the department name. This value is disregarded if a department is specified in DepartmentIdentity.

Tech

Request Usage Example(s)


Example 01 - use department identity
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsGetDepartmentList>
         <pws:serviceRequest>
            <req:SessionTicket>ARNkL4C1bp7KLtsSXQW6/g==</req:SessionTicket>
            <req:DepartmentIdentity>
               <com:DepartmentName>Technology</com:DepartmentName>
            </req:DepartmentIdentity>
            <req:MaxRowsToReturn>6</req:MaxRowsToReturn>
         </pws:serviceRequest>
      </pws:PwsGetDepartmentList>
   </soapenv:Body>
</soapenv:Envelope>
Example 02 - use query string
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsGetDepartmentList>
         <pws:serviceRequest>
            <req:SessionTicket>ARNkL4C1bp7KLtsSXQW6/g==</req:SessionTicket>
            <req:MaxRowsToReturn>6</req:MaxRowsToReturn>
            <req:QueryString>Management</req:QueryString>
         </pws:serviceRequest>
      </pws:PwsGetDepartmentList>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsGetDepartmentList Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click herefor more information.


ResponseId

Int32

Click here for more information.

0

Status

RequestStatusClick here for more information
Ok

ServerTimestampUtc

DateTime

Click here for more information.

2018-03-08T16:59:32.3174314Z

Departments

PwsDepartmentSummary[]

The department summary record(s) retrieved by the service. Click here for more information.


Response Usage Example(s)


Example 01 - use department identity
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetDepartmentListResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetDepartmentListResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-08T16:59:32.3174314Z</ServerTimestampUtc>
            <a:Departments xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsDepartmentSummary>
                  <b:DepartmentId i:nil="true"/>
                  <b:DepartmentName>Technology</b:DepartmentName>
                  <b:DepartmentUid>1152921504606851320</b:DepartmentUid>
               </b:PwsDepartmentSummary>
            </a:Departments>
         </PwsGetDepartmentListResult>
      </PwsGetDepartmentListResponse>
   </s:Body>
</s:Envelope>
Example 02 - use query string
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsGetDepartmentListResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsGetDepartmentListResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-08T17:05:10.2334412Z</ServerTimestampUtc>
            <a:Departments xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsDepartmentSummary>
                  <b:DepartmentId i:nil="true"/>
                  <b:DepartmentName>Management</b:DepartmentName>
                  <b:DepartmentUid>1152921504606851319</b:DepartmentUid>
               </b:PwsDepartmentSummary>
            </a:Departments>
         </PwsGetDepartmentListResult>
      </PwsGetDepartmentListResponse>
   </s:Body>
</s:Envelope>                    

PwsGetDepartmentList - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
57575DepartmentNotFoundThe specified department does not exist.