Create mass edit job request
A Create Mass Edit Job Request object is used to request the creation of a new Mass Edit Job. The following properties are present:
Name |
Type |
Description |
---|---|---|
|
A description of the current state of the Mass Edit Job. | |
|
Collection |
The details of the relation to navigate to determine the entities that must be processed. |
|
Array |
The list of operations that must be performed on the entities in the collection. |
Collection
The collection property determines which entities are processed. This property contains an object that has the following properties:
Name |
Type |
Description |
---|---|---|
|
The link to the relation to navigate. | |
|
String |
The type of role to navigate on the relation. This can be either "Parent" or "Child". |
The role property specifies the role of the relation on the side of the collection entity. If the role property is set to "Parent", the child entities of the relation are navigated. Likewise, if the role property is set to "Child", the parent entities of the relation are navigated.
Operations
Each operation in the list is an Object that describes what that operation must do.
Set Property Operation Object
Sets the value of a property, optionally for a specific culture. If no culture is specified, the value must consist of a Labels object with the values to set for multiple cultures at once. This object has the following properties.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "SetProperty" |
|
String |
The name of the property to set |
|
String |
Optionally, the name of the culture for which to set the value in a multilanguage field. |
|
Value |
The value to set. |
Append Property Operation Object
Appends the value of a property, optionally for a specific culture. This object has the following properties.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "AppendProperty" |
|
String |
The name of the property to append |
|
String |
Optionally, the name of the culture for which to append the value in a multilanguage field. |
|
Value |
The value to append. |
Clear Relation Operation Object
Sets the related members for a specific relation on the entity. The relation is cleared before this is done. This is the only operation that garantuees that the order of related entities is preserved. This object has the following properties.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "ClearRelation" |
|
String |
The name of the relation to clear. |
|
String |
The type of role to change. Either 'Child' or 'Parent'. |
The role refers to the main entity. So in the case of the 'Child' role, the related entities are the parent or parents, and vice versa.
Add Relation Operation Object
Adds a set of related members to a specific relation on the entity. Entities that are already related are not affected. This object has the following properties.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "AddRelation" |
|
String |
The name of the relation to change. |
|
String |
The type of role to change. Either 'Child' or 'Parent'. |
|
Link or Array |
A Link object or array of Link objects referring to the entities to add to the relation. |
The role refers to the main entity. So in the case of the 'Child' role, the related entities are the parent or parents, and vice versa.
Remove Relation Operation Object
Removes a set of related members from a specific relation on the entity. Entities that are not part of the relation don't affect the operation. This object has the following properties.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "RemoveRelation" |
|
String |
The name of the relation to change. |
|
String |
The type of role to change. Either 'Child' or 'Parent'. |
|
Link or Array |
A Link object or array of Link objects referring to the entities to add to the relation. |
The role refers to the main entity. So in the case of the 'Child' role, the related entities are the parent or parents, and vice versa.
Submit Operation Object
TBD
The presence of this type of operation automatically disables the normal flow of operations. This object has the following property.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "Submit" |
Approve Operation Object
TBD
The presence of this type of operation automatically disables the normal flow of operations. This object has the following property.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "Approve" |
Reject Operation Object
TBD
The presence of this type of operation automatically disables the normal flow of operations. This object has the following property.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "Reject" |
Delete Entity Operation Object
Deletes the entity. The presence of this type of operation automatically disables the normal flow of operations and the entity is deleted immediately. This object has the following property.
Name |
Type |
Description |
---|---|---|
|
String |
Set to "DeleteEntity" |
Example
{
"stateDescription":"In progress",
"collection":{
"relation":{
"href":"http://server/api/entities/23/CollectionToAsset"
},
"role":"Parent"
},
"operations":[
{
"type":"SetProperty",
"property":"AssetName",
"culture":"en-US",
"value":"New name for this asset."
},
{
"type":"SetProperty",
"property":"AssetTitle",
"value":{
"en-US":"New name for this asset.",
"nl-BE":"De naam voor dit nieuwe asset."
}
},
{
"type":"ClearRelation",
"relation":"AssetToAssetType",
"role":"Child"
},
{
"type":"AddRelation",
"relation":"AssetToAssetType",
"role":"Child",
"value":[
{
"href":"http://server/api/entities/14"
},
{
"href":"http://server/api/entities/14"
}
]
},
{
"type":"RemoveRelation",
"relation":"AssetToAssetType",
"role":"Child",
"value":[
{
"href":"http://server/api/entities/14"
}
]
}
]
}