Dokky PRO APIs provide a Powerful Tool for Developers who want to interact with the File Management system programmatically. These programming Json Interfaces allow you to perform a variety of operations such as uploading, downloading, deleting, and searching for Documents, as well as getting user statistics and managing comments.

In this article, we will explore the main Features of the Dokky PRO APIs and provide practical examples to illustrate their use.

Dokky PRO - API

Authentication and Request Limitation

To interact with the APIs, you need to authenticate yourself using a JWT (JSON Web Token).
Each request must include this token in the `X-Authorization` header. It is important to note that there is a limit of 30 requests per minute to ensure system stability.

1. File Upload – [POST]

This API allows you to upload files to the server, specifying metadata such as title, description, tags, and license. You can also create a new category if needed.

Example request:

curl -X POST "https://your-dokkyPRO.com/api/V1/docs/api-upload" \
-H "X-Authorization: Bearer Your JWT Token here" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/file.pdf" \
-F "title=Upload via API" \
-F "description=Upload File via API" \
-F "tags=tag1, tag2" \
-F "category_id=1" \
-F "cc_license=CC BY"

2. Download File – [GET]

This API allows you to download a file by specifying its ID. It checks whether the file is available for download.

Example Request:

curl -X GET "https://your-dokkyPRO.com/api/V1/docs/api-download?file_id=123" \
-H "X-Authorization: Bearer Your JWT Token here"

3. File Deletion – [DELETE]

Allows you to delete a file by specifying its ID. A valid JWT token is required to authenticate the deletion request.

Example Request:

curl -X DELETE "https://your-dokkyPRO.com/api/V1/docs/api-delete" \
-H "X-Authorization: Bearer Your JWT Token here" \
-H "Content-Type: application/json" \
-d '{"id": "20"}'

4. File Search – [POST]

Allows you to search for files using a specified search term. JWT authentication is required.

Example Request:

curl -X POST "https://your-dokkyPRO.com/api/V1/stats/api-search" \
-H "X-Authorization: Bearer Your JWT Token here" \
-H "Content-Type: application/json" \
-d '{"search": "document"}'

5. User Stats – [POST]

Provides statistics about the authenticated user, including total number of comments, uploaded files, and downloads.

Example Request:

curl -X POST "https://your-dokkyPRO.com/api/V1/stats/api-stats" \
-H "X-Authorization: Bearer Your JWT Token here" \
-H "Content-Type: application/json"

6. User Files – [GET]

This API allows you to get a list of files uploaded by a given user.

Example Request:

curl -X GET "https://your-dokkyPRO.com/api/V1/users/api-files?user_id=1" \
-H "X-Authorization: Bearer Your JWT Token here" \
-H "Content-Type: application/json"

7. User Comments – [POST]

Allows you to retrieve comments received from the authenticated user.

Example Request:

curl -X POST "https://your-dokkyPRO.com/api/V1/users/api-comments" \
-H "X-Authorization: Bearer Your JWT Token here" \
-H "Content-Type: application/json"

Dokky PRO APIs offer a wide range of Features that can simplify File Management and improve user interaction. With these interfaces, Developers can automate processes and integrate Dokky PRO features into their applications. Using the various endpoints, you can manage files, get statistics, and monitor comments, all in a secure and efficient way.

Try it!
Live Demo

Spread the love

Team ScriptNet

Since 2014 ScriptNet Solutions, Software House with active patents, was born to give concrete Internet Solutions to Small and structured Web Marketing Agencies, Web Developers and Affiliate Programs Tools. Official Blog