ferg.rose - Hi all. We are developing a feature...

Hi all. We are developing a feature that will allow users to set up groups and handle various other admin tasks. There are two features we want to include here which I'm not sure are achievable using the thoughtspot API: 1. Querying liveboards by org 2. Sharing data workspaces with a group when creating new group Can someone shed light on whether either of these are possible?
20 Replies
shikharTS
shikharTS3w ago
1. Do you mean org access 2. do you mean data workspace be visible to a group? We have the data management privilege (Can manage data) for this..
ferg.rose
ferg.roseOP3w ago
1. Just wondering if there's an endpoint that can return all liveboards under a provided org - their ids, names etc 2. I might need to clarify this requirement with my product lead but the request was to set up data workspace access when creating a new group, similar to how a group can be given liveboard access when it is created
shikharTS
shikharTS3w ago
1. yes the search metadata api can do that 2. Yes you can use the can manage data privilege for that particular group to give them data workspace privilege
ferg.rose
ferg.roseOP3w ago
Thanks for pointing me in the right direction @shikharTS @shikharTS Are you able to provide further instruction on how to use the metadata search endpoint to query liveboards by org id? I'm not seeing a way to do this in the documentation. The endpoint also seems to only return metadata objects belonging to the primary org.
shikharTS
shikharTS2w ago
So you can get the token using /auth/token/full endpoint for different orgs for a given user. By default it provides the token for primary org..
ferg.rose
ferg.roseOP2w ago
Our use case for this is a feature that will allow admin users on our platform to set up and manage groups within orgs. As part of this we are looking to display the liveboards available within each org, so that when creating a new group, they could select which liveboards they want to give the group access to. We have a service user account set up that we use to proxy thoughtspot API requests, but it is only in our primary org. From what you have said, it sounds like we would have to have this account set up across all orgs, and then request the liveboard data for each org using a different authentication token for each request. Each token request would have to set the required org id in the body of the request. Does this sound like the correct approach?
shikharTS
shikharTS2w ago
yes
ferg.rose
ferg.roseOP2w ago
@shikharTS thanks for your help - all good with the above now. There is now a requirement to fetch all liveboards that have been shared with a group. So far I'm having trouble doing this with the search metadata endpoint. I have tried sending the request with the following body: { metadata: [ { type: 'LIVEBOARD', }, ], permissions: [ { principal: { identifier: groupId, type: 'USER_GROUP', }, share_mode: 'READ_ONLY', }, ], } I have tested this with a group id for a group with which I have shared multiple liveboards, but the request returns an empty array. I am now thinking that I've misunderstood the permissions parameter and that it perhaps isn't actually possible to retrieve all liveboards that have been shared with a particular group. Could you please clarify whether this can be done and if so how?
shikharTS
shikharTS2w ago
You should be able to get info using this payload. This is correct. I think this is a bug we had raised with the team. Can you create a support case for this? Maybe there is a patch than can help you
ferg.rose
ferg.roseOP2w ago
Ok no worries, thanks for getting back to me and for your ongoing help. I will raise a support request Is the way to do that by making a post in the help channel?
shikharTS
shikharTS2w ago
no the support request will be through your thoughtspot app.
ferg.rose
ferg.roseOP2w ago
@shikharTS I think I have solved the issue - it seems the payload must include record_size parameter set to -1 when using other parameters to filter the results. A bit counterintuitive, as you would expect the record size to just fallback to default when it is omitted. There is a note about this in the docs which I missed though so all good. Thanks for helping me resolve this, I will no longer need to raise a support case
shikharTS
shikharTS2w ago
Cool, will create a ticket to update the docs internally
ferg.rose
ferg.roseOP7d ago
@shikharTS Another question for you - when creating a new group via the create group endpoint, there is an optional parameter default_liveboard_identifiers. Can you explain what it means to assign a liveboard to a group as a 'default liveboard'? I'm working on a UI flow that uses this endpoint to allow users to create new groups, and part of the requirement is to enable them to select liveboards they want shared with the group. I'm wondering if the default_liveboard_identifiers parameter is an appropriate way to do this, or does assigning a liveboard as default do more than just share the liveboard with the group? I haven't found any documentation on this so just trying to clarify my understanding so I know what the best solution is. I am aware that I can do this via the share metadata endpoint, but the default_liveboard_identifiers parameter would be a much simpler solution if that is a valid way to do it.
shikharTS
shikharTS7d ago
Even I am not sure what it does. Will check.
ferg.rose
ferg.roseOP5d ago
I have seen that it is possible to share liveboards and other metadata with groups via the share metadata endpoint. It seems like it is not possible to also unshare liveboards with a group - can you confirm this for me?
shikharTS
shikharTS5d ago
Using the share metadata api you can use this : To prevent a user or group from accessing the shared object, specify the GUID or name of the principal and set shareMode to NO_ACCESS.. This is part of the documentation for the share api
ferg.rose
ferg.roseOP4d ago
Awesome that's great, thanks for that! If you can just let me know if you found out anything re the default liveboards as well that would be helpful.
shikharTS
shikharTS4d ago
I was not able to check it there is very low internal documentation around this as well, but you can check it by running a small experiment by assigning the liveboard through default_liveboard_identifiers. I am hoping it jsut shares the liveboard and nothing else
ferg.rose
ferg.roseOP3d ago
Yeh no worries, I think I may have already tested that but I'll test again to confirm. All good, thanks again for all your help! @shikharTS FYI it looks like passing default liveboards in the create group payload doesn't actually share the liveboards with the group. I am not sure what it does. I am having to use the share metadata endpoint to share liveboards after all. Thought it might interest you to know.

Did you find this page helpful?