Updating a DMS object without user interaction

You can update an existing DMS object in a d.3 repository without the need for action by the user. No Validate hooks are executed in d.3 server while updating the DMS object without user interaction. Mappings are required before the action can be performed. In the Basic information about mapping chapter, you can find general information for helping you to create mappings.

To update a DMS object, perform the following steps:

  • Determining the URL for a repository

  • Determine the link relation for the existing DMS object

  • Provide the file to be stored (optional)

  • Open the URL to update the DMS object

Determining the URL for a repository

In the chapter Determining a repository, you can learn how to determine the URL for a repository.

Determine the link relation for the existing DMS object

To determine a URL for an existing DMS object, perform a search and evaluate the update or updateWithContent link relation for an item in the result list. The chapter Retrieving and viewing the results of a search operation provides you with more information about performing a search and the description of a result list item. If the d.3 document status of the existing DMS object is Processing, the authenticated user must be the processor of the DMS object.

Provide the file to be stored (optional)

If you have determined an updateWithContent link relation, you can provide a file with the parameters contentUri or contentLocationUri. In the chapter Provision of files, you can learn how to provide a file.

If you want to update only the properties with the update link relation, you do not need to provide a file.

If you have received only an update link relation, an update with a file is not possible.

Open the URL to update the DMS object

Send an HTTP PUT request with the required properties as the Body to the URL of the existing DMS object that you received in the update or updateWithContent link relation. If you want to modify only parameters, do not specify the contenLocationUri and filename parameters.

Request

PUT /dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/o2m/A00000001
Origin: https://baseuri
Accept: application/hal+json
Content-Type: application/hal+json

{
        "filename": "myfile.txt",
        "alterationText": "updated file",
        "sourceCategory": "mycategory1_ID",
        "sourceId": "/myapp/sources/mysource",
        "contentLocationUri": "/dms/r/dee1f3d3-eae8-5d9d-84d8-2d758c5ddc27/blob/chunk/2018-01-01_temp_master_file_user1_44f7-95a6-58b8400ecf43",
        "sourceProperties": {
                "properties": [{
                                "key": "myprop1_ID",
                                "values": ["Please verify the XYZ invoice"]
                        },
                        {
                                "key": "myprop2_ID",
                                "values": ["Name1@contoso.com","Name2@samplecompany.de"]
                        }
                ]
        }
}

For information about the JSON object parameters, see the chapter Defining the parameters for storing.

If the call is successful, HTTP 200 OK is returned:

Response

HTTP/1.1 200 OK

If the call was successful and there is detailed information on the processing result of the storage operation, the detailed information is returned in the response. With the help of the information, you can decide whether further processing steps are necessary for the DMS object. For more information see Format of the response for successful requests with detailed information.

If the version fails to save, a corresponding answer (response) is returned. For more information see Response format for errors.

If the call was successful and there is detailed information about the processing result of the storage operation, this detailed information is returned in the response. You can use this information, for example, to make decisions about whether further processing steps are necessary for the DMS object. For more information see Format of the response for successful requests with detailed information.