Restore a custom object record
object.restore(strid, ObjectRestoreParams**kwargs) -> ObjectRestoreResponse
POST/v1/objects/{entitySlug}/values/{id}/restore
Restores a trashed custom object record, bringing it back to active.
Calling restore on a record that is not trashed is a no-op and returns the existing record. A record of a different custom object type than entitySlug is reported as not found.
Required scope: custom_objects:restore
Rate limit category: Write
Restore a custom object record
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
object_restore_response = client.object.restore(
id="id",
entity_slug="entitySlug",
)
print(object_restore_response.id){
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}