Choose Organization¶
Select the organization that the user needs to use after login.
Request Format¶
POST https://{apigw-address}/app-portal-service/v2.1/session/set
Request Parameters (Header)¶
Name  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
Authorization  | 
Mandatory  | 
String  | 
The access token (or bearer token). Refer to Log In or Refresh Access Token to learn how to get the access token.  | 
Request Parameters (Body)¶
Name  | 
Mandatory/Optional  | 
Data Type  | 
Description  | 
|---|---|---|---|
orgId  | 
Mandatory  | 
String  | 
The organization ID.  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
data  | 
Data Struct  | 
The details of the organization.  | 
data Struct¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
userId  | 
String  | 
The user ID.  | 
userName  | 
String  | 
The user name.  | 
currentOrgId  | 
String  | 
The current organization ID.  | 
currentOrgName  | 
String  | 
The current organization name.  | 
accessToken  | 
String  | 
The access token in the request.  | 
refreshToken  | 
String  | 
The new refresh token.  | 
refreshTokenExpire  | 
String  | 
The refresh token expiration time in UTC format. For the time format, see ISO8601 Standard Time Formats Used by UTC  | 
Samples¶
Request Sample¶
url: https://{apigw-address}/app-portal-service/v2.1/session/set
headers: {"Authorization":"yourBearerToken"}
method: POST
requestBody:
{
  "orgId":"yourOrgId"
}
Return Sample¶
{
  "code": 200,
  "message": "",
  "data": {
    "userId": "yourUserId",
    "userName": "portal_demo",
    "currentOrgId": "yourOrgId",
    "currentOrgName": "Portal Demo",
    "accessToken": "yourBearerToken",
    "refreshToken": "yourRefreshToken",
    "refreshTokenExpire": 1570018958000
  }
}