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 “company-provided.”
- Parameters
- Example Requests:
- Status Codes
Parameters
* Required.
add-
[Body] Assets to add.
Value: [Array] Asset and its change details.
{ "entity": "entity_guid", "type": "string", "value": "string", "reason": "string" } Asset-
[Body] An asset and its change details.
Value: [Object]
entity-
* Required.
[Body] Identify the company to add assets to.
Value: [String] Company unique identifier [
entity_guid]. See GET: Portfolio Details. type-
* Required.
[Body] Identify the type of asset that is being added.
Value: [String]
cidrdomain
value-
* Required.
[Body] Identify the asset to add.
Value: [String]
DomainIP address/CIDR
reason-
[Body] Specify a reason for the change.
Value: [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.
-
202– Okay - Everything worked as expected.
-
400– Bad Request -
This can often be due to an error or missing a required parameter.
- Malformed CIDR or domain
- Duplicate entry
- Not found
- September 18, 2023: Permissions.
- April 20, 2023: Help and troubleshooting.
- March 31, 2023: Published.
Feedback
0 comments
Please sign in to leave a comment.