Access to content, users and roles

Constructor

@:keepnew (api:Api)

Methods

@:keepcreateRole (name:String):RoleApi

Create a new role

@:keepcreateUser (request:UserCreationRequest):UserApi

Create a new user

@:keepgetFileByName (path:String):Null<FileApi>

Get a file by name - formatted as "storage/project/file.ext"

@:keepgetProject (key:String):ProjectApi

Returns a ProjectApi instance for a given project key.

Use a project to modify content.

See ProjectApi for more info.

@:has_untyped@:keepgetProjects ():Array<ProjectApi>

Get all projects

@:has_untyped@:keepgetRoles ():Array<RoleApi>

Get all roles

@:keepgetUserByEmail (email:String):UserApi

Get a user by their email address

@:keepgetUserByID (id:Int):UserApi

Get a user by ID

@:has_untyped@:keepgetUsers ():Array<UserApi>

Get all users

@:keepinviteUser (email:String, secure:Bool, ?mailOptions:InviteMailOptions):UserApi

Create a new user and send an invite, returns the newly created user.

If secure is set the link to the registration page uses the https protocol.

Content of the invite mail can be changed using mailOptions, see InviteMailOptions for more info.

@:keepremoveFileByName (path:String):BackendApi

Remove a file by name - formatted as "storage/project/file.ext"

Static methods

@:keepstaticgetApiUser ():User