GET DTA Snapshots SnapshotID
The GET /dta_snapshots/{snapshotId} method is used to retrieve the data from that snapshot with the specified ID. Only the columns originally stored in the snapshot may be retrieved. This method returns HTTP 200 OK on a success with the requested data.
Table 15: POST DTA Snapshots SnapshotID Input Parameters
| Name | In | Description |
|---|---|---|
| snapshotId | path |
A string indicating the name of the snapshot. For example: https://<YOUR-HUB-NAME>/api/v1/dta_snapshots/snapshot_5
|
| columns | query |
An array of strings indicating the columns to return. Only the columns included in the snapshot are available for inclusion. For example: columns=certIssuerAsn1s&columns=certCommonName&columns=certAltNames&columns=certNotValidAfterEpochSecs&columns=certPublicKeyAlgo
|
| filter | query |
A string indicating a query to limit the results. The default is to return all records. For example (regular expression indicating DNS SAN list contains a domain): certTxt ~* 'DNS:\s*([^.]+\.)*keyexample\.com'
Or, URL encoded: certTxt%20~*%20%27DNS%3A%5Cs%2A%28%5B%5E.%5D%2B%5C.%29%2Akeyexample%5C.com%27
Tip: The filter option on the evidence page can be used to test and build filters for use with the API (see Filtering).
|
| sorts | query |
An array of strings indicating one or more sort keys and whether the sort should be ascending (asc) or descending (desc). The order is required if a sort key is specified. For example (URL encoded): sorts=certPublicKeyAlgo%20desc
|
| offset | query | An integer that specifies how many multiples of the limit to skip and offset by before returning results, to enable paging. |
| limit | query | An integer that specifies how many results to return per page. Very large values can result in long processing time. |
| reportFilteredCount | query | A Boolean indicating whether to return the total count of rows after the filter is applied (true) or not (false). The default is false. |
| reportTotalCount | query | A Boolean indicating whether to return the total count of rows before the filter is applied (true) or not (false). The default is false. |
Table 16: GET DTA Snapshots SnapshotID Response Data
| Name | Description |
|---|---|
| rows | An array of objects containing the requested records. |
| filteredCount | An integer indicating the total count of rows after the filter was applied, if reportFilteredCount was true. |
| totalCount | An integer indicating the total count of rows before the filter was applied, if reportTotalCount was true. |
API_KEY='<YOUR-API-KEY>'
HUB='https://<YOUR-HUB-SERVER>'
curl -sS -G "$HUB/api/v1/dta_cert" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H "x-api-key: $API_KEY" \
--data-urlencode 'columns=certIssuerAsn1s' \
--data-urlencode 'columns=certCommonName' \
--data-urlencode 'columns=certAltNames' \
--data-urlencode 'columns=certNotValidAfterEpochSecs' \
--data-urlencode 'columns=certPublicKeyAlgo' \
--data-urlencode 'sorts=certPublicKeyAlgo desc' \
--data-urlencode 'limit=20'Was this page helpful? Provide Feedback