Toggle menu

addReferences

Adds references to a file, as identified by its fileID.

The refDetails parameter must be an array of at least one object, with each object containing the keys refType and refIdentifier.

Request Parameters

NameTypeComments
fileIDArray<UUID>, requiredUUID file identifier of the file to add references to
refDetailsList<Reference>, requiredA list of reference objects to add
removeExistingReferencesBoolean, optionalDefault, false. Set to true to remove all existing references before adding the new reference (use with caution as other applications may be dependent on the file)

Example Request

This request adds a single reference to a file.

{
    "id": "testreq1",
    "jsonrpc": "2.0",
    "method": "addReferences",
    "params": {
        "fileID": "655f695d-9f48-4626-8c44-0a87ce9e77e8",
        "refDetails": [{
            "refType": "OBJECT",
            "refIdentifier": "1"
        }]
    }
}

Example Response

The response will list all current references.

{
    "fileDetails": {
        "id": "f618b936-572f-44f1-a300-9944b5b3e2c6",
        "references": [{
            "refIdentifier": "OBJECT",
            "refType": "1"
        }],
        "createdBy": null,
        "created": "2016-02-22T17:01Z",
        "hash": "ba44f7f8f88543fbf91f9b9eb0217cfe",
        "lastUpdatedBy": null,
        "lastUpdated": "2016-02-22T17:01Z",
        "filename": "pusheen.png",
        "type": "image/png",
        "size": 37029
    }
}

Last modified on June 27, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon