SmoothDeploy Docs
API Reference

Shared steps

List, read, update and delete shared steps with an API key

Shared steps are reusable step groups that can be embedded in multiple tests. Shared steps are authorized through the tests scope: reading uses tests:read; updating and deleting use tests:update together with tests:read. To rearrange the steps of a single test, or to turn a step into a shared one, see Steps.

GET actions take their inputs as query parameters; all other actions, including DELETE, take a JSON body. All actions require x-project-id. The branch is resolved from x-branch-id or the project default branch. Actions that change data require an active subscription and otherwise return 403 { "error": "LICENSE_REQUIRED" }; GET actions do not.

See Authentication and Scopes.

stepId on this page is the canonical step ID, not a revision-step ID.


List shared steps

GET /v1/actions/shared-steps.list

Scope: tests:read

Returns shared steps on the active branch, with pagination.

Query parameters

ParameterTypeDefaultNotes
limitinteger50Results per page. 1 to 1000.
pageinteger0Zero-based page index.
searchstring-Substring search on step name.
typestringallall, ui, or api.

Response

{
  "data": [
    {
      "id": "step-uuid",
      "name": "Log in as admin",
      "action": { "name": "group", "description": "Log in as admin" },
      "shared": true,
      "group": true
    }
  ],
  "pagination": {
    "page": 0,
    "limit": 50,
    "total": 4,
    "totalPages": 1,
    "hasMore": false
  }
}

Screenshot data is stripped from action payloads in all list and detail responses.

Example

curl -s "https://api.smoothdeploy.com/v1/actions/shared-steps.list?limit=50&page=0" \
  -H "x-api-key: $SMOOTHDEPLOY_API_KEY" \
  -H "x-project-id: $PROJECT_ID"

Get a shared step

GET /v1/actions/shared-steps.get

Scope: tests:read

Returns the shared step with its action on the active branch.

Query parameters

ParameterTypeRequiredNotes
stepIdUUIDyesThe shared step.

Response

{
  "data": {
    "id": "step-uuid",
    "name": "Log in as admin",
    "action": { "name": "group", "description": "Log in as admin" },
    "shared": true,
    "group": true
  }
}

Status codes

StatusMeaning
200Step found
404Shared step not found on this branch

Get a shared group step's children

GET /v1/actions/shared-steps.get-children

Scope: tests:read

Returns the parent step and its child steps for a shared group.

Query parameters

ParameterTypeRequiredNotes
stepIdUUIDyesThe shared group step.

Response

{
  "data": {
    "step": {
      "id": "step-uuid",
      "name": "Log in as admin",
      "group": true,
      "shared": true
    },
    "children": [
      {
        "id": "child-step-uuid",
        "name": "Go to login page",
        "action": { "name": "goto", "url": "/login" },
        "order": 0
      }
    ]
  }
}

Status codes

StatusMeaning
200Group found
404Shared group step not found

Get step usage

GET /v1/actions/shared-steps.get-usage

Scope: tests:read

Returns the tests that use the shared step on the active branch.

Query parameters

ParameterTypeRequiredNotes
stepIdUUIDyesThe shared step.

Response

{
  "data": [
    { "id": "test-uuid", "name": "Login flow" },
    { "id": "test-uuid-2", "name": "Checkout flow" }
  ]
}

Update a shared step

PUT /v1/actions/shared-steps.update

Scope: tests:read and tests:update

The server applies copy-on-write: if the action changes and other branches reference this step, a new step record is created rather than mutating the shared one.

Body

FieldRequiredNotes
stepIdyesUUID of the shared step.
namenoNew display name.
actionnoNew action payload. Structure depends on the action type and is generated by the step editor.
metadatanoStep metadata (e.g. screenshot references).
conditionnoStep condition (skip, always-run, or conditional).
filesnoUp to 50 files for a setInputFiles action, each { "name": string, "type": string (optional), "base64": string }.

Omit a field to leave it unchanged.

Response

{
  "data": {
    "id": "step-uuid",
    "name": "Log in as admin",
    "action": { "name": "group", "description": "Log in as admin" }
  }
}

Status codes

StatusMeaning
200Updated
400The action fails validation
404Shared step not found
409No test uses the step, so it can only be deleted

To change the children of a shared group, use steps.update-children.


Delete a shared step

DELETE /v1/actions/shared-steps.delete

Scope: tests:read and tests:update

Deletes a shared step that no test uses. Returns 400 if the step is still referenced by any test on any branch, naming the branches.

Body

FieldRequiredNotes
stepIdyesUUID of the shared step.

Response

{
  "message": "Shared step deleted successfully",
  "data": { "id": "step-uuid", "shared": true, "group": true }
}

Status codes

StatusMeaning
200Deleted
400Step is in use
404Shared step not found