Image Management Service v3

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

The Image Management Service (IMS) creates and customizes boot images which run on compute nodes. A boot image consists of multiple image artifacts including the root file system (rootfs), kernel, and initrd. There are optionally additional artifacts such as debug symbols, etc. IMS uses the open source Kiwi-NG tool to build image roots from compressed Kiwi image descriptions (recipes). Kiwi-NG is able to build images based on a variety of different Linux distributions, specifically SUSE, RHEL, and their derivatives. A user may choose to use the provided recipes or customize Kiwi recipes to define the image to be built. IMS creates and customizes existing boot images and maintains metadata about the images and related artifacts. IMS accesses and stores the recipes, images, and related artifacts in the artifact repository.

Resources

/images

Manipulate ImageRecords, which relate multiple image artifact records together.

/jobs

Initiate image creation or customization.  It creates the image which it uploads to the
artifact repository, and maintains associated metadata in IMS for subsequent access. It
also customizes a pre-existing image.

/public-keys

Manage the public keys which enable SSH access. Public-keys are created and uploaded by the
administrator to allow access to SSH shells provided by IMS during image creation and
customization.

/recipes

Manipulate the RecipeRecord metadata about the Kiwi-NG recipes which are stored in the
artifact repository. Recipes themselves define how an image is to be created, including the
RPMs that will be installed, the RPM repositories to use, etc.

/remote-build-nodes

Manage the set of nodes set up for running remote jobs. These are jobs that are
run on nodes outside of the set of Kubernetes worker nodes. They can be used to
offload work from the worker nodes, or match the architecture of the images
being created or customized.

The remote node must be fully configured and booted into the 'remote-node-image'
by the site-admin prior to registration in IMS. It will be tested prior to job
launch and if it is not accessible or correctly configured it will not be used.

Workflows

There are two main workflows using the IMS - image creation and image customization. The IMS /jobs endpoint directs the creation of a new image, or the customization of an existing image, depending on the POST /jobs request job_type body parameter.

Add a New Recipe

#### GET /recipes

  Obtain list of existing recipes which are registered with IMS.

#### Upload recipe using CLI

  Upload a new recipe to the artifact repository using the cray artifacts command, if necessary.
  Refer to Administrator's Guide for instructions.

#### POST /recipes

  Register new recipe with IMS.

Manage Public Keys

#### GET /public-keys

  Obtain list of available public-keys.

#### POST /public-keys

  Add a new public-key.

Create a New Image

#### GET /public-keys

  Get a list of available keys.

#### GET /recipes

  Get recipe ID.

#### POST /jobs

  Use Kiwi-NG to create a new IMS image and image artifacts from a recipe. Specify job_type
  "create" in JobRecord. Request body parameters supply the recipe ID and public key ID.
  Upon success, the artifact repository contains the new image and the image artifacts,
  IMS contains a new ImageRecord with metadata for the new image. During the creation
  process, IMS may create an SSH shell for administrator interaction with the image for
  debugging, if necessary.  (enable_debug = true in JobRecord)

Modify an Image

#### GET /public-keys

  Get a list of available keys.

#### GET /images

  Obtain a list of available images registered in IMS.

#### POST /jobs

  To create a modified version of an existing IMS image, specify job_type "customize".
  Specify the IMS ID of the existing image, and public key.  This request creates a copy of
  the existing image, and then an interactive SSH shell in which to modify the copy of the
  image. Upon success, the artifact repository contains the original image and a modified
  version of it. IMS contains a new ImageRecord with metadata for the modified image. The
  original image is still intact.  A user may want to install additional software, install
  licenses, change the timezone, add mount points, etc.

Base URLs:

License: Hewlett Packard Enterprise Development LP

Authentication

  • HTTP Authentication, scheme: bearer

images

Interact with image records

get_all_v3_images

Code samples

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

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

GET /v3/images

List all ImageRecords

Retrieve a list of ImageRecords indicating images that are registered with IMS. The ImageRecord ID is used to associate multiple image artifacts together (kernel, initrd, rootfs (squashfs)).

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "name": "centos7.5_barebones",
    "link": {
      "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
      "etag": "f04af5f34635ae7c507322985e60c00c-131",
      "type": "s3"
    },
    "arch": "aarch64",
    "metadata": {
      "key": "includes_additional_packages",
      "value": "foo,bar,baz"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of images Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ImageRecord] false none [An Image Record]
» id string(uuid) false read-only Unique ID of the image.
» created string(date-time) false read-only Time the image record was created
» name string true none Name of the image
» link ArtifactLinkRecord false none An Artifact Link Record
»» path string true none Path or location to the artifact in the artifact repository
»» etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
»» type string true none Identifier specifying the artifact repository where the artifact is located
» arch string false none Target architecture for the recipe.
» metadata object false none User supplied annotations about an image
»» key string false none Template variable to associate with the IMS image
»» value string false none Value variable to associate with the IMS image

Enumerated Values

Property Value
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v3_image

Code samples

POST https://api-gw-service-nmn.local/apis/ims/v3/images 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/ims/v3/images \
  -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/ims/v3/images', 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/ims/v3/images", data)
    req.Header = headers

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

POST /v3/images

Create a new ImageRecord

Create a new ImageRecord and register the new image with IMS.

Body parameter

{
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Parameters

Name In Type Required Description
body body ImageRecord true Image record to create

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
201 Created New image record ImageRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_images

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/images 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/ims/v3/images \
  -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/ims/v3/images', 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/ims/v3/images", data)
    req.Header = headers

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

DELETE /v3/images

Soft delete all ImageRecords

Delete all ImageRecords. Deleted images are soft deleted and added to the /deleted/images endpoint. The S3 key for the associated image manifests are renamed.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Image records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_image

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/images/{image_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/ims/v3/images/{image_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/ims/v3/images/{image_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/ims/v3/images/{image_id}", data)
    req.Header = headers

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

GET /v3/images/{image_id}

Retrieve image by image_id

Retrieve an image by image_id.

Parameters

Name In Type Required Description
image_id path string(uuid) true The unique ID of an image

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
200 OK An image record ImageRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v3_image

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/images/{image_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/images/{image_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/images/{image_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/images/{image_id}", data)
    req.Header = headers

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

PATCH /v3/images/{image_id}

Update an image

Update an ImageRecord in IMS.

Body parameter

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "operation": "set",
    "key": "includes_additional_packages",
    "value": "vim,emacs,man"
  }
}

Parameters

Name In Type Required Description
body body ImagePatchRecord true Image Patch record
image_id path string(uuid) true The unique ID of an image

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
200 OK Updated Image record ImageRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_image

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/images/{image_id} 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/ims/v3/images/{image_id} \
  -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/ims/v3/images/{image_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/images/{image_id}", data)
    req.Header = headers

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

DELETE /v3/images/{image_id}

Soft delete ImageRecord by image_id

Delete an ImageRecord by ID. Deleted images are soft deleted and added to the /deleted/images endpoint. The S3 key for the associated image manifest is renamed.

Parameters

Name In Type Required Description
image_id path string(uuid) true The unique ID of an image

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Image record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v3_deleted_images

Code samples

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

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

GET /v3/deleted/images

List all DeletedImageRecords

Retrieve a list of DeletedImageRecords indicating images that have been deleted from IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "deleted": "2018-07-28T03:26:01.234Z",
    "name": "centos7.5_barebones",
    "link": {
      "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
      "etag": "f04af5f34635ae7c507322985e60c00c-131",
      "type": "s3"
    },
    "arch": "aarch64",
    "metadata": {
      "key": "includes_additional_packages",
      "value": "foo,bar,baz"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of deleted image records Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeletedImageRecord] false none [A Deleted Image Record]
» id string(uuid) false read-only Unique ID of the image.
» created string(date-time) false read-only Time the image record was created
» deleted string(date-time) false read-only Time the image record was deleted
» name string true none Name of the image
» link ArtifactLinkRecord false none An Artifact Link Record
»» path string true none Path or location to the artifact in the artifact repository
»» etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
»» type string true none Identifier specifying the artifact repository where the artifact is located
» arch string false none Target architecture for the recipe.
» metadata object false none User supplied annotations about an image
»» key string false none Template variable to associate with the IMS image
»» value string false none Value variable to associate with the IMS image

Enumerated Values

Property Value
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_deleted_images

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/deleted/images 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/ims/v3/deleted/images \
  -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/ims/v3/deleted/images', 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/ims/v3/deleted/images", data)
    req.Header = headers

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

DELETE /v3/deleted/images

Permanently delete all DeletedImageRecords

Permanently delete all DeletedImageRecords. Associated artifacts are permanently deleted from S3.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Image records were permanently deleted None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_all_v3_deleted_images

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/images HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/images \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/deleted/images', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/images", data)
    req.Header = headers

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

PATCH /v3/deleted/images

Restore all DeletedImageRecords in IMS.

Restore all DeletedImageRecords in IMS.

Body parameter

{
  "operation": "undelete"
}

Parameters

Name In Type Required Description
body body DeletedImagePatchRecord true Deleted Recipe Image record

Example responses

400 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Deleted image records updated successfully None
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_deleted_image

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_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/ims/v3/deleted/images/{deleted_image_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/ims/v3/deleted/images/{deleted_image_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/ims/v3/deleted/images/{deleted_image_id}", data)
    req.Header = headers

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

GET /v3/deleted/images/{deleted_image_id}

Retrieve deleted image details by using deleted_image_id

Retrieve deleted image details by using deleted_image_id.

Parameters

Name In Type Required Description
deleted_image_id path string(uuid) true The unique ID of a deleted image

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
200 OK A deleted image record DeletedImageRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_deleted_image

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_id} 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/ims/v3/deleted/images/{deleted_image_id} \
  -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/ims/v3/deleted/images/{deleted_image_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_id}", data)
    req.Header = headers

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

DELETE /v3/deleted/images/{deleted_image_id}

Permanently delete image record by deleted_image_id

Permanently delete image record associated with deleted_image_id. Associated artifacts are permanently deleted from S3.

Parameters

Name In Type Required Description
deleted_image_id path string(uuid) true The unique ID of a deleted image

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content ImageRecord was permanently deleted None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v3_deleted_image

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/images/{deleted_image_id}", data)
    req.Header = headers

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

PATCH /v3/deleted/images/{deleted_image_id}

Restore a DeletedImageRecord in IMS.

Restore a DeletedImageRecord in IMS.

Body parameter

{
  "operation": "undelete"
}

Parameters

Name In Type Required Description
body body DeletedImagePatchRecord true DeletedImage Patch record
deleted_image_id path string(uuid) true The unique ID of a deleted image

Example responses

400 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Deleted image records updated successfully None
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v2_images

Code samples

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

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

GET /images

List all ImageRecords

Retrieve a list of ImageRecords indicating images that are registered with the IMS. The ImageRecord ID is used to associate multiple image artifacts together (kernel, initrd, rootfs (squashfs)).

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "name": "centos7.5_barebones",
    "link": {
      "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
      "etag": "f04af5f34635ae7c507322985e60c00c-131",
      "type": "s3"
    },
    "arch": "aarch64",
    "metadata": {
      "key": "includes_additional_packages",
      "value": "foo,bar,baz"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of images Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [ImageRecord] false none [An Image Record]
» id string(uuid) false read-only Unique ID of the image.
» created string(date-time) false read-only Time the image record was created
» name string true none Name of the image
» link ArtifactLinkRecord false none An Artifact Link Record
»» path string true none Path or location to the artifact in the artifact repository
»» etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
»» type string true none Identifier specifying the artifact repository where the artifact is located
» arch string false none Target architecture for the recipe.
» metadata object false none User supplied annotations about an image
»» key string false none Template variable to associate with the IMS image
»» value string false none Value variable to associate with the IMS image

Enumerated Values

Property Value
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v2_image

Code samples

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

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

POST /images

Create a new ImageRecord

Create a new ImageRecord and register the new image with IMS.

Body parameter

{
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Parameters

Name In Type Required Description
body body ImageRecord true Image record to create

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
201 Created New image record DeletedImageRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v2_images

Code samples

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

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

DELETE /images

Delete all ImageRecords

Delete all ImageRecords.

Parameters

Name In Type Required Description
cascade query boolean false If cascade is true, IMS also deletes the linked artifacts in S3. If cascade is false, the linked artifacts in S3 are not affected.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Image records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v2_image

Code samples

GET https://api-gw-service-nmn.local/apis/ims/images/{image_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/ims/images/{image_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/ims/images/{image_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/ims/images/{image_id}", data)
    req.Header = headers

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

GET /images/{image_id}

Retrieve image by image_id

Retrieve an image by image_id.

Parameters

Name In Type Required Description
image_id path string(uuid) true The unique ID of an image

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
200 OK An image record ImageRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v2_image

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/images/{image_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/images/{image_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/images/{image_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/images/{image_id}", data)
    req.Header = headers

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

PATCH /images/{image_id}

Update an image

Update an ImageRecord in IMS.

Body parameter

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "operation": "set",
    "key": "includes_additional_packages",
    "value": "vim,emacs,man"
  }
}

Parameters

Name In Type Required Description
body body ImagePatchRecord true Image Patch record
image_id path string(uuid) true The unique ID of an image

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

Responses

Status Meaning Description Schema
200 OK Updated Image record ImageRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v2_image

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/images/{image_id} 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/ims/images/{image_id} \
  -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/ims/images/{image_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/images/{image_id}", data)
    req.Header = headers

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

DELETE /images/{image_id}

Delete ImageRecord by image_id

Delete an ImageRecord by image_id.

Parameters

Name In Type Required Description
cascade query boolean false If cascade is true, IMS also deletes the linked artifacts in S3. If cascade is false, the linked artifacts in S3 are not affected.
image_id path string(uuid) true The unique ID of an image

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Image record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

healthz

Interact with kubernetes healthz checks

get_healthz_ready

Code samples

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

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

GET /healthz/ready

Retrieve IMS Readiness Probe

Readiness probe for IMS. This is used by Kubernetes to determine if IMS is ready to accept requests.

Example responses

Responses

Status Meaning Description Schema
200 OK IMS is ready to accept requests None
500 Internal Server Error IMS is not able to accept requests None

Response Schema

To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_healthz_live

Code samples

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

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

GET /healthz/live

Retrieve IMS Liveness Probe

Liveness probe for IMS. This is used by Kubernetes to determine if IMS is responsive

Example responses

Responses

Status Meaning Description Schema
200 OK IMS is responsive None
500 Internal Server Error IMS is not responsive None

Response Schema

To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

jobs

Interact with job records

get_all_v3_jobs

Code samples

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

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

GET /v3/jobs

Retrieve a list of JobRecords that are registered with IMS

Retrieve a list of JobRecords that are registered with IMS

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "job_type": "customize",
    "image_root_archive_name": "cray-sles12-sp3-barebones",
    "kernel_file_name": "vmlinuz",
    "initrd_file_name": "initrd",
    "kernel_parameters_file_name": "kernel-parameters",
    "status": "creating",
    "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
    "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
    "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
    "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
    "ssh_containers": [
      {
        "name": "customize",
        "jail": true,
        "status": "pending",
        "connection_info": {
          "property1": {
            "host": "10.100.20.221",
            "port": 22
          },
          "property2": {
            "host": "10.100.20.221",
            "port": 22
          }
        }
      }
    ],
    "enable_debug": true,
    "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
    "build_env_size": 15,
    "kubernetes_namespace": "default",
    "arch": "aarch64",
    "require_dkms": false
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of jobs Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [JobRecord] false none [A Job Record]
» id string(uuid) false read-only Unique ID of the job
» created string(date-time) false read-only Time the image record was created
» job_type JobTypes true none Type of job
» image_root_archive_name string true none Name to be given to the imageroot artifact (do not include .sqshfs or other extensions)
» kernel_file_name string false none Name of the kernel file to extract and upload to the artifact repository from the /boot directory of the image root.
» initrd_file_name string false none Name of the initrd image file to extract and upload to the artifact repository from the /boot directory of the image root.
» kernel_parameters_file_name string false none Name of the kernel-parameters file to extract and upload to the artifact repository from the /boot directory of the image root.
» status JobStatuses false read-only Status of the job
» artifact_id string(uuid) true none IMS artifact_id which specifies the recipe (create job_type) or the image (customize job_type) to fetch from the artifact repository.
» public_key_id string(uuid) true none Public key to use to enable passwordless SSH shells
» kubernetes_job string false read-only Name of the underlying kubernetes job
» kubernetes_service string false read-only Name of the underlying kubernetes service
» kubernetes_configmap string false read-only Name of the underlying kubernetes configmap
» ssh_containers [SshContainer] false none List of SSH containers used to customize images being built or modified
»» name string true none Name of the SSH container
»» jail boolean true none If true, establish an SSH jail, or chroot environment.
»» status string false read-only Status of the SSH container (pending, establishing, active, complete)
»» connection_info object false none none
»»» additionalProperties object false none none
»»»» host string false read-only IP or host name to use, in combination with the port, to connect to the SSH container
»»»» port integer false read-only Port to use, in combination with the host, to connect to the SSH container
» enable_debug boolean false none Whether to enable debugging of the job
» resultant_image_id string(uuid) false read-only IMS image ID for the resultant image.
» build_env_size integer false none Size (in Gb) to allocate for the image root. Default = 15
» kubernetes_namespace string false read-only Kubernetes namespace where the IMS job resources were created
» arch string false read-only Target architecture for the recipe.
» require_dkms boolean false none Whether enable DKMS for the job

Enumerated Values

Property Value
job_type create
job_type customize
status creating
status fetching_image
status fetching_recipe
status waiting_for_repos
status building_image
status waiting_on_user
status error
status success
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v3_job

Code samples

POST https://api-gw-service-nmn.local/apis/ims/v3/jobs 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/ims/v3/jobs \
  -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/ims/v3/jobs', 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/ims/v3/jobs", data)
    req.Header = headers

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

POST /v3/jobs

Create JobRecord

Create a new IMS image or modify an existing IMS image, depending on request body parameter, job_type.

Create

  • Fetch recipe from the artifact repository and decompress to temp directory.
  • Wait for required package repositories to become available
  • Call kiwi-ng, which builds the image root using the recipe in artifact repository and accesses packages in zypper/yum repositories.
  • Upload the new image to the artifact repository, and save metadata to IMS - ImageRecord.
  • If there is a failure, establish debug SSH shell, depending on value of enable_debug. Admin can inspect image build root. touch /mnt/image/complete in a non-jailed environment or touch /tmp/complete in a jailed (chroot) environment to exit.

Customize

  • The artifact_id in the POST /job request body refers to an IMS ImageRecord. IMS uses the ImageRecord to read the Image’s manifest.yaml to find the Image’s root file system (rootfs) artifact. IMS downloads the rootfs from the artifact repository and uncompresses it.
  • IMS creates an SSH environment so admin can inspect and modify the image. For example, it may be necessary to modify the timezone, or modify the programming environment, etc. touch /mnt/image/complete in a non-jailed environment or touch /tmp/complete in a jailed (chroot) environment. to exit.
  • IMS waits for the user to exit the ssh, then creates new IMS image record with the modifications, and adds the root certificate to the image. Note that IMS does not modify the original image but modifies a copy of it.
  • IMS creates a new IMS ImageRecord, packages the IMS artifacts (kernel, initrd, rootfs), creates a manifest.json manifest file, and uploads all new artifacts to the artifact repository. The metadata is recorded by IMS and ImageRecord is updated.

Body parameter

{
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "connection_info": {
        "property1": {},
        "property2": {}
      }
    }
  ],
  "enable_debug": true,
  "build_env_size": 15,
  "require_dkms": false
}

Parameters

Name In Type Required Description
body body JobRecord true Job record to create

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
201 Created New job record JobRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_jobs

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/jobs 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/ims/v3/jobs \
  -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/ims/v3/jobs', 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/ims/v3/jobs", data)
    req.Header = headers

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

DELETE /v3/jobs

Delete all JobRecords

Delete all job records.

Parameters

Name In Type Required Description
status query array[string] false List of job statues. Only jobs with matching statues are considered for deletion.
job_type query array[string] false Only jobs with matching job type are considered for deletion.
age query string false Only jobs older than the given age are considered for deletion. Age is given in the format “1d” or “6h”

Enumerated Values

Parameter Value
status creating
status fetching_image
status fetching_recipe
status waiting_for_repos
status building_image
status waiting_on_user
status error
status success
job_type create
job_type customize

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Job records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_job

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_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/ims/v3/jobs/{job_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/ims/v3/jobs/{job_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/ims/v3/jobs/{job_id}", data)
    req.Header = headers

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

GET /v3/jobs/{job_id}

Retrieve a job by job_id

Retrieve JobRecord by job_id

Parameters

Name In Type Required Description
job_id path string(uuid) true The unique ID of a job

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK A job record JobRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v3_job

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_id}", data)
    req.Header = headers

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

PATCH /v3/jobs/{job_id}

Update a JobRecord by job_id (Internal Use Only)

Update a job record. Internal use only. Not for API consumers.

Body parameter

{
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "status": "creating"
}

Parameters

Name In Type Required Description
body body JobPatchRecord true Image Patch record
job_id path string(uuid) true The unique ID of a job

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK Updated job record JobRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_job

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_id} 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/ims/v3/jobs/{job_id} \
  -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/ims/v3/jobs/{job_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/jobs/{job_id}", data)
    req.Header = headers

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

DELETE /v3/jobs/{job_id}

Delete JobRecord by job_id

Delete a job record by job_id. This also deletes the underlying Kubernetes resources that were created when the job record was submitted.

Parameters

Name In Type Required Description
job_id path string(uuid) true The unique ID of a job

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Job record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v2_jobs

Code samples

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

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

GET /jobs

Retrieve a list of JobRecords that are registered with IMS

Retrieve a list of JobRecords that are registered with IMS

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "job_type": "customize",
    "image_root_archive_name": "cray-sles12-sp3-barebones",
    "kernel_file_name": "vmlinuz",
    "initrd_file_name": "initrd",
    "kernel_parameters_file_name": "kernel-parameters",
    "status": "creating",
    "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
    "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
    "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
    "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
    "ssh_containers": [
      {
        "name": "customize",
        "jail": true,
        "status": "pending",
        "connection_info": {
          "property1": {
            "host": "10.100.20.221",
            "port": 22
          },
          "property2": {
            "host": "10.100.20.221",
            "port": 22
          }
        }
      }
    ],
    "enable_debug": true,
    "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
    "build_env_size": 15,
    "kubernetes_namespace": "default",
    "arch": "aarch64",
    "require_dkms": false
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of jobs Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [JobRecord] false none [A Job Record]
» id string(uuid) false read-only Unique ID of the job
» created string(date-time) false read-only Time the image record was created
» job_type JobTypes true none Type of job
» image_root_archive_name string true none Name to be given to the imageroot artifact (do not include .sqshfs or other extensions)
» kernel_file_name string false none Name of the kernel file to extract and upload to the artifact repository from the /boot directory of the image root.
» initrd_file_name string false none Name of the initrd image file to extract and upload to the artifact repository from the /boot directory of the image root.
» kernel_parameters_file_name string false none Name of the kernel-parameters file to extract and upload to the artifact repository from the /boot directory of the image root.
» status JobStatuses false read-only Status of the job
» artifact_id string(uuid) true none IMS artifact_id which specifies the recipe (create job_type) or the image (customize job_type) to fetch from the artifact repository.
» public_key_id string(uuid) true none Public key to use to enable passwordless SSH shells
» kubernetes_job string false read-only Name of the underlying kubernetes job
» kubernetes_service string false read-only Name of the underlying kubernetes service
» kubernetes_configmap string false read-only Name of the underlying kubernetes configmap
» ssh_containers [SshContainer] false none List of SSH containers used to customize images being built or modified
»» name string true none Name of the SSH container
»» jail boolean true none If true, establish an SSH jail, or chroot environment.
»» status string false read-only Status of the SSH container (pending, establishing, active, complete)
»» connection_info object false none none
»»» additionalProperties object false none none
»»»» host string false read-only IP or host name to use, in combination with the port, to connect to the SSH container
»»»» port integer false read-only Port to use, in combination with the host, to connect to the SSH container
» enable_debug boolean false none Whether to enable debugging of the job
» resultant_image_id string(uuid) false read-only IMS image ID for the resultant image.
» build_env_size integer false none Size (in Gb) to allocate for the image root. Default = 15
» kubernetes_namespace string false read-only Kubernetes namespace where the IMS job resources were created
» arch string false read-only Target architecture for the recipe.
» require_dkms boolean false none Whether enable DKMS for the job

Enumerated Values

Property Value
job_type create
job_type customize
status creating
status fetching_image
status fetching_recipe
status waiting_for_repos
status building_image
status waiting_on_user
status error
status success
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v2_job

Code samples

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

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

POST /jobs

Create JobRecord

Create a new IMS image or modify an existing IMS image, depending on request body parameter, job_type.

Create

  • Fetch recipe from the artifact repository and decompress to temp directory.
  • Wait for required package repositories to become available.
  • Call kiwi-ng, which builds the image root using the recipe in artifact repository and accesses packages in zypper/yum repositories.
  • Upload the new image to the artifact repository, and save metadata to IMS - ImageRecord.
  • If there is a failure, establish debug SSH shell, depending on value of enable_debug. Admin can inspect image build root. touch /mnt/image/complete in a non-jailed environment or touch /tmp/complete in a jailed (chroot) environment to exit.

Customize

  • The artifact_id in the POST /job request body refers to an IMS ImageRecord. IMS uses the ImageRecord to read the Image’s manifest.yaml to find the Image’s root file system (rootfs) artifact. IMS downloads the rootfs from the artifact repository and uncompresses it.
  • IMS creates an SSH environment so admin can inspect and modify the image. For example, it may be necessary to modify the timezone, or modify the programming environment, etc. touch /mnt/image/complete in a non-jailed environment or touch /tmp/complete in a jailed (chroot) environment. to exit.
  • IMS waits for the user to exit the ssh, then creates new IMS image record with the modifications, and adds the root certificate to the image. Note that IMS does not modify the original image but modifies a copy of it.
  • IMS creates a new IMS ImageRecord, packages the IMS artifacts (kernel, initrd, rootfs), creates a manifest.json manifest file, and uploads all new artifacts to the artifact repository. The metadata is recorded by IMS and ImageRecord is updated.

Body parameter

{
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "connection_info": {
        "property1": {},
        "property2": {}
      }
    }
  ],
  "enable_debug": true,
  "build_env_size": 15,
  "require_dkms": false
}

Parameters

Name In Type Required Description
body body JobRecord true Job record to create

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
201 Created New job record JobRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v2_jobs

Code samples

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

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

DELETE /jobs

Delete all JobRecords

Delete all job records.

Parameters

Name In Type Required Description
status query array[string] false List of job statues. Only jobs with matching statues are considered for deletion.
job_type query array[string] false Only jobs with matching job type are considered for deletion.
age query string false Only jobs older than the given age are considered for deletion. Age is given in the format “1d” or “6h”

Enumerated Values

Parameter Value
status creating
status fetching_image
status fetching_recipe
status waiting_for_repos
status building_image
status waiting_on_user
status error
status success
job_type create
job_type customize

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Job records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v2_job

Code samples

GET https://api-gw-service-nmn.local/apis/ims/jobs/{job_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/ims/jobs/{job_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/ims/jobs/{job_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/ims/jobs/{job_id}", data)
    req.Header = headers

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

GET /jobs/{job_id}

Retrieve a job by job_id

Retrieve JobRecord by job_id

Parameters

Name In Type Required Description
job_id path string(uuid) true The unique ID of a job

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK A job record JobRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v2_job

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/jobs/{job_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/jobs/{job_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/jobs/{job_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/jobs/{job_id}", data)
    req.Header = headers

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

PATCH /jobs/{job_id}

Update a JobRecord by job_id (Internal Use Only)

Update a job record. Internal use only. Not for API consumers.

Body parameter

{
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "status": "creating"
}

Parameters

Name In Type Required Description
body body JobPatchRecord true Image Patch record
job_id path string(uuid) true The unique ID of a job

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK A job record JobRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v2_job

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/jobs/{job_id} 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/ims/jobs/{job_id} \
  -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/ims/jobs/{job_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/jobs/{job_id}", data)
    req.Header = headers

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

DELETE /jobs/{job_id}

Delete JobRecord by job_id

Delete a job record by job_id. This also deletes the underlying Kubernetes resources that were created when the job record was submitted.

Parameters

Name In Type Required Description
job_id path string(uuid) true The unique ID of a job

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Job record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

recipes

Interact with recipe records

get_all_v3_recipes

Code samples

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

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

GET /v3/recipes

Retrieve RecipeRecords

Retrieve all RecipeRecords that are registered with the IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "link": {
      "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
      "etag": "f04af5f34635ae7c507322985e60c00c-131",
      "type": "s3"
    },
    "recipe_type": "kiwi-ng",
    "linux_distribution": "sles12",
    "name": "centos7.5_barebones",
    "template_dictionary": [
      {
        "key": "CSM_RELEASE_VERSION",
        "value": "1.0.0"
      }
    ],
    "arch": "aarch64",
    "require_dkms": false
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of recipes Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [RecipeRecord] false none [A Recipe Record]
» id string(uuid) false read-only Unique ID of the recipe
» created string(date-time) false read-only Time the recipe record was created
» link ArtifactLinkRecord false none An Artifact Link Record
»» path string true none Path or location to the artifact in the artifact repository
»» etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
»» type string true none Identifier specifying the artifact repository where the artifact is located
» recipe_type string true none Type of recipe
» linux_distribution string true none Linux distribution being built
» name string true none Name of the image
» template_dictionary [RecipeKeyValuePair] false none List of key/value pairs to be templated into the recipe when building the image.
»» key string true none Template variable to replace in the IMS recipe
»» value string true none Value to replace the template variable in the IMS recipe
» arch string false none Target architecture for the recipe.
» require_dkms boolean false none Whether to enable DKMS for the job

Enumerated Values

Property Value
recipe_type kiwi-ng
recipe_type packer
linux_distribution sles12
linux_distribution sles15
linux_distribution centos7
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v3_recipes

Code samples

POST https://api-gw-service-nmn.local/apis/ims/v3/recipes 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/ims/v3/recipes \
  -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/ims/v3/recipes', 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/ims/v3/recipes", data)
    req.Header = headers

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

POST /v3/recipes

Create a new recipe

Create a new RecipeRecord in IMS. A compressed Kiwi-NG image description is actually stored in the artifact repository. This IMS RecipeRecord contains metadata for the recipe.

Body parameter

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Parameters

Name In Type Required Description
body body RecipeRecord true Recipe record

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
201 Created New Recipe record RecipeRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_recipes

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/recipes 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/ims/v3/recipes \
  -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/ims/v3/recipes', 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/ims/v3/recipes", data)
    req.Header = headers

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

DELETE /v3/recipes

Soft delete all RecipeRecords

Delete all RecipeRecords. Deleted recipes are soft deleted and added to the /deleted/recipes endpoint. The S3 key for associated artifacts is renamed.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Recipe records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_recipe

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_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/ims/v3/recipes/{recipe_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/ims/v3/recipes/{recipe_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/ims/v3/recipes/{recipe_id}", data)
    req.Header = headers

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

GET /v3/recipes/{recipe_id}

Retrieve RecipeRecord by ID

Retrieve a RecipeRecord by ID

Parameters

Name In Type Required Description
recipe_id path string(uuid) true The unique ID of a recipe

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK A recipe record RecipeRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v3_recipe

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_id}", data)
    req.Header = headers

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

PATCH /v3/recipes/{recipe_id}

Update a recipe

Update a RecipeRecord in IMS.

Body parameter

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "require_dkms": false,
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ]
}

Parameters

Name In Type Required Description
body body RecipePatchRecord true Recipe Patch record
recipe_id path string(uuid) true The unique ID of a recipe

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK Updated Recipe record RecipeRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_recipe

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_id} 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/ims/v3/recipes/{recipe_id} \
  -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/ims/v3/recipes/{recipe_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/recipes/{recipe_id}", data)
    req.Header = headers

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

DELETE /v3/recipes/{recipe_id}

Soft delete a RecipeRecord by ID

Delete a RecipeRecord by ID. The deleted recipes are soft deleted and added to the /deleted/recipes endpoint. The S3 key for the associated artifact is renamed.

Parameters

Name In Type Required Description
recipe_id path string(uuid) true The unique ID of a recipe

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Recipe record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v3_deleted_recipes

Code samples

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

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

GET /v3/deleted/recipes

Retrieve DeletedRecipeRecords

Retrieve all DeletedRecipeRecords that are registered with the IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "deleted": "2018-07-28T03:26:01.234Z",
    "link": {
      "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
      "etag": "f04af5f34635ae7c507322985e60c00c-131",
      "type": "s3"
    },
    "recipe_type": "kiwi-ng",
    "arch": "aarch64",
    "require_dkms": false,
    "linux_distribution": "sles12",
    "name": "centos7.5_barebones"
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of deleted recipes Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeletedRecipeRecord] false none [A Deleted Recipe Record]
» id string(uuid) false read-only Unique ID of the recipe
» created string(date-time) false read-only Time the recipe record was created
» deleted string(date-time) false read-only Time the recipe record was deleted
» link ArtifactLinkRecord false none An Artifact Link Record
»» path string true none Path or location to the artifact in the artifact repository
»» etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
»» type string true none Identifier specifying the artifact repository where the artifact is located
» recipe_type string true none Type of recipe
» arch string false none Target architecture for the recipe.
» require_dkms boolean false none Whether to enable DKMS for the job
» linux_distribution string true none Linux distribution being built
» name string true none Name of the image

Enumerated Values

Property Value
recipe_type kiwi-ng
recipe_type packer
arch aarch64
arch x86_64
linux_distribution sles12
linux_distribution sles15
linux_distribution centos7
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_deleted_recipes

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes 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/ims/v3/deleted/recipes \
  -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/ims/v3/deleted/recipes', 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/ims/v3/deleted/recipes", data)
    req.Header = headers

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

DELETE /v3/deleted/recipes

Permanently delete all DeletedRecipeRecords

Permanently delete all DeletedRecipeRecords. Associated artifacts are permanently deleted from S3.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Recipe records were permanently deleted None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_all_v3_deleted_recipes

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes", data)
    req.Header = headers

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

PATCH /v3/deleted/recipes

Restore all DeletedRecipeRecords in IMS.

Restore all DeletedRecipeRecords in IMS.

Body parameter

{
  "operation": "undelete"
}

Parameters

Name In Type Required Description
body body DeletedRecipePatchRecord true Deleted Recipe Patch record

Example responses

400 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Deleted recipe records updated successfully None
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_deleted_recipe

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_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/ims/v3/deleted/recipes/{recipe_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/ims/v3/deleted/recipes/{recipe_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/ims/v3/deleted/recipes/{recipe_id}", data)
    req.Header = headers

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

GET /v3/deleted/recipes/{recipe_id}

Retrieve DeletedRecipeRecord by ID

Retrieve a DeletedRecipeRecord by ID

Parameters

Name In Type Required Description
recipe_id path string(uuid) true The unique ID of a deleted recipe

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "arch": "aarch64",
  "require_dkms": false,
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones"
}

Responses

Status Meaning Description Schema
200 OK A deleted recipe record DeletedRecipeRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_deleted_recipe

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_id} 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/ims/v3/deleted/recipes/{recipe_id} \
  -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/ims/v3/deleted/recipes/{recipe_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_id}", data)
    req.Header = headers

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

DELETE /v3/deleted/recipes/{recipe_id}

Permanently delete a DeletedRecipeRecord by ID

Permanently delete a DeletedRecipeRecord by ID. Associated artifacts are permanently deleted from S3.

Parameters

Name In Type Required Description
recipe_id path string(uuid) true The unique ID of a deleted recipe

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content RecipeRecord was permanently deleted None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v3_deleted_recipe

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/recipes/{recipe_id}", data)
    req.Header = headers

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

PATCH /v3/deleted/recipes/{recipe_id}

Restore a DeletedRecipeRecord in IMS.

Restore a DeletedRecipeRecord in IMS.

Body parameter

{
  "operation": "undelete"
}

Parameters

Name In Type Required Description
body body DeletedRecipePatchRecord true Deleted Recipe Patch record
recipe_id path string(uuid) true The unique ID of a deleted recipe

Example responses

400 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Deleted recipe records updated successfully None
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v2_recipes

Code samples

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

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

GET /recipes

Retrieve RecipeRecords

Retrieve all RecipeRecords that are registered with the IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "link": {
      "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
      "etag": "f04af5f34635ae7c507322985e60c00c-131",
      "type": "s3"
    },
    "recipe_type": "kiwi-ng",
    "linux_distribution": "sles12",
    "name": "centos7.5_barebones",
    "template_dictionary": [
      {
        "key": "CSM_RELEASE_VERSION",
        "value": "1.0.0"
      }
    ],
    "arch": "aarch64",
    "require_dkms": false
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of recipes Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [RecipeRecord] false none [A Recipe Record]
» id string(uuid) false read-only Unique ID of the recipe
» created string(date-time) false read-only Time the recipe record was created
» link ArtifactLinkRecord false none An Artifact Link Record
»» path string true none Path or location to the artifact in the artifact repository
»» etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
»» type string true none Identifier specifying the artifact repository where the artifact is located
» recipe_type string true none Type of recipe
» linux_distribution string true none Linux distribution being built
» name string true none Name of the image
» template_dictionary [RecipeKeyValuePair] false none List of key/value pairs to be templated into the recipe when building the image.
»» key string true none Template variable to replace in the IMS recipe
»» value string true none Value to replace the template variable in the IMS recipe
» arch string false none Target architecture for the recipe.
» require_dkms boolean false none Whether to enable DKMS for the job

Enumerated Values

Property Value
recipe_type kiwi-ng
recipe_type packer
linux_distribution sles12
linux_distribution sles15
linux_distribution centos7
arch aarch64
arch x86_64
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v3_recipe

Code samples

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

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

POST /recipes

Create a new recipe

Create a new RecipeRecord in IMS. A compressed Kiwi-NG image description is actually stored in the artifact repository. This IMS RecipeRecord contains metadata for the recipe.

Body parameter

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Parameters

Name In Type Required Description
body body RecipeRecord true Recipe record

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
201 Created New recipe record RecipeRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v2_recipes

Code samples

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

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

DELETE /recipes

Delete all RecipeRecords

Delete all RecipeRecords.

Parameters

Name In Type Required Description
cascade query boolean false If cascade is true, IMS also deletes the linked artifacts in S3. If cascade is false, the linked artifacts in S3 are not affected.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Recipe records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v2_recipe

Code samples

GET https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_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/ims/recipes/{recipe_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/ims/recipes/{recipe_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/ims/recipes/{recipe_id}", data)
    req.Header = headers

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

GET /recipes/{recipe_id}

Retrieve RecipeRecord by ID

Retrieve a RecipeRecord by ID

Parameters

Name In Type Required Description
recipe_id path string(uuid) true The unique ID of a recipe

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK A recipe record RecipeRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v2_recipe

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_id}", data)
    req.Header = headers

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

PATCH /recipes/{recipe_id}

Update a recipe

Update a RecipeRecord in IMS.

Body parameter

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "require_dkms": false,
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ]
}

Parameters

Name In Type Required Description
body body RecipePatchRecord true Recipe Patch record
recipe_id path string(uuid) true The unique ID of a recipe

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

Responses

Status Meaning Description Schema
200 OK Updated Recipe record RecipeRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v2_recipe

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_id} 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/ims/recipes/{recipe_id} \
  -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/ims/recipes/{recipe_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/recipes/{recipe_id}", data)
    req.Header = headers

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

DELETE /recipes/{recipe_id}

Delete a RecipeRecord by ID

Delete a recipe by ID.

Parameters

Name In Type Required Description
cascade query boolean false If cascade is true, IMS also deletes the linked artifacts in S3. If cascade is false, the linked artifacts in S3 are not affected.
recipe_id path string(uuid) true The unique ID of a recipe

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Recipe record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

public keys

Interact with public key records

get_all_v3_public_keys

Code samples

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

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

GET /v3/public-keys

List public SSH keys

Retrieve a list of public SSH keys that are registered with IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "name": "Eric's public key",
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of keypairs Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [PublicKeyRecord] false none [A Keypair Record]
» id string(uuid) false read-only Unique ID of the image
» created string(date-time) false read-only Time the image record was created
» name string true none Name of the public key
» public_key string true none The raw public key
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v3_public_key

Code samples

POST https://api-gw-service-nmn.local/apis/ims/v3/public-keys 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/ims/v3/public-keys \
  -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/ims/v3/public-keys', 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/ims/v3/public-keys", data)
    req.Header = headers

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

POST /v3/public-keys

Create a new public SSH key record

Create a new public SSH key record. Uploaded by administrator to allow them to access SSH shells that IMS provides.

Body parameter

{
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Parameters

Name In Type Required Description
body body PublicKeyRecord true Public key record to create

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Responses

Status Meaning Description Schema
201 Created New PublicKey PublicKeyRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_public_keys

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/public-keys 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/ims/v3/public-keys \
  -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/ims/v3/public-keys', 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/ims/v3/public-keys", data)
    req.Header = headers

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

DELETE /v3/public-keys

Soft delete all PublicKeyRecords

Delete all public key-records. Deleted public-keys are soft deleted and added to the /deleted/public-keys endpoint.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Public key records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_public_key

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/public-keys/{public_key_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/ims/v3/public-keys/{public_key_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/ims/v3/public-keys/{public_key_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/ims/v3/public-keys/{public_key_id}", data)
    req.Header = headers

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

GET /v3/public-keys/{public_key_id}

Retrieve a public key by public_key_id

Retrieve a public key by public_key_id

Parameters

Name In Type Required Description
public_key_id path string(uuid) true The unique ID of a public key

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Responses

Status Meaning Description Schema
200 OK A public key record PublicKeyRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_public_key

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/public-keys/{public_key_id} 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/ims/v3/public-keys/{public_key_id} \
  -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/ims/v3/public-keys/{public_key_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/public-keys/{public_key_id}", data)
    req.Header = headers

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

DELETE /v3/public-keys/{public_key_id}

Soft delete public key by public_key_id

Delete a PublicKeyRecord by ID. Deleted public-keys are soft deleted and added to the /deleted/public-keys endpoint.

Parameters

Name In Type Required Description
public_key_id path string(uuid) true The unique ID of a public key

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Public Key record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v3_deleted_public_keys

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys 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/ims/v3/deleted/public-keys \
  -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/ims/v3/deleted/public-keys', 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/ims/v3/deleted/public-keys", data)
    req.Header = headers

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

GET /v3/deleted/public-keys

List deleted public SSH keys

Retrieve a list of deleted public SSH keys that are registered with IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "deleted": "2018-07-28T03:26:01.234Z",
    "name": "Eric's public key",
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of keypairs Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [DeletedPublicKeyRecord] false none [A Deleted Keypair Record]
» id string(uuid) false read-only Unique ID of the image
» created string(date-time) false read-only Time the image record was created
» deleted string(date-time) false read-only Time the image record was deleted
» name string true none Name of the public key
» public_key string true none The raw public key
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_deleted_public_keys

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys 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/ims/v3/deleted/public-keys \
  -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/ims/v3/deleted/public-keys', 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/ims/v3/deleted/public-keys", data)
    req.Header = headers

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

DELETE /v3/deleted/public-keys

Permanently delete all DeletedPublicKeyRecords

Permanently delete all public key-records.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content PublicKey records were permanently deleted None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_all_v3_deleted_public_keys

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys", data)
    req.Header = headers

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

PATCH /v3/deleted/public-keys

Restore all DeletedPublicKeyRecord in IMS.

Restore all DeletedPublicKeyRecord in IMS.

Body parameter

{
  "operation": "undelete"
}

Parameters

Name In Type Required Description
body body DeletedPublicKeyPatchRecord true Deleted PublicKey Patch record

Example responses

400 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Deleted public key records updated successfully None
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_deleted_public_key

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_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/ims/v3/deleted/public-keys/{deleted_public_key_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/ims/v3/deleted/public-keys/{deleted_public_key_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/ims/v3/deleted/public-keys/{deleted_public_key_id}", data)
    req.Header = headers

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

GET /v3/deleted/public-keys/{deleted_public_key_id}

Retrieve a deleted public key by deleted_public_key_id

Retrieve a deleted public key by deleted_public_key_id

Parameters

Name In Type Required Description
deleted_public_key_id path string(uuid) true The unique ID of a deleted public key

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Responses

Status Meaning Description Schema
200 OK A deleted public key record DeletedPublicKeyRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_deleted_public_key

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_id} 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/ims/v3/deleted/public-keys/{deleted_public_key_id} \
  -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/ims/v3/deleted/public-keys/{deleted_public_key_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_id}", data)
    req.Header = headers

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

DELETE /v3/deleted/public-keys/{deleted_public_key_id}

Permanently delete public key by deleted_public_key_id

Permanently delete a DeletedPublicKeyRecord by ID.

Parameters

Name In Type Required Description
deleted_public_key_id path string(uuid) true The unique ID of a deleted public key

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content PublicKeyRecord was permanently deleted None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

patch_v3_deleted_public_key

Code samples

PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_id} HTTP/1.1
Host: api-gw-service-nmn.local
Content-Type: application/json
Accept: application/json
# You can also use wget
curl -X PATCH https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_id} \
  -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.patch('https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_id}', 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("PATCH", "https://api-gw-service-nmn.local/apis/ims/v3/deleted/public-keys/{deleted_public_key_id}", data)
    req.Header = headers

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

PATCH /v3/deleted/public-keys/{deleted_public_key_id}

Restore a DeletedPublicKeyRecord in IMS.

Restore a DeletedPublicKeyRecord in IMS.

Body parameter

{
  "operation": "undelete"
}

Parameters

Name In Type Required Description
body body DeletedPublicKeyPatchRecord true DeletedPublicKey Patch record
deleted_public_key_id path string(uuid) true The unique ID of a deleted public key

Example responses

400 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Deleted public key record updated successfully None
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
409 Conflict Requested resource could not be patched due to conflict. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_all_v2_public_keys

Code samples

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

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

GET /public-keys

List public SSH keys

Retrieve a list of public SSH keys that are registered with IMS.

Example responses

200 Response

[
  {
    "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
    "created": "2018-07-28T03:26:01.234Z",
    "name": "Eric's public key",
    "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of keypairs Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [PublicKeyRecord] false none [A Keypair Record]
» id string(uuid) false read-only Unique ID of the image
» created string(date-time) false read-only Time the image record was created
» name string true none Name of the public key
» public_key string true none The raw public key
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v2_public_key

Code samples

POST https://api-gw-service-nmn.local/apis/ims/public-keys 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/ims/public-keys \
  -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/ims/public-keys', 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/ims/public-keys", data)
    req.Header = headers

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

POST /public-keys

Create a new public SSH key record

Create a new public SSH key record. Uploaded by administrator to allow them to access SSH shells that IMS provides.

Body parameter

{
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Parameters

Name In Type Required Description
body body PublicKeyRecord true Public key record to create

Example responses

201 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Responses

Status Meaning Description Schema
201 Created New public key PublicKeyRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v2_public_keys

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/public-keys 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/ims/public-keys \
  -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/ims/public-keys', 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/ims/public-keys", data)
    req.Header = headers

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

DELETE /public-keys

Delete all PublicKeyRecords

Delete all public key records.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Public key records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v2_public_key

Code samples

GET https://api-gw-service-nmn.local/apis/ims/public-keys/{public_key_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/ims/public-keys/{public_key_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/ims/public-keys/{public_key_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/ims/public-keys/{public_key_id}", data)
    req.Header = headers

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

GET /public-keys/{public_key_id}

Retrieve a public key by public_key_id

Retrieve a public key by public_key_id

Parameters

Name In Type Required Description
public_key_id path string(uuid) true The unique ID of a public key

Example responses

200 Response

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

Responses

Status Meaning Description Schema
200 OK A public key record PublicKeyRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v2_public_key

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/public-keys/{public_key_id} 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/ims/public-keys/{public_key_id} \
  -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/ims/public-keys/{public_key_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("DELETE", "https://api-gw-service-nmn.local/apis/ims/public-keys/{public_key_id}", data)
    req.Header = headers

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

DELETE /public-keys/{public_key_id}

Delete public key by public_key_id

Delete a public key by public_key_id.

Parameters

Name In Type Required Description
public_key_id path string(uuid) true The unique ID of a public key

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Public Key record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

version

Get version

getVersion

Code samples

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

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

GET /version

Get IMS version

Retrieve the version of the IMS Service

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK IMS Version string
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

remote build node

get_all_v3_remote_build_nodes

Code samples

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

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

GET /remote-build-nodes

List remote build nodes

Retrieve a list of remote build nodes that are registered with IMS.

Example responses

200 Response

[
  {
    "xname": "x3000c1s10b1n0"
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of remote build nodes Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [RemoteBuildNodeRecord] false none [A Remote Build Node Record]
» xname string true none Xname of the remote build node
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

post_v3_remote_build_node

Code samples

POST https://api-gw-service-nmn.local/apis/ims/remote-build-nodes 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/ims/remote-build-nodes \
  -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/ims/remote-build-nodes', 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/ims/remote-build-nodes", data)
    req.Header = headers

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

POST /remote-build-nodes

Create a new remote built node record

Create a new remote build node record. Updated by administrator to allow them to run jobs on a remote build node.

Body parameter

{
  "xname": "x3000c1s10b1n0"
}

Parameters

Name In Type Required Description
body body RemoteBuildNodeRecord true Remote build node record to create

Example responses

201 Response

{
  "xname": "x3000c1s10b1n0"
}

Responses

Status Meaning Description Schema
201 Created New RemoteBuildNode RemoteBuildNodeRecord
400 Bad Request No input provided. Determine the specific information that is missing or invalid and then re-run the request with valid information. ProblemDetails
422 Unprocessable Entity Input data was understood, but failed validation. Re-run request with valid input values for the fields indicated in the response. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_all_v3_remote_build_nodes

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/remote-build-nodes 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/ims/remote-build-nodes \
  -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/ims/remote-build-nodes', 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/ims/remote-build-nodes", data)
    req.Header = headers

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

DELETE /remote-build-nodes

Delete all RemoteBuildNodeRecords

Delete all remote build node records.

Example responses

500 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Remote build node records deleted successfully None
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

get_v3_remote_build_node

Code samples

GET https://api-gw-service-nmn.local/apis/ims/remote-build-nodes/{remote_build_node_xname} 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/ims/remote-build-nodes/{remote_build_node_xname} \
  -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/ims/remote-build-nodes/{remote_build_node_xname}', 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/ims/remote-build-nodes/{remote_build_node_xname}", data)
    req.Header = headers

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

GET /remote-build-nodes/{remote_build_node_xname}

Retrieve a remote build node by remote_build_node_xname

Retrieve a remote build node by remote_build_node_xname

Parameters

Name In Type Required Description
remote_build_node_xname path string true The unique xname of a remote build node

Example responses

200 Response

{
  "xname": "x3000c1s10b1n0"
}

Responses

Status Meaning Description Schema
200 OK A remote build node record RemoteBuildNodeRecord
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

delete_v3_remote_build_node

Code samples

DELETE https://api-gw-service-nmn.local/apis/ims/remote-build-nodes/{remote_build_node_xname} 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/ims/remote-build-nodes/{remote_build_node_xname} \
  -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/ims/remote-build-nodes/{remote_build_node_xname}', 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/ims/remote-build-nodes/{remote_build_node_xname}", data)
    req.Header = headers

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

DELETE /remote-build-nodes/{remote_build_node_xname}

Delete remote build node by remote_build_node_xname

Delete a RemoteBuildNodeRecord by Xname.

Parameters

Name In Type Required Description
remote_build_node_xname path string true The unique xname of a remote build node

Example responses

404 Response

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

Responses

Status Meaning Description Schema
204 No Content Remote build node record deleted successfully None
404 Not Found Requested resource does not exist. Re-run request with valid ID. ProblemDetails
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

remote build node status

get_all_v3_remote_build_status

Code samples

GET https://api-gw-service-nmn.local/apis/ims/v3/remote-build-nodes/status 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/ims/v3/remote-build-nodes/status \
  -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/ims/v3/remote-build-nodes/status', 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/ims/v3/remote-build-nodes/status", data)
    req.Header = headers

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

GET /v3/remote-build-nodes/status

List remote build node status objects

Retrieve the status of all remote build nodes that are registered with IMS.

Example responses

200 Response

[
  {
    "xname": "x3000c1s10b1n0",
    "nodeArch": "x86_64",
    "numCurrentJobs": 15,
    "podmanStatus": "Podman present at /usr/bin/podman",
    "sshStatus": "SSH connection established",
    "ableToRunJobs": true
  }
]

Responses

Status Meaning Description Schema
200 OK A collection of the status of each remote build node Inline
500 Internal Server Error An internal error occurred. Re-running the request may or may not succeed. ProblemDetails

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [RemoteBuildNodeStatus] false none [A Remote Build Node Status]
» xname string true none Xname of the remote build node
» nodeArch string false none Architecture of the remote build node
» numCurrentJobs integer false none Number of current jobs running on the remote build node
» podmanStatus string false none Status of the podman executable on the remote build node
» sshStatus string false none Status of the ssh connection to the remote build node
» ableToRunJobs boolean false none If the node is able to run new jobs
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Schemas

SSHConnectionInfo

{
  "host": "10.100.20.221",
  "port": 22
}

Properties

Name Type Required Restrictions Description
host string false read-only IP or host name to use, in combination with the port, to connect to the SSH container
port integer false read-only Port to use, in combination with the host, to connect to the SSH container

SSHConnectionMap

{
  "property1": {
    "host": "10.100.20.221",
    "port": 22
  },
  "property2": {
    "host": "10.100.20.221",
    "port": 22
  }
}

Properties

Name Type Required Restrictions Description
additionalProperties SSHConnectionInfo false none none

SshContainer

{
  "name": "customize",
  "jail": true,
  "status": "pending",
  "connection_info": {
    "property1": {
      "host": "10.100.20.221",
      "port": 22
    },
    "property2": {
      "host": "10.100.20.221",
      "port": 22
    }
  }
}

Properties

Name Type Required Restrictions Description
name string true none Name of the SSH container
jail boolean true none If true, establish an SSH jail, or chroot environment.
status string false read-only Status of the SSH container (pending, establishing, active, complete)
connection_info SSHConnectionMap false none none

ProblemDetails

{
  "detail": "string",
  "errors": {},
  "instance": "http://example.com",
  "status": 400,
  "title": "string",
  "type": "about:blank"
}

An error response for RFC 7807 problem details.

Properties

Name Type Required Restrictions Description
detail string false none A human-readable explanation specific to this occurrence of the problem. Focus on helping correct the problem, rather than giving debugging information.
errors object false none An object denoting field-specific errors. Only present on error responses when field input is specified for the request.
instance string(uri) false none A relative URI reference that identifies the specific occurrence of the problem
status integer false none HTTP status code
title string false none Short, human-readable summary of the problem, should not change by occurrence.
type string(uri) false none Relative URI reference to the type of problem which includes human-readable documentation.

PublicKeyRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

A Keypair Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the image
created string(date-time) false read-only Time the image record was created
name string true none Name of the public key
public_key string true none The raw public key

DeletedPublicKeyRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "name": "Eric's public key",
  "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA ... fa6hG9i2SzfY8L6vAVvSE7A2ILAsVruw1Zeiec2IWt"
}

A Deleted Keypair Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the image
created string(date-time) false read-only Time the image record was created
deleted string(date-time) false read-only Time the image record was deleted
name string true none Name of the public key
public_key string true none The raw public key

RemoteBuildNodeRecord

{
  "xname": "x3000c1s10b1n0"
}

A Remote Build Node Record

Properties

Name Type Required Restrictions Description
xname string true none Xname of the remote build node

RemoteBuildNodeStatus

{
  "xname": "x3000c1s10b1n0",
  "nodeArch": "x86_64",
  "numCurrentJobs": 15,
  "podmanStatus": "Podman present at /usr/bin/podman",
  "sshStatus": "SSH connection established",
  "ableToRunJobs": true
}

A Remote Build Node Status

Properties

Name Type Required Restrictions Description
xname string true none Xname of the remote build node
nodeArch string false none Architecture of the remote build node
numCurrentJobs integer false none Number of current jobs running on the remote build node
podmanStatus string false none Status of the podman executable on the remote build node
sshStatus string false none Status of the ssh connection to the remote build node
ableToRunJobs boolean false none If the node is able to run new jobs

ArtifactLinkRecord

{
  "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
  "etag": "f04af5f34635ae7c507322985e60c00c-131",
  "type": "s3"
}

An Artifact Link Record

Properties

Name Type Required Restrictions Description
path string true none Path or location to the artifact in the artifact repository
etag string false none Opaque identifier used to uniquely identify the artifact in the artifact repository
type string true none Identifier specifying the artifact repository where the artifact is located

RecipeKeyValuePair

{
  "key": "CSM_RELEASE_VERSION",
  "value": "1.0.0"
}

Key/value pair used to template an IMS recipe

Properties

Name Type Required Restrictions Description
key string true none Template variable to replace in the IMS recipe
value string true none Value to replace the template variable in the IMS recipe

RecipeRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones",
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ],
  "arch": "aarch64",
  "require_dkms": false
}

A Recipe Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the recipe
created string(date-time) false read-only Time the recipe record was created
link ArtifactLinkRecord false none An Artifact Link Record
recipe_type string true none Type of recipe
linux_distribution string true none Linux distribution being built
name string true none Name of the image
template_dictionary [RecipeKeyValuePair] false none List of key/value pairs to be templated into the recipe when building the image.
arch string false none Target architecture for the recipe.
require_dkms boolean false none Whether to enable DKMS for the job

Enumerated Values

Property Value
recipe_type kiwi-ng
recipe_type packer
linux_distribution sles12
linux_distribution sles15
linux_distribution centos7
arch aarch64
arch x86_64

DeletedRecipeRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "recipe_type": "kiwi-ng",
  "arch": "aarch64",
  "require_dkms": false,
  "linux_distribution": "sles12",
  "name": "centos7.5_barebones"
}

A Deleted Recipe Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the recipe
created string(date-time) false read-only Time the recipe record was created
deleted string(date-time) false read-only Time the recipe record was deleted
link ArtifactLinkRecord false none An Artifact Link Record
recipe_type string true none Type of recipe
arch string false none Target architecture for the recipe.
require_dkms boolean false none Whether to enable DKMS for the job
linux_distribution string true none Linux distribution being built
name string true none Name of the image

Enumerated Values

Property Value
recipe_type kiwi-ng
recipe_type packer
arch aarch64
arch x86_64
linux_distribution sles12
linux_distribution sles15
linux_distribution centos7

RecipePatchRecord

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "require_dkms": false,
  "template_dictionary": [
    {
      "key": "CSM_RELEASE_VERSION",
      "value": "1.0.0"
    }
  ]
}

Values to update a RecipeRecord with

Properties

Name Type Required Restrictions Description
link ArtifactLinkRecord false none An Artifact Link Record
arch string false none Target architecture for the recipe.
require_dkms boolean false none Whether enable DKMS for the job
template_dictionary [RecipeKeyValuePair] false none List of key/value pairs to be templated into the recipe when building the image.

Enumerated Values

Property Value
arch aarch64
arch x86_64

ImagePatchRecord

{
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "operation": "set",
    "key": "includes_additional_packages",
    "value": "vim,emacs,man"
  }
}

Values used to update an existing IMS Image Record

Properties

Name Type Required Restrictions Description
link ArtifactLinkRecord false none An Artifact Link Record
arch string false none Target architecture for the recipe.
metadata object false none An object which indicates a number of annotation patch operations relating to image tags.
» operation string true none How to update a given key within the context of a patch operation
» key string true none The key to update for a given image
» value string false none The value to associate with a key during a patch operation

Enumerated Values

Property Value
arch aarch64
arch x86_64
operation set
operation remove

ImageRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

An Image Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the image.
created string(date-time) false read-only Time the image record was created
name string true none Name of the image
link ArtifactLinkRecord false none An Artifact Link Record
arch string false none Target architecture for the recipe.
metadata object false none User supplied annotations about an image
» key string false none Template variable to associate with the IMS image
» value string false none Value variable to associate with the IMS image

Enumerated Values

Property Value
arch aarch64
arch x86_64

DeletedImageRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "deleted": "2018-07-28T03:26:01.234Z",
  "name": "centos7.5_barebones",
  "link": {
    "path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
    "etag": "f04af5f34635ae7c507322985e60c00c-131",
    "type": "s3"
  },
  "arch": "aarch64",
  "metadata": {
    "key": "includes_additional_packages",
    "value": "foo,bar,baz"
  }
}

A Deleted Image Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the image.
created string(date-time) false read-only Time the image record was created
deleted string(date-time) false read-only Time the image record was deleted
name string true none Name of the image
link ArtifactLinkRecord false none An Artifact Link Record
arch string false none Target architecture for the recipe.
metadata object false none User supplied annotations about an image
» key string false none Template variable to associate with the IMS image
» value string false none Value variable to associate with the IMS image

Enumerated Values

Property Value
arch aarch64
arch x86_64

JobRecord

{
  "id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "created": "2018-07-28T03:26:01.234Z",
  "job_type": "customize",
  "image_root_archive_name": "cray-sles12-sp3-barebones",
  "kernel_file_name": "vmlinuz",
  "initrd_file_name": "initrd",
  "kernel_parameters_file_name": "kernel-parameters",
  "status": "creating",
  "artifact_id": "46a2731e-a1d0-4f98-ba92-4f78c756bb12",
  "public_key_id": "b05c54e3-9fc2-472d-b120-4fd718ff90aa",
  "kubernetes_job": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-customize",
  "kubernetes_service": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-service",
  "kubernetes_configmap": "cray-ims-46a2731e-a1d0-4f98-ba92-4f78c756bb12-configmap",
  "ssh_containers": [
    {
      "name": "customize",
      "jail": true,
      "status": "pending",
      "connection_info": {
        "property1": {
          "host": "10.100.20.221",
          "port": 22
        },
        "property2": {
          "host": "10.100.20.221",
          "port": 22
        }
      }
    }
  ],
  "enable_debug": true,
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "build_env_size": 15,
  "kubernetes_namespace": "default",
  "arch": "aarch64",
  "require_dkms": false
}

A Job Record

Properties

Name Type Required Restrictions Description
id string(uuid) false read-only Unique ID of the job
created string(date-time) false read-only Time the image record was created
job_type JobTypes true none Type of job
image_root_archive_name string true none Name to be given to the imageroot artifact (do not include .sqshfs or other extensions)
kernel_file_name string false none Name of the kernel file to extract and upload to the artifact repository from the /boot directory of the image root.
initrd_file_name string false none Name of the initrd image file to extract and upload to the artifact repository from the /boot directory of the image root.
kernel_parameters_file_name string false none Name of the kernel-parameters file to extract and upload to the artifact repository from the /boot directory of the image root.
status JobStatuses false read-only Status of the job
artifact_id string(uuid) true none IMS artifact_id which specifies the recipe (create job_type) or the image (customize job_type) to fetch from the artifact repository.
public_key_id string(uuid) true none Public key to use to enable passwordless SSH shells
kubernetes_job string false read-only Name of the underlying kubernetes job
kubernetes_service string false read-only Name of the underlying kubernetes service
kubernetes_configmap string false read-only Name of the underlying kubernetes configmap
ssh_containers [SshContainer] false none List of SSH containers used to customize images being built or modified
enable_debug boolean false none Whether to enable debugging of the job
resultant_image_id string(uuid) false read-only IMS image ID for the resultant image.
build_env_size integer false none Size (in Gb) to allocate for the image root. Default = 15
kubernetes_namespace string false read-only Kubernetes namespace where the IMS job resources were created
arch string false read-only Target architecture for the recipe.
require_dkms boolean false none Whether enable DKMS for the job

Enumerated Values

Property Value
arch aarch64
arch x86_64

JobPatchRecord

{
  "resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
  "status": "creating"
}

Values to update a JobRecord with

Properties

Name Type Required Restrictions Description
resultant_image_id string(uuid) false none IMS image ID for the resultant image.
status JobStatuses false none Status of the job

JobStatuses

"creating"

Status of the job

Properties

Name Type Required Restrictions Description
anonymous string false none Status of the job

Enumerated Values

Property Value
anonymous creating
anonymous fetching_image
anonymous fetching_recipe
anonymous waiting_for_repos
anonymous building_image
anonymous waiting_on_user
anonymous error
anonymous success

JobTypes

"customize"

Type of job

Properties

Name Type Required Restrictions Description
anonymous string false none Type of job

Enumerated Values

Property Value
anonymous create
anonymous customize

DeletedObjectPatchOperations

"undelete"

Patch operations that can be performed on a deleted IMS object

Properties

Name Type Required Restrictions Description
anonymous string false none Patch operations that can be performed on a deleted IMS object

Enumerated Values

Property Value
anonymous undelete

DeletedRecipePatchRecord

{
  "operation": "undelete"
}

Values to update a DeletedRecipeRecord with

Properties

Name Type Required Restrictions Description
operation DeletedObjectPatchOperations false none Patch operations that can be performed on a deleted IMS object

DeletedImagePatchRecord

{
  "operation": "undelete"
}

Values to update a DeletedImageRecord with

Properties

Name Type Required Restrictions Description
operation DeletedObjectPatchOperations false none Patch operations that can be performed on a deleted IMS object

DeletedPublicKeyPatchRecord

{
  "operation": "undelete"
}

Values to update a DeletedPublicKeyRecord with

Properties

Name Type Required Restrictions Description
operation DeletedObjectPatchOperations false none Patch operations that can be performed on a deleted IMS object