API-driven runs: Get Run-ID after uploading archive / Error handling

Hi there!

I’ve followed the guidelines for a API-driven run in the documentation: API-driven Runs - Runs - Terraform Cloud and Terraform Enterprise - Terraform by HashiCorp

It’s working fine, but right now I’m trying to make this more robust by trying to find out if any errors are happening after uploading the archive file. Querying the self link for the configuration version is actually not really helpful - even if the run is not being executed because of some misconfiguration of the workspace there is no error message to be found in the response body:

{
   "data":{
      "id":"cv-<redacted>",
      "type":"configuration-versions",
      "attributes":{
         "auto-queue-runs":true,
         "error":null,
         "error-message":null,
         "source":"tfe-api",
         "status":"uploaded",
         "status-timestamps":{
            "uploaded-at":"2021-10-09T10:04:50+00:00"
         },
         "changed-files":[
            
         ]
      },
      "relationships":{
         "ingress-attributes":{
            "data":null,
            "links":{
               "related":"/api/v2/configuration-versions/cv-<redacted>/ingress-attributes"
            }
         }
      },
      "links":{
         "self":"/api/v2/configuration-versions/cv-<redacted>"
      }
   }
}

Is there any way to find out if errors were happening after uploading the archive?

Also I’m trying to find out how I can query the run-id by using the configuration-version id. Is there any way to query the automatically executed run to get some status back?