ATTENTION

You're browsing the documentation for an development version of froxlor.
The current stable version's documentation can be found here.

DirProtections

DirProtections.add

add htaccess protection to a given directory

Permission

admin customer

Parameter

FieldTypeDescription
customeridintoptional, required when called as admin (if $loginname is not specified)
loginnamestringoptional, required when called as admin (if $customerid is not specified)
pathstring
usernamestring
directory_passwordstring
directory_authnamestringoptional name/description for the protection

Response

string as json-encoded array

DirProtections.get

return a directory-protection entry by either id or username

Permission

admin customer

Parameter

FieldTypeDescription
idintoptional, the directory-protection-id
usernamestringoptional, the username

Response

string as json-encoded array

DirProtections.update

update htaccess protection of a given directory

Permission

admin customer

Parameter

FieldTypeDescription
idintoptional the directory-protection-id
usernamestringoptional, the username
customeridintoptional, required when called as admin (if $loginname is not specified)
loginnamestringoptional, required when called as admin (if $customerid is not specified)
directory_passwordstringoptional, leave empty for no change
directory_authnamestringoptional name/description for the protection

Response

string as json-encoded array

DirProtections.listing

list all directory-protections, if called from an admin, list all directory-protections of all customers you are allowed to view, or specify id or loginname for one specific customer

Permission

admin customer

Parameter

FieldTypeDescription
customeridintoptional, admin-only, select directory-protections of a specific customer by id
loginnamestringoptional, admin-only, select directory-protections of a specific customer by loginname
sql_searcharrayoptional array with index = fieldname, and value = array with 'op' => operator (one of <, > or =),LIKE is used if left empty and 'value' => searchvalue
sql_limitintoptional specify number of results to be returned
sql_offsetintoptional specify offset for resultset
sql_orderbyarrayoptional array with index = fieldname and value = ASC|DESC to order the resultset by one or morefields

Response

string as json-encoded array count|list

DirProtections.listingCount

returns the total number of accessible directory protections

Permission

admin customer

Parameter

FieldTypeDescription
customeridintoptional, admin-only, select directory-protections of a specific customer by id
loginnamestringoptional, admin-only, select directory-protections of a specific customer by loginname

Response

string as json-encoded response message

DirProtections.delete

delete a directory-protection by either id or username

Permission

admin customer

Parameter

FieldTypeDescription
idintoptional, the directory-protection-id
usernamestringoptional, the username

Response

string as json-encoded array