PATCH frame

Used to perform a partial update of a frame. Validation will ensure that the user calling this method not only has write permissions but has permission to edit the specific frame (i.e. belongs to the frame's media owner).

This method accepts the same parameters as POST /api/frame except that your input JSON must contain a FrameID element specifying the frame that you wish to update.

Each attribute type/value will be validated to ensure that the data is valid.

INPUT

As this method is accessed via a PATCH request the raw body must be set to JSON as described below. This sample input will update FrameID 2000000000 changing the IMSWorldGeodeticCoordinate to have a latitude of 49.76680500 and longitude of -7.49999999. All other Frame details will be retained and only the IMSWorldGeodeticCoordinate set and/or updated.


[{
    "FrameID": 2000000000,
    "Environment": {
        "Attributes": [{
            "Type": "IMSWorldGeodeticCoordinate",
            "Value": "51.76680500,-1.49999999"
        }]
    }
}]
        

The table below details the fields used in this example.

parameter type description
FrameID int64 (required) the frame identifier representing the frame to update

FrameID is the only extra input to this method and you'll find definitions for the rest within POST /api/frame

OUTPUT

For each frame specified in the input a full frame will be returned. This output is exactly the same as the output defined for GET /api/frame and POST /api/frame except that the returned frame would include your changes.

ERRORS

Your API account might only be allowed to update certain data elements. In the event that you attempt to update an item that you don't have access to you'll receive a error code of "item_not_allowed". In the example below a request was made to update the PostCode attribute of frame which is not possible for the calling account. The field element will attempt to list the path to the problematic item.


{
    "errors": {
        "message": "Validation failed",
        "errors": [{
            "resource": "frame",
            "field": "\\Environment\\Attributes\\PostCode",
            "code": "item_not_allowed"
        }]
    }
}
        

If you receive this response and are unsure why then please contact the helpdesk for further information.