From 1a0f9edfefe1af5aefcbfda335783ef0c14ac798 Mon Sep 17 00:00:00 2001 From: Hasan Khan Date: Fri, 19 Jun 2026 01:41:08 -0700 Subject: [PATCH 1/5] feat(rest-api): add APIDeletionAcceptedResponse model Introduce a typed JSON body for async DELETE requests that return HTTP 202 Accepted. Fixes #2090 Signed-off-by: Hasan Khan --- rest-api/api/pkg/api/model/deletion.go | 22 ++++++++++++++++++++ rest-api/api/pkg/api/model/deletion_test.go | 23 +++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 rest-api/api/pkg/api/model/deletion.go create mode 100644 rest-api/api/pkg/api/model/deletion_test.go diff --git a/rest-api/api/pkg/api/model/deletion.go b/rest-api/api/pkg/api/model/deletion.go new file mode 100644 index 0000000000..8333ac1d9c --- /dev/null +++ b/rest-api/api/pkg/api/model/deletion.go @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +package model + +const ( + // DeletionRequestAcceptedMessage is returned when an asynchronous delete has + // been accepted for processing. + DeletionRequestAcceptedMessage = "Deletion request was accepted" +) + +// APIDeletionAcceptedResponse is the JSON body for accepted async DELETE requests. +type APIDeletionAcceptedResponse struct { + Message string `json:"message"` +} + +// NewAPIDeletionAcceptedResponse returns the JSON body for accepted async deletes. +func NewAPIDeletionAcceptedResponse() APIDeletionAcceptedResponse { + return APIDeletionAcceptedResponse{ + Message: DeletionRequestAcceptedMessage, + } +} diff --git a/rest-api/api/pkg/api/model/deletion_test.go b/rest-api/api/pkg/api/model/deletion_test.go new file mode 100644 index 0000000000..25ff28270c --- /dev/null +++ b/rest-api/api/pkg/api/model/deletion_test.go @@ -0,0 +1,23 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestAPIDeletionAcceptedResponse_JSON(t *testing.T) { + t.Parallel() + + payload, err := json.Marshal(NewAPIDeletionAcceptedResponse()) + require.NoError(t, err) + + var decoded APIDeletionAcceptedResponse + require.NoError(t, json.Unmarshal(payload, &decoded)) + assert.Equal(t, DeletionRequestAcceptedMessage, decoded.Message) +} From 6f2082f36dc31dff2178353264d503a663ea06c5 Mon Sep 17 00:00:00 2001 From: Hasan Khan Date: Fri, 19 Jun 2026 01:41:08 -0700 Subject: [PATCH 2/5] feat(rest-api): return JSON from 202 Accepted delete handlers Replace plain-text c.String responses with APIDeletionAcceptedResponse so clients can json.Unmarshal delete outcomes. Signed-off-by: Hasan Khan --- rest-api/api/pkg/api/handler/allocation.go | 2 +- rest-api/api/pkg/api/handler/infinibandpartition.go | 2 +- rest-api/api/pkg/api/handler/instance.go | 2 +- rest-api/api/pkg/api/handler/instancetype.go | 2 +- rest-api/api/pkg/api/handler/ipblock.go | 2 +- rest-api/api/pkg/api/handler/machine.go | 2 +- rest-api/api/pkg/api/handler/machineinstancetype.go | 2 +- rest-api/api/pkg/api/handler/machinevalidation.go | 2 +- rest-api/api/pkg/api/handler/networksecuritygroup.go | 2 +- rest-api/api/pkg/api/handler/nvlinklogicalpartition.go | 2 +- rest-api/api/pkg/api/handler/operatingsystem.go | 2 +- rest-api/api/pkg/api/handler/site.go | 2 +- rest-api/api/pkg/api/handler/sshkey.go | 2 +- rest-api/api/pkg/api/handler/sshkeygroup.go | 2 +- rest-api/api/pkg/api/handler/subnet.go | 2 +- rest-api/api/pkg/api/handler/tenantaccount.go | 2 +- rest-api/api/pkg/api/handler/vpc.go | 2 +- rest-api/api/pkg/api/handler/vpcprefix.go | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/rest-api/api/pkg/api/handler/allocation.go b/rest-api/api/pkg/api/handler/allocation.go index 0c2cf6704b..41ede27f71 100644 --- a/rest-api/api/pkg/api/handler/allocation.go +++ b/rest-api/api/pkg/api/handler/allocation.go @@ -1504,5 +1504,5 @@ func (dah DeleteAllocationHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/infinibandpartition.go b/rest-api/api/pkg/api/handler/infinibandpartition.go index c3c3da7778..bced691198 100644 --- a/rest-api/api/pkg/api/handler/infinibandpartition.go +++ b/rest-api/api/pkg/api/handler/infinibandpartition.go @@ -1129,6 +1129,6 @@ func (dibph DeleteInfiniBandPartitionHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/instance.go b/rest-api/api/pkg/api/handler/instance.go index c383632448..eb5a7c7191 100644 --- a/rest-api/api/pkg/api/handler/instance.go +++ b/rest-api/api/pkg/api/handler/instance.go @@ -4954,7 +4954,7 @@ func (dih DeleteInstanceHandler) Handle(c echo.Context) error { // Return response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } // GetInstanceStatusDetailsHandler is the API Handler for getting Instance StatusDetail records diff --git a/rest-api/api/pkg/api/handler/instancetype.go b/rest-api/api/pkg/api/handler/instancetype.go index 7e37de7584..3d3865499c 100644 --- a/rest-api/api/pkg/api/handler/instancetype.go +++ b/rest-api/api/pkg/api/handler/instancetype.go @@ -1551,5 +1551,5 @@ func (dith DeleteInstanceTypeHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/ipblock.go b/rest-api/api/pkg/api/handler/ipblock.go index 511d7e27e2..4b7d5318a4 100644 --- a/rest-api/api/pkg/api/handler/ipblock.go +++ b/rest-api/api/pkg/api/handler/ipblock.go @@ -1167,5 +1167,5 @@ func (dipbh DeleteIPBlockHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/machine.go b/rest-api/api/pkg/api/handler/machine.go index c6bcd6b298..25493d4626 100644 --- a/rest-api/api/pkg/api/handler/machine.go +++ b/rest-api/api/pkg/api/handler/machine.go @@ -1957,5 +1957,5 @@ func (umh DeleteMachineHandler) Handle(c echo.Context) error { logger.Info().Msg("finishing API handler") - return c.JSON(http.StatusAccepted, nil) + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/machineinstancetype.go b/rest-api/api/pkg/api/handler/machineinstancetype.go index a1e084df3c..fdc236b85e 100644 --- a/rest-api/api/pkg/api/handler/machineinstancetype.go +++ b/rest-api/api/pkg/api/handler/machineinstancetype.go @@ -752,5 +752,5 @@ func (dmith DeleteMachineInstanceTypeHandler) Handle(c echo.Context) error { // Return response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/machinevalidation.go b/rest-api/api/pkg/api/handler/machinevalidation.go index 1e17d9f37c..70b3d2ad73 100644 --- a/rest-api/api/pkg/api/handler/machinevalidation.go +++ b/rest-api/api/pkg/api/handler/machinevalidation.go @@ -1671,5 +1671,5 @@ func (handler DeleteMachineValidationExternalConfigHandler) Handle(c echo.Contex // Create response logger.Info().Msg("finishing API handler") - return c.JSON(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/networksecuritygroup.go b/rest-api/api/pkg/api/handler/networksecuritygroup.go index 368d0eb5ae..98e1e418f0 100644 --- a/rest-api/api/pkg/api/handler/networksecuritygroup.go +++ b/rest-api/api/pkg/api/handler/networksecuritygroup.go @@ -982,7 +982,7 @@ func (dnsgh DeleteNetworkSecurityGroupHandler) Handle(c echo.Context) error { // Return response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } // ~~~~~ Delete Handler ~~~~~ // diff --git a/rest-api/api/pkg/api/handler/nvlinklogicalpartition.go b/rest-api/api/pkg/api/handler/nvlinklogicalpartition.go index 915c279d74..2e61b7bd13 100644 --- a/rest-api/api/pkg/api/handler/nvlinklogicalpartition.go +++ b/rest-api/api/pkg/api/handler/nvlinklogicalpartition.go @@ -1352,5 +1352,5 @@ func (dibph DeleteNVLinkLogicalPartitionHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/operatingsystem.go b/rest-api/api/pkg/api/handler/operatingsystem.go index d166924a09..8951c5fdd2 100644 --- a/rest-api/api/pkg/api/handler/operatingsystem.go +++ b/rest-api/api/pkg/api/handler/operatingsystem.go @@ -1605,6 +1605,6 @@ func (dsh DeleteOperatingSystemHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/site.go b/rest-api/api/pkg/api/handler/site.go index e446ab243d..3dad75fbe8 100644 --- a/rest-api/api/pkg/api/handler/site.go +++ b/rest-api/api/pkg/api/handler/site.go @@ -1144,7 +1144,7 @@ func (dsh DeleteSiteHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } // GetSiteStatusDetailsHandler is the API Handler for getting Site StatusDetail records diff --git a/rest-api/api/pkg/api/handler/sshkey.go b/rest-api/api/pkg/api/handler/sshkey.go index 33af0e7bd5..6d6a504474 100644 --- a/rest-api/api/pkg/api/handler/sshkey.go +++ b/rest-api/api/pkg/api/handler/sshkey.go @@ -1008,5 +1008,5 @@ func (dskh DeleteSSHKeyHandler) Handle(c echo.Context) error { // Return response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/sshkeygroup.go b/rest-api/api/pkg/api/handler/sshkeygroup.go index e9e0b2e129..c794161037 100644 --- a/rest-api/api/pkg/api/handler/sshkeygroup.go +++ b/rest-api/api/pkg/api/handler/sshkeygroup.go @@ -1659,5 +1659,5 @@ func (dskgh DeleteSSHKeyGroupHandler) Handle(c echo.Context) error { // Return response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/subnet.go b/rest-api/api/pkg/api/handler/subnet.go index 05bf63df71..739414b7eb 100644 --- a/rest-api/api/pkg/api/handler/subnet.go +++ b/rest-api/api/pkg/api/handler/subnet.go @@ -1164,5 +1164,5 @@ func (dsh DeleteSubnetHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/tenantaccount.go b/rest-api/api/pkg/api/handler/tenantaccount.go index 7593ae0b6a..1628bafd5c 100644 --- a/rest-api/api/pkg/api/handler/tenantaccount.go +++ b/rest-api/api/pkg/api/handler/tenantaccount.go @@ -866,5 +866,5 @@ func (dtah DeleteTenantAccountHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/vpc.go b/rest-api/api/pkg/api/handler/vpc.go index d574c63643..34813995b9 100644 --- a/rest-api/api/pkg/api/handler/vpc.go +++ b/rest-api/api/pkg/api/handler/vpc.go @@ -1818,5 +1818,5 @@ func (dvh DeleteVPCHandler) Handle(c echo.Context) error { // Return response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } diff --git a/rest-api/api/pkg/api/handler/vpcprefix.go b/rest-api/api/pkg/api/handler/vpcprefix.go index 7498c6477b..491950b405 100644 --- a/rest-api/api/pkg/api/handler/vpcprefix.go +++ b/rest-api/api/pkg/api/handler/vpcprefix.go @@ -1160,5 +1160,5 @@ func (dsh DeleteVpcPrefixHandler) Handle(c echo.Context) error { // Create response logger.Info().Msg("finishing API handler") - return c.String(http.StatusAccepted, "Deletion request was accepted") + return c.JSON(http.StatusAccepted, model.NewAPIDeletionAcceptedResponse()) } From bf1208efb57f1ecd09650bf77956f69533922959 Mon Sep 17 00:00:00 2001 From: Hasan Khan Date: Fri, 19 Jun 2026 01:41:08 -0700 Subject: [PATCH 3/5] test(rest-api): assert structured JSON in delete handler tests Signed-off-by: Hasan Khan --- .../deletion_response_test_helper_test.go | 22 +++++++++++++++++++ rest-api/api/pkg/api/handler/instance_test.go | 2 +- rest-api/api/pkg/api/handler/vpc_test.go | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go diff --git a/rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go b/rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go new file mode 100644 index 0000000000..544cf9295f --- /dev/null +++ b/rest-api/api/pkg/api/handler/deletion_response_test_helper_test.go @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +package handler + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/NVIDIA/infra-controller/rest-api/api/pkg/api/model" +) + +func assertDeletionAcceptedResponse(t *testing.T, body []byte) { + t.Helper() + + var resp model.APIDeletionAcceptedResponse + require.NoError(t, json.Unmarshal(body, &resp)) + assert.Equal(t, model.DeletionRequestAcceptedMessage, resp.Message) +} diff --git a/rest-api/api/pkg/api/handler/instance_test.go b/rest-api/api/pkg/api/handler/instance_test.go index 4b6251ec1d..144f19ba01 100644 --- a/rest-api/api/pkg/api/handler/instance_test.go +++ b/rest-api/api/pkg/api/handler/instance_test.go @@ -9707,7 +9707,7 @@ func TestDeleteInstanceHandler_Handle(t *testing.T) { if tt.args.respCode != http.StatusAccepted { return } - assert.Contains(t, rec.Body.String(), "Deletion request was accepted") + assertDeletionAcceptedResponse(t, rec.Body.Bytes()) // Verify Instance in terminating state insDAO := cdbm.NewInstanceDAO(dbSession) diff --git a/rest-api/api/pkg/api/handler/vpc_test.go b/rest-api/api/pkg/api/handler/vpc_test.go index c1f6845fb5..ca07b9f6f5 100644 --- a/rest-api/api/pkg/api/handler/vpc_test.go +++ b/rest-api/api/pkg/api/handler/vpc_test.go @@ -3465,7 +3465,7 @@ func TestDeleteVPCHandler_Handle(t *testing.T) { if tt.args.respCode != http.StatusAccepted { return } - assert.Contains(t, rec.Body.String(), "Deletion request was accepted") + assertDeletionAcceptedResponse(t, rec.Body.Bytes()) // Verify VPC in deleting state vpcDAO := cdbm.NewVpcDAO(dbSession) From 9b7f4861ef1de0f0552880a17430de127a0f884c Mon Sep 17 00:00:00 2001 From: Hasan Khan Date: Fri, 19 Jun 2026 01:41:08 -0700 Subject: [PATCH 4/5] docs(openapi): document 202 delete JSON bodies and regenerate SDK Add DeletionAcceptedResponse schema for async delete endpoints only. Regenerate sdk/standard, update sdk/simple wrappers, and publish docs. Signed-off-by: Hasan Khan --- rest-api/docs/index.html | 62 +++---- rest-api/openapi/spec.yaml | 132 +++++++++++++++ rest-api/sdk/simple/infinibandpartition.go | 2 +- rest-api/sdk/simple/instance.go | 2 +- rest-api/sdk/simple/nvlinklogicalpartition.go | 2 +- rest-api/sdk/simple/operatingsystem.go | 2 +- rest-api/sdk/simple/sshkeygroup.go | 2 +- rest-api/sdk/simple/vpc.go | 2 +- rest-api/sdk/standard/api_allocation.go | 36 ++-- .../sdk/standard/api_infini_band_partition.go | 36 ++-- rest-api/sdk/standard/api_instance.go | 36 ++-- rest-api/sdk/standard/api_instance_type.go | 72 +++++--- rest-api/sdk/standard/api_ip_block.go | 40 +++-- rest-api/sdk/standard/api_machine.go | 52 +++--- .../standard/api_network_security_group.go | 56 ++++--- .../standard/api_nv_link_logical_partition.go | 36 ++-- rest-api/sdk/standard/api_operating_system.go | 36 ++-- rest-api/sdk/standard/api_site.go | 36 ++-- rest-api/sdk/standard/api_ssh_key.go | 36 ++-- rest-api/sdk/standard/api_ssh_key_group.go | 36 ++-- rest-api/sdk/standard/api_tenant_account.go | 36 ++-- rest-api/sdk/standard/api_vpc.go | 36 ++-- rest-api/sdk/standard/client.go | 9 + .../model_deletion_accepted_response.go | 157 ++++++++++++++++++ 24 files changed, 715 insertions(+), 237 deletions(-) create mode 100644 rest-api/sdk/standard/model_deletion_accepted_response.go diff --git a/rest-api/docs/index.html b/rest-api/docs/index.html index 02c4196f20..56da59eb81 100644 --- a/rest-api/docs/index.html +++ b/rest-api/docs/index.html @@ -1194,13 +1194,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

