POST /api/apps/{AppID}/versions

Adds a version of an app. Can be either the original version when the app is created, or a new version created later.

When a new app is created, this method should be invoked immediately following successful completion of the POST /api/apps method.

Note: When you add a new app or a new app version, if the platform includes APIs that are set to automatically create contracts, a contract is automatically created with your new app/app version.

Authorization Roles/Permissions: App team member, Business Admin. When a user invokes this method to create an app, successful completion of the operation gives the user a role as team member. When the current operation, POST /api/apps/{AppID}/versions, is invoked, which should immediately follow successful completion of POST /api/apps, the user already has the required team membership as assigned by the POST /api/apps operation.

Workflow: There is no default workflow for new app versions. However, a custom workflow might be in place. There is only one initial action valid for Akana API Platform workflows relating to app versions, the @Create initial action. For more information on workflow, see Executing Workflow Actions.

Authorization token renewal: This operation changes information that is reflected in the authorization token; therefore, when invoking this operation, you must also renew the token.

This topic includes the following sections:

HTTP Method

POST

Back to top

URL

https://{hostname}/api/apps/{AppID}/versions

Back to top

Sample Request

The example below sends information about the initial version of a crossword puzzle app.

Sample request URL

https://{hostname}/api/apps/app10037.acmepaymentscorp/versions

Sample request headers

POST /api/apps/app10037.acmepaymentscorp/versions HTTP/1.1
Host:{hostname}
Accept: */*
Content-Type: application/json; charset=UTF-8
X-Csrf-Token_{tenant}: {TokenID}

Sample request body

{
  "Name":"1.0",
  "Description":"1.0",
  "Tag":[
    "Puzzle",
    "crossword",
    "game",
    "Android"
  ],
  "AppID":"app10037.acmepaymentscorp",
  "InitialEnvironment":"Sandbox",
  "Visibility":"Public",
  "WebsiteAddress":""
}

Back to top

Request Headers

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

Header Description
Accept Any Accept header value that supports a response Content-Type of text/plain is valid; for example, */*.
Content-Type

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

application/json, application/vnd.soa.v71+json, application/vnd.soa.v72+json, application/vnd.soa.v80+json, application/vnd.soa.v81+json

X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
AppID Path string Required The unique ID for a specific app.
ApplicationVersion Body ApplicationVersion Optional Information about the app version, such as name, description, and tags.

Back to top

Response

If successful, this operation returns HTTP status code 200, with the AppVersionID of the app version in plain text.

Back to top

Sample Response

The sample response below shows the AppVersionID of the app version in plain text.

Sample response headers

HTTP/1.1 200 OK
Date: Wed, 19 Sep 2012 16:03:19 GMT
Content-Type: text/plain
Atmo-Renew-Token: renew

Sample response body

72zNE5InKlf2z00y8fWSp3AU.acmepaymentscorp

Back to top

Response Headers

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

Header Description
Content-Type text/plain
Atmo-Renew-Token renew

Back to top

Response Body

Name Type Description
AppVersionID string The unique ID for a specific app 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.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics