{"swagger":"2.0","info":{"title":"Crossbrowsertesting.com Selenium API","description":"What's in this version: \n\n 1. API v3 is a RESTful web service \n 2. Retrieve lists of browsers available for Selenium Tests \n 3. Take Snapshots, Record Videos, and Record Network Packet Captures of a Selenium Test \n 4. Retrieve a list of Selenium Tests ran and their results \n 5. All responses are JSON only at this time","version":"3.0.0"},"host":"crossbrowsertesting.com","schemes":["https"],"securityDefinitions":{"basicAuth":{"type":"basic","description":"HTTP Basic Authentication"}},"basePath":"/api/v3","produces":["application/json"],"paths":{"/selenium/browsers":{"get":{"summary":"List Selenium Test Browsers","description":"Access a list of available browsers for Selenium Tests.","parameters":[{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"default":"json","type":"string"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"An array of Configuration objects. Within each configuration is an array of browsers","schema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"api_name":{"type":"string"},"device":{"type":"string"},"version":{"type":"string"},"type":{"type":"string"},"icon_class":{"type":"string"},"sort_order":{"type":"number"},"browsers":{"type":"array","items":{"properties":{"default_config":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"string"},"api_name":{"type":"string"},"default_live_test_browser":{"type":"boolean"},"icon_class":{"type":"string"},"major_browser":{"type":"boolean"},"device":{"type":"string"}}}},"other_software":{"type":"array","items":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"string"},"icon_class":{"type":"string"}}}},"resolutions":{"type":"array","items":{"properties":{"width":{"type":"integer"},"height":{"type":"integer"},"name":{"type":"string"},"desktop_width":{"type":"integer"},"desktop_height":{"type":"integer"},"default":{"type":"boolean"}}}}}}}}}}},"/selenium":{"get":{"security":[{"basicAuth":[]}],"summary":"List Selenium Test History","description":"Returns a list of Selenium Tests ran on your account. Results returned are in order of most recent to oldest tests ran. As there can be hundreds of tests, the results are limited by specifying a starting index and count of tests to return indicated in the parameters provided. A record count is included in the \"meta\" attribute to determine the total number of tests ran.","parameters":[{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"},{"name":"num","in":"query","description":"The number of Selenium Tests to return for this request.","required":false,"type":"number","format":"integer","default":10},{"name":"start","in":"query","description":"Starting index for the Selenium Test results to retrieve","required":false,"type":"number","format":"integer","default":0},{"name":"active","in":"query","description":"Include only active or inactive tests.","required":false,"type":"boolean"},{"name":"name","in":"query","description":"Tests matching the specified Name provided when the test was created.","required":false,"type":"string"},{"name":"build","in":"query","description":"Tests matching the specified Build number provided when the test was created.","required":false,"type":"string"},{"name":"url","in":"query","description":"Filter to only tests with URLs that match this parameter. Can be full URL or partial. Example: google.com will match any tests whose URL has google.com within it.","required":false,"type":"string"},{"name":"score","in":"query","description":"Score can be one of three values: pass, fail, or unset. Filters results to only those tests that match the score provided.","required":false,"type":"string"},{"name":"os","in":"query","description":"The name and version of the operating system: Windows 8, Mac OSX 10.9, iPad 4 / 7.1 Simulator","required":false,"type":"string"},{"name":"os_type","in":"query","description":"The operating system type to filter results which includes all versions: Windows, Mac, iPad, Android","required":false,"type":"string"},{"name":"browser","in":"query","description":"The browser name and version to filter results: Firefox 32, Chrome Mobile 36, Internet Explorer 9","required":false,"type":"string"},{"name":"browser_type","in":"query","description":"The browser type to filter results which includes all versions: Firefox, Chrome Mobile, Internet Explorer","required":false,"type":"string"},{"name":"resolution","in":"query","description":"The resolution name to filter results to: 1024x769, 1400x1050","required":false,"type":"string"},{"name":"start_date","in":"query","description":"The starting date to filter results. Format: YYYY-MM-DD (2014-09-01)","required":false,"type":"string","format":"date"},{"name":"end_date","in":"query","description":"The ending date to filter results. Format: YYYY-MM-DD (2014-09-03)","required":false,"type":"string","format":"date"}],"responses":{"200":{"description":"An object containing the metadata of overall selenium tests and an array of the user's Selenium Test history","schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"record_count":{"type":"integer"}}},"selenium":{"type":"array","items":{"$ref":"#/definitions/selenium_test"}}}}}}}},"/selenium/{selenium_test_id}":{"get":{"security":[{"basicAuth":[]}],"summary":"Show Selenium Test Info","description":"Returns information about an active or finished Selenium Test session. It includes the current state, links to results, and result details for Commands, Capabilites, Snapshots, Videos, and Network Packet Captures.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Selenium Test Information","schema":{"$ref":"#/definitions/selenium_test"}}}},"delete":{"consumes":["application/x-www-form-urlencoded"],"summary":"Stop Selenium Test","description":"Stop an active Selenium Test session. Most likely used within a Selenium script as it is running.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Selenium Test Information","schema":{"$ref":"#/definitions/selenium_test"}}}},"put":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Update Selenium Test","description":"Options to set the description, set score as Pass or Fail, or archive a test.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"action","in":"formData","description":"Use action 'set_score' to mark a test as pass/fail.  Use action 'set_description' to set the test's notes. Use action 'archive' to archive or unarchive a test.","required":true,"type":"string","default":null},{"name":"score","in":"formData","description":"For action=set_score: can be one of three values: 'pass', 'fail', or 'unset'","required":false,"type":"string"},{"name":"description","in":"formData","description":"For action=set_description: the notes for the description of the Selenium Test. Pass an empty string to clear out any notes.","type":"string","required":false},{"name":"archived","in":"formData","description":"For action=archive: true or false","required":false,"type":"string"}],"responses":{"200":{"description":"the Selenium Test Information","schema":{"$ref":"#/definitions/selenium_test"}}}}},"/selenium/{selenium_test_id}/snapshots":{"post":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Take Snapshot","description":"Take a Snapshot of an active Selenium Test. Most likely used within a Selenium script as it is running to offer better control for when a screenshot is captured.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Snapshot information","schema":{"type":"array","items":{"$ref":"#/definitions/snapshot"}}}}},"get":{"security":[{"basicAuth":[]}],"summary":"List Snapshots","description":"Returns a list of Snapshots taken for a specific Selenium Test. Each result provides links to view and share the results on the CBT website as well as access to the raw images.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Snapshot information","schema":{"$ref":"#/definitions/snapshot"}}}}},"/selenium/{selenium_test_id}/snapshots/{snapshot_hash}":{"get":{"security":[{"basicAuth":[]}],"summary":"Show Snapshot Info","description":"Returns information about a specific Snapshot taken for a Selenium Test. The result provides links to view and share the Snapshot on the CBT website as well as access to the raw images.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"snapshot_hash","in":"path","description":"Hash of the Snapshot","required":true,"type":"string"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Snapshot's information","schema":{"$ref":"#/definitions/snapshot"}}}},"put":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Set Snapshot Description","description":"Add notes to a Snapshot from a Selenium Test.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"snapshot_hash","in":"path","description":"Hash of the Snapshot","required":true,"type":"string"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"},{"name":"description","in":"formData","description":"The notes for the description of the Snapshot.","type":"string","required":true}],"responses":{"200":{"description":"the Snapshot's information","schema":{"$ref":"#/definitions/snapshot"}}}}},"/selenium/{selenium_test_id}/videos":{"post":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Record Video","description":"Start recording a Video of an active Selenium Test. Most likely used within a selenium script as it's running.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Video's information","schema":{"$ref":"#/definitions/video"}}}},"get":{"security":[{"basicAuth":[]}],"summary":"List Videos","description":"Returns a list of Videos taken for a specific Selenium Test. Each result provides links to view and share the results on the CBT website as well as access to the FLV file and initial image stored to represent the video.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"An array of Videos","schema":{"type":"array","items":{"$ref":"#/definitions/video"}}}}}},"/selenium/{selenium_test_id}/videos/{video_hash}":{"get":{"security":[{"basicAuth":[]}],"summary":"Show Video Info","description":"Returns information about a specific Video taken for a Selenium Test. The result provides links to view and share the results on the CBT website as well as access to the FLV file and initial image stored to represent the video.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"video_hash","in":"path","description":"Hash of the Video","required":true,"type":"string"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Video's information","schema":{"$ref":"#/definitions/video"}}}},"put":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Set Video Description","description":"Add notes to a Video from a Selenium Test","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"video_hash","in":"path","description":"Hash of the Video","required":true,"type":"string"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"},{"name":"description","in":"formData","description":"The notes for the description of the Video","required":true,"type":"string"}],"responses":{"200":{"description":"the Video's information","schema":{"$ref":"#/definitions/video"}}}},"delete":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Stop Video","description":"Stop recording an active Video. Most likely used within a selenium script as it's running.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"video_hash","in":"path","description":"Hash of the Video","required":true,"type":"string"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Video's information","schema":{"$ref":"#/definitions/video"}}}}},"/selenium/{selenium_test_id}/networks":{"post":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Record Network Packets","description":"Start recording a Network Packet Capture for an active Selenium Test. Most likely used within a selenium script as it's running.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Network Packet Capture's information","schema":{"type":"array","items":{"$ref":"#/definitions/network"}}}}},"get":{"security":[{"basicAuth":[]}],"summary":"List Network Packet Captures","description":"Returns a list of Network Packet Captures recorded for a specific Selenium Test. Each result provides links to view and share the results on the CBT website as well as access to the PCAP and HAR file.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"An array of Network Packet Captures","schema":{"type":"array","items":{"$ref":"#/definitions/network"}}}}}},"/selenium/{selenium_test_id}/networks/{network_hash}":{"get":{"security":[{"basicAuth":[]}],"summary":"Show Network Packet Capture Info","description":"Returns information about a specific Network Packet Capture recorded for a Selenium Test. The result provides links to view and share the results on the CBT website as well as access to the PCAP and HAR file.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"network_hash","in":"path","description":"Hash of the Network Capture","required":true,"type":"string"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"json"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Network Packet Capture's information","schema":{"$ref":"#/definitions/network"}}}},"put":{"consumes":["application/x-www-form-urlencoded"],"security":[{"basicAuth":[]}],"summary":"Set Network Packet Capture Description","description":"Add notes to a Network Packet Capture from a Selenium Test.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"network_hash","in":"path","description":"Hash of the Network Capture","required":true,"type":"string"},{"name":"format","in":"formData","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"formData","description":"Name of callback method for JSONP requests.","required":false,"type":"string"},{"name":"description","in":"formData","description":"The notes for the description of the Network Packet Capture","required":true,"type":"string"}],"responses":{"200":{"description":"the Network Packet Capture's information","schema":{"type":"array","items":{"$ref":"#/definitions/network"}}}}},"delete":{"security":[{"basicAuth":[]}],"summary":"Stop Network Packet Capture","description":"Start recording a Network Packet Capture for an active Selenium Test. Most likely used within a selenium script as it's running.","parameters":[{"name":"selenium_test_id","in":"path","description":"Selenium Test session id","required":true,"type":"number","format":"integer"},{"name":"network_hash","in":"path","description":"Hash of the Network Capture","required":true,"type":"string"},{"name":"format","in":"query","description":"The format of the returned data. Possible values are \"json\" or \"jsonp\".","required":false,"type":"string","default":"false"},{"name":"callback","in":"query","description":"Name of callback method for JSONP requests.","required":false,"type":"string"}],"responses":{"200":{"description":"the Network Packet Capture's information","schema":{"$ref":"#/definitions/network"}}}}}},"definitions":{"selenium_test":{"type":"object","properties":{"selenium_test_id":{"type":"integer"},"selenium_session_id":{"type":"string"},"start_date":{"type":"string"},"finish_date":{"type":"string"},"test_score":{"type":"string"},"reason_stopped":{"type":"string"},"active":{"type":"boolean"},"state":{"type":"string"},"vnc_password":{"type":"string"},"vnc_port":{"type":"integer"},"rating":{"type":"integer"},"feedback":{"type":"string"},"startup_finish_date":{"type":"string"},"url":{"type":"string"},"client_platform":{"type":"string"},"client_browser":{"type":"string"},"use_copyrect":{"type":"boolean"},"scale":{"type":"string"},"is_packet_capturing":{"type":"integer"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"}},"show_result_web_url":{"type":"string"},"show_result_public_url":{"type":"string"},"download_results_zip_url":{"type":"string"},"launch_selenium_test_url":{"type":"string"},"resolution":{"$ref":"#/definitions/resolution"},"os":{"$ref":"#/definitions/os"},"browser":{"$ref":"#/definitions/browser"},"videos":{"type":"array","items":{"$ref":"#/definitions/video"}},"snapshots":{"type":"array","items":{"$ref":"#/definitions/snapshot"}},"networks":{"type":"array","items":{"$ref":"#/definitions/network"}},"caps":{"$ref":"#/definitions/caps"},"commands":{"type":"array","items":{"$ref":"#/definitions/command"}}}},"resolution":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"desktop_height":{"type":"integer"},"desktop_width":{"type":"integer"},"name":{"type":"string"}}},"os":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"string"},"api_name":{"type":"string"},"device":{"type":"string"},"icon_class":{"type":"string"}}},"browser":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"version":{"type":"string"},"api_name":{"type":"string"},"icon_class":{"type":"string"}}},"video":{"type":"object","properties":{"hash":{"type":"string"},"date_added":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"}},"is_finished":{"type":"boolean"},"show_result_web_url":{"type":"string"},"show_result_public_url":{"type":"string"},"video":{"type":"string"},"image":{"type":"string"},"thumbnail_image":{"type":"string"}}},"snapshot":{"type":"object","properties":{"hash":{"type":"string"},"date_added":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"}},"show_result_web_url":{"type":"string"},"show_result_public_url":{"type":"string"},"image":{"type":"string"},"thumbnail_image":{"type":"string"}}},"network":{"type":"object","properties":{"hash":{"type":"string"},"date_added":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"}},"is_finished":{"type":"boolean"},"show_result_web_url":{"type":"string"},"show_result_public_url":{"type":"string"},"pcap":{"type":"string"},"har":{"type":"string"}}},"caps":{"type":"object","properties":{"screen_resolution":{"type":"string"},"name":{"type":"string"},"record_snapshot":{"type":"string"},"record_video":{"type":"string"},"os_api_name":{"type":"string"},"build":{"type":"string"},"browser_api_name":{"type":"string"},"browserName":{"type":"string"},"platformName":{"type":"string"},"deviceName":{"type":"string"},"platformVersion":{"type":"string"}}},"command":{"type":"object","properties":{"body":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"date_issued":{"type":"string"},"hash":{"type":"string"},"response_code":{"type":"integer"},"response_body":{"type":"string"}}},"tag":{"type":"string"}}}