Simon Lejeune
02/12/2024, 10:22 AMMoises Morales
02/12/2024, 10:55 AMMoises Morales
02/12/2024, 1:25 PMheaders: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: `Bearer ${process.env.GOODDATA_TOKEN}`,
You need to use:
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer <API_TOKEN>" \
Feel free to confirm the issue is solved.Simon Lejeune
02/12/2024, 2:37 PM/export/visual
endpoint is returning me a 400 error and thus doesn't start the export.
I'm not sure where is the issue at my end, still investigating.
I'm doing a post
request and the body is well sent as JSON, which matches the documentation.Simon Lejeune
02/12/2024, 2:43 PM{
"detail": "Request Content-Type header '[application/vnd.gooddata.api+json]' does not match any allowed types. Must be one of: [application/json]., Request Accept header '[application/vnd.gooddata.api+json]' does not match any defined response types. Must be one of: [application/json].",
"status": 400,
"title": "Bad Request",
"traceId": "74f6767160b17c767ce4654267c663bf"
}
(it is probably why i changed them to application/json
in my code, but i can't confirm that since it's been weeks)Moises Morales
02/12/2024, 3:39 PMThe API request contained invalid value in its query params, headers or the payload. [original error: com.gooddata.tiger.oapi.validator.exception.InvalidPayloadException]
Could you please confirm the body request is correct? Could you also test the API call via an API client and make sure it is correct?Simon Lejeune
02/12/2024, 4:02 PMcurl $HOST_URL/api/v1/actions/workspaces/$WORKSPACE_ID/export/visual \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer <API_TOKEN>" \
-X POST \
-d '{
"fileName": "<export_filename>",
"dashboardId": "<dashboard_id>"
}' | jq .
i replaced the dashboardId. workspaceId and api_token with my values, still the same error.
curl 8.4.0 and on macosSimon Lejeune
02/12/2024, 4:13 PM