Hi Trevor,
Good question. It is possible to use the API to grant document access to a group, but it’s not documented -- yet. We’ve made plans to do so, so there should be documentation available before too long. For now, you can get all the info you need from the Create/Update Document User Collaborator page you mentioned, just adjusting the path to be https://api.lucid.co/documents/{id}/shares/groups/{groupId} instead of https://api.lucid.co/documents/{id}/shares/users/{userId}. All other elements (Valid Access Scopes, Body Params, Headers, etc.) should be the same.
If your situation could benefit from it, you might also consider checking out the Teams API.
hey @Caden E , thanks for this information.
Are groups and teams synonymous? The old route we were using for getting group Ids looked like this: `https://users.lucidchart.com/groups?accountId=${accountId}`
Should I be using `https://api.lucid.co/teams`?
They’re not synonymous, Teams are just a newer feature that you may find interesting given your usage of Groups. Groups should continue to work the way that you’re accustomed to.
Hey thanks for the explanation! I am not seeing documented routes for getting groups, which is why I asked.
Should I be able to use GET https://api.lucid.co/groups for getting user groups? Would the acountId filter work as it did previously?
Yep, that endpoint and filter should work as expected.
curl --location 'https://api.lucid.co/groups' \
--header 'Authorization: Bearer oauth2-…..-Lucid-US' \
--header 'Lucid-Api-Version: 1'
This cURL is returning resource not found for me
{
"code": "notFound",
"message": "Resource not found",
"requestId": "…..",
"details": {
"path": "/groups",
"method": "GET"
}
}
Is there documentation for groups or is that not yet available?
Groups and other user management endpoints follow some slightly different standards than most of our endpoints, so they are located under our SCIM APIs instead of our OAuth 2.0 APIs. Here is the documentation page for the Get All Groups endpoint.
The request will end up looking like this:
curl --location ‘https://users.lucid.app/scim/v2/Groups’ \
--header ‘Authorization: Bearer 1502c55ad6…’
Authorizing a SCIM token also has a different process, so if you’re not sure how to get a token or even if SCIM has been authorized for your account, the SCIM Overview page will also be useful. Traditionally Groups have been used for processes related to billing, hence the extra restrictions. Teams were designed with documents and collaboration in mind, which is why they are easier to manage via API.
Yep, that endpoint and filter should work as expected.
My bad, I missed the api.lucid.co vs users.lucidchart.com difference. Apologies for the confusion; Trevor J’s answer should clear that up.
Thank you both. Can I please confirm then that this route is still valid and undocumented?
https://api.lucid.co/documents/{id}/shares/groups/{groupId}