Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Background
This is a REST API meant to provide a list of all OKR views accessible to the current user. Users are granted as many permissions as the actual users have through their UpRaise roles.
API Details
This API will require valid authentication & will expect the user API token in the request.
Read Create User API token for more detailsEnd
Base URL - <baseurl>/rest/upraise/public/1.0/okr/views
Below are the end points for this API based on which UpRaise app you are using
App name | Endpoint |
---|---|
UpRaise for Employee Success | https://employee-success.upraise.io/rest/upraise/public/1.0/okr/views |
UpRaise People |
Request parameters
Response expected from this API endpoint is detailed below -
Parent | Parameter | Type | Description | Possible values |
---|---|---|---|---|
startAt | Numeric | This will show the starting index for the search results. | ||
maxResults | Numeric | This will show the max number of results on any given page. | Maximum allowed value of 50. If more than 50 value is sent in the request, the app will consider 50. | |
total | Numeric | This will indicate how many results in total exist for the given search. | ||
results | id | Numeric | Unique ID of the view. | 1, 2, 450 etc |
results | name | String | Name of the view as is shown in the app interface. | |
results | category | String | Identifies what category the given view belongs to. |
|
Sample JSON response
Here’s how the response JSON would look like with sample data -
Code Block | ||
---|---|---|
| ||
{ "startAt": 1, "maxResults": 10, "total": 3, "results": [ { "id": 1, "name": "all objectives", "category": "default views" }, { "id": 2, "name": "Anand's objectives", "category": "my views" }, { "id": 3, "name": "QA team", "category": "views shared with me" } ] } |
Some points to note
Views in the response will be paginated with max 50 results at the top. If the request has set this parameter to anything more than 50 or less than 1, then the app will treat that value as 50. Users can dictate which page they want to look at by using the startAt & maxResults parameters in the request.
Views in the response are be sorted by their categories & then their IDs. Meaning, Default views will be at the top followed by My views & then Views shared with me (same as they are displayed with app). And within each one of the categories, views whose id is smallest will appear at the top followed by the others.
This REST API always return the views that are related to the user whose token was sent in the request.
Response parameters
Parent | Parameter | Type | Description | Possible values or Examples |
---|---|---|---|---|
results | id | Numeric | View id are assigned as the views are created in system. Same ids are returened for the relevant view | 1, 2,3,4, etc. |
results | name | String | View name are the titles of the view created in system |
|
results | category | String | There are three different categories of OKR views in UpRaise. These categories are diplayed within app when clicked on the views dropdown. In response, you will get one of the below categories for views -
|
|
Error handeling
Scenario | Error | Details |
---|---|---|
Missing API token | errorMessage - This API requires authentication. Please add your API token in the request. | Should be handled at the API authentication layer. |
Invalid API token | errorMessage - The API token in the request is invalid. Please use a different one. | Should be handled at the API authentication layer. |
No OKR views available | errorMessage - There are no OKR views available for this user. | |
No access to OKR module | errorMessage - This user does not have the permission to view OKRs. |
On this page | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Iframe | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|