Screenster Public API

The following queries are available:

  • Authenticate
  • Get projects list
  • Get list of all tests in a project
  • Run all project’s tests
  • Stop all ongoing runs in a project
  • Import a project

Authenticate

This query allows to log in to a Screenster Server instance with your credentials

URL: /api/public/authenticate
Method: POST
URL Params:

  • email
  • password

Data Params: your credentials
Success Response: None, authorization is successful
Error Response:

{
“meta”: {
“code”: 403,
“message”: “not_authorized”,
“errDetail”: “This server is registered to Name1. Please contact administrator Name1 to be added to its subscription”
},
“response”: {}
}

Get projects list

This query returns the complete list of projects on a Screenster Server instance, ordered by name

URL: /api/public/projects
Method: GET
URL Params: None
Data Params: None
Success Response:
{
“meta”:{ “code”:200, “message”:”OK” },
“response”:{
“projects”:[
{ “name”:”My Project”, “id”:4 }
]
}
}
Error Response:
{
“meta”:{
“code”:404,
“message”:”project_not_found”,
“errDetail”:”No Projects Found”
},
“response”:{}
}

Get list of all tests in a project

Returns all tests of the project with id = projectId.

URL: /api/public/projects/{projectId}/tests
Method:GET
URL Params:

  • Optional: projectId

Data Params: your project’s ID
Success Response:
{
“meta”:{ “code”:200, “message”:”OK” },
“response”:{
“scripts”:[
{ “id”:9, “name”:”test 1″, “description”:”” },
{ “id”:11, “name”:”test 2″, “description”:””}
]
}
}
Error Response:
{
“meta”:{“code”:404,”message”:”project_not_found”,”errDetail”:”Project ID:999 Not Found”},”response”:{}
}

Run all project’s tests

URL: /api/public/projects/{projectId}/runs/{browserName}
Method: POST
URL Params:

  • projectId
  • browserName – the name of browser. Available options – “firefox”, “chrome”.

Data Params: none
Success Response: the tests are launched
Error Response: none

Stop all ongoing runs in a project

URL: /api/public/projects/{projectId}/stopProject
Method: POST
URL Params:

  • projectId

Data Params: none
Success Response: the tests are stopped
Error Response: none

Get statuses of all tests in a project

URL: /api/public/projects/{projectId}/status
Method: GET
URL Params:

  • projectId

Data Params: none
Success Response:
{“meta”:{“code”:200,”message”:”OK”},
“response”:{“runs”:[{“id”:64,”description”:”test 1″,”dateStarted”:”Mar 7, 2017 7:56:48 PM”,”status”:”STARTED”,”totalSteps”:5,”currentStep”:0,”isSuccessful”:false},{“id”:65,”description”:”test 1″,”dateStarted”:”Mar 7, 2017 7:56:48 PM”,”status”:”WAITING_STARTING”,”totalSteps”:5,”currentStep”:0,”isSuccessful”:false}]}}
Error Response:
{“meta”:{“code”:404,”message”:”project_not_found”,”errDetail”:”Project ID:999 Not Found”},”response”:{}}

Import a project

URL: /api/public/projects/import
Method: POST
URL Params: none
Data Params : your file attachment
Success Response: project is imported to Screenster
Error Response: none

WordPress Image Lightbox Plugin