Hi team, is Java SDK deprecated? My

Hi team, is Java SDK deprecated? My team's cluster was recently updated to 9.12.0cl and we started facing issues sharing objects using the SDK (rest-api-sdk-lib-1.11.0) . Posting code snippet and error message in thread.
2 Replies
ketchup
ketchupOP8mo ago
val shareReq = new TspublicRestV2SecurityShareTsobjectRequest(); shareReq.setId(objectIds); shareReq.setType(ShareObjectTypeEnum.DATAOBJECT); val permissionJson = "{\"permissions\": {\"%s\": {\"shareMode\": \"%s\"}}}" .formatted(groupResp.getId(), "READ_ONLY"); shareReq.setPermission(permissionJson); shareReq.setNotify(ShareObjectNotifyEnum.ENUM_FALSE); adminClient.getSecurityController().shareObject(shareReq); { "message": "AxiosError: Request failed with status code 500", "locations": [ { "line": 2, "column": 3 } ], "path": [ "restapiV2__shareObject" ], "extensions": { "service": "CALLOSUM", "upstreamResponse": { "data": { "code": 13006, "incident_id_guid": "672cbf96-9b97-42d2-b410-b2e78f797da6", "trace_id_guid": "672cbf96-9b97-42d2-b410-b2e78f797da6", "debug": "[\"Invalid Enum for Logical Table type\",\"\"]" }, "status": 500 }, "code": "UPSTREAM_FAILURE" } } Here is the code snippet and error message I get when I call it with user with ADMINISTRATION privilege. For more context, I can successfully call the following endpoint with ShareObjectTypeEnum values LIVEBOARD and ANSWER, but not with COLUMN and DATAOBJECT values. Code: val shareReq = new TspublicRestV2SecurityShareTsobjectRequest(); shareReq.setId(objectIds); shareReq.setType(ShareObjectTypeEnum.DATAOBJECT); val permissionJson = "{\"permissions\": {\"%s\": {\"shareMode\": \"%s\"}}}" .formatted(groupResp.getId(), "READ_ONLY"); shareReq.setPermission(permissionJson); shareReq.setNotify(ShareObjectNotifyEnum.ENUM_FALSE); adminClient.getSecurityController().shareObject(shareReq); Error: { "message": "AxiosError: Request failed with status code 500", "locations": [ { "line": 2, "column": 3 } ], "path": [ "restapiV2__shareObject" ], "extensions": { "service": "CALLOSUM", "upstreamResponse": { "data": { "code": 13006, "incident_id_guid": "672cbf96-9b97-42d2-b410-b2e78f797da6", "trace_id_guid": "672cbf96-9b97-42d2-b410-b2e78f797da6", "debug": "[\"Invalid Enum for Logical Table type\",\"\"]" }, "status": 500 }, "code": "UPSTREAM_FAILURE" } }
ashish
ashish8mo ago
Yes, Java SDK is deprecated. Its based on deprecated endpoints (which were deprecated in 2023). The code needs to move to use the Rest APIv2 https://developers.thoughtspot.com/docs/rest-apiv2-getstarted
Get started with REST API v2.0
Get started with REST API v2.0 to access, create, and manage ThoughtSpot resources programmatically.

Did you find this page helpful?