GET /api/kps/iterator/start/{storeAlias}/{batchSize} and /api/kps/iterator/next/{storeAlias}/{batchSize}

Description

THESE REST METHODS HAVE BEEN DEPRECATED. To iterate over the rows in a KPS table, use the cursor method instead.

/api/kps/iterator/start - Gets the first {batchSize} objects in a store.

/api/kps/iterator/next - Gets the next {batchSize} objects in a store.

Note: These methods support one client per API Gateway at a time. Concurrent clients are not supported.


Resource URL

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


Parameters

storeAlias mandatory Alias of store to get object from.
batchSize mandatory Number of objects to retrieve.

Responses

Response Code Description
200 Success. The response body contains the required objects. If there are no more objects then an empty array is returned.
404 Fail. KPS has not been configured on this node.
404 Fail. The specified store or object does not exist.
500 Fail. An internal server error occurred.

Example Request and Response

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

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

HTTP 1.1 200 OK

[
    {   
        "age": 28, 
        "email": "mike@acme.com", 
        "id": "49f4b730-f2d6-44c8-a90a-73c1d43345fa", 
        "name": "Mike Smith"
    },  
    {   
        "age": 45, 
        "email": "mary@acme.com", 
        "id": "45328c14-57cd-4746-9a0a-0ad13c1e33c5", 
        "name": "Mary Phillips"
    },  
    {   
        "age": 21, 
        "email": "bob@acme.com", 
        "id": "a97fdadf-2eed-41a2-ab7f-fc5b4bdbcec5", 
        "name": "Bob Jones"
    }   
]