Create an information asset
curl --request POST \
--url https://api.trycomp.ai/v1/assets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Production PostgreSQL (AWS RDS)",
"type": "cloud_resource"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Production PostgreSQL (AWS RDS)', type: 'cloud_resource'})
};
fetch('https://api.trycomp.ai/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/assets"
payload = {
"name": "Production PostgreSQL (AWS RDS)",
"type": "cloud_resource"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Assets
Create an information asset | Comp AI API
Adds an asset to the ePHI inventory with its lifecycle flags (created, received, maintained, transmitted), owner and linked risks. Reusing a sourceKey.
POST
/
v1
/
assets
Create an information asset
curl --request POST \
--url https://api.trycomp.ai/v1/assets \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Production PostgreSQL (AWS RDS)",
"type": "cloud_resource"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Production PostgreSQL (AWS RDS)', type: 'cloud_resource'})
};
fetch('https://api.trycomp.ai/v1/assets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/assets"
payload = {
"name": "Production PostgreSQL (AWS RDS)",
"type": "cloud_resource"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
201
Was this page helpful?

