Update an information asset
curl --request PATCH \
--url https://api.trycomp.ai/v1/assets/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Production PostgreSQL (AWS RDS)",
"description": "Primary application database holding patient records",
"type": "cloud_resource",
"status": "active",
"location": "AWS us-east-1",
"ephiCreated": true,
"ephiReceived": true,
"ephiMaintained": true,
"ephiTransmitted": true,
"dataDescription": "Patient demographics, lab results",
"vendorId": "vnd_abc123def456",
"integrationConnectionId": "icn_abc123def456",
"ownerId": "mem_abc123def456",
"sourceKey": "vendor:vnd_abc123def456",
"riskIds": [
"rsk_abc123def456"
]
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Production PostgreSQL (AWS RDS)',
description: 'Primary application database holding patient records',
type: 'cloud_resource',
status: 'active',
location: 'AWS us-east-1',
ephiCreated: true,
ephiReceived: true,
ephiMaintained: true,
ephiTransmitted: true,
dataDescription: 'Patient demographics, lab results',
vendorId: 'vnd_abc123def456',
integrationConnectionId: 'icn_abc123def456',
ownerId: 'mem_abc123def456',
sourceKey: 'vendor:vnd_abc123def456',
riskIds: ['rsk_abc123def456']
})
};
fetch('https://api.trycomp.ai/v1/assets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/assets/{id}"
payload = {
"name": "Production PostgreSQL (AWS RDS)",
"description": "Primary application database holding patient records",
"type": "cloud_resource",
"status": "active",
"location": "AWS us-east-1",
"ephiCreated": True,
"ephiReceived": True,
"ephiMaintained": True,
"ephiTransmitted": True,
"dataDescription": "Patient demographics, lab results",
"vendorId": "vnd_abc123def456",
"integrationConnectionId": "icn_abc123def456",
"ownerId": "mem_abc123def456",
"sourceKey": "vendor:vnd_abc123def456",
"riskIds": ["rsk_abc123def456"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Assets
Update an information asset | Comp AI API
Updates an asset in the ePHI inventory. riskIds replaces the full set of linked risks; omit it to leave links unchanged.
PATCH
/
v1
/
assets
/
{id}
Update an information asset
curl --request PATCH \
--url https://api.trycomp.ai/v1/assets/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Production PostgreSQL (AWS RDS)",
"description": "Primary application database holding patient records",
"type": "cloud_resource",
"status": "active",
"location": "AWS us-east-1",
"ephiCreated": true,
"ephiReceived": true,
"ephiMaintained": true,
"ephiTransmitted": true,
"dataDescription": "Patient demographics, lab results",
"vendorId": "vnd_abc123def456",
"integrationConnectionId": "icn_abc123def456",
"ownerId": "mem_abc123def456",
"sourceKey": "vendor:vnd_abc123def456",
"riskIds": [
"rsk_abc123def456"
]
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Production PostgreSQL (AWS RDS)',
description: 'Primary application database holding patient records',
type: 'cloud_resource',
status: 'active',
location: 'AWS us-east-1',
ephiCreated: true,
ephiReceived: true,
ephiMaintained: true,
ephiTransmitted: true,
dataDescription: 'Patient demographics, lab results',
vendorId: 'vnd_abc123def456',
integrationConnectionId: 'icn_abc123def456',
ownerId: 'mem_abc123def456',
sourceKey: 'vendor:vnd_abc123def456',
riskIds: ['rsk_abc123def456']
})
};
fetch('https://api.trycomp.ai/v1/assets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/assets/{id}"
payload = {
"name": "Production PostgreSQL (AWS RDS)",
"description": "Primary application database holding patient records",
"type": "cloud_resource",
"status": "active",
"location": "AWS us-east-1",
"ephiCreated": True,
"ephiReceived": True,
"ephiMaintained": True,
"ephiTransmitted": True,
"dataDescription": "Patient demographics, lab results",
"vendorId": "vnd_abc123def456",
"integrationConnectionId": "icn_abc123def456",
"ownerId": "mem_abc123def456",
"sourceKey": "vendor:vnd_abc123def456",
"riskIds": ["rsk_abc123def456"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
200
Was this page helpful?

