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
-
auth
objectThe authentication settings for the test environment. Basic, OAuth 1.0, and short and extended OAuth 2.0 methods are supported.
Show/Hide Basic
-
password
stringPassword for this authentication
-
username
stringUser name for this authentication
-
auth_type
stringThe authorization type for this authentication. Value is
basic
Show/Hide OAuth 1.0
-
consumer_key
stringThe Consumer Key used for asking the service for authorization
-
consumer_secret
stringThe Consumer Secret used for asking the service for authorization
-
access_token
stringThe token used for accessing the resource
-
token_secret
stringThe secret that accompanies the access token
-
signature_type
stringSignature type. Value can be
auth_header
,query
, orbody
-
auth_type
stringThe authorization type for this authentication. Value is
oauth_1
Show/Hide OAuth 2.0 (short)
-
access_token
stringValue of the access token
-
token_location
stringLocation of the token. Value can be
query
orauth_header
-
auth_type
stringThe 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_type
stringOAuth 2.0 grant type. Value can be
authorization_code
,authorization_code_pkce
,implicit
,password_credentials
, orclient_credentials
Important! 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_token
stringValue of the access token
-
token_location
stringLocation of the token. Value can be
query
orauth_header
-
auth_url
stringThird-party authorization URL
-
access_token_url
stringURL for the access token
-
client_id
stringThe ID of the client
-
client_secret
stringThe client secret
-
code_challenge_method
stringMethod for challenging code, either
plain
orS256
. For PKCE grant type only. Default is SHA-256 -
code_verifier
stringThe code verifier string generated by the app, if available. For PKCE grant type only
-
password
stringPassword for third-party authorization
-
username
stringUser name for third-party authorization
-
scope
stringThe OAuth 2.0 scope string, if used
-
state
stringThe OAuth 2.0 state string, if used
-
client_authentication
stringMethod of client authentication, either either sent in
basic_auth_header
orbody
. Default isbasic_auth_header
-
auth_type
stringThe authorization type for this authentication. Value is
oauth_2
-
refresh_token
stringValue of the refresh token
-
is_auto_refresh_token
booleanDetermines whether the refresh token is auto-generated
-
-
emails
objectThe email details for sending notifications for this test
Show/Hide Child Attributes
-
notify_all
booleanSend an email to all team members according to the
notify_on
rules -
notify_on
stringUpon 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_threshold
failuresswitch
— send an email only afternotify_threshold
failures, and then once more when it begins passing again.
-
notify_threshold
nullAn integer between 1 and 10 for use with the notify_on settings:
threshold
andswitch
-
recipients
arrayA list of team users to recieve emails according to the other settings
Show/Hide Child Attributes
-
email
stringThe email of the user
-
name
stringThe name of the user
-
id
stringThe unique identifier of the user
-
-
-
initial_variables
objectAn object with the keys and values being used for variables when the test begins
Show/Hide Child Attributes
-
variableName
stringThe key contains the variable name (i.e.
variableName
) and the value is the value of the variable (i.e.some value
)
-
-
integrations
arrayA list of integrations to enable for test runs using this environment
-
name
stringThe name for this environment
-
parent_environment_id
nullThe parent environment to inherit from, applies only to test-specific environments
-
preserve_cookies
booleanIf this is set to
true
, tests using this environment will manage cookies between steps -
regions
arrayA list of API Monitoring regions to execute test runs in when using this environment
-
retry_on_failure
booleanIf this is set to
true
, an additional test run will be triggered immediately after a failed scheduled test run -
stop_on_failure
booleanIf this is set to
true
, test runs will stop executing after the first step that fails. All subsequent steps will be skipped -
remote_agents
arrayA list of remote agents to execute test runs in when using this environment
Show/Hide Child Attributes
-
name
stringThe name of the remote agent
-
uuid
stringThe unique identifier for the remote agent
-
-
script
stringThe initial script to run before starting tests using this environment
-
test_id
stringThe test this environment is associated with, applies only to test-specific environments
-
id
stringThe unique ID for this environment
-
verify_ssl
booleanIf this is set to
false
, tests using this environment won't verify SSL certificates -
client_certificate
stringClient certificate text available to be used in request authentication. PEM-encoded
-
webhooks
arrayA 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"
]
}