create - Sessions APIThe create method of the sessions API creates a new session. If provided with an configuration it creates a session accordingly. If no configuration is provided it uses default values. It returns the session token of the newly created session, which is the unique identifier of sessions. While a session has the status PENDING it is possible to modify the configuration using the update method of the sessions API. As it is required to create the session from the device under test, this is really helpful, since it allows to configure the session using a second device.
POST /api/sessions
{ "tests": { "include": "Array<String>", "exclude": "Array<String>" }, "types": "Enum['automatic', 'manual']", "timeouts": { "automatic": "Integer", "manual": "Integer", "<test_path>": "Integer" }, "reference_tokens": "Array<String>", "labels": "Array<String>", "type": "String" }
{ "tests": { "include": ["/"], "exclude": [] }, "types": ["automatic", "manual"], "timeouts": { "automatic": 60000, "manual": 300000 }, "reference_tokens": [], "labels": [] }
If successful, the token of the new session is returned.
{ "token": "String" }
Request:
POST /api/sessions
{ "tests": { "include": ["/apiOne", "/apiTwo/sub"], "exclude": ["/apiOne/specials"] }, "types": ["automatic"], "timeouts": { "automatic": 70000, "/apiOne/example/dir": 30000, "/apiOne/example/filehtml": 45000 }, "reference_tokens": [ "ce2dc080-c283-11e9-b4d6-e046513784c2", "430f47d0-c283-11e9-8776-fcbc36b81035" ], "labels": ["label1", "label2", "label3"] }
Response:
{ "token": "6fdbd1a0-c339-11e9-b775-6d49dd567772" }