Screen Recording API returns 404 when querying via Terraform data source

I’m completely stumped as to why the screen recording retrieval endpoint is failing in our automated reporting pipeline. The UI shows recordings exist, but the API layer is rejecting the query.

Environment details:

  • Genesys Cloud Region: ap-southeast-2
  • Terraform Version: 1.8.5
  • Genesys Cloud Provider: 1.23.0
  • Custom Reporting Dashboard: Weekly Agent Compliance

The workflow involves an agent performing a screen share during a call. The recording status in the UI turns green within 5 minutes. However, when the Terraform data source attempts to fetch the recording URL for archival, it fails.

Code snippet:

data “genesyscloud_knowledge_document” “recording_doc” {
id = var.recording_id
}

resource “genesyscloud_screen_recording” “archive” {
recording_id = data.genesyscloud_knowledge_document.recording_doc.id
// Fails here
}

Error output:

Error: Error fetching screen recording: GET https://api.ap-southeast-2.genesys.cloud/api/v2/screenrecordings/records/: 404 Not Found
Response body: {“errors”:[{“code”:“notFound”,“message”:“The requested resource was not found”}]}

Key observations:

  1. The recording ID is valid. Copy-pasting the ID into the browser console with correct headers returns 200 OK.
  2. The Terraform provider uses the same API keys as the manual test.
  3. The delay between recording completion and API query is set to 10 minutes via a depends_on sleep resource.
  4. No custom screen recording policies are applied. Default retention settings.

Is there a known lag in the screen recording index propagation for the ap-southeast-2 region? Or is the genesyscloud_screen_recording data source outdated? The documentation suggests the resource should be available immediately after the status changes to ‘completed’.

Tried increasing the wait time to 30 minutes. Same 404 result. The recording appears in the list endpoint /api/v2/screenrecordings/records but individual GET requests fail.

Any insights on the indexing delay or provider bug?

TL;DR: Check the API endpoint version and ensure the recording ID matches the specific media type.

You might want to look at the genesyscloud_recordingmedia data source instead of the generic media endpoint. The screen recording API often behaves differently than voice recordings in Terraform, especially in ap-southeast-2.

The 404 usually happens when the provider tries to fetch a voice media object ID for a screen share. Screen shares generate separate media IDs. Try explicitly setting the media_type to SCREEN in your data source configuration.

data "genesyscloud_recordingmedia" "screen" {
 id = var.recording_id
 media_type = "SCREEN"
}

Also, verify the recording status is READY. If it’s still PROCESSING, the API returns 404. Add a depends_on to your recording job resource to force a wait. This avoids race conditions in the pipeline.