Updated on 2025-02-14 GMT+08:00

Creating an Application

In this example, the application is created in the environment.

Overview

This example uses the API for creating an application.

For details about how to call APIs, see 3 Calling APIs.

Procedure

  1. Create an application.

    Call the API for creating an application. The following shows an example request.

    curl -k -H "Content-Type:application/json" -H "X-Environment-ID: $env_id" -H "X-Auth-Token:$Token" -X POST "https://{cae_endpoint}/v1/{project_id}/cae/applications" -d '{
        "apiVersion": "v1",
        "kind": "Application",
        "metadata": {
            "name": "demo-app",
            "annotations": {
                "description": "demo"
            }
        }
    }'

    Information similar to the following is displayed.

    {
        "api_version": "v1",
        "kind": "Application",
        "metadata": {
            "id": "25f5aa9e-724c-4227-ab56-79b4066dce21",
            "name": "demo-app",
            "annotations": {
                "description": "demo"
            },
            "created_at": "2022-07-05T08:34:15.9820794Z",
            "updated_at": "2022-07-05T08:34:15.9820794Z"
        }
    }