Vikraman
02/07/2025, 3:43 PM<https://sustain360-dev.cloud.gooddata.com/api/v1/actions/workspaces/{workspace_id}/execution/afm/execute>
.
The response includes the following "links" section:
"links": {
"executionResult": "bd0da5fe01cd7652a8978f82653279f0bb5ef29c:3193346d2e2b604ba8f4aee81b8cb0202a1e29894eeed4d3f515687149fa39e7"
}
I used bd0da5fe01cd7652a8978f82653279f0bb5ef29c
as the execution result ID and attempted to hit the endpoint below (I also tried using 3193346d2e2b604ba8f4aee81b8cb0202a1e29894eeed4d3f515687149fa39e7
):
curl $HOST_URL/api/v1/actions/workspaces/<workspace_id>/export/tabular \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"format": "<CSV|XLSX|PDF|HTML>",
"fileName": "<tabular_export_file_name>",
"<executionResult|visualizationObject>": "<execution_result_id|visualizationObjectId>"
}
'
However, I am receiving the following error response:
{
"detail": "Server-side problem. Contact support.",
"status": 500,
"title": "Internal Server Error",
"traceId": "25ba5d80228dbb90fdef85a572fd3b46"
}
Could you please confirm if I am using the correct process?Michael Ullock
02/07/2025, 5:34 PM"executionResult": "bd0da5fe01cd7652a8978f82653279f0bb5ef29c:3193346d2e2b604ba8f4aee81b8cb0202a1e29894eeed4d3f515687149fa39e7"
Vikraman
02/10/2025, 6:38 AM{
"detail": "Server-side problem. Contact support.",
"status": 500,
"title": "Internal Server Error",
"traceId": "6d59dc1a381c40c7f9d9090aab6ebc4f"
}
Vikraman
02/10/2025, 6:57 AMMichael Ullock
02/10/2025, 11:23 AMerror message "Result not found in result cache" (HTTP 404
If the non-admin user gets a 404 Not Found error when exporting, it usually means:
They don’t have the required permissions to access or export data, or the execution result ID is missing or expired. Can you please check the permissions once againf or his user and verify the have have the correct permissions set? Also, can you please verify that the execution results didn’t expire and run the /execution/afm/execute
just before the export request to ensure the result is fresh.
https://www.gooddata.com/docs/cloud/manage-organization/manage-permissions/set-permissions-for-workspace/#permissions-json-structureMichael Ullock
02/10/2025, 11:27 AMVikraman
02/10/2025, 11:33 AMresultId
for a non-admin user while using the admin user's token to create the data.
But Is it scalable to have separate tokens for all users in the workspace to generate this tabular data?
Additionally, I noticed that I can use visualization object IDs to generate tabular data. Is it possible to retrieve visualization object IDs for a specific dashboard? I know I can get all object IDs for a workspace, but having the ability to get them for a particular dashboard would be more convenient for my use case.Michael Ullock
02/10/2025, 2:52 PMVikraman
02/10/2025, 4:01 PMVikraman
02/10/2025, 5:01 PMafm/execute
and executionResultId
for tabular data export, how should the payload for the afm/execute
endpoint be structured? From what I've observed, it seems the payload includes local identifiers and column name references from the LDM, based on applied filters.
If I'm manually calling the API, is there a way to retrieve the filters applied to the report displayed via the iframe and use them as the payload to obtain the executionResultId
? Any guidance on this would be greatly appreciated.Moises Morales
02/13/2025, 4:03 PM{
"executionResponse": {
"dimensions": [
{
"headers": [
{
"attributeHeader": {
"localIdentifier": "a_customer_created_date.month",
"label": {
"id": "customer_created_date.month",
"type": "label"
},
"labelName": "Customer created date - Month/Year",
"attribute": {
"id": "customer_created_date.month",
"type": "attribute"
},
"attributeName": "Customer created date - Month/Year",
"granularity": "MONTH",
"primaryLabel": {
"id": "customer_created_date.month",
"type": "label"
},
"format": {
"locale": "zh-Hans",
"pattern": "y年M月"
},
"valueType": "TEXT"
}
},
{
"attributeHeader": {
"localIdentifier": "a_order_status",
"label": {
"id": "order_status",
"type": "label"
},
"labelName": "Order status",
"attribute": {
"id": "order_status",
"type": "attribute"
},
"attributeName": "Order status",
"granularity": null,
"primaryLabel": {
"id": "order_status",
"type": "label"
},
"valueType": "TEXT"
}
}
],
"localIdentifier": "dim_0"
},
{
"headers": [
{
"measureGroupHeaders": [
{
"localIdentifier": "m_runsum",
"format": "#,##0.00",
"name": "Runsum"
}
]
}
],
"localIdentifier": "dim_1"
}
],
"links": {
"executionResult": "ba3cc6f4296f4c2d39c2ec9ab2b92eace4e8e300:eef17355465eff27da56f04b1ad94ab43e5a0f1a62c3a0ba26deb4e2f3823114"
}
}
}
If you are still not fully accustomed with the structure, I recommend placing the insight you wish to export via the API in a dashboard and then grab the payload from the dev console. The whole structure is under the "execute" call.
Regarding your second question, I am afraid I don't follow. The entire visualization definition include the filter applied to it when getting the executionResultId. I recommend going through the following documentation that explains the topic in detail: https://www.gooddata.com/docs/cloud/api-and-sdk/api/access_raw_data_through_api/