Refreshing visual URLs in scheduled email jobs

If your Cloudera Data Visualization instance moves to a new host or its domain or port changes, visual links saved in scheduled email jobs may still point to the previous address. Refresh the URLs so links in future emails point to the right instance.

You can refresh one job in the UI or use the Admin API to refresh selected jobs or all scheduled email jobs.

Refreshing visual URLs for one job using the UI

Use this method to refresh the visual URL in a single scheduled email job.

  1. Click in the top-right corner to open the Settings menu.
  2. Click Job Status.
  3. Select the Scheduled Jobs tab.
  4. Locate the job you want to update and click > Details at the end of its row to open the Job Details modal.
  5. Next to the visual link URL, click .
  6. Verify that the URL updates to reflect the current host domain.
  7. Click Close.

Refreshing visual URLs for multiple jobs using the Admin API

Administrators can use POST /adminapi/jobs/refresh_visual_urls to refresh selected scheduled jobs or all scheduled email jobs in one request.

  • Make sure you have administrator privileges.

  • Enable the jobs Admin API category in Site Settings > Advanced Settings.

    For instructions, see Enabling admin API support.

  • If you want to refresh specific jobs, find their IDs on the Scheduled Jobs tab.

  1. Send a POST request to the /adminapi/jobs/refresh_visual_urls endpoint with a JSON object in the request body.

    Use {} to refresh all scheduled email jobs:

    curl -X POST "https://<cdv-host>:<port>/adminapi/jobs/refresh_visual_urls" \
      -H "Origin: https://<cdv-host>:<port>" \
      -H "Content-Type: application/json" \
      -H "Authorization: apikey <API_KEY>" \
      -d '{}'
    

    To update specific scheduled jobs, replace {} with their IDs.

    curl -X POST "https://<cdv-host>:<port>/adminapi/jobs/refresh_visual_urls" \
    -H "Origin: https://<cdv-host>:<port>" \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer <ADMIN_API_TOKEN>" \
      -d '[101, 102, 105]'
    
  2. Check the response to confirm that the request succeeded.

    If it was successful, the response includes refreshed_count, refreshed_schedule_ids, and skipped_schedule_ids data.