Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

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

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.

  • Default views

  • My views

  • Views shared with me

Sample JSON response

Here’s how the response JSON would look like with sample data -

{
    "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

  • My team’s OKRs

  • My OKRs

  • All OKRs not updated since last 2 weeks

  • Company OKRs

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 -

  • Default views

  • My views

  • Views shared with me

  • Default views

  • My views

  • Views shared with me

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


  • No labels