Controls cloning supported objects and viewing cloning job status.
A Clone Object is an association between a Source and a Destination; it also tracks the current state of a clone operation and any errors that may have occurred during the job.
Controls cloning supported objects and viewing cloning job status.
A Clone Object is an association between a Source and a Destination; it also tracks the current state of a clone operation and any errors that may have occurred during the job.
source_id
Integer
The id of the source object
source_type
String
The type of the source object
options
Object
Additional fields to be applied to the new object
id
Integer
Clone Object id
state
String
Current state of the cloning operation
destination_id
Integer
The id of the destination object
destination_type
String
The type of the destination object
source_id
Integer
The id of the source object
source_type
String
The type of the source object
error_messages
ArrayAn array of any existing error messages
created_at
String
The date the clone object was created
updated_at
String
The date the clone object was last updated
200 OK
304 Not Modified
{
"meta": {},
"clone_objects": [
{
"id": 3,
"state": "created",
"destination_id": 1605,
"destination_type": "SubAccount",
"source_id": 1,
"source_type": "SubAccount",
"error_messages": [],
"created_at": "2018-03-28T15:36:16.915-06:00",
"updated_at": "2018-03-28T15:36:16.915-06:00",
"parameters": { "subdomain": "sub-clone-1" , "name": "Sub Clone 1" }
}
]
}
200 OK
id
Integer
Required
Path parameter. Clone Object id
{ "clone_objects": [ { "id": 3, "state": "created", "destination_id": 1605, "destination_type": "SubAccount", "source_id": 1, "source_type": "SubAccount", "error_messages": [], "created_at": "2018-03-28T15:36:16.915-06:00", "updated_at": "2018-03-28T15:36:16.915-06:00", "parameters": { "subdomain": "sub-clone-1" , "name": "Sub Clone 1" } } ] }
This will create a clone object and initiate a clone job for the requested object. Note that all source_types need to be identical. This endpoint does not support creating clone_objects for different source types at this time.
201 Created
400 Bad Request
409 Conflict
Body parameter. An array of {API::CloneObjectRequest} to be executed.
{ "clone_objects": [ { "source_id": 1, "source_type": "SubAccount", "options": { "subdomain": "sub-clone-1", "name": "Sub Clone 1" } }, { "source_id": 3, "source_type": "SubAccount", "options": { "subdomain": "sub-clone-2", "name": "Sub Clone 2" } } ] }
curl \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{"clone_objects":[{"source_id":1,"source_type":"SubAccount","options":{"subdomain":"sub-clone-1","name":"Sub Clone 1"}},{"source_id":3,"source_type":"SubAccount","options":{"subdomain":"sub-clone-2","name":"Sub Clone 2"}}]}' \ http://<bridge>/api/admin/clone_objects
{ "clone_objects": [ { "id": 3, "state": "pending", "destination_id": 1605, "destination_type": "SubAccount", "source_id": 1, "source_type": "SubAccount", "error_messages": [], "created_at": "2018-03-28T15:36:16.915-06:00", "updated_at": "2018-03-28T15:36:16.915-06:00", "parameters": { "subdomain": "sub-clone-1" , "name": "Sub Clone 1" } }, { "id": 4, "state": "pending", "destination_id": 1606, "destination_type": "SubAccount", "source_id": 3, "source_type": "SubAccount", "error_messages": [], "created_at": "2018-03-28T15:36:26.013-06:00", "updated_at": "2018-03-28T15:36:26.013-06:00", "parameters": { "subdomain": "sub-clone-2" , "name": "Sub Clone 2" } } ] }