In addition to this API, the web interface will use the same request format and supply some additional actions.
The API is using our new model of access. Instead of a user <-> group model, we're using user <-> organisation. If you're having trouble at this early stage, just use the 'administrator' or 'open-audit_enterprise' account(s). We have not created the GUI screens to associate a user to an organisation as yet. If you wish to use another account you could run the below SQL directly to create the association:
INSERT INTO oa_user_org VALUES (NULL, $user_id, $org_id, 10, '');
Where your new $user_id and $org_id can be found in the Open-AudIT web interface.
The API uses a cookie. You can request a cookie by sending a POST to the URL below, containing the username and password attributes and values:
To create a resource, you should POST the required data.When POSTing data, you must include an access token. An access token is generated with every request type, so make a GET (for example) and Accept: applicaiotnapplication/json, parse the response for meta→access_token, and include that with your request. This will be in the field data[access_token], IE, the top level.