-
Notifications
You must be signed in to change notification settings - Fork 0
How to start
This APIs wrap some of the CrwodComputer operations, such as CRUD for processes, tasks, task instances and users (write us for this).
The APIs are built with the idea of providing an easy access to CroCo functionalities to build new applications on top of it (see SurveyManager)
First of all, APIs have a two token authentication One token is to identify your application. One token is to identify the user, so whoever is using the API through your application.
This token can be generated via the CrowdComputer UI from this url: crowdcomputer.org/dev/app/ (Login is required).
For this token we implemented a Django APP, so if you are using Django pls include the app and the login and token will be magically handled by this app. The token will then available in the session: session['token']
If you are not using django, you have to redirect the user to http://www.crowdcomputer.org/apilogin?from= where after form
you have to put your page that will handled the response.
This page will call back the form page passing as parameter the token in this form ?token=*
To create an API class you have to pass:
- user token
- app token
- url of the crowdcomputer (www.crowdcomputer.org)
myapi=API('123456789','0987654321','https://crowdcomputer.org')
If not specified, and you are createing a Django Application, the API class will try to search into your settings.py these parameters.
- processList
- processCreate
- processDetails
- createTask
- taskList
- startStopProcess
- taskInstances
- taskInstanceStatuses
- taskInstanceDetail
- userGetOrCreate
- userDetail
- updateInsance
- whoami
- contactUser
- notifyCreator
- createReward