AttackForge Enterprise & AttackForge Core
Powered By GitBook
GetAssetsInLibrary
This method can be used for the following: Get assets in the library (must have Assets Module enabled in your tenant configuration!);

Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

Headers

1
GET /api/ss/library/assets HTTP/1.1
2
Host: demo.attackforge.com
3
X-SSAPI-KEY: APIKey
4
Content-Type: application/json
5
Connection: close
Copied!

Query

name (string) (optional)
Name of the asset.
Example:
1
{
2
"name": "..."
3
}
Copied!
type (string) (optional)
Type of asset. Must be one of the following: Web App, API, Mobile, Cloud, Infrastructure, Network, Wifi, Hardware, Other
Example:
1
{
2
"type": "Web App"
3
}
Copied!
external_id (string) (optional)
External id for the asset. For example id associated with the assest in Configuration Management Database.
Example:
1
{
2
"external_id": "..."
3
}
Copied!
skip (integer) (optional)
Number of records to skip. Default is 0 (do not skip any records).
Example:
1
GET /api/ss/library/assets?skip=10 HTTP/1.1
Copied!
limit (integer) (optional)
Number of records to limit to. Default limit is 500. Max limit is 500.
Example:
1
GET /api/ss/library/assets?limit=100 HTTP/1.1
Copied!

Example

The following example is a cURL request to get all assets from the library of type 'Web App'.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.
1
curl -X GET 'https://demo.attackforge.com/api/ss/library/assets' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
2
"type": "Web App"
3
}'
Copied!

Response

Response contains an asset library count and array of asset library objects.
1
{
2
"count": 999,
3
"assets": [
4
{
5
"id": "...",
6
"created": "...",
7
"modified": "...",
8
"name": "...",
9
"type": "...",
10
"external_id": "...",
11
"details": "...",
12
"groups": "[{"name": "...", "id": "..."}]",
13
"projects": "[{"name": "...", "id": "..."}]",
14
"created_by": "..."
15
}
16
]
17
}
Copied!
Last modified 1mo ago