Troubleshooting
Problem
With the resource REST of the API Gateway, the following request:
POST : https://host:port/rest/apigateway/archive
Headers :
Accept - application/octet-stream
Content-Type - application/json
x-HTTP-Method-Override - GET
with the payload :
{
"types": ["application"],
"scope": [{
"attributeName": "applicationID",
"keyword": "42"
}],
"includeOptions": {
"includeApis": false
}
}
Instead of returning the code 404 not found, it returns:
400 - An error occurred while creating an ACDL archive. At least one valid API or policy must be available to create an archive.
But in the swagger 'APIGatewayArchive.json' is specified that it's an error of the payload event...
'200':
description: This response indicates that the archive is created successfully. The response body is the zipped archive.
'201':
description: This response indicates that the archive import was successful. The response body holds a detailed import log in application/json format.
schema:
type: array
items:
$ref: '#/definitions/ArchiveResult'
'400':
description: 'This response indicates that the request is invalid or faulty, for example, the request body may contain an invalid archive.'
'401':
description: This response indicates that invalid credentials have been provided for the request.
'500':
description: This response indicates that the server has encountered an error while exporting or importing API Gateway Asset
So, there is no error into the above request, it's just that the server didn't found any application with these ID.
400 is the HTTP code for BAD REQUEST.
As written into the swagger it's to indicate that the request (payload) given in the request is invalid or faulty. It is absolute not the case.
Also the message returned is : An error occurred while creating an ACDL archive. At least one valid API or policy must be available to create an archive.
It don't mean a thing, we are working on application. This is an internal error returned here.
So a response 404 (not a response 400) should be returned.
Document Location
Worldwide
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
20 March 2025
UID
ibm17207902