Priotice REST API

Priotice REST API provides programmatic access to read and write the Priotice data. Organization data, prioritization process and all its components can be read, modified or deleted using the REST API.

Process

  1. Create a new prioritization POST create prioritization
  2. List criteria and sub-criteria. POST create criteria
  3. List alternatives. POST create alternative
  4. List groups. POST create group
  5. List users to groups. POST create user
  6. Invite participants. POST invite participants
  7. Check collect data status. GET prioritization collect status
  8. Stop collection and save data. POST save collected data
  9. Analyze GET prioritization analysis or get final prioritization result. GET final prioritization result

Overview

  • Authentication - your application will authenticate each request by sending an auth code. Connection to our API is stateless, no cookies are being used, therefore a valid auth code must be sent along with each request.
  • Requests - you can make GET and POST requests. When making a GET request (list or delete data) all data is being sent as part of the request string. When making a POST request (create or update data) your application will send both a query string and the POST data.
  • Response - our API will return a JSON formatted response. Response will always return the status which can be "error" or "success" and, when data was requested (GET), it will return "Data", an array containg the requested data.

Requests and parameters

The request URL is comprised of:

  • The absolute URL of our API - https://api.priotice.se/rest/ - always required.
  • The auth code - {auth} - always required.
    You can find the API auth code after you login to your Priotice account, on the Dashboard page, under the Summary tab.
  • The resource that is being addressed - that can be /organization, /prioritization, /criteria, /alternative, /group, /user - always required.
  • The action performed on the specified resource: /list, /create, /delete, /update, /collect, /analyze - always required.
  • The identifier of a particular resource - /{identifier} - that is an integer value, that represents the identifier of a prioritization, criteria, alternative, group and so on - sometimes required.

Errors

While executing a request if anything goes wrong, an "error" status is being returned, along with an error code and an error message.
No data is being returned on errors.
Data is being returned only on the "success" status which indicates that the request has been executed as expected.

Errors that can be returned are defined as:

Error code Error message
101No authentication code
102Bad authentication code
103Database error
104Resource not requested
105Resource inexistent
106No action
107Undefined action
108Resource not found
109No POST parameters
110Required POST parameter missing
111Forbidden
112Invalid POST parameter
113POST parameter duplicates existing values
114Resource identifier required
115No data