IBM Support

draft-apis REST API fails with status 400

Troubleshooting


Problem

Using the REST API to create a draft API
  curl --location 'https://apimserver.example.com/api/orgs/{org}/drafts/draft-apis?api_type=rest' \
       --header 'Authorization: Bearer eyJhbGciOiJS...4NwpR3bY6KeWw' \
       --form 'openapi=@"/tempAPI-1-0-0.json"'
where tempAPI-1-0-0.json 
{
    "swagger": "2.0",
    "info": {
        "title": "tempAPI",
        "x-ibm-name": "tempAPI",
        "version": "1.0.0"
    },
    ...........
    ],
    "schemes": [
        "https"
    ]
}   
fails with:
{
    "status": 400,
    "message": [
        "The multipart/form-data request payload must contain the 'wsdl' or the 'wsdl' and 'openapi' fields."
    ]
}

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSMNED","label":"IBM API Connect"},"ARM Category":[{"code":"a8mKe000000CaZLIA0","label":"API Connect-\u003EAPIC Admin"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.5;and future releases"}]

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:
03 October 2024

UID

ibm17172130