Search

This method will search for items. This call must be encrypted.

Input parameters

Input-SessionId

The current session id as base64-string. This type is mandatory.

Input-Type

The type of item to search. Available types: User, Token, EndEntity, Certificate, Task, Organization, Audit and Diagnostic. This type is mandatory.

Input-Directive

The search directive depening on type and configuration. E.g. name of a user, serial number of a token, name of an end entity etc. etc.

Input-Offset

Optional when using paging for large search operations. The offset tag means the current page of the presented items. Note that paging is only available for internal items, stored in the system. External services like citizen services and directory services does not support paging and will always return matched result from the directive value. This value is optional.

Example: The search response will be 100 items. The limit is set to 5. The offset page span that can be used by the client is 20 pages of presentation.

For typically use, the offset value should be set to zero.

Input-Limit

Optional when using paging for large search operations. Set the limit as maximum items for each offset. Note that paging is only available for internal items, stored in the system. External services like citizen services and directory services does not support paging and will always return matched result from the directive value. This value is optional.

Example: The search response will be 100 items. The offset page span is 20 pages. Each offset page should have a limit of 5 items.

For typically use, the limit value should be set to 10 (max 10 items).

Input-Count

The current call-count of the session. This must be a numeric value. This type is mandatory.

SOAP implementation

Content type

text/xml; charset="utf-8";

Header

Action: "http://www.pointsharp.com/netid/server/portal/IServiceSoap/Search"

Request
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <Search xmlns="http://www.pointsharp.com/netid/server/portal">
            <Info>
                <SessionId></SessionId>
                <Type>User</Type>
                <Directive>john</Directive>
                <Offset>0</Offset>
                <Limit>10</Limit>
                <Count>1</Count>
            </Info>
        </Search>
    </s:Body>
</s:Envelope>
Response
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <SearchResponse xmlns="http://www.pointsharp.com/netid/server/portal">
            <SearchResult>
                <ResultCounter>3</ResultCounter>
                <List>
                    <ListObj>
                        <Id>1</Id>
                        <OriginServiceType>Internal</OriginServiceType>
                        <PresentationInfo>John Doe</PresentationInfo>
                        <ActivityList>
                            <ActivityObj>
                                <Method>GetObject</Method>
                                <Type>User</Type>
                                <Id>1</Id>
                            </ActivityObj>
                        </ActivityList>
                    </ListObj>
                </List>
                <Status>
                    <Code>Success</Code>
                    <Description>Success</Description>
                </Status>
            </SearchResult>
        </SearchResponse>
    </s:Body>
</s:Envelope>

REST implementation

Content type

application/json; charset="utf-8";

Method

POST

URI

/api/search

Request
{
  "SessionId": "",
  "Type": "User",
  "Directive": "john",
  "Offset": "0",
  "Limit": "10",
  "Count": "1"
}
Response
{
  "ResultCounter": "3",
  "List": [
    {
      "Id": "1",
      "OriginServiceType": "Internal",
      "PresentationInfo": "John Doe",
      "ActivityList": [
        {
          "Method": "GetObject",
          "Type": "User",
          "Id": "1"
        }
      ]
    }
  ],
  "Status": {
    "Code": "Success",
    "Description": "Success"
  }
}

Output parameters

Output-ResultCounter

The counter of the result. This is used primary for paging and will always be the counter of internal items (already created items in the system). Items outside the scope will not be included in the result counter but will be presented anyway.

Output-HeaderInfo

The information of headers. The data of the header is pipe-separated.

Output-List[]

A list of result items.

Output-List[]-ListObj

The result item.

Id

The unique id of the item.

OriginServiceType

The type name of the origin of the item. The type name "Internal" is normally used when found in the system but can be another type if the item could not be found the system, e.g. found in an external service and hasn’t been created in the system yet.

PresentationInfo

The presentation of the item depanding on type and configuration, e.g. name of a user, serial number of a token etc. etc. The data is pipe-separated as well as the header information.

ActivityList

A list of available activities for the item. Normally the next activity can be to load (Method=GetObject) the user (Type=User) "John Ingram" with the id 1056 (Id=1056).

Output-Status

The generic status object of the call.