Administrate

Getting DMS Documents

DMS documents are those stored within Administrate’s Document Management System (DMS). You can access the meta data stored with these documents, and the documents themselves.

GET /api/v2/docs/dms/:id

Using curl

curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/docs/dms/:id \
    -k -u (login):(password)

Using php

<?php
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/docs/dms/1';
$credentials = 'username:password';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, $credentials);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0 );
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0 );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
echo $result;

Example response

{
    "file": {
        "human_name": "Acme Feature List.pdf",
        "id": 2229,
        "mime_type": "application/pdf",
        "original_name": "Acme Feature List.pdf"
    },
    "url": "url/to/fetch/2229"
}
statuscode 200:no error
statuscode 404:does not exist