AttackForge Enterprise & AttackForge Core
Powered By GitBook
UpdateScope
This method can be used for the following functionality: Update an asset on a project that this user must have Edit access to.

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
PUT /api/ss/project/:projectId/asset/:assetId HTTP/1.1
2
Host: demo.attackforge.com
3
X-SSAPI-KEY: APIKey
4
Content-Type: application/json
5
Connection: close
Copied!

Query

projectId (string)
Id of the project.
Example:
1
PUT /api/ss/project/5e7c29afa3362408cf502a11/asset/:assetId HTTP/1.1
Copied!
assetId (string)
Id of the asset.
Example:
1
PUT /api/ss/project/:projectId/asset/5e7c29afa3362408cf502a15 HTTP/1.1
Copied!
name (string) (optional)
Name of the asset.
Example:
1
{
2
"name": "..."
3
}
Copied!
is_deleted (boolean) (optional)
Whether asset is deleted or not.
Example:
1
{
2
"is_deleted": false
3
}
Copied!

Example

The following example is a cURL request to update name of an asset.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.
1
curl -X PUT 'https://demo.attackforge.com/api/ss/project/5e7c29afa3362408cf502a11/asset/5e7c29afa3362408cf502a15' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
2
"name": "Asset New Name",
3
"is_deleted": false
4
}'
Copied!

Response

Response contains a status.
1
{
2
"status": "Asset Updated"
3
}
Copied!
Last modified 1yr ago