https://api.bitsighttech.com/v1/companies/infrastructure/bulk
Set an end date for infrastructure or add assets to your infrastructure. The source of added assets are considered to be “customer-provided.”
- Parameters
- Example Requests:
- Status Codes
Parameters
* Required.
Parameter | Values | ||
---|---|---|---|
add [Body] Assets to add. |
[Array] Asset and its change details. { "*entity": "entity_guid", "*type": "string", "*value": "string", "reason": "string" } |
||
Asset [Body] An asset and its change details. |
[Object] | ||
entity * [Body] Identify the company to add assets to. |
[String] Company unique identifier [entity_guid ]. See GET: Portfolio Details. |
||
type * [Body] Identify the type of asset that is being added. |
[String]
|
||
value * [Body] Identify the asset to add. |
[String]
|
||
reason [Body] Specify a reason for the change. |
[String] See reasons. |
Example Requests
Add Assets
POST command curl 'https://api.bitsighttech.com/ratings/v1/companies/infrastructure/bulk' -H 'Content-Type: application/json' --data-binary '{ "add": [ { "entity": "a940bb61-33c4-42c9-9231-c8194c305db3", "type": "ip_cidr", "value": "newdomain.com", "reason": "dev" } ] }' --compressed -u api_token:
End Date Assets
POST command curl 'https://api.bitsighttech.com/ratings/v1/companies/infrastructure/bulk' -H 'Content-Type: application/json' --data-binary '{ "expire": [ { "entity": "a940bb61-33c4-42c9-9231-c8194c305db3", "type": "ip_cidr", "value": "23.4.128.0/20", } ] }' --compressed -u api_token:
Example Response
The response may include a message (value
) if an error or failed validation occurs.
{ "add":[ { "value":[ "Invalid net_cidr mask: 24.6.0.0/19. IPv4 CIDR mask must be greater or equal to 20." ] } ] }
Status Codes
See common errors and status codes.
Code | Description |
---|---|
202 – Okay |
Everything worked as expected. |
400 – Bad Request |
This can often be due to an error or missing a required parameter.
|
- September 18, 2023: Permissions.
- April 20, 2023: Help and troubleshooting.
- March 31, 2023: Published.
Feedback
0 comments
Please sign in to leave a comment.