Teams API

Teams API

INTRODUCTION

Teams API allows creating and editing Teams. 


AUTHENTICATION

A suite user token obtained via the login API must be provided in the request headers as a bearer token.

Authorization: Bearer <user-token>

GET TEAMS

Provides a way to get a list of teams of a Suite Organization.

Path: /api/teams
Method: GET 

PARAMETERS

Name
Type
Requirement
Description
action
String
Mandatory
getTeams
organizationId
Number
Mandatory
Suite Organization ID


EXAMPLE 

SUITERC EXAMPLE

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=getTeams&organizationId=1909009
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?organizationId\=1909009\&action\=getTeams


SUCCESSFUL RESPONSE

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok". 

{
"teams": [

    {
      "id": 4039601,
      "description": "",
      "name": "Icareus Testers"

},

{
      "id": 4035101,
      "description": "",
      "name": "Kitchen sink"

},

{
      "id": 4037001,
      "description": "",
      "name": "The last one"

}

],
  "status": "ok"
}


ERROR RESPONSE 

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


GET TEAM

Provides a way to get a single team of a Suite Organization based on the teamId.

Path: /api/teams
Method: GET 

PARAMETERS 

Name
Type
Requirement
 Description
action
String
Mandatory
getTeam
organizationId
Number
Mandatory
Suite Organization ID
teamId
Number
Mandatory
ID of the Team

EXAMPLE 

SUITERC EXAMPLE 

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=getTeam&organizationId=1909009&teamId=4039601
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=getTeam\&organizationId\=1909009\&teamId\=4039601


SUCCESSFUL RESPONSE 

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok". 