accountId
required
string <uuid>

ID of the Tenant Account

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Site

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/tenant/account/{accountId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Site

Typical API Call Flow for Tenant " class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

ID of the Site

query Parameters
purgeMachines
boolean

Scrub all Machine data associated with this Site to re-pair

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Retrieve Site status history

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/site/{siteId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Retrieve Site status history

Typical API Call Flow for Tenant " class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

allocationId
required
string <uuid>

ID of the Allocation

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update Allocation

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/allocation/{allocationId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update Allocation

Update an existing Allocation

@@ -2608,13 +2608,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

vpcId
required
string <uuid>

ID of the VPC

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update VPC

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/vpc/{vpcId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update VPC

Update an existing VPC

Org must have a Tenant entity. User must have authorization role with TENANT_ADMIN suffix

@@ -5670,13 +5670,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

infiniBandPartitionId
required
string

ID of the InfiniBand Partition

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update InfiniBand Partition

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/infiniband-partition/{infiniBandPartitionId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update InfiniBand Partition

Update an existing InfiniBand Partition

@@ -6038,13 +6038,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the NGC Org

nvLinkLogicalPartitionId
required
string

ID of the NVLink Logical Partition

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update Operating System

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/operating-system/{operatingSystemId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update Operating System

Update an Operating System by ID

@@ -6954,13 +6954,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

instanceTypeId
required
string <uuid>

ID of the Instance Type

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update Instance Type

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/instance/type/{instanceTypeId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update Instance Type

Update an Instance Type by ID.

Org must have an Infrastructure Provider entity that owns the Instance Type. User must have authorization role with PROVIDER_ADMIN suffix.

@@ -7204,13 +7204,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

ID of the Instance Type

machineAssociationId
required
string

Can be ID of the Machine (machineId) or ID of Machine/Instance Type Association (machineAssociationId). Use of machineAssociationId is now deprecated and will no longer be accepted after July 9th, 2026 00:00 UTC.

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Instance

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/instance/type/{instanceTypeId}/machine/{machineAssociationId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Instance

Instance is a Machine provisioned with an Operating System by a Tenant and attached to one or more VPC Prefixes or Subnets.

Retrieve all Instances

Typical API Call Flow for Tenant " class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Diagnostic information, logs, ticket numbers, etc.

isRepairTenant
boolean or null

Should be set to true for Tenants who are performing investigation/repairing the Machine. Otherwise omit or set to false

-

Responses

Request samples

Content type
application/json
{
  • "machineHealthIssue": {
    },
  • "isRepairTenant": false
}

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update Instance

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/instance/{instanceId}

Request samples

Content type
application/json
{
  • "machineHealthIssue": {
    },
  • "isRepairTenant": false
}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update Instance

Update an Instance by ID

Org must have a Tenant entity. Instance must belong to Tenant. User must have authorization role with TENANT_ADMIN suffix.

@@ -9538,7 +9538,7 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

machineId
required
string

ID of the Machine

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "Error validating request data",
  • "data": {
    }
}

Retrieve Machine status history

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/machine/{machineId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Retrieve Machine status history

Org must have either an Infrastructure Provider entity or a Tenant entity.

@@ -11990,7 +11990,7 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

networkSecurityGroupId
required
string

ID of the Network Security Group

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "Error validating request data",
  • "data": {
    }
}

IP Block

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/network-security-group/{networkSecurityGroupId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

IP Block

IP Block is a contiguous block of IP addresses defined by a prefix and prefix length.

It can be used by the Provider to describe the overlay network of a particular Site. Providers can also use Allocations to delegate portions of these IP Blocks to Tenants.

@@ -12250,7 +12250,7 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

ipBlockId
required
string

ID of the IP Block

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "Error validating request data",
  • "data": {
    }
}

Update IP Block

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/ipblock/{ipBlockId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update IP Block

Update an existing IP Block

@@ -13028,13 +13028,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

sshKeyGroupId
required
string

ID of the SSH Key Group

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update an SSH Key Group

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/sshkeygroup/{sshKeyGroupId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update an SSH Key Group

Update a specific SSH Key Group.

@@ -13228,13 +13228,13 @@

Typical API Call Flow for Tenant

" class="sc-iJSMbW sc-cBEgGa fiNpIH bAoMjv">

Name of the Org

sshKeyId
required
string

ID of the SSH Key

-

Responses

Response samples

Content type
application/json
{
  • "source": "nico",
  • "message": "User is not allowed to perform this action",
  • "data": null
}

Update an SSH Key

https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/sshkey/{sshKeyId}

Response samples

Content type
application/json
{
  • "message": "Deletion request was accepted"
}

Update an SSH Key

Typical API Call Flow for Tenant