- Home
- API reference
- API documentation (JSON/XML)
- Tasks
- Object user assignment tasks
Object user assignement all
Function
The ObjectUserAssignement All task assigns to a user all objects of another user in whose administration they are. The <cancelation> keyword can be used to control the deletion of existing cancellations. Possible objects are domains, zones, domain contacts, preregistrations, redirects, BackupMX and TMCH.
Description
Route: PUT /object/_assignment/all
{
"source": {
"user": "customer",
"context": 4
},
"target": {
"user": "target_user",
"context": 4
}
}{
"stid": "20211104-app-9057",
"status": {
"code": "S1308001",
"text": "All objects were assigned successfully to the new user.",
"type": "SUCCESS"
}
}
Task code: 1308001
Uses ObjectUserAssignment object
<request>
<auth>
<user>customer</user>
<password>password</password>
<context>4</context>
</auth>
<task>
<code>1308001</code>
<source>
<owner>
<user>customer</user>
<context>4</context>
</owner>
</source>
<target>
<owner>
<user>target_user</user>
<context>4</context>
</owner>
</target>
<reply_to>customer@example.com</reply_to>
</task>
</request><response>
<result>
<data/>
<status>
<code>S1308001</code>
<text>All objects were assigned successfully to the new user.</text>
<type>success</type>
</status>
</result>
<stid>20211104-app-9059</stid>
</response>Example of deletion of all cancellations of the user when assigning the objects
<request>
<auth>
<user>customer</user>
<password>password</password>
<context>4</context>
</auth>
<task>
<code>1308001</code>
<default>
<cancelation>delete</cancelation>
</default>
<source>
<owner>
<user>customer</user>
<context>4</context>
</owner>
</source>
<target>
<owner>
<user>customer2</user>
<context>4</context>
</owner>
</target>
<reply_to>customer@example.com</reply_to>
</task>
</request><response>
<result>
<data/>
<status>
<code>S1308001</code>
<text>All objects were assigned successfully to the new user.</text>
<type>success</type>
</status>
</result>
<stid>20211104-app-6453</stid>
</response>