Example: Adding an App Version

This example walks you through adding a new version to an existing app in Akana API Platform by using the API rather than the user interface.

This exercise assumes that you already have a valid login for Akana API Platform and are a member of the app team. You can't add an app version unless you're an authorized user. Before running the procedures below, get set up as a platform user, and get another member of the app team to invite you to the team.

Note: If you added the app, you automatically become the first member of the app team. See Example: Adding an App.

Before starting, you will need:

  • A valid UserID and password for platform access.
  • The AppID.

To add an app version in the Akana API Platform using the API

  1. Log in via the API, POST /api/login operation, using your own email and password in the body of the operation instead of the placeholder values given below.
    • HTTP method: POST
    • URL: https://{hostname}/api/login
    • Accept header: application/json
    • Content-Type header: application/json
    • CSRF header: include it if needed. If you are not sure whether it's needed or not, refer to CSRF Prevention on the Platform.
    • Request Body:
      {
        "email":"MyEmailAddress",
        "password":"MyPassword"
      }
  2. Add the app version, using the POST /api/apps/{AppID}/versions operation. In your API call, use the following, substituting the correct AppID in the URL and also in the request body:
    • HTTP method: POST
    • URL: https://{hostname}/api/apps/{AppID}/versions
    • Accept header: text/plain
    • Content-Type header: application/json
    • CSRF header: include it if needed. If you are not sure whether it's needed or not, refer to CSRF Prevention on the Platform.
    • Request Body (this example includes optional tags, but you can just omit those two lines, keeping the opening and closing square brackets):
      {
        "Name":"MyAppVersionName",
        "Description":"MyAppVersionDescription",
        "Tag":[
          "Tag1",
          "Tag2"
        ],
        "AppID":"MyAppID",
        "InitialEnvironment":"Sandbox",
        "Visibility":"Public",
        "WebsiteAddress":""
      }
  3. When done, remember to log out using the POST /api/login/logout operation. Use the following values:
    • URL: https://{hostname}/api/login/logout
    • Accept header: application/json
    • Content-Type header: application/x-www-form-urlencoded

Back to top

Related Topics