Skip to main content
Skip table of contents

Document update

Document update

Document update

PUT /api/admin/v1/documents/{document}

Method parameters

int document, unique identifier of the document


string title, name of the document


string description, description of the document


file file, document file (maximum file size 70MB)


file version, document version


bool is_public_download, file for public download

200 OK

Successful response

JSON
{
    "id": 2,
    "title": "2",
    "description": "1",
    "url": "https://vms.local/storage/downloads/documents/620261318effe/v1.3.docx",
    "version": "1",
    "is_public_download": false,
    "created_at": "2022-02-08 15:25:21"
}

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/documents/{document}' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "document": 0,
    "title": "string",
    "description": "string",
    "file": "file",
    "version": "file",
    "is_public_download": true
}'
PHP
PHP
$data = array (
  'document' => 0,
  'title' => 'string',
  'description' => 'string',
  'file' => 'file',
  'version' => 'file',
  'is_public_download' => true,
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'PUT',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/documents/{document}', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.