Is there any way to see via API who created a dash...
# gooddata-cloud
f
Is there any way to see via API who created a dashboard? Runing
GET {{baseUrl}}/api/v1/entities/workspaces/:workspaceId/analyticalDashboards/:objectId
doesn't have any createdBy data.
m
Hi Filip, Thank you for getting in touch with us. I looked into your call and noticed that you are missing the query parameter 'include' with the required value 'createdBy', as specified in the documentation: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#operation/getAllEntities@AnalyticalDashboards You can find the complete list of query parameters there, and your call should be formatted like this:
{{baseUrl}}/api/v1/entities/workspaces/:workspaceId/analyticalDashboards/:objectId?include=createdBy
Once you add this parameter, the response will include:
Copy code
"included": [
        {
            "id": "123456789-abcdefg",
            "type": "userIdentifier",
            "attributes": {
                "firstname": "Name",
                "lastname": "Lastname",
                "email": "123@abc.com"
            },
Let me know if you need further assistance!
f
accepts the api call, but still returns nothing. The included section is not there.
here's what it returns:
Copy code
{
  "data": {
    "id": "21e44576-1d7b-4de5-ad3c-994038e604a8",
    "type": "analyticalDashboard",
    "attributes": {
      "title": "Wessels bank deposits",
      "description": "",
      "content": {
        "layout": {
          "type": "IDashboardLayout",
          "sections": [
            {
              "type": "IDashboardLayoutSection",
              "items": [
                {
                  "size": {
                    "xl": {
                      "gridWidth": 12,
                      "gridHeight": 29
                    }
                  },
                  "type": "IDashboardLayoutItem",
                  "widget": {
                    "type": "insight",
                    "title": "Payments Reporting - BDV View",
                    "drills": [
                      {
                        "type": "drillToInsight",
                        "origin": {
                          "type": "drillFromAttribute",
                          "attribute": {
                            "localIdentifier": "d9c79b78c6374f0e8f69f12a93693d13"
                          }
                        },
                        "target": {
                          "identifier": {
                            "id": "574af660-fcee-41c3-9c3d-7a04f50ededf",
                            "type": "visualizationObject"
                          }
                        },
                        "transition": "pop-up",
                        "localIdentifier": "647802a0febf403487b375520ebebffc"
                      }
                    ],
                    "insight": {
                      "identifier": {
                        "id": "79723caf-f69a-439d-b293-bc62d55101fa",
                        "type": "visualizationObject"
                      }
                    },
                    "properties": {},
                    "dateDataSet": {
                      "identifier": {
                        "id": "cleared_date",
                        "type": "dataset"
                      }
                    },
                    "description": "",
                    "configuration": {
                      "hideTitle": true
                    },
                    "localIdentifier": "49efe9e220fb3e319fa3b96b849eaed3",
                    "ignoreDashboardFilters": [],
                    "ignoredDrillDownHierarchies": [
                      {
                        "type": "dateHierarchyReference",
                        "dateDatasetAttribute": {
                          "identifier": {
                            "id": "cleared_date.day",
                            "type": "attribute"
                          }
                        },
                        "dateHierarchyTemplate": "cleared_date"
                      }
                    ]
                  }
                }
              ],
              "header": {
                "title": "Bank Deposit View",
                "description": "Please click on `Cleared Date` to bring up a detailed view (by claim)"
              }
            }
          ]
        },
        "version": "2",
        "dateFilterConfig": {
          "mode": "active",
          "filterName": ""
        },
        "filterContextRef": {
          "identifier": {
            "id": "6a1e2dae-0d80-4c1b-ba77-e830724a4694",
            "type": "filterContext"
          }
        },
        "disableCrossFiltering": true,
        "attributeFilterConfigs": [
          {
            "mode": "hidden",
            "localIdentifier": "11495ccec6b048e5972f97969731b5a6"
          }
        ]
      },
      "createdAt": "2024-03-20 12:57"
    },
    "meta": {
      "origin": {
        "originType": "NATIVE",
        "originId": "child_1_75"
      }
    }
  },
  "links": {
    "self": "<https://zentist.cloud.gooddata.com/api/v1/entities/workspaces/child_1_75/analyticalDashboards/21e44576-1d7b-4de5-ad3c-994038e604a8?include=createdBy>"
  }
}
m
Hi Filip, could you share exactly how you are doing the call?
f
the exact call is in the self section
GET <https://zentist.cloud.gooddata.com/api/v1/entities/workspaces/child_1_75/analyticalDashboards/21e44576-1d7b-4de5-ad3c-994038e604a8?include=createdBy>
m
yes, but I mean, using the browser? curl with sh/bash script? or some tool like Postman?
f
via postman
m
Hi Filip, could you try to get the workspace layout? there must appear the 'createdBy' without use any filter:
GET {{baseUrl}}/api/v1/layout/workspaces/{workspaceID}
f
it works for other dashboards in the workspace, but not that one specifically, even if I run a declarative get call. How can some dashboards show a createdby and some don't?
m
Hi Filip, I believe I’ve found the answer. After testing with different users, I noticed that if the user who created a dashboard has been deleted, the 'createdBy' field will not appear in the call's return. Therefore, the reason you can’t see who created the specific dashboard you’re interested in is likely that the creator no longer belongs to the organization.
Hi Filip I would like to know if you need more help related with the original question
f
No it makes sense, thanks!
1
@Mauricio Cabezas We have a weird thing happening where dashboards are being unshared with their authors. I checked dashboards and they dont have a createdBy, meaning their users were deleted. I checked our DB (our automation pulls users from DB and creates them in GD) and the users were not deleted - they are still there. It seems like this is happening within GD only and I want to understand why. 1. is it possible to see when user was created in GD? a. I tried running
{{baseUrl}}/api/v1/entities/users?filter=user.authenticationId==2706126&metaInclude=ALL
but it dooesn't return a createdAt 2. Is there a user limit in GD, either on our entire org or for a userGroup?
m
Hi Filip, thank you for this follow-up question. I am sorry to hear about the issue is still present. But first I will reply the the questions: 1. Unfortunately, it is not possible to see the information by API, I have checked and you have you own OIDC provided, I would recommend ask to them. 2. Also, I have checked and you have unlimited users count, thus, for now no limits for your organization of user, neither userGroup Can you provide please, information of the user(s) you are interested in? Feel free to use DM*
f
We're currently using JWT for our clients. We take the user id from our table and pass it on when creating or authenticating users in GD. In
access_token
we have information about
user_id
in GD. All the flow was created using this documentation .
Also since I can't see who created dashboards because user is deleted - but can you see who created them via your internal tools? If possible I would really like to have that data so I can restore access. Can I provide you a list of dashboard ids?
m
Hi Filip, I think I can help you, but I would like to ask if you can create/ask in a new thread please?. To access to your enviroment using our Impersonation tool, we need a ticket, but the ticket is already close, so if you ask in a new thread it will create a new ticket for us, and with this we can impersonate.