{
  "status": "ok",
  "team": {
    "id": 4039601,
    "users": [
      {
        "lastName": "Kuikka",
        "userId": 3992501,
        "ismRole": "",
        "screenName": "mievaan",
        "emailAddress": "pasi@a.com",
        "firstName": "Pasi"

}, {

        "lastName": "Smith",
        "userId": 3999901,
        "ismRole": "Account User",
        "screenName": "blaa",
        "emailAddress": "john@a.com",
        "firstName": "John"

} ],

    "description": "",
    "name": "Icareus Testers"
  }


ERROR RESPONSE 

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


CREATE TEAM 

Provides a way to create a team.

Path: /api/teams
Method: GET 

PARAMETERS

Name
Type
Requirement
Description
action
String
Mandatory
createTeam
organizationId
Number
Mandatory
Suite Organization ID
name
String
Mandatory
Name of the Team
description
String
Optional
Description of the Team

EXAMPLE 

SUITERC EXAMPLE 

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=createTeam&organizationId=1909009&name=team%20api%20test%20%edited&description=description
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=createTeam\&organizationId\=1909009\&name\=team\%20api\%20test\%20edited\&description\=description

SUCCESSFUL RESPONSE 

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok".

{
  "message": "team created",
  "status": "ok",
  "team": {
    "id": 9576301,
    "users": [],
    "description": "description",
    "name": "test team"

}



ERROR RESPONSE 

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


DELETE TEAM

Provides a way to delete a team of a Suite Organization based on the teamId.

Path: /api/teams
Method: GET

PARAMETERS 

Name
Type
Requirement
Description
action
String
Mandatory
deleteTeam
organizationId
Number
Mandatory
Suite ORganization ID
teamId
Number
Mandatory
ID of the Team

EXAMPLE 

SUITERC EXAMPLE

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=deleteTeam&organizationId=1909009&teamId=9536101
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=deleteTeam\&organizationId\=1909009\&teamId\=9536101

SUCCESSFUL RESPONSE 

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok". 

{
  "message": "team deleted",
  "status": "ok"
} 

ERROR RESPONSE

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


EDIT TEAM

Provides a way to edit a team of a Suite Organization based on the teamId.

Path: /api/teams
Method: GET 

PARAMETERS

Name
Type
Requirement
Description
action
String
Mandatory
editTeam
organizationId
Number
Mandatory
editTeam
teamId
Number
Mandatory
ID of the Team
name 
StringOptional
New name for the Team
description
String
Optional
New description for the Team

EXAMPLE 

SUITERC EXAMPLE 

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=editTeam&organizationId=1909009&name=edited%20team&description=edited%20team%20description&teamId=9576301
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=editTeam\&organizationId\=1909009\&name\=edited\%20team\%20description\&teamId\=9576301

SUCCESSFUL RESPONSE 

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok". 

{
  "message": "team updated",
  "status": "ok",
  "team": {
    "id": 9576301,
    "users": [],
    "description": "edited team description",
    "name": "edited team"

}



ERROR RESPONSE 

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


LIST AVAILABLE USERS

Returns a list of available users that can be added to the provided team.

Path: /api/teams
Method: GET 

PARAMETERS

Name
Type
Requirement
Desciption
action
String
Mandatory
getAvailableUsers
organizationId
Number
Mandatory
Suite Organization ID
teamId
Number
Mandatory
ID of the Team

EXAMPLE 

SUITERC EXAMPLE 

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=getAvailableUsers&organizationId=1909009&teamId=9576301
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=getAvailableUsers\&organizationId\=1909009\&teamId\=9576301

SUCCESSFUL RESPONSE 

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok". 

{
  "message": "success",
  "users": [
    {
      "lastName": "User1",
      "userId": 6076801,
      "ismRole": "Account User",
      "screenName": "testaccountuser",
      "emailAddress": "testaccountuser1@icareus.com",
      "firstName": "Test"

},

{
      "lastName": "X",
      "userId": 6746401,
      "ismRole": "IsmSubscriber",
      "screenName": "pjotrix",
      "emailAddress": "pjotrix@hotmailx.com",
      "firstName": "pjotri"

},

{
      "lastName": "User",
      "userId": 8453202,
      "ismRole": "Account Admin",
      "screenName": "testtestuser",
      "emailAddress": "test.user@icareus.com",
      "firstName": "Test"

}

],
  "status": "ok"
}

ERROR RESPONSE 

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


ADD USER TO TEAM

Provides a way to add a given Suite user to the provided Team.

Path: /api/teams
Method: GET 


PARAMETERS

Dame
Type
Requirement
Description
action
String
Mandatory
getAvailableUsers
organizationId
Number
Mandatory
Suite Organization ID
teamId
Number
Mandatory
ID of the Team
userId
Number
Mandatory
ID of the user to be added to the Team

EXAMPLE 

SUITERC EXAMPLE

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=addTeamUser&organizationId=1909009&teamId=9576301&userId=4035901
curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=addTeamUser\&organizationId\=1909009\&teamId\=9576301\&userId\=9576301


SUCCESSFUL REPSONSE

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok".

{
  "message": "user added to team",
  "status": "ok",
  "team": {
    "id": 9576301,
    "users": [
      {
        "lastName": "Admin",
        "userId": 4035901,
        "ismRole": "Account Admin",
        "screenName": "ossiadmin",
        "emailAddress": "ossiadmin@icareus.com",
        "firstName": "Ossi"

}

],
    "description": "edited team description",
    "name": "edited team"
  }


ERROR RESPONSE

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 


REMOVE USER FROM TEAM

Provides a way to add a given Suite user to the provided Team.

Path: /api/teams
Method: GET 

PARAMETERS

Name
Type
Requirement
Description
action
String
Mandatory
getAvailableUsers

organizationId 

Number
Mandatory
Suite Organization ID
teamId
Number
Mandatory
ID of the Team
userId
Number
Mandatory
ID of the user to be removed

EXAMPLE 

SUITERC EXAMPLE 

This is just an example meant to demonstrate what a correct call and response might look like, the request might not actually work if ran.

            https://suiterc.icareus.com/api/teams?action=removeTeamUser&organizationId=1909009&teamId=9576301&userId=4035901

curl -i -H Authorization\:\ Bearer\ user_token -H Content-Type\:\ application/json -XGET
https\://suiterc.icareus.com/api/teams\?action\=removeTeamUser\&organizationId\=1909009\&teamId\=9576301\&userId\=4035901

SUCCESSFUL RESPONSE 

A successful response will have the HTTP Status code 200 and the JSON response will contain "status": "ok". 

{
  "status": "ok",
  "team": {
    "id": 9576301,
    "users": [],
    "description": "edited team description",
    "name": "edited team"

}



ERROR RESPONSE 

An error response will have a non-200 HTTP Status code and the JSON response will contain "status": "error" as well as "message": "what-went-wrong" 





    • Related Articles

    • Recycle Bin API

      Introduction This API allows you to manage the recycle bin. Please note that this API is only meant for managing assets that are already in the recycle bin. If the recycle bin feature is enabled for a an Organizatino, deleting an asset via the ...
    • Analytics API (ENG)

      INTRODUCTION This API stores video access/usage statistics for the linear channels and vod items. API PATH /api/analytics API METHODS ADDING NEW RECORD Adds a new analytics record of either on-demand video usage or linear channel viewing statistics ...
    • OEMBED API (ENG)

      INTRODUCTION This API is used to query for oEmbed objects for video page URL(s) on Icareus Suite sites. Note Suite oEmbed API only supports JSON responses for now API PATH /api/oembed API GET OEMBED OBJECT REQUEST /api/oembed Parameters: Name Value ...
    • Devices API (ENG)

      INTRODUCTION Devices API is used to register devices to the server and get device specific information/configurations from the server. API PATH /api/devices It is recommended to use POST request. Latest version: 02 API METHODS REGISTER A DEVICE ...
    • Channels Management API

      Introduction This API is used to manage Linear Channels. Authorization All requests made to the following API endpoints require a token. The token should be provided in the headers as: Authorization: Bearer <token> The token should either be a valid ...