Shared Steps
How to work with shared steps using the public API
The shared steps endpoints allow you to manage reusable test steps that can be referenced across multiple test cases. Shared steps consist of a title and a list of sub-steps, each with a description and expected result.
About Shared Steps
Shared steps are reusable test step templates that can be used in multiple test cases. They consist of:
- Title: A descriptive name for the shared step (1-255 characters)
- Sub-steps: A list of individual steps, each with:
- Description: What action to perform (HTML content)
- Expected: The expected result (HTML content)
- Test data (optional): A list of up to 20 test data items (
text,link, orfile), returned in thedatafield — see the Step Test Data section of the Test Cases page for the item shape
When a shared step is used in a test case, all its sub-steps are included. Updates to a shared step automatically propagate to all test cases that reference it.
- Shared steps must have at least one sub-step
- Each sub-step must have at least a description, expected result, or test data
- The title of a shared step must be unique within a project
- Shared steps are versioned - updates create new versions while preserving old ones
- Deleted shared steps are still returned by test case versions that reference them, with
deletedAtset on the shared step and its sub-steps
List Shared Steps
/paginated endpoints are transitional. In API v1, the base paths will return paginated responses and the /paginated suffix will be removed.
Retrieves all non-deleted shared steps within a project, optionally sorted and with additional fields included.
Path Parameters
project_id: The project identifier (can be either the project code or UUID)
Query Parameters
| Parameter | Type | Description | Default | Example |
|---|---|---|---|---|
offset | number | Number of rows to skip before returning results. | 0 | offset=10 |
limit | number | Maximum number of rows to return. Accepted range: 0–1,000. | 100 | limit=20 |
sortField | string | Field to sort by: created_at or title. | title | sortField=title |
sortOrder | string | Sort direction for sortField: asc or desc. | asc | sortOrder=asc |
include | string | Include additional fields omitted by default. Accepted value: tcaseCount. | None | include=tcaseCount |
- Use
include=tcaseCountto see how many test cases reference each shared step - Sorting by
created_atshows the most recently created steps first (withdesc) or oldest first (withasc) - Sorting by
titleprovides alphabetical ordering
Example Request
Fetch all shared steps
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-step/paginatedFetch all shared steps sorted by title in ascending order
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-step/paginated?sortField=title&sortOrder=ascFetch all shared steps with test case count included
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-step/paginated?include=tcaseCountResponse Fields
{
total: number, // Total number of shared steps
offset: number, // The page offset
limit: number, // The page limit
data: Array<{ // List of shared steps in the page
id: number // Unique identifier of the shared step
version: number // Version of the shared step
type: string // Type of the step (always "shared" for shared steps)
title: string // Title of the shared step
isLatest: boolean // Whether this is the latest version of the step
subSteps: Array<{ // List of sub-steps
id: number // Unique identifier of the sub-step
type: string // Type of the step (always "shared_sub_step")
version: number // Version of the step (same as parent step)
isLatest: boolean // Whether this is the latest version (same as parent step)
description: html // Details of the sub-step
expected: html // Expected result from the sub-step
data?: Array<StepData> // Sub-step test data items (see Step Test Data on the Test Cases page)
deletedAt?: string // Date the sub-step was deleted on (ISO 8601 format)
}>
deletedAt?: string // Date the shared step was deleted on (ISO 8601 format)
tcaseCount?: number // Number of test cases using this shared step (only included if requested)
}>
}Example Response
{
"total": 2,
"offset": 0,
"limit": 100,
"data": [
{
"id": 1,
"version": 3,
"type": "shared",
"title": "User login validation",
"isLatest": true,
"subSteps": [
{
"id": 2,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Navigate to the login page</p>",
"expected": "<p>Login form is displayed</p>"
},
{
"id": 3,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Enter valid username and password</p>",
"expected": "<p>Credentials are accepted</p>"
},
{
"id": 4,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Click the login button</p>",
"expected": "<p>User is redirected to the dashboard</p>"
}
]
},
{
"id": 5,
"version": 1,
"type": "shared",
"title": "Form submission validation",
"isLatest": true,
"subSteps": [
{
"id": 6,
"type": "shared_sub_step",
"version": 1,
"isLatest": true,
"description": "<p>Fill in all required fields</p>",
"expected": "<p>All fields are populated correctly</p>"
},
{
"id": 7,
"type": "shared_sub_step",
"version": 1,
"isLatest": true,
"description": "<p>Submit the form</p>",
"expected": "<p>Form is submitted successfully</p>"
}
],
"tcaseCount": 12
}
]
}List Shared Steps (Deprecated)
Deprecated
This endpoint is deprecated. Use List Shared Steps (GET /api/public/v0/project/{project_id}/shared-step/paginated) instead.
Retrieves all non deleted shared steps within a project, optionally sorted and with additional fields included.
Path Parameters
project_id: The project identifier (can be either the project code or UUID)
Query Parameters
All query parameters are optional.
| Parameter | Type | Description | Allowed Values | Example |
|---|---|---|---|---|
sortField | string | Field to sort by | created_at, title | sortField=title |
sortOrder | string | Sort order (requires sortField; default: desc) | asc, desc | sortOrder=asc |
include | string | Include additional fields in the response which are omitted by default | tcaseCount | include=tcaseCount |
- Use
include=tcaseCountto see how many test cases reference each shared step - Sorting by
created_atshows the most recently created steps first (withdesc) or oldest first (withasc) - Sorting by
titleprovides alphabetical ordering
Example Request
Fetch all shared steps
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-stepFetch all shared steps sorted by title in ascending order
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-step?sortField=title&sortOrder=ascFetch all shared steps with test case count included
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-step?include=tcaseCountResponse Fields
{
sharedSteps: Array<{
// List of shared step objects
id: number // Unique identifier of the shared step
version: number // Version of the shared step
type: string // Type of the step (always "shared" for shared steps)
title: string // Title of the shared step
isLatest: boolean // Whether this is the latest version of the step
subSteps: Array<{
// List of sub-steps
id: number // Unique identifier of the sub-step
type: string // Type of the step (always "shared_sub_step")
version: number // Version of the step (same as parent step)
isLatest: boolean // Whether this is the latest version (same as parent step)
description: html // Details of the sub-step
expected: html // Expected result from the sub-step
data?: Array<StepData> // Sub-step test data items (see Step Test Data on the Test Cases page)
deletedAt?: string // Date the sub-step was deleted on (ISO 8601 format)
}>
deletedAt?: string // Date the shared step was deleted on (ISO 8601 format)
tcaseCount?: number // Number of test cases using this shared step (only included if requested)
}>
}Example Response
{
"sharedSteps": [
{
"id": 1,
"version": 3,
"type": "shared",
"title": "User login validation",
"isLatest": true,
"subSteps": [
{
"id": 2,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Navigate to the login page</p>",
"expected": "<p>Login form is displayed</p>"
},
{
"id": 3,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Enter valid username and password</p>",
"expected": "<p>Credentials are accepted</p>"
},
{
"id": 4,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Click the login button</p>",
"expected": "<p>User is redirected to the dashboard</p>"
}
]
},
{
"id": 5,
"version": 1,
"type": "shared",
"title": "Form submission validation",
"isLatest": true,
"subSteps": [
{
"id": 6,
"type": "shared_sub_step",
"version": 1,
"isLatest": true,
"description": "<p>Fill in all required fields</p>",
"expected": "<p>All fields are populated correctly</p>"
},
{
"id": 7,
"type": "shared_sub_step",
"version": 1,
"isLatest": true,
"description": "<p>Submit the form</p>",
"expected": "<p>Form is submitted successfully</p>"
}
],
"tcaseCount": 12
}
]
}Get Shared Step
Get details of a single shared step using its ID.
Path Parameters
project_id: The project identifier (can be either the project code or UUID)step_id: The shared step identifier (numeric ID)
Example Request
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/project/BD/shared-step/1Response Fields
{
id: number // Unique identifier of the shared step
version: number // Version of the shared step
type: string // Type of the step (always "shared" for shared steps)
title: string // Title of the shared step
isLatest: boolean // Whether this is the latest version of the step
subSteps: Array<{ // List of sub-steps
id: number // Unique identifier of the sub-step
type: string // Type of the step (always "shared_sub_step")
version: number // Version of the step (same as parent step)
description: html // Details of the sub-step
expected: html // Expected result from the sub-step
data?: Array<StepData> // Sub-step test data items (see Step Test Data on the Test Cases page)
deletedAt?: string // Date the sub-step was deleted on (ISO 8601 format)
}>
isLatest: boolean // Whether this is the latest version (same as parent step)
deletedAt?: string // Date the shared step was deleted on (ISO 8601 format)
}Example Response
{
"id": 1,
"version": 3,
"type": "shared",
"title": "User login validation",
"isLatest": true,
"subSteps": [
{
"id": 2,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Navigate to the login page</p>",
"expected": "<p>Login form is displayed</p>"
},
{
"id": 3,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Enter valid username and password</p>",
"expected": "<p>Credentials are accepted</p>",
"data": [
{
"type": "text",
"label": "Credentials",
"data": { "value": "user@example.com / s3cret", "format": "plaintext" }
}
]
},
{
"id": 4,
"type": "shared_sub_step",
"version": 3,
"isLatest": true,
"description": "<p>Click the login button</p>",
"expected": "<p>User is redirected to the dashboard</p>"
}
]
}