NCN Lifecycle Service 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.

Base URLs:

Authentication

  • HTTP Authentication, scheme: bearer

NCN Lifecycle Events

post__nls_v1_ncns_reboot

Code samples

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

r = requests.post('https://api-gw-service-nmn.local/apis/nls/v1/ncns/reboot', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

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

POST /nls/v1/ncns/reboot

End to end rolling reboot ncns

Body parameter

{
  "dryRun": true,
  "hosts": [
    "string"
  ],
  "switchPassword": "string",
  "wipeOsd": true
}

Parameters

Name In Type Required Description
body body models.CreateRebootWorkflowRequest true hostnames to include

Example responses

200 Response

{
  "name": "string",
  "targetNcns": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK models.CreateRebootWorkflowResponse
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

post__nls_v1_ncns_rebuild

Code samples

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

r = requests.post('https://api-gw-service-nmn.local/apis/nls/v1/ncns/rebuild', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

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

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

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

POST /nls/v1/ncns/rebuild

End to end rolling rebuild ncns

Body parameter

{
  "desiredCfsConfig": "string",
  "dryRun": true,
  "hosts": [
    "string"
  ],
  "imageId": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "switchPassword": "string",
  "workflowType": "string",
  "zapOsds": true
}

Parameters

Name In Type Required Description
body body models.CreateRebuildWorkflowRequest true hostnames to include

Example responses

200 Response

{
  "name": "string",
  "targetNcns": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK models.CreateRebuildWorkflowResponse
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

Workflow Management

get__nls_v1_workflows

Code samples

GET https://api-gw-service-nmn.local/apis/nls/v1/workflows 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/nls/v1/workflows \
  -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/nls/v1/workflows', 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/nls/v1/workflows", data)
    req.Header = headers

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

GET /nls/v1/workflows

Get status of a ncn workflow

Parameters

Name In Type Required Description
labelSelector query string false Label Selector

Example responses

200 Response

[
  {
    "label": {},
    "name": "string",
    "status": {}
  }
]

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 [models.GetWorkflowResponse] false none none
» label object false none none
» name string false none none
» status object false none none
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete__nls_v1_workflows_{name}

Code samples

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

r = requests.delete('https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}', 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("DELETE", "https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}", data)
    req.Header = headers

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

DELETE /nls/v1/workflows/{name}

Delete a ncn workflow

Parameters

Name In Type Required Description
name path string true name of workflow

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK OK ResponseOk
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

put__nls_v1_workflows_{name}_rerun

Code samples

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

r = requests.put('https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}/rerun', 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("PUT", "https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}/rerun", data)
    req.Header = headers

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

PUT /nls/v1/workflows/{name}/rerun

Rerun a workflow, all steps will run

Parameters

Name In Type Required Description
name path string true name of workflow

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK OK ResponseOk
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

put__nls_v1_workflows_{name}_retry

Code samples

PUT https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}/retry HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PUT https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}/retry \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}/retry', headers = headers)

print(r.json())
package main

import (
       "bytes"
       "net/http"
)

func main() {

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

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://api-gw-service-nmn.local/apis/nls/v1/workflows/{name}/retry", data)
    req.Header = headers

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

PUT /nls/v1/workflows/{name}/retry

Retry a failed ncn workflow, skip passed steps

Body parameter

{
  "restartSuccessful": true,
  "stepName": "string"
}

Parameters

Name In Type Required Description
name path string true name of workflow
body body models.RetryWorkflowRequestBody true retry options

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK OK ResponseOk
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

Schemas

ResponseError

{
  "message": "string"
}

Properties

Name Type Required Restrictions Description
message string false none none

ResponseOk

{
  "message": "string"
}

Properties

Name Type Required Restrictions Description
message string false none none

models.CreateRebootWorkflowRequest

{
  "dryRun": true,
  "hosts": [
    "string"
  ],
  "switchPassword": "string",
  "wipeOsd": true
}

Properties

Name Type Required Restrictions Description
dryRun boolean false none none
hosts [string] false none none
switchPassword string false none none
wipeOsd boolean false none none

models.CreateRebootWorkflowResponse

{
  "name": "string",
  "targetNcns": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
name string false none none
targetNcns [string] false none none

models.CreateRebuildWorkflowRequest

{
  "desiredCfsConfig": "string",
  "dryRun": true,
  "hosts": [
    "string"
  ],
  "imageId": "string",
  "labels": {
    "property1": "string",
    "property2": "string"
  },
  "switchPassword": "string",
  "workflowType": "string",
  "zapOsds": true
}

Properties

Name Type Required Restrictions Description
desiredCfsConfig string false none none
dryRun boolean false none none
hosts [string] false none none
imageId string false none none
labels object false none none
» additionalProperties string false none none
switchPassword string false none none
workflowType string false none used to determine storage rebuild vs upgrade
zapOsds boolean false none this is necessary for storage rebuilds when unable to wipe the node prior to rebuild

models.CreateRebuildWorkflowResponse

{
  "name": "string",
  "targetNcns": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
name string false none none
targetNcns [string] false none none

models.GetWorkflowResponse

{
  "label": {},
  "name": "string",
  "status": {}
}

Properties

Name Type Required Restrictions Description
label object false none none
name string false none none
status object false none none

models.RetryWorkflowRequestBody

{
  "restartSuccessful": true,
  "stepName": "string"
}

Properties

Name Type Required Restrictions Description
restartSuccessful boolean false none none
stepName string false none none