TAPMS Tenant Status API v1

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Read-Only APIs to Retrieve Tenant Status

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

Tenant and Partition Management System

get__apis_tapms_v1_tenant_{id}

Code samples

GET https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenant/{id} HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenant/{id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenant/{id}', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenant/{id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /apis/tapms/v1/tenant/{id}

Get a tenant’s spec/status

Parameters

Name In Type Required Description
id path string true Either the Name or UUID of the Tenant

Example responses

200 Response

{
  "spec": {
    "childnamespaces": [
      "vcluster-blue-slurm"
    ],
    "state": "New,Deploying,Deployed,Deleting",
    "tenantname": "vcluster-blue",
    "tenantresources": [
      {
        "enforceexclusivehsmgroups": true,
        "hsmgrouplabel": "green",
        "hsmpartitionname": "blue",
        "type": "compute",
        "xnames": [
          "x0c3s5b0n0",
          "x0c3s6b0n0"
        ]
      }
    ]
  },
  "status": {
    "childnamespaces": [
      "vcluster-blue-slurm"
    ],
    "tenantresources": [
      {
        "enforceexclusivehsmgroups": true,
        "hsmgrouplabel": "green",
        "hsmpartitionname": "blue",
        "type": "compute",
        "xnames": [
          "x0c3s5b0n0",
          "x0c3s6b0n0"
        ]
      }
    ],
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Responses

Status Meaning Description Schema
200 OK OK Tenant
400 Bad Request Bad Request ResponseError
404 Not Found Not Found ResponseError
500 Internal Server Error Internal Server Error ResponseError
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get__apis_tapms_v1_tenants

Code samples

GET https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenants HTTP/1.1
Host: api-gw-service-nmn.local
Accept: application/json
# You can also use wget
curl -X GET https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenants \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenants', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api-gw-service-nmn.local/apis/tapms-operator/apis/tapms/v1/tenants", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /apis/tapms/v1/tenants

Get list of tenants’ spec/status

Example responses

200 Response

[
  {
    "spec": {
      "childnamespaces": [
        "vcluster-blue-slurm"
      ],
      "state": "New,Deploying,Deployed,Deleting",
      "tenantname": "vcluster-blue",
      "tenantresources": [
        {
          "enforceexclusivehsmgroups": true,
          "hsmgrouplabel": "green",
          "hsmpartitionname": "blue",
          "type": "compute",
          "xnames": [
            "x0c3s5b0n0",
            "x0c3s6b0n0"
          ]
        }
      ]
    },
    "status": {
      "childnamespaces": [
        "vcluster-blue-slurm"
      ],
      "tenantresources": [
        {
          "enforceexclusivehsmgroups": true,
          "hsmgrouplabel": "green",
          "hsmpartitionname": "blue",
          "type": "compute",
          "xnames": [
            "x0c3s5b0n0",
            "x0c3s6b0n0"
          ]
        }
      ],
      "uuid": "550e8400-e29b-41d4-a716-446655440000"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad Request ResponseError
404 Not Found Not Found ResponseError
500 Internal Server Error Internal Server Error ResponseError

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Tenant] false none [The primary schema/definition of a tenant]
» spec TenantSpec true none The desired state of Tenant
»» childnamespaces [string] false none none
»» state string false none none
»» tenantname string true none none
»» tenantresources [TenantResource] true none The desired resources for the Tenant
»»» enforceexclusivehsmgroups boolean false none none
»»» hsmgrouplabel string false none none
»»» hsmpartitionname string false none none
»»» type string true none none
»»» xnames [string] true none none
» status TenantStatus false none The observed state of Tenant
»» childnamespaces [string] false none none
»» tenantresources [TenantResource] false none The desired resources for the Tenant
»» uuid string(uuid) false none none
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Schemas

ResponseError

{
  "message": "Error Message..."
}

Properties

Name Type Required Restrictions Description
message string false none none

Tenant

{
  "spec": {
    "childnamespaces": [
      "vcluster-blue-slurm"
    ],
    "state": "New,Deploying,Deployed,Deleting",
    "tenantname": "vcluster-blue",
    "tenantresources": [
      {
        "enforceexclusivehsmgroups": true,
        "hsmgrouplabel": "green",
        "hsmpartitionname": "blue",
        "type": "compute",
        "xnames": [
          "x0c3s5b0n0",
          "x0c3s6b0n0"
        ]
      }
    ]
  },
  "status": {
    "childnamespaces": [
      "vcluster-blue-slurm"
    ],
    "tenantresources": [
      {
        "enforceexclusivehsmgroups": true,
        "hsmgrouplabel": "green",
        "hsmpartitionname": "blue",
        "type": "compute",
        "xnames": [
          "x0c3s5b0n0",
          "x0c3s6b0n0"
        ]
      }
    ],
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  }
}

The primary schema/definition of a tenant

Properties

Name Type Required Restrictions Description
spec TenantSpec true none The desired state of Tenant
status TenantStatus false none The observed state of Tenant

TenantResource

{
  "enforceexclusivehsmgroups": true,
  "hsmgrouplabel": "green",
  "hsmpartitionname": "blue",
  "type": "compute",
  "xnames": [
    "x0c3s5b0n0",
    "x0c3s6b0n0"
  ]
}

The desired resources for the Tenant

Properties

Name Type Required Restrictions Description
enforceexclusivehsmgroups boolean false none none
hsmgrouplabel string false none none
hsmpartitionname string false none none
type string true none none
xnames [string] true none none

TenantSpec

{
  "childnamespaces": [
    "vcluster-blue-slurm"
  ],
  "state": "New,Deploying,Deployed,Deleting",
  "tenantname": "vcluster-blue",
  "tenantresources": [
    {
      "enforceexclusivehsmgroups": true,
      "hsmgrouplabel": "green",
      "hsmpartitionname": "blue",
      "type": "compute",
      "xnames": [
        "x0c3s5b0n0",
        "x0c3s6b0n0"
      ]
    }
  ]
}

The desired state of Tenant

Properties

Name Type Required Restrictions Description
childnamespaces [string] false none none
state string false none none
tenantname string true none none
tenantresources [TenantResource] true none The desired resources for the Tenant

TenantStatus

{
  "childnamespaces": [
    "vcluster-blue-slurm"
  ],
  "tenantresources": [
    {
      "enforceexclusivehsmgroups": true,
      "hsmgrouplabel": "green",
      "hsmpartitionname": "blue",
      "type": "compute",
      "xnames": [
        "x0c3s5b0n0",
        "x0c3s6b0n0"
      ]
    }
  ],
  "uuid": "550e8400-e29b-41d4-a716-446655440000"
}

The observed state of Tenant

Properties

Name Type Required Restrictions Description
childnamespaces [string] false none none
tenantresources [TenantResource] false none The desired resources for the Tenant
uuid string(uuid) false none none