IBM Support

webMethods Knowlegebase : Return code of a POST archive if not found 400 (1802643)

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

[{"Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSL6KH","label":"IBM webMethods API Management SaaS"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"webMethods API Gateway (YAI)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"SUSE Linux Enterprise Server"}],"Version":"10.3"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17207902