ISAITB / gitb

The Interoperability Test Bed is a service offered by the European Commission’s DIGIT for the conformance testing of IT systems. It is based on the GITB CEN Workshop Agreement and was originally forked from the GITB PoC software (available at https://github.com/srdc/gitb).
https://joinup.ec.europa.eu/solution/interoperability-test-bed/about
Other
18 stars 4 forks source link

API REST error #64

Closed Nicolas-Caroff closed 1 month ago

Nicolas-Caroff commented 1 month ago

Hello,

I'm trying to use ITB REST API to execute a test suite. But I get a 400 bad request response when I'm doing this request : curl --location 'https:///itb-dev/api/rest/tests/start' \ --header 'ITB_API_KEY: E41394CFX73FDX4FD2XA1E8X08CF499967D8' \ --header 'Content-Type: application/json' \ --data '{ "system": "7FA403A7X4416X4A43X966DXDE166FB26A87", "actor": "B50327A6X1791X492EXBC70XAA566FB3AC5E", "testSuite": [ "OGC_validation" ] }' The response is this :

image

Do you have an idea about the problem ?

costas80 commented 1 month ago

Your request seems ok so there's no obvious issue from there. What is odd however is that you're getting an HTML error page which means that the REST API is not processing your request (you would get a JSON response if the request was correctly received and resulted in an error).

Are you already using the REST API for other calls or is this the first time you try it? If it's the first time then you should first make sure it's enabled (it's disabled by default). If enabled then you can try loading the API in Swagger UI and making the same call from there. If that works then you know there's something wrong in the curl request that we've missed.

Finally, we can check the error's stacktrace from the logs of the gitb-ui container (or itb-ui depending on the naming). This should pinpoint the cause of the issue (note that you can lookup the error with the reported error code as well). If you check the logs and the error is not obvious then please post here the relevant stacktrace.

costas80 commented 1 month ago

Closing as @Nicolas-Caroff confirmed in #69 this issue no longer comes up.