/
V2 API Specification

V2 API Specification

Projects API

The project allows multi-tenancy in the application from a user perspective.

POST

POST
POST URL: /v2/projects POST BODY: { "metadata": { "name": "<name>", "description": "<description>", "userData1": "<user data>", "userData2": "<user data>" } } RETURN STATUS: 201 RETURN BODY: { "metadata": { "name": ""<name>", "description": "<description>", "userData1": "<user data>", "userData2": "<user data>" } }

GET, DELETE



GET, DELETE
GET URL: /v2/projects/{project-name} RETURN STATUS: 200 RETURN BODY: { "metadata": { "name": "<name>", "description": "<description>", "userData1": "<user data>", "userData2": "<user data>" } } DELETE URL: /v2/projects/{project-name} RETURN STATUS: 204



GET, DELETE
GET URL: /v2/projects/{project-name} RETURN STATUS: 200 RETURN BODY: { "metadata": { "name": "<name>", "description": "<description>", "userData1": "<user data>", "userData2": "<user data>" } } DELETE URL: /v2/projects/{project-name} RETURN STATUS: 204

Composite Application API

Composite Application names are unique within a Project. Composite application resource represents a collection of applications and each application is represented by helm charts. Each Helm chart is wrapped in tar.gz format.

POST

POST

GET, DELETE

GET, DELETE

Adding applications to composite app

Format of the Helm chart for the application wrapped in tar.gz 

> cd vagrant/tests/vnfs/test/helm
> find vault-consul-dev
vault-consul-dev
vault-consul-dev/Chart.yaml
vault-consul-dev/values.yaml
vault-consul-dev/templates
vault-consul-dev/templates/service.yaml
vault-consul-dev/templates/deployment.yaml
vault-consul-dev/charts
vault-consul-dev/charts/common/values.yaml
vault-consul-dev/charts/common/templates/_service.tpl
vault-consul-dev/charts/common/templates/_repository.tpl
vault-consul-dev/charts/common/templates/_name.tpl
vault-consul-dev/charts/common/templates/_namespace.tpl
vault-consul-dev/charts/common/templates
vault-consul-dev/charts/common/Chart.yaml
vault-consul-dev/charts/common
 
#Create a tar.gz for upload
> tar -cf vault-consul-dev.tar vault-consul-dev
> gzip vault-consul-dev.tar

POST

This POST is a multipart POST. With the POST body containing the data about the application and the tar.gz uploaded in multipart form.

POST

GET, DELETE

GET, DELETE

Profile API

Once the definitions for applications are created, profiles are created to customize the applications. Later on, they are instantiated in Kubernetes by the instantiation API.

POST

POST

GET, DELETE

GET, DELETE

Adding profile per application

A per application profile contains the following:

  1. manifest.yaml

    1. Contains the details for the profile and everything contained within

  2. A HELM values override yaml file.

    1. It can have any name as long as it matches the corresponding entry in the manifest.yaml

  3. Any number of files organized in a folder structure

    1. All these files should have a corresponding entry in manifest.yaml file

Sample Profile is described below:

Create the profile artifact
Creating a Profile Artifact

1
2
3
4
5
6
7
8
9
10
11
12
13

> cd vagrant/tests/vnfs/test/helm/profile
> find .
manifest.yaml
override_values.yaml
testfol
testfol/subdir
testfol/subdir/deployment.yaml
 
#Create profile tar.gz
> cd profile
> tar -cf profile.tar *
> gzip profile.tar
> mv profile.tar.gz ../

The manifest file contains the following:
manifest.yaml

1
2
3
4
5
6
7

---
version: v1
type:
  values: "values_override.yaml"
  configresource:
    - filepath: testfol/subdir/deployment.yaml
      chartpath: vault-consul-dev/templates/deployment.yaml

POST

This POST is a multipart POST. With the POST body containing the data about the profile and the profile tar.gz uploaded in multipart form.

POST

GET, DELETE

GET, DELETE

Generic Placement Intent API

Generic Placement Intent API is used to create generic placement intents for sub-applications in an application. Intent created using this API will be added to an Intent Group for use during instantiation.

POST

POST

GET, DELETE

Get, Delete

Adding placement intent for each application in the composite-app

POST

POST

GET, DELETE

Get, Delete

Deployment Intent Group API

Deployment Intent Group API is used to create Intent Groups that can then will be used at instantiation time. Some intents that can be part of an Intent Group are Generic Placement Intent, HPA Intent, and traffic controller Intent.

POST

POST

GET, DELETE

Get, Delete

Adding intents to an Intent group

POST

POST

GET, DELETE

Get, Delete

Instantiation, Destroy, Status API

Instantiation API to instantiate composite app based on intent-group. Destroy API deletes the app and Status API returns the resources 

POST

POST

Cluster Registration API

API to support Reachability for a Kubernetes Cloud. This API will be used to upload configuration information for the cluster

POST

POST


GET, DELETE

Get, Delete

POST

This POST is a multipart POST. With the POST body containing the data about the cluster and the kubeconfig uploaded in multipart form. 

POST


GET, DELETE

Get, Delete

Add Label to a cluster

POST

POST

GET, DELETE

Get, Delete

Add key-value pair to a cluster

Add property to a cluster without the need for change to the API.

POST

POST

GET, DELETE

Get, Delete



Orchestrator Controller Registration API

This API allows controllers to register themselves as gRPC servers consumed by the orchestrator.

POST

POST

GET, DELETE



GET, DELETE

Example CURL Command:

POST