Skip to main content

Intro

Workbench Enterprise allows third-party applications to launch jobs and to get the status of a job execution. JSON web tokens (JWTs) have a limited scope. A token can only do the following:
  • Get the job execution status
  • Start an execution for a single job—to execute another job, you must generate a new JWT

Generate a JWT

  1. Find and select your job in the jobs list.
    job.jpg
  2. Go to the External Access tab and select Create New JWT.
    external access.jpg
  3. Copy the JWT and save it in a secure location. The JWT will never display again after you close the modal.
    jwt blurred.jpg

Launch a Workbench Enterprise Job

Launch a Workbench Enterprise job with a PUT request to the job execution endpoint.
Note: In the examples below, the JWT is stored in a variable named JWT.
Curl:
curl -X PUT --header "Authorization: $JWT" 
-v https://WorkbenchEnterprise.internal.com/Api/Jobs/{jobId}/Execute 
Powershell:
Invoke-Webrequest -uri https://WorkbenchEnterprise.internal.com/Api/Jobs/ {jobId} 
/Execute -Method PUT -Headers @{'Authorization' = $JWT} 

Get the Job Execution Status

Workbench Enterprise can return the job status using a GET request to the job execution endpoint.
Note: In the examples below, the JWT is stored in a variable named JWT.
Curl:
curl -X GET --header "Authorization: $JWT" 
-v https://WorkbenchEnterprise.internal.com/Api/Jobs/ {jobId} /Execute 
Powershell:
Invoke-Webrequest 
-uri https://WorkbenchEnterprise.internal.com/Api/Jobs/ {jobId} /Execute -Method GET -Headers @{'Authorization' = $JWT} 
The response body will have these elements:
Screenshot 2024-10-08 at 3.51.42 PM.png

Invalidate a JWT

If you want to invalidate an existing token, select Invalidate for the token in the job’s External Access tab.
invalidate blur.jpg