Mass edit job collection

The Mass Edit Job Collection Resource contains all of the mass edit jobs present in the system. This resource is also used to post new mass edit jobs. Methods supported: GET, HEAD, POST

GET /api/massedits{?state,skip,take}

Returns a Mass Edit Job Collection Object that contains the collection of all mass edit jobs in the system.

Optionally, add a state filter to only return jobs that match the specified state.

Chunking

If there are more jobs than can fit in a single chunk, a link is included to retrieve the next chunk.

Ranging

Use the take parameter to return the specified number of jobs (up to 100). Use the skip parameter to further determine which range of jobs is returned.

Example request:

RequestResponse

GET http://<hostname>/api/massedits?state=Pending
Host: hostname
Accept: application/json

Example response:

RequestResponse

HTTP/1.1 200 OK
Content-Length: content lengtha
Content-Type: application/json; charset=utf-8
ETag: "hash string"

{
    "items": [
        ... Mass Edit Job Objects
    ],
    "next",{
        "href":"http://<hostname>/api/massedits?skip=25"
    },
    "returned_items":25,
    "self":{
        "href":"http://<hostname>/api/massedits"
    },
    "total_items":78
}

POST /api/massedits

Creates a mass edit job. A complete Create Mass Edit Job Request object is expected in the body. Success is indicated by a 201 Created response, where a Location header contains the URL of the newly created resource. Use the massedits endpoint to refresh renditions or create public links. The response is the same for all examples.

Example request for standard mass edit:

RequestResponse

POST http://<hostname>/api/massedits

{
    "selectionPool": "SelectionPool.Content",
    "subPoolId": null,
    "definitionName": "M.Asset",
    "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://<hostname>/api/entities/14"
                },
                {
                    "href":"http://<hostname>/api/entities/15"
                }
            ]
        },
        {
            "type":"RemoveRelation",
            "relation":"AssetToAssetType",
            "role":"Child",
            "value":[
                {
                    "href":"http://<hostname>/api/entities/16"
                }
            ]
        }
    ]
}

Example request for refresh renditions:

RequestResponse

POST http://<hostname>/api/massedits

{
    "selectionPool": "SelectionPool.Content",
    "subPoolId": null,
    "definitionName": "M.Asset",
    "operations": [{
        "type": "RefreshRenditions",
        "value": {
            "renditions": [],
            "failed_only": false,
            "refresh_history": false,
            "refresh_subfiles": false,
            "refresh_user_renditions": false
        }
    }]
}

Example request for creating mass public links:

RequestResponse

POST http://<hostname>/api/massedits

{
    "selectionPool": "SelectionPool.Content",
    "subPoolId": null,
    "definitionName": "M.Asset",
    "operations": [
        {
            "type": "CreatePublicLinks",
            "value": [
                {
                    "rendition": "downloadOriginal",
                    "expirationDate": null
                }
            ]
        }
    ]
}

Example response:

RequestResponse

HTTP/1.1 201 Created
Location: http://<hostname>/api/massedits/5549

Do you have some feedback for us?

If you have suggestions for improving this article,