> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Launch Workbench Enterprise Jobs with Third-Party Tools Using JWT

### 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

<Tip>
  **Tip:** Learn how to [implement Workbench Enterprise](/s/article/000005303).
</Tip>

### Generate a JWT

1. Find and select your job in the jobs list.

   <Frame>
     <img alt="job.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/g5Ek3SRXv8ussuBG/images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038jJB.jpg?fit=max&auto=format&n=g5Ek3SRXv8ussuBG&q=85&s=0ece3c9562676944cf7af7b19493f207" style={{width: 899, height: 408}} width="2472" height="1122" data-path="images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038jJB.jpg" />
   </Frame>

2. Go to the
   **External Access** tab and select **Create New JWT**.

   <Frame>
     <img alt="external access.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/g5Ek3SRXv8ussuBG/images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038SIL.jpg?fit=max&auto=format&n=g5Ek3SRXv8ussuBG&q=85&s=54d0816db436371b34c59a6813eba44b" style={{width: 899, height: 403}} width="2488" height="1116" data-path="images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038SIL.jpg" />
   </Frame>

3. Copy the JWT and save it in a secure location. The JWT will never display again after you close the modal.

   <Frame>
     <img alt="jwt blurred.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/g5Ek3SRXv8ussuBG/images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038jRF.jpg?fit=max&auto=format&n=g5Ek3SRXv8ussuBG&q=85&s=200c0a6cbe520a0a71c91aaa036cc2a3" style={{width: 900, height: 407}} width="2476" height="1120" data-path="images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038jRF.jpg" />
   </Frame>

### Launch a Workbench Enterprise Job

Launch a Workbench Enterprise job with a PUT request to the job execution endpoint.

<Note>
  **Note:** In the examples below, the JWT is stored in a variable named `JWT.`
</Note>

Curl:

```bash theme={"dark"}
curl -X PUT --header "Authorization: $JWT" 
-v https://WorkbenchEnterprise.internal.com/Api/Jobs/{jobId}/Execute 
```

Powershell:

```powershell theme={"dark"}
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>
  **Note:** In the examples below, the JWT is stored in a variable named `JWT.`
</Note>

Curl:

```bash theme={"dark"}
curl -X GET --header "Authorization: $JWT" 
-v https://WorkbenchEnterprise.internal.com/Api/Jobs/ {jobId} /Execute 
```

Powershell:

```powershell theme={"dark"}
Invoke-Webrequest 
-uri https://WorkbenchEnterprise.internal.com/Api/Jobs/ {jobId} /Execute -Method GET -Headers @{'Authorization' = $JWT} 
```

The response body will have these elements:

<Frame>
  <img alt="Screenshot 2024-10-08 at 3.51.42 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/g5Ek3SRXv8ussuBG/images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038fAj.jpg?fit=max&auto=format&n=g5Ek3SRXv8ussuBG&q=85&s=4948bf0cc198282c74d1495acbad7cd4" style={{width: 900, height: 440}} width="2246" height="1098" data-path="images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038fAj.jpg" />
</Frame>

### Invalidate a JWT

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

<Frame>
  <img alt="invalidate blur.jpg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/g5Ek3SRXv8ussuBG/images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038jfl.jpg?fit=max&auto=format&n=g5Ek3SRXv8ussuBG&q=85&s=a09efd318508c1826a93ea7a5aed4cf6" style={{width: 899, height: 407}} width="2488" height="1126" data-path="images/kb/ka0Vq0000003LPh-00N5w00000Ri7BU-0EMVq0000038jfl.jpg" />
</Frame>
