Basics

Schema

The API is accessible from a DOCman menu item in your website: https://www.example.com/downloads.

Throughout our documentation we’ll use https://demo.joomlatools.com/joomla3/en/docman/hierarchical-list.

Note: The API can only access the categories and documents that are accessible through the menu item.

Accept header

All data is sent and received as JSON, set the Accept request-header:

Accept: application/json

Query string

By adding format=json to the query string the representation will always be JSON data.

Example: https://demo.joomlatools.com/joomla3/en/docman/hierarchical-list?format=json

Authentication

For some requests, like creating documents, you need to pass the user credentials to the request so that DOCman can authenticate the user.

To do that, install our basic auth plugin on your site and enable it. You can send the user credentials using basic auth and the user will automatically be logged in and authenticated.

If you are programmatically creating documents using a single user, we suggest you create a new admin user specifically for this purpose.

Basic authentication

GET /joomla3/en/docman/hierarchical-list HTTP/1.1
Host: https://demo.joomlatools.com
Accept: application/json
Cache-Control: no-cache
Authorization: Basic YWRtaW46YWRtaW4=

Note that the Authorization header sends the user credentials in a base64 encoded format.

Pagination

Requests that return multiple items will be paginated to 20 items by default. You can specify pagination with the limit and offset parameters.

Parameters

Name Type Description Default
limit integer Defines the total items that should be returned in the response 20
offset integer Defines the beginning of the subset of items. 0

The pagination info is included in the JSON response. It is advised to follow these values instead of constructing your own URLs.

{
    "links": {
        "self": {
            "href": "https://demo.joomlatools.com/joomla3/en/docman/hierarchical-list?view=documents&format=json&offset=20",
            "type": "application/json; version=1.0"
        },
        "next": {
            "href": "https://demo.joomlatools.com/joomla3/en/docman/hierarchical-list?view=documents&format=json&offset=40",
            "type": "application/json; version=1.0"
        },
        "previous": {
            "href": "https://demo.joomlatools.com/joomla3/en/docman/hierarchical-list?view=documents&format=json&offset=0",
            "type": "application/json; version=1.0"
        }
    }
}

Need Help?

Let our developers personally assist you. You can ask development related questions in our Support Center. Only for Business or Agency subscribers.