Restore S3 objects
POST
/api/meta/entity/bulk#restoreS3Objects
Restore one or more soft-deleted (archived) S3 objects.
The restoration relies on matches being found for the provided qualifiedName
s. If the this does not exactly match (case-sensitive) a soft-deleted S3 object's qualifiedName
, the request will fail.
Note that the guid
is also required to avoid accidentally creating a new S3 object. If the qualifiedName
does not match an existing S3 object, and no guid
is supplied in the request, then this endpoint will create a new S3 object with the provided details.
POST /api/meta/entity/bulk#restoreS3Objects
curl \
-X POST https://tenant.atlan.com/api/meta/entity/bulk#restoreS3Objects \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entities":[{"typeName":"S3Object","attributes":{"name":"my-file.csv","s3ObjectKey":"a/prefix/my-file.csv","connectorName":"s3","connectionQualifiedName":"default/s3/production","s3BucketQualifiedName":"default/s3/production/my-bucket","qualifiedName":"default/s3/production/my-bucket/a/prefix/my-file.csv","awsArn":"aws::production:my-bucket:a/prefix/my-file.csv"},"relationshipAttributes":{"bucket":{"guid":"f5740924-fe74-4462-96ff-5da0bc970cec","typeName":"S3Bucket"}},"guid":"23d6ec91-9399-41bf-8427-5cc91caaa42d","status":"ACTIVE"}]}'
Request example
{
"entities": [
{
"typeName": "S3Object",
"attributes": {
"name": "my-file.csv",
"s3ObjectKey": "a/prefix/my-file.csv",
"connectorName": "s3",
"connectionQualifiedName": "default/s3/production",
"s3BucketQualifiedName": "default/s3/production/my-bucket",
"qualifiedName": "default/s3/production/my-bucket/a/prefix/my-file.csv",
"awsArn": "aws::production:my-bucket:a/prefix/my-file.csv"
},
"relationshipAttributes": {
"bucket": {
"guid": "f5740924-fe74-4462-96ff-5da0bc970cec",
"typeName": "S3Bucket"
}
},
"guid": "23d6ec91-9399-41bf-8427-5cc91caaa42d",
"status": "ACTIVE"
}
]
}
Response example (200)
{
"mutatedEntities": {
"UPDATE": [
{
"typeName": "S3Object",
"attributes": {
"popularityScore": 1.17549435e-38,
"sourceCreatedAt": 0,
"viewerUsers": [],
"viewScore": 1.17549435e-38,
"lastSyncRunAt": 0,
"connectionQualifiedName": "default/s3/production",
"adminGroups": [],
"s3ObjectSize": 0,
"qualifiedName": "default/s3/production/my-bucket/a/prefix/my-file.csv",
"s3ObjectKey": "a/prefix/my-file.csv",
"awsArn": "aws::production:my-bucket:a/prefix/my-file.csv",
"__hasLineage": false,
"adminUsers": [],
"s3ObjectLastModifiedTime": 0,
"ownerGroups": [],
"isEditable": true,
"sourceUpdatedAt": 0,
"announcementUpdatedAt": 0,
"name": "my-file.csv",
"certificateUpdatedAt": 0,
"connectorName": "s3",
"s3BucketQualifiedName": "default/s3/production/my-bucket",
"isDiscoverable": true,
"viewerGroups": [],
"ownerUsers": [],
"awsTags": []
},
"guid": "23d6ec91-9399-41bf-8427-5cc91caaa42d",
"status": "ACTIVE",
"displayText": "my-file.csv",
"classificationNames": [],
"classifications": [],
"meaningNames": [],
"meanings": [],
"isIncomplete": false,
"labels": [],
"createdBy": "service-account-apikey-bea1e1d1-e4e7-465e-8adf-7c61c227a59b",
"updatedBy": "service-account-apikey-bea1e1d1-e4e7-465e-8adf-7c61c227a59b",
"createTime": 1652796499504,
"updateTime": 1652796499504
}
]
},
"guidAssignments": {}
}
Response example (404)
{
"errorCode": "ATLAS-404-00-00A",
"errorMessage": "Referenced entity 23d6ec91-9399-41bf-8427-5cc91caaa42d is not found",
"entityGuid": "23d6ec91-9399-41bf-8427-5cc91caaa42d"
}