Initializing and Creating a Session
Function
Initialize and create a session.
URI
POST /koodrive/ose/v1/session/
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Traceid |
No |
String |
Message log trace ID. The value contains 58 bits. |
language |
No |
String |
Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
code |
Yes |
String |
Authorization code. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
Integer |
Response code. |
msg |
String |
Response information. |
data |
SessionUserDto object |
Authorization code required by the service API. |
Parameter |
Type |
Description |
---|---|---|
accessToken |
String |
Authorization code required by the service API. |
sessionId |
String |
Session ID. |
userId |
String |
User ID. |
userInfo |
SessionUserInfo object |
Enterprise-level user information. |
Parameter |
Type |
Description |
---|---|---|
role |
String |
Role.
|
userName |
String |
Username. |
innerUserId |
String |
Internal user ID. |
userId |
String |
External user ID. |
tenantId |
String |
Tenant code, that is, enterprise code. |
orgId |
String |
orgId |
orgName |
String |
Name in OrgID. |
xHwSchema |
String |
Database object set allocated to the tenant. |
userCount |
Integer |
Number of users. |
deptId |
String |
Department ID. |
Example Requests
Request for initializing a session.
POST /koodrive/ose/v1/session { "code" : "FrbMohdqi86v6sMZlFSSuG3E0_9RsDpL08BlYfNQPhvibLET266cQhDI_WczEXJOAoIoKGCdqN2shKX1yfqrVci8nSFdMlxljNFhoffVvH93uSzIoyFxK4P7yhY6fDXa", "domain" : "kdconsole-***-***.************.cn:8080" }
Example Responses
Status code: 200
Session response information.
{ "data": { "accessToken": "Bearer 6ebb6266dd5cdefa1d7126af2eb6173ce0a054d8ba4295be", "sessionId": "c17c8903e9382a0aa1b82e9d42cb82ba12760a18d6cf018d", "userId": "1008600000701011122", "userInfo": { "role": "2", "userName": "199******04", "innerUserId": "1574641576007768198", "userId": "1008600000701011122", "tenantId": "28389189a7744593a59940c0d0fcd451", "orgId": "9190086000001721760", "orgName": "lym09", "deptId": "1574641574824974465", "userCount": 40, "xhwSchema": "tenants1_liantiao" } }, "code": 0, "msg": "Successful" }
Status Codes
Status Code |
Description |
---|---|
200 |
Session response information. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot