Segments API
Get a list of reusable groups of test steps.
List Segments
Returns the segments in your account, including a step-by-step breakdown of each segment's definition.
Request
GET https://api.reflect.run/v1/segments
Query parameters:
platform (string, required): filter by platform: 'web', 'native-mobile', or 'api'
limit (integer, optional)
offset (integer, optional)
Response
{
"count": 42,
"segments": [
{
"id": 12345,
"name": "Login flow",
"description": "Logs the test user into the staging environment",
"steps": [
{
"type": "direct-navigation",
"description": "Go to login page",
"url": "https://staging.example.com/login"
},
{
"type": "input",
"selector": "#email",
"inputText": "qa-user@example.com"
},
{
"type": "input",
"selector": "#password",
"inputText": "${var(password)}"
},
{
"type": "click",
"selector": "button[type=submit]"
}
],
"parameters": [
{ "name": "password", "value": "${sec(QA_PASSWORD)}" }
]
}
]
}