Test Environment List
Get the details of the environments for a test.
Test Environment List
curl 'https://api.runscope.com/buckets/<bucket_key>/tests/<test_id>/environments' \
-H 'Authorization: Bearer <access_token>'
Test Environment List Response Attributes
Attributes
-
authobjectThe authentication settings for the test environment. Basic, OAuth 1.0, and short and extended OAuth 2.0 methods are supported.
Show/Hide Basic
-
passwordstringPassword for this authentication
-
usernamestringUser name for this authentication
-
auth_typestringThe authorization type for this authentication. Value is
basic
Show/Hide OAuth 1.0
-
consumer_keystringThe Consumer Key used for asking the service for authorization
-
consumer_secretstringThe Consumer Secret used for asking the service for authorization
-
access_tokenstringThe token used for accessing the resource
-
token_secretstringThe secret that accompanies the access token
-
signature_typestringSignature type. Value can be
auth_header,query, orbody -
auth_typestringThe authorization type for this authentication. Value is
oauth_1
Show/Hide OAuth 2.0 (short)
-
access_tokenstringValue of the access token
-
token_locationstringLocation of the token. Value can be
queryorauth_header -
auth_typestringThe authorization type for this authentication. Value is
oauth_2
Show/Hide OAuth 2.0 (extended)
-
Note: Not all parameters are mandatory. Only the parameters included in the payload are saved in the test Environment or Template. Parameters not included in the payload will show as "null" in the response.
-
grant_typestringOAuth 2.0 grant type. Value can be
authorization_code,authorization_code_pkce,implicit,password_credentials, orclient_credentialsImportant! For Authorization Code, Authorization Code with PKCE, and Implicit grant types, you must add or register the API Monitoring Redirect URI, https://www.runscope.com/oauth2/callback, to the third-party authorization site. See Redirect URI Registration for details.
-
access_tokenstringValue of the access token
-
token_locationstringLocation of the token. Value can be
queryorauth_header -
auth_urlstringThird-party authorization URL
-
access_token_urlstringURL for the access token
-
client_idstringThe ID of the client
-
client_secretstringThe client secret
-
code_challenge_methodstringMethod for challenging code, either
plainorS256. For PKCE grant type only. Default is SHA-256 -
code_verifierstringThe code verifier string generated by the app, if available. For PKCE grant type only
-
passwordstringPassword for third-party authorization
-
usernamestringUser name for third-party authorization
-
scopestringThe OAuth 2.0 scope string, if used
-
statestringThe OAuth 2.0 state string, if used
-
client_authenticationstringMethod of client authentication, either either sent in
basic_auth_headerorbody. Default isbasic_auth_header -
auth_typestringThe authorization type for this authentication. Value is
oauth_2 -
refresh_tokenstringValue of the refresh token
-
is_auto_refresh_tokenbooleanDetermines whether the refresh token is auto-generated
-
-
emailsobjectThe email details for sending notifications for this test
Show/Hide Child Attributes
-
notify_allbooleanSend an email to all team members according to the
notify_onrules -
notify_onstringUpon completion of a test run Runscope will send email notifications according to the following rules:
all— send an email for every test run completedfailures— send an email for every test run that failsthreshold— send an email only afternotify_thresholdfailuresswitch— send an email only afternotify_thresholdfailures, and then once more when it begins passing again.
-
notify_thresholdnullAn integer between 1 and 10 for use with the notify_on settings:
thresholdandswitch -
recipientsarrayA list of team users to recieve emails according to the other settings
Show/Hide Child Attributes
-
emailstringThe email of the user
-
namestringThe name of the user
-
idstringThe unique identifier of the user
-
-
-
initial_variablesobjectAn object with the keys and values being used for variables when the test begins
Show/Hide Child Attributes
-
variableNamestringThe key contains the variable name (i.e.
variableName) and the value is the value of the variable (i.e.some value)
-
-
integrationsarrayA list of integrations to enable for test runs using this environment
-
namestringThe name for this environment
-
parent_environment_idnullThe parent environment to inherit from, applies only to test-specific environments
-
preserve_cookiesbooleanIf this is set to
true, tests using this environment will manage cookies between steps -
regionsarrayA list of API Monitoring regions to execute test runs in when using this environment
-
retry_on_failurebooleanIf this is set to
true, an additional test run will be triggered immediately after a failed scheduled test run -
stop_on_failurebooleanIf this is set to
true, test runs will stop executing after the first step that fails. All subsequent steps will be skipped -
remote_agentsarrayA list of remote agents to execute test runs in when using this environment
Show/Hide Child Attributes
-
namestringThe name of the remote agent
-
uuidstringThe unique identifier for the remote agent
-
-
scriptstringThe initial script to run before starting tests using this environment
-
test_idstringThe test this environment is associated with, applies only to test-specific environments
-
idstringThe unique ID for this environment
-
verify_sslbooleanIf this is set to
false, tests using this environment won't verify SSL certificates -
client_certificatestringClient certificate text available to be used in request authentication. PEM-encoded
-
webhooksarrayA list of URL's to send results to when test runs using this environment finish
Response200 OK
{
"auth": {
"password": "password",
"username": "username",
"auth_type": "basic"
},
"emails": {
"notify_all": false,
"notify_on": "all",
"notify_threshold": null,
"recipients": [
{
"email": "grace@example.com",
"name": "Grace Hopper",
"id": "4ee15ecc-7fe1-43cb-aa12-ef50420f2cf9"
}
]
},
"initial_variables": {
"my_variable": "some value",
"one more": "values"
},
"integrations": [],
"name": "Remote Settings",
"parent_environment_id": null,
"preserve_cookies": false,
"regions": [
"us1",
"jp1"
],
"retry_on_failure": false,
"stop_on_failure": false,
"remote_agents": [
{
"name": "my-local-machine.runscope.com",
"uuid": "141d4dbc-1e41-401e-8067-6df18501e9ed"
}
],
"script": "var a = \"asdf\";\nlog(\"OK\");",
"test_id": null,
"id": "f8007150-0052-482c-9d52-c3ea4042e0f5",
"verify_ssl": true,
"client_certificate": "",
"webhooks": [
"http://api.example.com/webhook_reciever",
"https://yourapihere.com/post"
]
}