API IntroOur API is available for all apps hosted on orga.zone. During development on your own servers, you can use the "ID token" to avoid cross-domain problems.
The idea is pretty simple: we offer a form builder and a simple, but robust REST API for anybody, who needs some backend features on their mobile apps. We have a strong focus on business apps. So part of the packages we offer are SSL certificates and free subdomains, if you upload your web app to us.
This also includes an integrated user management for you. The entry point for the API is: and the first thing you have to do, to use it: login as a valid user!
The form sends a confirmation email with a link that MUST be clicked to activate the user. See under "sessions" how to start a verified session with a login.
For that you may use the REST parameter &formid=<ID>
Database StorageAt its core, the API is your simple toolbox to our database table for data management. While we have some extra caching and index in place ABOVE the table, it helps you to understand the approach to take a look at the table itself:
SessionsOnce a user is registered, you can login the user with his email and password from your app. You create a session and you also get a session token (cross domain capability!) back - the token is optional.
Get User DetailsThe "showuser" command gives you details about the currently logged in user:
Get User By eMailFor communication apps and other apps with many users in one dataspace, you can fetch information about the users by eMail. If the user exists for a specific app, display his/her info via email. eMail is URL-encoded.
Update User Profile DetailsThe active user has a JSON encoded PROFILE in his details, you can set freely...
Setting appdata as the new profile:
and pushing this as a JSON field:
Invite an user to your appFor teamwork apps and every app you want to invite others to use, we have a process ready, creating an invite form with automated confirmation of the account. If the user does not exist, it will be created with a random password and invited to your app.
The destination link should be on your subdomain and we append the value ?to=<email> to the URL
Get StatusThe "status" gives you the latest primary key and the amount of entries in the database for your app. You can filter with different additional values, that many developers need to sort and categorize their requests for different tasks:
Push DataWith this you put data into the database. You have several fields to sort and categorize the data that is pushed. You may also assign the data to a form that you have created before, so the data will be visible in the administration area.
If you do not address a specific, existing form ID, the data is not visible in the administration area!
You get the database entry ID back - this is the unique primary index in the table (OZINDEX).
Pull DataThe counterpart to retrieve data out of the API is called "pull":
Request by IDWhen you push data up, you will get an UNIQUE ID as an big integer value. You can use this value to retrieve one specific entry.
Search data freely by keyword
Uses the sphinx search daemon to find up to 1000 entries with a certain keyword. Keyword URL encoded in appdata.
Update EntriesYou can also update existing data entries:
Delete EntriesAnd naturally delete an existing entry...
Upload FilesTo save a picture or document, the API also supports file uploads:
Download FilesUploaded files are only available to registered users in an app. So direct linking is not allowed and must be routed thru the API. The name of the file is only the basename and the directory is created by the function.
Delete FilesThere is one entry point in the API to delete the physical file AND the database entry of it.
Search FilesYou can search only for files, if you want to filter these out. All filter strings work accordingly.
SendmailAs a registered user you can send emails out of your app. The command is named "sendmail" and
takes the receiver, subject, text and even attachments from the appdata block.
to: [email protected]
subject: just a test
text: this may contain simple HTML code as well
attachment: dsc02342.jpg (optional - that file must exist in the app specific upload directory)