![]() |
REST API
16
REST API for Luna Network HSMs
|
The REST API framework provides formatting options for requests and their responses to suit the needs of your application.
To format a response, include your formatting options in the query, as described below.
This is a filter that limits the number of elements in an array. If, for example, the server would normally return 100 elements (0-99), setting a limit of 20 would return elements 0-19 only. /verbatim https://LUNAIPADDRESS:PORT/api/hsms/{hsmid}/partitions?limit=20 /endverbatim When limit is used with offset it can generate a link header with a link to the "next" page. The link header will not be created if there are no more pages.
This filter offsets the results of an array. If, for example, the server would normally return 100 elements (0-99), an offset of 20 would return elements 20-99. /verbatim api/hsms/1234/partitions?offset=20 /endverbatim
Notes:
api/hsms/1234/partitions?limit=2&offset=2This format will return elements 2,3 and skip 0 and 1.
The REST API framework provides some options for formatting requests.
URLs can only be sent using the ASCII character-set. Since the REST API framework allows you to use some non-ASCII characters in URLs, these characters must be encoded by the REST client and decoded by the server. Currently, the REST API framework supports the ASCII characters from 20 (space) to 126 (tilde).
GET https://LUNAIPADDRESS:PORTapi/lunasa/hsms/1234/partitions/20160901/stc/clients/client%20%luna
The example above encodes the client name "client luna" to "client%20luna" in URL.