Using REST API for Upload Quotas

The example below can be used to get and set upload quotas for specific users. As usual, you will need to change the user name, user folder, and so on.

Copy
################################################################################
###This Request GETS the "Upload Quota at USR folder level"
###
GET https://{{host}}/admin/v2/sites/{{Siteid}}/filesystem/folders HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###
##################################################################################
#####    #########
##### GET the Folder structure and settings for a specifc User   #########
@User_Folder = AFAR
GET https://{{host}}/admin/v2/sites/{{Siteid}}/filesystem/folders/
%2Fusr%2F{{User_Folder}}%2F HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
##################################################################################
##### or ENTER THE USER NAME DIRECTLY ON THE CALL  #########
GET https://{{host}}/admin/v2/sites/{{Siteid}}/filesystem/folders/
%2Fusr%2Ftony%2F HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
##################################################################################
##### POST REQUEST TO CREATE A FOLDER WITH UPLOAD QUOTA ENABLED #########
###
@User_Folder = sofia
POST https://{{host}}/admin/v2/sites/{{Siteid}}/filesystem/folders/
%2Fusr%2F{{User_Folder}}%2F/folders HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": {
"type": "folder",
"attributes": {
"name": "Folder4",
"subFolder": "Folder4",
"uploadQuota": {
"emailsToReportToOnExceed": [
"gsqaaf1@gmail.com",
"gsqaaf2@gmail.com"
],
"enabled": true,
"limitMBytes": 150,
"usedMBytes": 0
}
}
}
}
##################################################################################
##### UPDATE SETTINGS OF A SPECIFIC FOLDER FOR A SPECIFIC USER  #########
@User_Folder = sofia
@FOLDER_NAME = FOLDER4
PATCH https://{{host}}/admin/v2/sites/{{Siteid}}/filesystem/folders/
%2Fusr%2F{{User_Folder}}%2F{{FOLDER_NAME}}%2f HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
{
"data": {
"attributes":{
"uploadQuota": {
"emailsToReportToOnExceed": [
"gsqaaf1@gmail.com",
"gsqaaf2@gmail.com"
],
"enabled": true,
"limitMBytes": 150,
"usedMBytes": 0
}
}
}
}
#########################################################################
############ DELETE A SPECIFIC FOLDER FOR A SPECIFIC USER  #######################
@User_Folder = sofia
@FOLDER_NAME = FOLDER4
###
DELETE https://{{host}}/admin/v2/sites/{{Siteid}}/filesystem/folders/
%2Fusr%2F{{User_Folder}}%2F{{FOLDER_NAME}}%2f HTTP/1.1
Authorization: EFTAdminAuthToken {{AuthToken}}
###