logo

Create Mass Edit Job Request Object

A Create Mass Edit Job Request object is used to request the creation of a new Mass Edit Job. The following properties are present:

NameTypeDescription
state_descriptionLabelsA description of the current state of the Mass Edit Job.
collectionCollectionThe details of the relation to navigate to determine the entities that must be processed.
operationsArrayThe 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:

NameTypeDescription
relationLinkThe link to the relation to navigate.
roleStringThe 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.

Properties:

NameTypeDescription
typeStringSet to "SetProperty"
propertyStringThe name of the property to set
cultureStringOptionally, the name of the culture for which to set the value in a multilanguage field.
valueValueThe value to set.

Append Property Operation Object

Appends the value of a property, optionally for a specific culture.

Properties:

NameTypeDescription
typeStringSet to "AppendProperty"
propertyStringThe name of the property to append
cultureStringOptionally, the name of the culture for which to append the value in a multilanguage field.
valueValueThe 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.

Properties:

NameTypeDescription
typeStringSet to "ClearRelation"
relationStringThe name of the relation to clear.
roleStringThe 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.

Properties:

NameTypeDescription
typeStringSet to "AddRelation"
relationStringThe name of the relation to change.
roleStringThe type of role to change. Either 'Child' or 'Parent'.
valueLink or ArrayA 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.

Properties:

NameTypeDescription
typeStringSet to "RemoveRelation"
relationStringThe name of the relation to change.
roleStringThe type of role to change. Either 'Child' or 'Parent'.
valueLink or ArrayA 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.

Properties:

NameTypeDescription
typeStringSet to "Submit"

Approve Operation Object

TBD

The presence of this type of operation automatically disables the normal flow of operations.

Properties:

NameTypeDescription
typeStringSet to "Approve"

Reject Operation Object

TBD

The presence of this type of operation automatically disables the normal flow of operations.

Properties:

NameTypeDescription
typeStringSet 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.

Properties:

NameTypeDescription
typeStringSet 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"
                }
            ]
        }
    ]
}

Can we improve this article ? Provide feedback