Update an existing document or media file on the MDM server

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

To Modify documents

Endpoints

Request URL

https://{server-hostname}:8383/api/v1/mdm/docs/{doc_id}

Scope

MDMDeviceMgmt.UPDATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

doc_idstringMandatory

Unique identifier of the document. Obtain from the Upload Content or Get Content List response

- Request Body

application/json
JSON Object
Hide Sub-Attributes
tagsarrayOptional

Array of tag IDs to classify the content

descriptionstringOptional

Updated content description for the document or media file

file_idlongMandatory

File ID of the replacement document or media file. Upload the file using Upload File with MDM_CONTENT_MGMT module

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request PUT \
  --url https://appdomain/api/v1/mdm/docs/{doc_id} \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"file_id":9007199254741080,"description":"Updated document description","tags":[9007199254741088,9007199254741088]}'

Sample Request Body

Update content with new tags, description, and file

Copied!
  {
    "file_id": 9007199254741080,
    "description": "Updated document description",
    "tags": [
      9007199254741088,
      9007199254741088
    ]
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
doc_idlong

A unique identifier for the document or media

doc_namestring

Name of the document or media

added_timelong

Epoch timestamp (milliseconds) when the document or media was added to the MDM server

updated_timelong

Epoch timestamp (milliseconds) when the document or media was last modified

last_modified_by_namestring

Name of the user who last modified the document or media

last_modified_bylong

User ID of the user who last modified the document or media

created_by_namestring

Name of the user who created the document or media

created_bylong

User ID of the user who created the document or media

sizelong

Document or media size in bytes

doc_typeinteger

Content type identifier

repository_typeinteger

Repository from where the media or document is added

descriptionstring

Content description

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Content successfully updated on the MDM server

Copied!
  {
    "updated_time": 1714717200000,
    "added_time": 1714630800000,
    "size": 6855,
    "doc_name": "Zylker MDM",
    "description": "Updated document description",
    "last_modified_by": 9007199254741036,
    "doc_type": 4,
    "created_by_name": "admin",
    "doc_id": 9007199254741080,
    "last_modified_by_name": "admin",
    "created_by": 9007199254741036,
    "repository_type": 1
  }
                
Show full

Duration: 1 minute | Threshold: 60 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.