Difference between revisions of "API: File Uploads"

From Charitylog Manual
Jump to: navigation, search
 
(5 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
[[File:helpheader_small.png|right]]
 
[[File:helpheader_small.png|right]]
  
You can upload files against clients and referrals, these can only be uploaded to Amazon S3.
+
You can upload files against clients and referrals. Like the web application, these are stored on Amazon S3.
  
[POST] https://api.dizions.co.uk/v2/clients/id/CLIENT_ID/uploads
+
[POST] https<nowiki/>://api.dizions.co.uk/v2/clients/id/CLIENT_ID/uploads
  
[POST] https://api.dizions.co.uk/v2/referrals/id/REFERRAL_ID/uploads
+
[POST] https<nowiki/>://api.dizions.co.uk/v2/referrals/id/REFERRAL_ID/uploads
  
In the body you'll need the files along with user_visibility and group_visibility settings which are IDs (comma separated if there's more than one)
+
In the body you'll need:
 +
* the files
  
 +
and optionally:
 +
* user_visibility, which is a comma separated list of user ids who are allowed to access the files
 +
* group_visibility, which is a comma separated list of group ids who are allowed to access the files
 +
 +
If a list of users and/or groups is not specified, the files will be visible to all users.
 +
To get a list of users, call:
 +
[GET] https<nowiki/>://api.dizions.co.uk/v2/dictionary/user
 +
The user group ids are not currently available in the API.
 
----
 
----

Latest revision as of 13:55, 1 May 2024

Go to API overview

Helpheader small.png

You can upload files against clients and referrals. Like the web application, these are stored on Amazon S3.

[POST] https://api.dizions.co.uk/v2/clients/id/CLIENT_ID/uploads
[POST] https://api.dizions.co.uk/v2/referrals/id/REFERRAL_ID/uploads

In the body you'll need:

  • the files

and optionally:

  • user_visibility, which is a comma separated list of user ids who are allowed to access the files
  • group_visibility, which is a comma separated list of group ids who are allowed to access the files

If a list of users and/or groups is not specified, the files will be visible to all users. To get a list of users, call:

[GET] https://api.dizions.co.uk/v2/dictionary/user

The user group ids are not currently available in the API.