Sipfront API¶
Sipfront provides a REST API to programmatically control various aspects of the platform.
Data Format¶
To send data to the API, use form-encoded request bodies. The API responds with JSON data and standard HTTP response codes.
Authentication¶
Authentication on the API is performed using Basic Authentication over HTTPS.
Info
You can create your own API key here: Sipfront API Keys.
Note
Note that the secret key is only revealed once, so if you lose it, you have to issue a new pair of keys.
Explore API Endpoints¶
#!/bin/sh
AUTH="$public_key:$secret"
curl -X GET \
-u "$AUTH" \
https://app.sipfront.com/api/v2/ | jq .
echo
The response shows the currently provided API URLs with supported HTTP methods each:
{
"endpoints": [
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2"
},
{
"methods": [
"GET",
"POST"
],
"url": "http://app.sipfront.com/api/v2/appimages"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/projects"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/projects/:id/status/last"
},
{
"methods": [
"POST"
],
"url": "http://app.sipfront.com/api/v2/projects/run"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/runs"
},
{
"methods": [
"GET"
],
"name": "api_run_status",
"url": "http://app.sipfront.com/api/v2/runs/:id/status"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/runs/:sid/stats"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/runs/:sid/stats/:measure"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/tests"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/tests/:id/status/last"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/tests/:tid/stats"
},
{
"methods": [
"GET"
],
"url": "http://app.sipfront.com/api/v2/tests/:tid/stats/:measure"
},
{
"methods": [
"POST"
],
"url": "http://app.sipfront.com/api/v2/tests/run"
}
],
"status": 200
}
Explore available projects¶
#!/bin/sh
AUTH="$public_key:$secret"
curl -X GET \
-u "$AUTH" \
https://app.sipfront.com/api/v2/projects | jq .
echo
Explore available tests and their parameters¶
#!/bin/sh
AUTH="$public_key:$secret"
curl -X GET \
-u "$AUTH" \
https://app.sipfront.com/api/v2/tests | jq .
echo
Browse test sessions¶
#!/bin/sh
AUTH="$public_key:$secret"
curl -X GET \
-u "$AUTH" \
https://app.sipfront.com/api/v2/runs | jq .
echo
Below query parameters can be appended to the URL for pagination:
start
: pagination offsetcount
: page size to fetch (defaults to 100)
Below query parameters can be appended to the URL for sorting:
orderby
: sort by session columnid
session_id
tags
has_passed
result_description
test_id
test_name
project_id
project_name
started_at
stopped_at
agentpool_name
is_finished
is_failed
testcase_name
session_status
orderdir
: sort directionasc
desc
Below query parameters can be appended to the URL to narrow results by time range:
startdate
: filter for runs started at after the specified timestamp in epoch secondsenddate
: filter for runs started at before the specified timestamp in epoch seconds
Below query parameters can be appended to the URL for detailed filtering:
filtername
: filter by session columnid
session_id
tags
has_passed
result_description
test_id
test_name
project_id
project_name
started_at
stopped_at
agentpool_name
is_finished
is_failed
testcase_name
session_status
filterval
: session column filter value
The filtername
, filterval
query parameters can be repeated to form conjunctions, ie. https://app.sipfront.com/api/v2/runs?filtername=tags&filterval=mytag1&filtername=tags&filterval=mytag2