KB User's Guide - API - Groups

This document provides information in the Group API for the KnowledgeBase.

Title

Get Groups

Calls externally-available group spaces that are hosted under the specified site domain.

Collection Endpoint

[KB site domain]/[subsite (optional)]/api/v1/groups

Example: https://kb.wisc.edu/api/v1/groups or https://kb.wisc.edu/helpdesk/api/v1/groups

Method

GET

URL Params

Note: All URL params are optional.

parameter type description
query text string one or more search terms, separated by a plus sign (plus sign)

Collection Sample Response

{
  "_links": {
    "self": {
      "href": "https://kb.wisc.edu/api/v1/groups?page=1"
    },
    "first": {
      "href": "https://kb.wisc.edu/api/v1/groups"
    },
    "last": {
      "href": "https://kb.wisc.edu/api/v1/groups?page=11"
    },
    "next": {
      "href": "https://kb.wisc.edu/api/v1/groups?page=2"
    }
  },
  "_embedded": {
    "group": [
      {
        "id": "1",
        "groupId": "1",
        "groupName": "DoIT Help Desk",
        "groupNameShort": "DoIT Help Desk",
        "groupDir": "helpdesk",
        "groupStartDate": "1999-09-10",
        "_links": {
          "self": {
            "href": "https://kb.wisc.edu/api/v1/groups/1"
          }
        }
      },
      {
        "id": "2",
        "groupId": "2",
        "groupName": "Systems & Network Control Center",
        "groupNameShort": "SNCC",
        "groupDir": "sncc",
        "groupStartDate": "2001-04-19",
        "_links": {
          "self": {
            "href": "https://kb.wisc.edu/api/v1/groups/2"
          }
        }
      },

      ...

      }
    ]
  },
  "page_count": 11,
  "page_size": 25,
  "total_items": 257,
  "page": 1
}

Entity Endpoint

/api/v1/groups/[group_id]

Example: /api/v1/groups/1

Entity Sample Response

{
  "id": "1",
  "instId": "1",
  "groupId": "1",
  "groupName": "DoIT Help Desk",
  "groupNameShort": "DoIT Help Desk",
  "groupDir": "helpdesk",
  "groupMobileApp": "1",
  "_links": {
    "self": {
      "href": "https://kb.wisc.edu/api/v1/groups/1"
    }
  }
}

Success Response

Code: 200 OK
Content: Content-type: application/hal+json

Error Response

Code: 403 Forbidden
Content: {"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Forbidden","status":403,"detail":"Forbidden"}

OR

Code: 404 Page Not Found
Content: Page not found.

OR

Code: 405 Method Not Allowed
Content: None

OR

Code: 500 Unexpected error
Content: { error : "Error producing an iterator" }

Notes

N/A

See Also: