Mabl resource IDs

How to obtain mabl resource IDs to use with the mabl API or mabl CLI

Every component in a workspace, from applications and environments to ad-hoc test runs, has a unique ID known as a mabl resource ID. Mabl resource IDs are required for many commands in the mabl CLI and for parameter values in mabl API endpoints.

This guide lists the component types that have mabl resource IDs and explains how to obtain mabl resource IDs from the mabl CLI, the mabl app, and webhook payloads.

Component types

Mabl resource IDs consist of an alphanumeric string and a component suffix. For example, a workspace ID may be 1234567890AbCdE-w.

The following list identifies component types that have a mabl resource ID and their component suffix:

  • Workspace: -w
  • Application: -a
  • Environment: -e
  • Deployment event: -v
  • Plan: -p
  • Plan run: -pr
  • Test: -j
  • Test run: -jr

In the mabl CLI

You can get IDs for workspaces, applications, environments, plans, tests, and deployment events in the mabl CLI with the list command:

  • mabl workspaces list
  • mabl applications list
  • mabl environments list
  • mabl plans list
  • mabl tests list
  • mabl deployments list

The list command returns IDs, names, and the created time for component type.

In the following example, the command mabl applications list returns a table with application IDs, names, and the date they were created.

┌──────────────────────────┬─────────────────────────────────┬─────────────────────────┐
│ ID                       │ Name                            │ Created time            │
├──────────────────────────┼─────────────────────────────────┼─────────────────────────┤
│ <application-id>         │ Marketing Site | FreshBooks.com │ Oct 29th 2019, 22:06:55 │
├──────────────────────────┼─────────────────────────────────┼─────────────────────────┤
│ <application-id>         │ FreshBooks App                  │ Mar 19th 2020, 14:15:01 │
├──────────────────────────┼─────────────────────────────────┼─────────────────────────┤
│ <application-id>         │ mabl Sandbox                    │ Mar 23rd 2020, 17:57:23 │
├──────────────────────────┼─────────────────────────────────┼─────────────────────────┤
│ <application-id>         │ Sandbox                         │ Jun 16th 2022, 01:28:37 │
└──────────────────────────┴─────────────────────────────────┴─────────────────────────┘

📘

Optional arguments

Add the --help flag to the end of a list command to find out what options are available for the command.

For example, mabl environments list –help shows optional arguments for listing environments:

  • --workspace-id: if you belong to multiple workspaces, list environments for a specific workspace.
  • --limit: specify the number of environments to return; the default is 10.
  • --output: specify the result format: table, json, or yaml.

In the mabl app

In the mabl app, you can obtain mabl resource IDs on different pages, depending on the component.

Workspace

Go to Settings > Workspace to obtain the workspace ID. Workspace IDs end in -w.

2490

Obtaining the workspace ID

Applications and environments

Go to Settings > APIs and scroll down to the mabl CLI section. Select an application, an environment, or both from the dropdowns. Application and environment IDs appear in the mabl CLI command: application IDs end in -a and environment IDs end in -e.

2442

Obtaining application and environment IDs

Tests and plans

The Test Details and Plan Details pages include a CLI icon in the top left corner.

2138

Getting CLI info from the Test Details page

Click on the CLI icon to view the mabl resource ID for a specific test or plan. Test IDs end in -j and plan IDs end in -p.

2492

Viewing mabl resource IDs for a plan

Test runs

On the Test Output page for a specific test run, click on the kebab menu for More Actions and select "CLI info."

2142

Getting CLI info from the Test Output page

The test run ID appears in the mabl CLI resource ID modal. Test run IDs end in -jr.

2150

Mabl resource IDs on the Test Output page

Deployment events

Go to Results > By deployment and click on the Received Time for a specific deployment event.

2212

Viewing deployment event results

Clicking on the received time opens the Deployment Event Details page, where you can find the deployment event ID ending in -v.

In webhook payloads

If you have configured your workspace to send information to a webhook post-execution, you can obtain IDs for plan runs and test runs.

Plan runs

The body of the webhook payload includes IDs for plan runs, which are called plan_execution and end in -pr.

Test runs

In the webhook payload, the journey_execution_id shows test run IDs, which end in -jr.