Version used
Context of the issue/feature
While creating AETs API test I've spotted several API related bugs:
- Get artifact by artifact Id for wrong artifactId returns code 500 instead of 400
request: GET: http://aet-vagrant:8181/api/artifact?company=aet&project=aet&id=99999999
response: HTTP ERROR 500
expected reposne: 400 with proper error message
- Get metadata api for wrong correlationId returns error message text which doesn't describe the problem:
request: GET: http://aet-vagrant:8181/api/metadata?company=aet&project=aet&correlationId=99999999
response:{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }
- Get metadata api for wrong suite name returns error message skipping suite name:
request: GET: http://aet-vagrant:8181/api/metadata?company=aet&project=aet&suite=no_existing_suite
response:{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }
expected reposne: { "message": "Unable to get Suite Metadata for no_existing_suite {company='aet', project='aet'}" }
- Get metadata by suite name and version for wrong suite version returns error message text which doesn't describe the problem:
request: GET: http://aet-vagrant:8181/api/metadata?company=aet&project=aet&suite=main&version=999
response:{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }
- Get correlationIds and versions by suite name for not existing suite returns wrong status code (404 instead of 400) with proper error message:
request: GET: http://aet-vagrant:8181/api/history?company=aet&project=aet&suite=no_existing_suite
response: 404{"message":"History not found for suite: no_existing_suite {company\u003d\u0027aet\u0027, project\u003d\u0027aet\u0027}"}
- Get all locked suites returns JSON object with looks like not valid json object:
request: GET: http://aet-vagrant:8181/configs/locks
response:{aet-aet-main2=aet-aet-main2-1540988624814, aet-aet-main=aet-aet-main-1540540651320}
Documentation link: https://github.com/Cognifide/aet/wiki/WebAPI
Version used
AET 3.0.1Context of the issue/feature
While creating AETs API test I've spotted several API related bugs:
request: GET:
http://aet-vagrant:8181/api/artifact?company=aet&project=aet&id=99999999response:
HTTP ERROR 500expected reposne: 400 with proper error message
request: GET:
http://aet-vagrant:8181/api/metadata?company=aet&project=aet&correlationId=99999999response:
{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }request: GET:
http://aet-vagrant:8181/api/metadata?company=aet&project=aet&suite=no_existing_suiteresponse:
{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }expected reposne:
{ "message": "Unable to get Suite Metadata for no_existing_suite {company='aet', project='aet'}" }request: GET:
http://aet-vagrant:8181/api/metadata?company=aet&project=aet&suite=main&version=999response:
{ "message": "Unable to get Suite Metadata for {company='aet', project='aet'}" }request: GET:
http://aet-vagrant:8181/api/history?company=aet&project=aet&suite=no_existing_suiteresponse: 404
{"message":"History not found for suite: no_existing_suite {company\u003d\u0027aet\u0027, project\u003d\u0027aet\u0027}"}request: GET:
http://aet-vagrant:8181/configs/locksresponse:
{aet-aet-main2=aet-aet-main2-1540988624814, aet-aet-main=aet-aet-main-1540540651320}Documentation link: https://github.com/Cognifide/aet/wiki/WebAPI