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.
Manipulate ImageRecords, which relate multiple image artifact records together.
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.
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.
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.
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 archetecture 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.
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.
#### 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.
#### GET /public-keys
Obtain list of available public-keys.
#### POST /public-keys
Add a new public-key.
#### 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)
#### 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
Interact with image records
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"
}
]
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 |
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. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth
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"
}
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"
}
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
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"
}
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
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.
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"
}
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
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"
}
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"
}
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
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.
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"
}
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
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"
}
]
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 |
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. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth
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"
}
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
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"
}
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"
}
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
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.
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"
}
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
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.
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"
}
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
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"
}
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"
}
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
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"
}
]
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 |
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. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth
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"
}
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"
}
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
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.
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"
}
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
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.
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"
}
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
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"
}
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"
}
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
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.
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"
}
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
Interact with kubernetes healthz checks
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
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 |
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth
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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | IMS is responsive | None |
500 | Internal Server Error | IMS is not responsive | None |
To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth
Interact with job records
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
}
]
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 |
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 |
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
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.
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
}
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
}
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
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.
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” |
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"
}
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
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
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
}
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
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"
}
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
}
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
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.
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"
}
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
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
}
]
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 |
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 |
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
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.
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
}
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
}
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
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.
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” |
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"
}
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
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
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
}
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
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"
}
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
}
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
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.
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"
}
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
Interact with recipe records
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
}
]
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 |
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 |
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
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
}
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
}
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
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"
}
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
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
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
}
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
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"
}
]
}
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
}
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
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.
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"
}
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
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"
}
]
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 |
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 |
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
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"
}
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
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"
}
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"
}
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
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
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"
}
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
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.
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"
}
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
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"
}
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"
}
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
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
}
]
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 |
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 |
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
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
}
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
}
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
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.
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"
}
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
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
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
}
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
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"
}
]
}
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
}
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
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.
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"
}
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
Interact with public key records
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"
}
]
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 |
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
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"
}
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"
}
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
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"
}
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
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
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"
}
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
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.
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"
}
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
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"
}
]
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 |
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
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"
}
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
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"
}
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"
}
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
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
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"
}
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
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.
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"
}
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
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"
}
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"
}
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
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"
}
]
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 |
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
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"
}
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"
}
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
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"
}
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
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
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"
}
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
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.
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"
}
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 version
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"
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
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"
}
]
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 |
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
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"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | RemoteBuildNodeRecord | true | Remote build node record to create |
Example responses
201 Response
{
"xname": "x3000c1s10b1n0"
}
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
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"
}
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
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
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"
}
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
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.
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"
}
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
{
"host": "10.100.20.221",
"port": 22
}
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 |
{
"property1": {
"host": "10.100.20.221",
"port": 22
},
"property2": {
"host": "10.100.20.221",
"port": 22
}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
additionalProperties | SSHConnectionInfo | false | none | none |
{
"name": "customize",
"jail": true,
"status": "pending",
"connection_info": {
"property1": {
"host": "10.100.20.221",
"port": 22
},
"property2": {
"host": "10.100.20.221",
"port": 22
}
}
}
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 |
{
"detail": "string",
"errors": {},
"instance": "http://example.com",
"status": 400,
"title": "string",
"type": "about:blank"
}
An error response for RFC 7807 problem details.
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. |
{
"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
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 |
{
"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
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 |
{
"xname": "x3000c1s10b1n0"
}
A Remote Build Node Record
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
xname | string | true | none | Xname of the remote build node |
{
"path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
"etag": "f04af5f34635ae7c507322985e60c00c-131",
"type": "s3"
}
An Artifact Link Record
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 |
{
"key": "CSM_RELEASE_VERSION",
"value": "1.0.0"
}
Key/value pair used to template an IMS recipe
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 |
{
"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
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 |
Property | Value |
---|---|
recipe_type | kiwi-ng |
recipe_type | packer |
linux_distribution | sles12 |
linux_distribution | sles15 |
linux_distribution | centos7 |
arch | aarch64 |
arch | x86_64 |
{
"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
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 |
Property | Value |
---|---|
recipe_type | kiwi-ng |
recipe_type | packer |
arch | aarch64 |
arch | x86_64 |
linux_distribution | sles12 |
linux_distribution | sles15 |
linux_distribution | centos7 |
{
"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
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. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
{
"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"
}
An Image Record
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. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
{
"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"
}
A Deleted Image Record
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. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
{
"link": {
"path": "s3://boot-images/1fb58f4e-ad23-489b-89b7-95868fca7ee6/manifest.json",
"etag": "f04af5f34635ae7c507322985e60c00c-131",
"type": "s3"
},
"arch": "aarch64"
}
Values to update an ImageRecord with
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
link | ArtifactLinkRecord | false | none | An Artifact Link Record |
arch | string | false | none | Target architecture for the recipe. |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
{
"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
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 |
Property | Value |
---|---|
arch | aarch64 |
arch | x86_64 |
{
"resultant_image_id": "e564cd0a-f222-4f30-8337-62184e2dd86d",
"status": "creating"
}
Values to update a JobRecord with
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 |
"creating"
Status of the job
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Status of the job |
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 |
"customize"
Type of job
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Type of job |
Property | Value |
---|---|
anonymous | create |
anonymous | customize |
"undelete"
Patch operations that can be performed on a deleted IMS object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Patch operations that can be performed on a deleted IMS object |
Property | Value |
---|---|
anonymous | undelete |
{
"operation": "undelete"
}
Values to update a DeletedRecipeRecord with
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
operation | DeletedObjectPatchOperations | false | none | Patch operations that can be performed on a deleted IMS object |
{
"operation": "undelete"
}
Values to update a DeletedImageRecord with
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
operation | DeletedObjectPatchOperations | false | none | Patch operations that can be performed on a deleted IMS object |
{
"operation": "undelete"
}
Values to update a DeletedPublicKeyRecord with
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
operation | DeletedObjectPatchOperations | false | none | Patch operations that can be performed on a deleted IMS object |