api spec without event methods
Change-Id: Ie226c9129d88abecaa52719f869794ea3c914f2d
This commit is contained in:
parent
04757a1d56
commit
b166e0cb3c
@ -20,89 +20,6 @@ N/A
|
|||||||
|
|
||||||
All urls will be prefaced by */v1/* indicating version one of the api is in use.
|
All urls will be prefaced by */v1/* indicating version one of the api is in use.
|
||||||
|
|
||||||
####events#
|
|
||||||
|
|
||||||
**description:** allows remote tester to add and list events of a test run.
|
|
||||||
|
|
||||||
**url:** post: /v1/events/
|
|
||||||
|
|
||||||
**parameters:**
|
|
||||||
|
|
||||||
str:data - a string input containing json as shown in lower example.
|
|
||||||
|
|
||||||
**post example:**
|
|
||||||
|
|
||||||
{
|
|
||||||
'job_id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'message': 'this job has failed because of blah',
|
|
||||||
'event_type': 'finished'|'failed'|'pending'|'running'
|
|
||||||
}
|
|
||||||
|
|
||||||
**sucessful response:** http:201 - The status has been saved
|
|
||||||
|
|
||||||
{
|
|
||||||
'id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'job_id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'timestamp': '00:00:00',
|
|
||||||
'message': 'this job has failed because of blah',
|
|
||||||
'event_type': 'finished'|'failed'|'pending'|'running'
|
|
||||||
}
|
|
||||||
|
|
||||||
**failed response:** http:404 - the job_id doesn't exist
|
|
||||||
|
|
||||||
{
|
|
||||||
'message': 'the job_id does not exist',
|
|
||||||
}
|
|
||||||
|
|
||||||
**failed response:** http:400 - malformed request | missing information
|
|
||||||
|
|
||||||
{
|
|
||||||
'message': 'malformed request | missing information',
|
|
||||||
}
|
|
||||||
|
|
||||||
------------
|
|
||||||
|
|
||||||
####jobs > events#
|
|
||||||
|
|
||||||
**description:** Allows remote tester to add events to a test run.
|
|
||||||
|
|
||||||
**url:** get: /v1/jobs/[job_id]/events
|
|
||||||
|
|
||||||
**Parameters:**
|
|
||||||
|
|
||||||
int:job_id - The test id you want the event history for.
|
|
||||||
|
|
||||||
**sucessful response:** http:201 - here are some results
|
|
||||||
|
|
||||||
[{
|
|
||||||
'id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'job_id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'timestamp': '00:00:00',
|
|
||||||
'message': 'the job is starting',
|
|
||||||
'event_type': 'pending'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'job_id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'timestamp': '00:00:01',
|
|
||||||
'message': 'tests are running now',
|
|
||||||
'event_type': 'running'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'job_id': '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12',
|
|
||||||
'timestamp': '00:00:02',
|
|
||||||
'message': 'this job has finsihed',
|
|
||||||
'event_type': 'finished'
|
|
||||||
}]
|
|
||||||
|
|
||||||
**failed response:** http:404 - the job_id doesn't exist
|
|
||||||
|
|
||||||
{
|
|
||||||
'message': 'the job_id doesnt exist.'
|
|
||||||
}
|
|
||||||
|
|
||||||
------------
|
|
||||||
|
|
||||||
####results#
|
####results#
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user