Asset Configuration API Primer
The asset configuration API is intended for users to quickly gather information about the asset groups and the assets discovered by Open Raven. There is additional supplementary configuration collected for each asset that are not yet exposed in the UI, and this API will allow you to access such information.
List Asset Groups
This endpoint is paginated. For details on pagination and responseMetadata see the following section: Pagination
You may retrieve a list of your asset groups with the following request:
GET https://<OPENRAVEN_ORG>.openraven.io/external/api/assets/v1/asset-groups
Response:
{
"collection": [{...}], # List of Asset Group JSON objects, may be empty.
"responseMetadata": {
"hasNextPage": true|false,
"endCursor": "<PAGE_TOKEN>"
}
}
Get Asset Group By ID
You may retrieve an asset group by ID with the following request:
GET https://<OPENRAVEN_ORG>.openraven.io/external/api/assets/v1/asset-groups/{ID}
Reponse:
{
"id": "<ID>",
"name": "<NAME>",
"namespace": "<NAMESPACE>",
"description": "<DESCRIPTION>"
}
If your asset group is not found you will receive a 404 response.
List Assets
This endpoint is paginated. For details on pagination and responseMetadata see the following section: Pagination
You may retrieve a list of your assets with the following request:
GET https://<OPENRAVEN_ORG>.openraven.io/external/api/assets/v1/aws/raw/
Response:
{
"collection": [{...}], # List of Asset JSON Objects, may be empty.
"responseMetadata": {
"hasNextPage": true|false,
"endCursor": "<PAGE_TOKEN>"
}
}
Get Asset By ID
You may retrieve an asset by ID with the following request, ensure that your POST content type is set to "application/json".
Note: This is a POST request as some assets may have special characters in their ID.
POST https://<OPENRAVEN_ORG>.openraven.io/external/api/assets/v1/aws/raw/by-asset-id
Content-type: application/json
BODY:
{
"assetId": "<ID>"
}
Response:
{
"assetId": "<ID>",
"cloudProvider": "aws",
"configuration": {
...
},
"supplementaryConfiguration": {...},
"updatedIso": <LAST_UPDATED_TS>,
"cloudCommonAttributes": {
"arn": "<ARN>",
"resourceName": "<NAME>",
"resourceId": "<RESOURCE_ID>",
"resourceType": "<RESOURCE_TYPE>",
"awsRegion": "<AWS_REGION>",
"awsAccountId": "<AWS_ACCOUNT_ID>",
"tags": {
"key": "value"
}
}
If your asset is not found you will receive a 404 response.
Updated almost 2 years ago