GET /api/kps/{storeAlias}

Description

**THIS REST METHOD IS INTENDED FOR INTERNAL USE ONLY ** Please use the cursor method instead.

This method returns objects in the specified table that match a specified filter.
Up to 1000 records are returned.

If any property in any object in the table contains the value of this filter then the object is included in the result set.
List and Map object properties are converted to Strings before being compared.
A case insensitive comparision is used.

This method is DOJO JSON REST store friendly and derived:
http://livedocs.dojotoolkit.org/dojox/data/JsonRestStore#implementing-a-rest-server


Resource URL

https://localhost:8090/api/router/service/api-server-instance-id/api/kps/{storeAlias}


Parameters

storeAlias mandatory Alias of store to get objects from.
filter optional Filter to use. A query parameter named filter. If not specified then no filter is applied and all objects are returned.
range optional Position of start object and end object, inclusive, to retrieve. A HTTP Range header of format: "Range: items=start-end". Used for paging through objects. If not defined then a range 0-99 is used. i.e. the first 100 objects are returned.

Responses

Response Code Description
200 Success. The response body contains the required objects. NOTE: an empty array indicates that no objects were found. A Content-Range header specifies the start position, end position, and total number of objects found (max: 1000). Format: "Content-Range: items startIndex-endIndex/totalObjects", e.g., "items 0-99/1000".
404 Fail. KPS has not been configured on this node.
404 Fail. The specified store does not exist.
500 Fail. An internal server error occurred.

Example Requests and Responses

No filter or range specified.

GET https://localhost:8090/api/router/service/instance-1/api/kps/employees

Via CURL: curl -k -v --user admin:changeme https://localhost:8090/api/router/service/instance-1/api/kps/employees

HTTP 1.1 200 OK
Content-Range: items 0-1/2

[
    {
        "age": 46, 
        "email": "joe@vordel.com", 
        "id": "0002", 
        "name": "joe"
    }, 
    {
        "age": 35, 
        "email": "fred@vordel.com", 
        "id": "0001", 
        "name": "fred"
    }
]

Filter specified.

Via CURL: curl -k -v --user admin:changeme https://localhost:8090/api/router/service/instance-1/api/kps/employees?filter=joe

HTTP 1.1 200 OK
Content-Range: items 0-0/1

[
    {
        "age": 46, 
        "email": "joe@vordel.com", 
        "id": "0002", 
        "name": "joe"
    }
]

Range specified.

Via CURL: curl -k -u admin:changeme --header "Range: items=0-2" https://localhost:8090/api/router/service/instance-1/api/kps/OAuthAuthZCodes

HTTP 1.1 200 OK
Content-Range: items 0-2/10

[
    {
        "auth": "A",
        "code": "a"
    },
    {
        "auth": "C",
        "code": "c"
    },
    {
        "auth": "B",
        "code": "b"
    }
]

Range and Filter specified.

curl -v -k -u admin:changeme --header "Range: items=0-2" https://localhost:8090/api/router/service/instance-1/api/kps/OAuthAuthZCodes?filter=B

HTTP 1.1 200 OK
Content-Range: items 0-0/1

[
    {
        "auth": "B",
        "code": "b"
    }
]