Table of Contents |
---|
Introduction
We have already seen how you can upload, edit and share filesusing the platform. Well then, there is a REST API available to perform these functions.
We will first see how to use this API directly, using a REST client such as Postman; then we will see how we can use this REST API through the available Java client.
...
Authentication
As you need authentication to perform these operations, except for GET in some cases, you need to authenticate using OAuth. To do this, you must send a GET request to the path '/api-ops/login/username/{username}/password/{password}', replacing the parameters in {curly braces}.
If the credentials are correct, you will receive an access token, "access_token".This is the token you will use in all your requests as an authentication header.
...
NOTE: Remember to include "Bearer" before the access token.
...
CRUD Operation
...
Upload a file (POST)
To upload a post, you must make a POST request to the 'controlpanel/binary-repository' endpoint, with two parameters in the body:
...