API: Teams & App Users

This Developer API lets you manage teams & users of an app. If not marked otherwise, all endpoints require authentication with an API token.

List Teams

List all teams for an account.

GET /api/2/teams

Parameters:

  • page - optional, used for pagination

  • per_page - optional, the number of items to be present in the response (25, 50, 100); default is 25

Example:

curl \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/teams

Response:

{
    "teams": [
        {
            "id": 23,
            "name": "Bit Stadium GmbH Owners"
        },
        {
            "id": 42,
            "name": "External Testers"
        },
    ],
    "status": "success",
    "current_page": 1,
    "per_page": 25,
    "total_entries": 2,
    "total_pages": 1
}

List Teams of App

List the teams that are assigned to an app.

GET /api/2/apps/APP_ID/app_teams

Example:

curl \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_teams

Response:

{
    "teams": [
        {
            "id": 23,
            "name": "Bit Stadium GmbH Owners"
        },
        {
            "id": 42,
            "name": "External Testers"
        },
    ],
    "status": "success",
    "current_page": 1,
    "per_page": 25,
    "total_entries": 2,
    "total_pages": 1
}

List Users of App

List all users of an app.

GET /api/2/apps/APP_ID/app_users

Example:

curl \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_users

Response:

Status: 200
Body:
{
    "app_users": [
        {
            "role": 0,
            "id": 1234,
            "user_id": 23,
            "full_name": "Thomas Dohmke",
            "email": "thomas@dohmke.de"
        },
        {
            "invited_at": "2011-10-26T16:55:35Z",
            "role": 3,
            "id": 4567,
            "user_id": 42,
            "full_name": "Joe Tester",
            "email": "joe@hockeyapp.net"
        }
    ]
}

The field "role" is defined as follows:

  • 0 - owner
  • 1 - developer
  • 2 - member
  • 3 - tester

Add Team to App

Add a team to an app.

PUT /api/2/apps/APP_ID/app_teams/ID

Replace ID with team's id (see List Teams).

Example:

curl \
  -X PUT \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_teams/42

Response:

{
    "app_users": [
        {
            "id": 12345,
            "role": 0,
            "created_at": "2013-01-06T15:39:54Z",
            "email": "thomas@dohmke.de",
            "full_name": "Thomas Dohmke",
            "tags": ""
        }
    ],
    "team": {
        "id": 42,
        "name": "External Testers"
    },
    "status": "success"
}

Invite User to App

Invite a user to an app.

POST /api/2/apps/APP_ID/app_users

Parameters:

  • email - required, email of the new user

  • first_name - optional, first name of the new user; only set if the user does not exist

  • last_name - optional, first name of the new user; only set if the user does not exist

  • message - optional, text message which is added to the invitation email

  • role - optional, set to 1 for developers, 2 for members, and 3 for testers (default)

  • tags - optional, comma-separated list of tags for this user

Example:

curl \
  -F "email=thomas@dohmke.de" \
  -F "first_name=Thomas" \
  -F "last_name=Dohmke" \
  -F "role=3" \
  -F "tags=internal,codenauts" \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_users

Response:

Status: 200
Body:
{
    "email": "thomas@dohmke.de",
    "id": 10283,
    "full_name": "Thomas Dohmke",
    "pending": true,
    "invited_at": "2012-01-13T14:21:17Z",
    "tags": "codenauts,internal",
    "role": 3
}

Check Membership of App

Check if the specified user is a member of this app. This endpoint does not require an API token.

GET /api/2/apps/APP_ID/app_users

Parameters:

  • email - required, email of the new user

  • secret - required, secret of the app (see app page)

Example:

curl \
  "https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_users/check?email=thomas@dohmke.de&secret=b3c397c516d00046a8970b7512ca62e9"

Update User

Update the role and tags of a user.

PUT /api/2/apps/APP_ID/app_users/ID

Parameters:

  • role - optional, set to 1 for developers, 2 for members, and 3 for testers (default)

  • tags - optional, comma-separated list of tags for this user

Example:

curl \
  -F "role=2" \
  -F "tags=internal,qa" \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_users/1234

Remove Team from App

Remove a team from an app.

DELETE /api/2/apps/APP_ID/app_teams/ID

Example:

curl \
  -X DELETE \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_teams/42

Note that you can not delete the owner of an app. The team members will be only removed from the app if they are not a member of another team.

Remove User from App

Remove a user from an app.

DELETE /api/2/apps/APP_ID/app_users/ID

Example:

curl \
  -X DELETE \
  -H "X-HockeyAppToken: 4567abcd8901ef234567abcd8901ef23" \
  https://rink.hockeyapp.net/api/2/apps/0873e2b98ad046a92c170a243a8515f6/app_users/1234

Note that you can not delete the owner of an app.