Categories API

Use the Categories API to list all the application categories in your organization and add an application to one or more categories. Categories are a way to group and classify apps on a mobile device. Users can display the contents of the App Catalog organized by category. An organization is pre-populated with several application categories.

Currently, you can add, edit, and delete categories through the Admin Portal only; you cannot perform these actions through the API. For more information, see Managing Categories.

Resources

GET /v1/categories/

List All Categories

Requires administrator privileges. Authenticate as an Apperian administrator.

Returns a list of all the categories for the authenticated user’s organization. The list includes a unique identifier (psk) for each category. This is the category_psk that you will need to provide to add an application to a category using the PUT /applications/<application>/categories resource.

Currently, you can add, edit, and delete categories through the Admin Portal only. For more information, see Managing Categories.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/categories/
Europe https://eu01ws.apperian.eu/v1/categories/

URL Parameters

None

Header Parameter

X-TOKEN
(Required) API token or User token (POST /users/authenticate). For more information, see Authentication.

Data Parameters

None

Example Request

curl -X GET https://na01ws.apperian.com/v1/categories/ --header "X-TOKEN: eTg8ktZXRqKIBJTHunwP6A"

Example Response

{
  "categories": [
    {
      "psk": 24166,
      "org_psk": 1062,
      "constant": "BOOKS",
      "name": "Books",
      "icon_path": "/icons/categories/books.png",
      "description": ""
    },
    {
      "psk": 24167,
      "org_psk": 1062,
      "constant": "BUSINESS",
      "name": "Business",
      "icon_path": "/icons/categories/business.png",
      "description": ""
    },
    {
      "psk": 24169,
      "org_psk": 1062,
      "constant": "EDUCATION",
      "name": "Education",
      "icon_path": "/icons/categories/education.png",
      "description": ""
    },
    {
      "psk": 24171,
      "org_psk": 1062,
      "constant": "EXECUTIVE",
      "name": "Executive",
      "icon_path": "/icons/categories/executive.png",
      "description": ""
    },
    {
      "psk": 24172,
      "org_psk": 1062,
      "constant": "FINANCE",
      "name": "Finance",
      "icon_path": "/icons/categories/finance.png",
      "description": ""
    },
    {
      "psk": 24173,
      "org_psk": 1062,
      "constant": "HEALTHCARE",
      "name": "Healthcare",
      "icon_path": "/icons/categories/healthcare.png",
      "description": ""
    },
    {
      "psk": 24174,
      "org_psk": 1062,
      "constant": "HR",
      "name": "Human Resources",
      "icon_path": "/icons/categories/human_Resources.png",
      "description": ""
    },
    {
      "psk": 24176,
      "org_psk": 1062,
      "constant": "NAVIGATION",
      "name": "Navigation",
      "icon_path": "/icons/categories/navigation.png",
      "description": ""
    },
    {
      "psk": 24177,
      "org_psk": 1062,
      "constant": "NEWS",
      "name": "News",
      "icon_path": "/icons/categories/news.png",
      "description": ""
    }
]
}
PUT /v1/applications/(application)/categories/

Add an Application to Categories

Requires administrator privileges. Authenticate as an Apperian administrator.

Add an application to a comma-separated list of categories. Specify each category with category, which is the id returned by the GET /categories resource. The list of categories that you specify will overwrite any categories to which the app was previously added, so this resource also provides a way of editing an application’s categories.

Currently, you can add, edit, and delete categories through the Admin Portal only. For more information, see Managing Categories.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/applications/<application>/categories
Europe https://eu01ws.apperian.eu/v1/applications/<application>/categories

URL Parameters

application
(Required) Unique ID for the app. DATA TYPE: string

Header Parameter

X-TOKEN
(Required) API token or User token (POST /users/authenticate). For more information, see Authentication.
Content-Type
(Required) Specifies the content type of the body of data sent with the request. Set to: application/json

Data Parameters

category_psk

(Required) Comma-separated list of the category_psks for the categories to which you want to add the application. For example:

"category_psk": [10334, 23788, 34678]

The categories you specify overwrite any categories to which the app was previously added. If you specify "category_psk": [], it removes the app from all previously assigned categories.

Example Request

The following example adds an application with app_psk 123 to three categories.

curl -X PUT https://na01ws.apperian.com/v1/applications/123/categories
--header "Content-Type: application/json" --header "X-TOKEN: hShU5OD-SiadD8gyC_K4HA"
--data '{"category_psk": [24188,24189,37022]}'

Example Response

The response lists all the categories to which the application was successfully added. If you specify an invalid category_psk in the request, that psk will not be listed in the response.

{
  "categories_assigned": [
    24188,
    24189,
    37022
  ]
}