POST /api/apis/{APIID}/versions

Adds a new API version on the platform; from scratch, based on an existing service, or based on an API description document.

You can add a new API version by:

  • Cloning the current version
  • Designing from scratch (REST APIs only)
  • Importing an API description document (Swagger, RAML, WSDL, or WADL)

The request format depends on the approach you choose. See examples below.

New in API Platform Version: 8.1

Authorization Roles/Permissions: Must be logged in. Must have Add permission for the resource. An API Admin or Business Admin.

This topic includes the following sections:

HTTP Method


Back to top



Back to top

Sample Request

The examples below show adding a new API version.

Request URL


Sample request headers

POST /api/apis/b1d965dc-d560-416f-84af-0e60f1cbd199.acmepaymentscorp/versions HTTP/1.1
Accept: application/vnd.soa.v81+json
Content-Type: application/vnd.soa.v81+json

Sample request body #1: Cloning an existing API version

Creates a new API version by cloning the current version. If you're adding a new version by cloning, you must provide a request such as the below, with the new version name and the existing APIVersionID.

    "Name":"Version 2"

Sample request body #2: Designing from scratch

Creates a new API version by designing from scratch. You must provide a request such as the below, with the new version name. Then, update the API design using the PUT /api/apis/versions/{APIVersionID}/design operation.

    "Name":"Version 2"

Sample request body #3: Importing an API description document

Creates a new API version by importing a new API description document. You must first upload the document using the POST /api/dropbox/readfiledetails operation, in the same way as when creating an API by uploading an API description document. Then, provide a request such as the below, with the new version name and the correct ServiceName, FileName, and DropboxFileId for the uploaded file.

    "Name":"Version 2"

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Any one of the following media types is valid for the request Content-Type:

application/vnd.soa.v81+json or application/vnd.soa.v81+xml

X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
APIID Path string Required The unique ID for a specific API.
AddAPIRequest Body AddAPIRequest Required

Contains information about a request to add an API or API version.

Required values vary according to the method being used to create the API version:

  • By cloning the current version
  • From scratch
  • By importing an API description document

Properties supported in the AddAPIImplementRequest (part of this object) when creating an API version are:

  • ImplementationCode
  • CreateMechanism (see CreateMechanism values)
  • ProxyImplementationRequest (if CreateMechanism is PROXY)

The DropboxFileId is returned by the POST /api/dropbox/readfiledetails operation which is run first to upload an individual or ZIP file, if the API version is being created by importing an API description document.

For examples showing the required fields for each scenario, see above.

Back to top


If successful, this operation returns HTTP status code 200, with information about the new API version.

Back to top

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers: application/vnd.soa.v81+json

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2016 15:40:00 GMT
Content-Type: application/vnd.soa.v81+json
Atmo-Renew-Token: renew

Sample response body: application/vnd.soa.v81+json

  "APIVersionID" : "e9bf5bd1-0e9a-4c7a-bbcb-de91c4cf57d2.acmepaymentscorp",
  "APIID" : "b1d965dc-d560-416f-84af-0e60f1cbd199.acmepaymentscorp",
  "Name" : "Version 2",
  "Environment" : "Production",
  "Visibility" : "Public",
  "Created" : "2016-04-28T15:40:01Z",
  "Updated" : "2016-04-28T15:40:03Z",
  "State" : "",
  "ProductionEndpointAccessAutoApproved" : true,
  "SandboxEndpointAccessAutoApproved" : false,
  "RatingSummary" : {
    "Five" : 0,
    "Four" : 0,
    "Three" : 0,
    "Two" : 0,
    "One" : 0
  "SandboxAnonymousAccessAllowed" : false,
  "ProductionAnonymousAccessAllowed" : true,
  "ResourceLevelPermissionsSupported" : false,
  "APIOwnedImplementations" : true,
  "ProductionServiceKey" : "uddi:78ff6d0c-0d57-11e6-9fe3-c2371d568f6f",
  "APIDesign" : {
    "CommonDesign" : true,
    "DesignServiceKey" : "uddi:78169380-0d57-11e6-9fe3-c2371d568f6f"

Back to top

Sample response headers: application/vnd.soa.v81+xml

HTTP/1.1 200 OK
Date: Thu, 28 Apr 2016 16:00:52 GMT
Content-Type: application/vnd.soa.v81+xml
Atmo-Renew-Token: renew
Set-Cookie: AtmoAuthToken_acmepaymentscorp=TokenID...

Sample response body: application/vnd.soa.v81+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<APIVersion xmlns="" xmlns:ns2="" 
xmlns:ns3="" xmlns:ns4="" 
xmlns:ns5="" xmlns:ns6="" 
    <Name>Version 3</Name>

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/vnd.soa.v81+json, application/vnd.soa.v81+xml
Atmo-Renew-Token renew

Back to top

Response Body

Name Type Description
APIVersion APIVersion Includes information about an API version.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
404 The resource could not be found. For example, you might get this if you have a typo in the URL, or if the Accept header is set to a wrong value.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics