MuukTest has a collection of public Rest API for all users, in this article will explain all.
Execution
/api/v1/execution (GET)
Description
Get the details of the last or specific test execution.
Route
https://portal.muuktest.com:8081/api/v1/execution/<Execution Number>
Parameters
Parameter |
Description |
"key"
|
The downloaded key from the MuukTest Portal (key.pub) |
"Execution number"(optional) |
Specific execution to return. If empty returns the latest execution. |
Returns
{
“status”:boolean,
“tests”: Array [
{
“status” : boolean,
“Message” : string
}
]
}
- status: Indicates if the process of getting the test details was successful or not.
- message: If there was an error on the process you get a message indicating why.
Example
Shell
#curl -X GET -d @key.pub 'https://portal.muuktest.com:8081/api/v1/execution/7'
The @key.pub is where you will put the downloaded key from the portal. Eg:
'{"key":"value"}'
Result
{"status":"Failed","tests":[
{"status":"Failed","message":"geb.error.RequiredPageContentNotPresent: The required page content 'myFreshbooksComcpzn0bnrhncm -> ajgS2BNiWMField: geb.navigator.EmptyNavigator' is not present"},
{"status":"Success","message":""},
{"status":"Success","message":""}
]
}
Execute Test
/api/v1/cloudExecution (POST)
Description
Run any test you have created, you can run it either by tag or by hashtag.
Route
https://portal.muuktest.com:8081/api/v1/cloudExecution
Parameters
Parameter |
Description |
"key"
|
The downloaded key from the MuukTest Portal (key.pub) |
"browser"
|
Here you can choose Chrome or Firefox. |
"elements" : [ |
elements: The tests you want to add to this schedule.
|
Returns
{
"success":true/false,
"message":""
}
- success: Indicates if the process of executing the test was successful or not
- message: If there was an error in the process you get a message indicating why.
Example:
Shell:
curl -H "Content-Type: application/json" -X POST -d @oncloud_execution.json 'https://portal.muuktest.com:8081/api/v1/cloudExecution'
The @oncloud_execution.json is where you will put all the data described above, depending on whether you want to run with Tag or Hashtag. Eg:
'{"key": " ", "browser": " ", "elements": [{"name": [ " "], "type": "tag/hashtag"}]}'
Result:
{
"success":true",
"message":""
}
Global Variable (GET)
/api/v1/globalvariable (GET)
Description
This route lists the global variables within your organization.
Route
https://portal.muuktest.com:8081/api/v1/globalvariable
Parameters:
Parameter |
Description |
"key"
|
The downloaded key from the MuukTest Portal (key.pub) |
Returns:
{
"globalVariables":[],
"status":true/false,
"message":""
}
- globalVariables: An array with the global variables within your organization.
- success: Indicates if the process of getting the global was successful or not
- msg: If there was an error in the process you get a message indicating why.
Example:
Shell:
curl -X GET -d @key.pub https://portal.muuktest.com:8081/api/v1/globalvariable -k -H "Content-Type: application/json"
The @key.pub is where you will put the downloaded key from the portal. Eg:
'{"key":"value"}'
Result:
{
"globalVariables":[ { name : “var1” , value: “qa1” }, { name : “var2” , value: “qa2” }],
"status":true,
"message":""
}
Global Variable (POST)
/api/v1/globalvariable (POST)
Description
This route saves a new variable or edits an existing one (based on name).
Route
https://portal.muuktest.com:8081/api/v1/globalvariable
Parameters
Parameter |
Description |
"key"
|
The downloaded key from the MuukTest Portal (key.pub) |
params(object): |
|
Returns
An object that will look like this one:
{
"success":true/false,
"msg":""
}
- success: Indicates if the process of adding a global variable was successful or not
- msg: If there was an error in the process you get a message indicating why.
Example
Shell
curl -X POST -d @globalvarApi.json https://portal.muuktest.com:8081/api/v1/globalvariable -k -H "Content-Type: application/json"
The @globalvarApi.json is an object where you enter the parameters indicated above. eg:
'{"key":"", "params": {"name": "newVar", "value": "qa2"}}'
Result
{
"status":true,
"message":""
}
Scheduling (POST)
/api/v1/schedule(POST)
Description
This route creates a new schedule.
Route
https://portal.muuktest.com:8081/api/v1/schedule
Parameters
Parameter |
Description |
"key"
|
The downloaded key from the MuukTest Portal (key.pub) |
"params" (object) : |
|
Returns
An object that will look like this one:
{
"success":true/false,
"msg":""
}
- success: Indicates if the process of adding a schedule was successful or not
- msg: If there was an error in the process you get a message indicating why.
Example
Shell
curl -X POST -d @schedule.json https://portal.muuktest.com:8081/api/v1/globalvariable -k -H "Content-Type: application/json"
The @schedule.json is an object where you enter the parameters indicated above. example:
'{
"key" : "key2jme14g",
"params" : {
"name" : "Test schedule 1",
"initdate" : "12/12/20",
"time": "20:00 ",
"advanced":{
"browsers":["chrome"]
},
"recurrence":{
"type":"weekdays",
"dayfrequency":["monday","tuesday","wednesday", "thursday", "friday"]
},
"elements":[
{
"name":["TC8"],
"type":"tag"
}
]
}
}'
Result
{
"status":true,
"message":""
}
Test (PUT)
/api/v1/test (PUT)
Description
This route updates the URL of an existing test.
Route
https://portal.muuktest.com:8081/api/v1/test
Parameters
Parameter |
Description |
"key"
|
The downloaded key from the MuukTest Portal (key.pub) |
"tag" |
Test ID of the test you want to modify. |
params(object): |
|
Returns
An object that will look like this one:
{
"status":true/false,
"message":""
}
- status: Indicates if the process of updating a test was successful or not.
- message: If there was an error on the process you get a message indicating why otherwise you will get a successful message.
Example
Shell
curl -X PUT -d @testInfoApi.json https://portal.muuktest.com:8081/api/v1/test -k -H "Content-Type: application/json"
The @testInfoApi.json is an object where you enter the parameters indicated above. eg:
'{
"key" : "key2jme14g",
"tag" : "TC1",
"params":
{
"url": "https://portal.muuktest.com:8081"
}
}'
Result
{
"status":true,
"message":""
}
User (PUT)
/api/v1/user (PUT)
Description
This route can help you to edit users.
Route
https://portal.muuktest.com:8081/api/v1/test
Parameters
Parameter |
Description |
"key" (string)
|
The downloaded key from the MuukTest Portal (key.pub) |
"newName" (string) |
The new username that will be changed |
Returns
An object that will look like this one:
{
"status":true/false,
"message":""
}
- status: Indicates if the process of updating a test was successful or not.
- message: If there was an error on the process you get a message indicating why otherwise you will get a successful message.
Example
Shell
curl -X PUT -d @user.json https://portal.muuktest.com:8081/api/v1/user -k -H "Content-Type: application/json"
The @user.json is an object where you enter the parameters indicated above. eg:
'{
"key" : "key-value",
"newName" : "new name"
}'
Result
{
"status":true,
"message":""
}
Invite (POST)
/api/v1/invite (POST)
Description
This route can help you to send invitations by email to your team members to use MuukTest.
Route
https://portal.muuktest.com:8081/api/v1/invite
Parameters
Parameter |
Description |
"key" (string)
|
The downloaded key from the MuukTest Portal (key.pub) |
"emailMembers" (array of string) |
Array including all emails from the team |
"sameOrganization" (boolean) *optional |
A bool value indicates if invitations will be sent to your organization or only for an invite to use MuukTest. If you don't use it, by default is true. |
Returns
An object that will look like this one:
{
"status":true/false,
"message":""
}
- status: Indicates if the process of updating a test was successful or not.
- message: If there was an error on the process you get a message indicating why otherwise you will get a successful message.
Example
Shell
curl -X POST -d @members.json https://portal.muuktest.com:8081/api/v1/invite -k -H "Content-Type: application/json"
The @members.json is an object where you enter the parameters indicated above. eg:
'{
"key" : "key-value",
"emailMembers" : [
"example@email.com",
"example@mail.com"
]
}'
Result
{
"status":true,
"message":""
}
Execute Schedule (GET)
/api/v1/executeSchedule (GET)
Description
This route helps you to execute scheduling. Use the name to search schedule. If have more than one with the same name, cannot execute any schedule.
Route
https://portal.muuktest.com:8081/api/v1/executeSchedule
Parameters
Parameter |
Description |
"key" (string)
|
The downloaded key from the MuukTest Portal (key.pub) |
"name" (string) |
Name of scheduling |
Returns
An object that will look like this one:
{
"status":true/false,
"message":""
}
- status: Indicates if the process of updating a test was successful or not.
- message: If there was an error on the process you get a message indicating why otherwise you will get a successful message.
Example
Shell
curl -X GET -d @schedule.json https://portal.muuktest.com:8081/api/v1/executeSchedule -k -H "Content-Type: application/json"
The @schedule.json is an object where you enter the parameters indicated above. eg:
'{
"key" : "key-value",
"scheduleName" : "value"
}'
Result
{
"status":true,
"message":""
}
Comments
0 comments
Please sign in to leave a comment.