Documentation ¶
Overview ¶
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* HPE GreenLake for Private Cloud Containers APIs * * # Table Of Contents - [Introduction](#section/Introduction) - [Authentication](#section/Authentication) - [Get a Space ID](#section/Get-a-Space-ID) - [Roles and Permissions](#section/Roles-and-Permissions) - [Getting Started Guide](#section/Getting-Started-Guide) - [Machine Blueprint Creation Example](#section/Getting-Started-Guide/Machine-Blueprint-Creation-Example) - [Cluster Blueprint Creation Example](#section/Getting-Started-Guide/Cluster-Blueprint-Creation-Example) - [Cluster Creation Example](#section/Getting-Started-Guide/Cluster-Creation-Example) # Introduction Welcome to the APIs for HPE GreenLake for Private Cloud Enterprise: containers. This document describes the API protocol and available endpoints for the containers service. The containers service APIs are built on HTTP. Our API is RESTful. It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. You can use your favorite HTTP/REST library for your programming language to use the containers service APIs. # Authentication To authenticate with the containers service, you must obtain the access token using either of the following options. <h2>Option 1: Creating an API client (recommended)</h2> An API client allows nonhuman entities (an application service account, for instance) programmatic access to a resource on a space. 1. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=greenlakecentral-create-api-client.html\" target=\"_blank\"> Create an API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to save the **Issuer Url**, **Client ID**, and **Client Secret**. 2. <a href=\"https://support.hpe.com/hpesc/public/docDisplay?docId=a00092451en_us&page=GUID-1CEA233B-C4B0-41B7-9A25-7A36D9FC0312.html\" target=\"_blank\"> Create an assignment for the API client <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a> **Note:** Make sure to assign `Private Cloud Cluster Owner`(cluster-admin) or `Private Cloud Cluster Resource Contributor`(developer) role. 3. Make a REST call to generate the API access token, using the issuer URL, client ID, and client secret from step 1: ``` curl -i -X POST \\ '{issuerUrl}/v1/token' \\ -H 'Content-Type: application/x-www-form-urlencoded' \\ -d 'client_id={clientID}' \\ -d 'client_secret={clientSecret}' \\ -d grant_type=client_credentials \\ -d scope=hpe-tenant ``` Obtain the `access_token` from the response. <h2>Option 2: Getting the token directly from the UI</h2> To authenticate with the containers service API, you can obtain the access token from <a href=\"https://client.greenlake.hpe.com\" target=\"_blank\"> HPE GreenLake Central <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/share.svg\" height=\"12\"> </a>. Log into **HPE GreenLake Central**. Click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/user.svg\"> icon in the top right corner and then click **API Access**. In the API Access page, click the <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/clipboard.svg\"> icon to copy the personal access token. <br> > <img src=\"https://raw.githubusercontent.com/grommet/grommet-icons/stable/img/circle-information.svg\"> **INFO**: For both the options, the access token lease expires in **15** minutes. # Get a Space ID You must obtain the space ID for the space on which you have access. Use the UI to get the space ID. ![Alt text](./space.png?raw=true \"Space\") # Roles and Permissions The containers service provides two default roles for customers: **Private Cloud Cluster Owner** and **Private Cloud Cluster Resource Contributor**. The **Private Cloud Cluster Owner** role is for a cluster administrator who gets all the required permissions to execute all the APIs documented in this guide. The **Private Cloud Cluster Resource Contributor** role is for developers with only selective permissions, so that they can execute only a selected list of APIs. Each API has details about \"Required Permissions to access the API\" and \"Default Roles which can access the API\" # Getting Started Guide Our getting started guide will demonstrate a machine blueprint creation, a cluster blueprint creation and then a cluster creation using that cluster blueprint. Here are the set of APIs that you will likely execute: + Sites + Gets all Sites + Machine Providers + Gets all Machine Providers + Machine Blueprints + Create a Machine Blueprint + Cluster Providers + Gets all Cluster Providers + Cluster Blueprints + Creates a Cluster Blueprint + Clusters + Create a Cluster + Get a specific Cluster ## Machine Blueprint Creation Example Use the steps in this section to create a machine blueprint that can be used by the cluster blueprint. ### Step 1 ### Obtain the 'applianceID' for the site on which you want to create a cluster by running the '[Gets all Sites](#tag/Sites/paths/~1v1~1appliances/get)' API. Note the `applianceID`. ### Step 2 ### Get a list of all machine providers for the specified 'applianceID' by running the '[Gets all Machine Providers](tag/Machine-Providers/paths/~1v1~1appliances~1%7Bid%7D~1machineproviders/get)' API. Make a note of the `name`, `workerType`, one of the `osImages`, one of the `computeInstanceTypes` and one of the `storageInstanceTypes`. ### Step 3 ### Create a machine blueprint by running the '[Create a Machine Blueprint](#tag/Machine-Blueprints/paths/~1v1~1machineblueprints/post)' API. Designate the machine role as \"worker\", and in the request body, provide the values that you noted in the previous step. Make note of the 'id' and 'name' values of the machine blueprint. ## Cluster Blueprint Creation Example ### Step 1 ### List all the cluster providers for the specified 'applianceId' by running the '[Gets all Cluster Providers](l#tag/Cluster-Providers/paths/~1v1~1appliances~1%7Bid%7D~1clusterproviders/get)' API. Make note of the `name`, one of the `kubernetesVersions` and one of the `storageClasses`. ### Step 2 ### Create a cluster blueprint by running the [Creates a Cluster Blueprint](#tag/Cluster-Blueprints/paths/~1v1~1clusterblueprints/post) API, and, in the request body, providing the values noted in the previous step. Take note of the 'id' value in the response body. ## Cluster Creation Example ### Step 1 ### Create the cluster by running the '[Creates a Cluster](#tag/Clusters/paths/~1v1~1clusters/post)' API. In the response body, observe the details of the newly created cluster. Make note of the 'clusterID' value. ### Step 2 ### Monitor the cluster provisioning state of the specified 'clusterID' by running the [`Get a specific Cluster`](#tag/Clusters/paths/~1v1~1clusters~1%7Bid%7D/get) API. After the state turns ready, the cluster is ready for use! “ * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type AllOfClusterOidc
- type AllOfClusterProviderMinMasterSize
- type AllOfClusterProviderMinWorkerSize
- type AllOfCreateClusterOidc
- type AllOfMachineBlueprintSizeDetail
- type AllOfMachineSetDetailSizeDetail
- type AllOfOidcClaimMapping
- type AllOfUpdateClusterOidc
- type Appliance
- type Appliances
- type BasicAuth
- type ClaimMapping
- type Cluster
- type ClusterBlueprint
- type ClusterBlueprints
- type ClusterBlueprintsApiService
- func (a *ClusterBlueprintsApiService) V1ClusterblueprintsGet(ctx context.Context, field string) (ClusterBlueprints, *http.Response, error)
- func (a *ClusterBlueprintsApiService) V1ClusterblueprintsIdDelete(ctx context.Context, id string) (*http.Response, error)
- func (a *ClusterBlueprintsApiService) V1ClusterblueprintsIdGet(ctx context.Context, id string, field string) (ClusterBlueprint, *http.Response, error)
- func (a *ClusterBlueprintsApiService) V1ClusterblueprintsPost(ctx context.Context, body ClusterBlueprint) (ClusterBlueprint, *http.Response, error)
- type ClusterProvider
- type ClusterProviderAvailableCapacity
- type ClusterProviderLicenseInfo
- type ClusterProviders
- type ClusterProvidersApiService
- type ClusterProvidersApiV1AppliancesIdClusterprovidersGetOpts
- type ClusterUtilization
- type Clusters
- type ClustersApiService
- func (a *ClustersApiService) V1ClustersGet(ctx context.Context, field string) (Clusters, *http.Response, error)
- func (a *ClustersApiService) V1ClustersIdDelete(ctx context.Context, id string) (EmptyBody, *http.Response, error)
- func (a *ClustersApiService) V1ClustersIdGet(ctx context.Context, id string, field string) (Cluster, *http.Response, error)
- func (a *ClustersApiService) V1ClustersIdPut(ctx context.Context, body UpdateCluster, id string) (Cluster, *http.Response, error)
- func (a *ClustersApiService) V1ClustersPost(ctx context.Context, body CreateCluster) (Cluster, *http.Response, error)
- type Common
- type ComputeInstanceTypes
- type Configuration
- type CreateCluster
- type EmptyBody
- type GenericSwaggerError
- type Health
- type KubeConfigApiService
- type Kubeconfig
- type Licenses
- type Machine
- type MachineBlueprint
- type MachineBlueprints
- type MachineBlueprintsApiService
- func (a *MachineBlueprintsApiService) V1MachineblueprintsGet(ctx context.Context, field string) (MachineBlueprints, *http.Response, error)
- func (a *MachineBlueprintsApiService) V1MachineblueprintsIdDelete(ctx context.Context, id string) (*http.Response, error)
- func (a *MachineBlueprintsApiService) V1MachineblueprintsIdGet(ctx context.Context, id string, field string) (MachineBlueprint, *http.Response, error)
- func (a *MachineBlueprintsApiService) V1MachineblueprintsPost(ctx context.Context, body MachineBlueprint) (MachineBlueprint, *http.Response, error)
- type MachineProvider
- type MachineProviderName
- type MachineProviders
- type MachineProvidersApiService
- type MachineProvidersApiV1AppliancesIdMachineprovidersGetOpts
- type MachineRolesType
- type MachineSet
- type MachineSetDetail
- type MachineWorkerType
- type ModelError
- type Namespace
- type Namespaces
- type NamespacesApiService
- type Oidc
- type OsImages
- type Pagination
- type ResourceQuota
- type ServiceEndpoints
- type SitesApiService
- type SizeDetail
- type State
- type StorageClass
- type StorageClasses
- type StorageClassesApiService
- type UpdateCluster
- type UpdateClusterMachineSet
- type User
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { ClusterBlueprintsApi *ClusterBlueprintsApiService ClusterProvidersApi *ClusterProvidersApiService ClustersApi *ClustersApiService KubeConfigApi *KubeConfigApiService MachineBlueprintsApi *MachineBlueprintsApiService MachineProvidersApi *MachineProvidersApiService NamespacesApi *NamespacesApiService SitesApi *SitesApiService StorageClassesApi *StorageClassesApiService // contains filtered or unexported fields }
APIClient manages communication with the HPE GreenLake for Private Cloud Containers APIs API vv1 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type AllOfClusterOidc ¶ added in v0.0.16
type AllOfClusterProviderMinMasterSize ¶ added in v0.0.7
type AllOfClusterProviderMinWorkerSize ¶ added in v0.0.7
type AllOfCreateClusterOidc ¶ added in v0.0.16
type AllOfOidcClaimMapping ¶ added in v0.0.16
type AllOfUpdateClusterOidc ¶ added in v0.0.16
type Appliances ¶ added in v0.0.3
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type ClaimMapping ¶ added in v0.0.16
type Cluster ¶
type Cluster struct { State string `json:"state"` Health string `json:"health"` UserID string `json:"userID"` UserDisplayName string `json:"userDisplayName"` UserName string `json:"userName"` CreatedDate time.Time `json:"createdDate"` LastUpdateDate time.Time `json:"lastUpdateDate"` Id string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Tags map[string]string `json:"tags,omitempty"` ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` ClusterBlueprintId string `json:"clusterBlueprintId"` ClusterProvider string `json:"clusterProvider"` K8sVersion string `json:"k8sVersion,omitempty"` KubernetesVersion string `json:"kubernetesVersion"` MachineSets []MachineSet `json:"machineSets"` MachineSetsDetail []MachineSetDetail `json:"machineSetsDetail"` Utilization *ClusterUtilization `json:"utilization"` ApiEndpoint string `json:"apiEndpoint"` ServiceEndpoints []ServiceEndpoints `json:"serviceEndpoints"` ApplianceID string `json:"applianceID"` ApplianceName string `json:"applianceName"` SpaceID string `json:"spaceID"` DefaultStorageClass string `json:"defaultStorageClass"` DefaultStorageClassDescription string `json:"defaultStorageClassDescription"` OidcEnabled bool `json:"oidcEnabled,omitempty"` Oidc *AllOfClusterOidc `json:"oidc,omitempty"` }
type ClusterBlueprint ¶
type ClusterBlueprint struct { CreatedDate time.Time `json:"createdDate"` LastUpdateDate time.Time `json:"lastUpdateDate"` Id string `json:"id"` Name string `json:"name"` K8sVersion string `json:"k8sVersion,omitempty"` KubernetesVersion string `json:"kubernetesVersion"` Description string `json:"description,omitempty"` ClusterProvider string `json:"clusterProvider"` MachineSets []MachineSet `json:"machineSets"` MachineSetsDetail []MachineSetDetail `json:"machineSetsDetail"` ApplianceID string `json:"applianceID"` SystemManaged bool `json:"systemManaged"` DefaultStorageClass string `json:"defaultStorageClass"` ControlPlaneCount int32 `json:"controlPlaneCount"` }
type ClusterBlueprints ¶ added in v0.0.3
type ClusterBlueprints struct { Count int32 `json:"count"` Total int32 `json:"total"` Items []ClusterBlueprint `json:"items"` }
type ClusterBlueprintsApiService ¶ added in v0.0.13
type ClusterBlueprintsApiService service
func (*ClusterBlueprintsApiService) V1ClusterblueprintsGet ¶ added in v0.0.13
func (a *ClusterBlueprintsApiService) V1ClusterblueprintsGet(ctx context.Context, field string) (ClusterBlueprints, *http.Response, error)
ClusterBlueprintsApiService Gets all Cluster Blueprints Retrieves all cluster blueprints available for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param field field for all query parameters
@return ClusterBlueprints
func (*ClusterBlueprintsApiService) V1ClusterblueprintsIdDelete ¶ added in v0.0.13
func (a *ClusterBlueprintsApiService) V1ClusterblueprintsIdDelete(ctx context.Context, id string) (*http.Response, error)
ClusterBlueprintsApiService Delete a Cluster Blueprint Delete the specified blueprint for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster blueprint id
func (*ClusterBlueprintsApiService) V1ClusterblueprintsIdGet ¶ added in v0.0.13
func (a *ClusterBlueprintsApiService) V1ClusterblueprintsIdGet(ctx context.Context, id string, field string) (ClusterBlueprint, *http.Response, error)
ClusterBlueprintsApiService Gets a specific Cluster Blueprint Retrieve the specified cluster blueprint for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster blueprint id
- @param field field for all query parameters
@return ClusterBlueprint
func (*ClusterBlueprintsApiService) V1ClusterblueprintsPost ¶ added in v0.0.13
func (a *ClusterBlueprintsApiService) V1ClusterblueprintsPost(ctx context.Context, body ClusterBlueprint) (ClusterBlueprint, *http.Response, error)
ClusterBlueprintsApiService Creates a Cluster Blueprint Creates a new cluster blueprint for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body cluster blueprint to create
@return ClusterBlueprint
type ClusterProvider ¶
type ClusterProvider struct { State string `json:"state"` Health string `json:"health"` CreatedDate time.Time `json:"createdDate"` LastUpdateDate time.Time `json:"lastUpdateDate"` Id string `json:"id"` Name string `json:"name"` K8sVersions []string `json:"k8sVersions,omitempty"` KubernetesVersions []string `json:"kubernetesVersions"` MinMasterSize *AllOfClusterProviderMinMasterSize `json:"minMasterSize"` MinWorkerSize *AllOfClusterProviderMinWorkerSize `json:"minWorkerSize"` LicenseInfo *ClusterProviderLicenseInfo `json:"licenseInfo"` StorageClasses []StorageClass `json:"storageClasses"` AvailableCapacity *ClusterProviderAvailableCapacity `json:"availableCapacity"` }
type ClusterProviderLicenseInfo ¶
type ClusterProviderLicenseInfo struct {
Licenses []Licenses `json:"licenses,omitempty"`
}
type ClusterProviders ¶ added in v0.0.3
type ClusterProviders struct { Count int32 `json:"count"` Total int32 `json:"total"` Items []ClusterProvider `json:"items"` }
type ClusterProvidersApiService ¶ added in v0.0.13
type ClusterProvidersApiService service
func (*ClusterProvidersApiService) V1AppliancesIdClusterprovidersGet ¶ added in v0.0.13
func (a *ClusterProvidersApiService) V1AppliancesIdClusterprovidersGet(ctx context.Context, id string, localVarOptionals *ClusterProvidersApiV1AppliancesIdClusterprovidersGetOpts) (ClusterProviders, *http.Response, error)
type ClusterProvidersApiV1AppliancesIdClusterprovidersGetOpts ¶ added in v0.0.16
type ClusterUtilization ¶ added in v0.0.13
type ClustersApiService ¶ added in v0.0.13
type ClustersApiService service
func (*ClustersApiService) V1ClustersGet ¶ added in v0.0.13
func (a *ClustersApiService) V1ClustersGet(ctx context.Context, field string) (Clusters, *http.Response, error)
ClustersApiService Gets all Clusters Retrieves all clusters currently created for the current tenant. **Required Permissions to access the API**: - caas.cluster.read **Default Roles which can access the API**: - Private Cloud Cluster Owner - Private Cloud Resource Contributor
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param field field for all query parameters
@return Clusters
func (*ClustersApiService) V1ClustersIdDelete ¶ added in v0.0.13
func (a *ClustersApiService) V1ClustersIdDelete(ctx context.Context, id string) (EmptyBody, *http.Response, error)
ClustersApiService Deletes a Cluster Delete the specified cluster **Required Permissions to access the API**: - caas.cluster.delete **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster id
@return EmptyBody
func (*ClustersApiService) V1ClustersIdGet ¶ added in v0.0.13
func (a *ClustersApiService) V1ClustersIdGet(ctx context.Context, id string, field string) (Cluster, *http.Response, error)
ClustersApiService Get a specific Cluster Retrieve the specified cluster **Required Permissions to access the API**: - caas.cluster.read **Default Roles which can access the API**: - Private Cloud Cluster Owner - Private Cloud Resource Contributor
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster id
- @param field field for all query parameters
@return Cluster
func (*ClustersApiService) V1ClustersIdPut ¶ added in v0.0.13
func (a *ClustersApiService) V1ClustersIdPut(ctx context.Context, body UpdateCluster, id string) (Cluster, *http.Response, error)
ClustersApiService Updates a Cluster Update the specified cluster for the current tenant **Required Permissions to access the API**: - caas.cluster.update **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body cluster to update
- @param id cluster id
@return Cluster
func (*ClustersApiService) V1ClustersPost ¶ added in v0.0.13
func (a *ClustersApiService) V1ClustersPost(ctx context.Context, body CreateCluster) (Cluster, *http.Response, error)
ClustersApiService Create a Cluster Creates a new cluster based on the specified cluster blueprint for the current tenant. **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body cluster to create with cluster blueprint reference
@return Cluster
type ComputeInstanceTypes ¶ added in v0.0.6
type ComputeInstanceTypes struct { Name string `json:"name"` Sizes []SizeDetail `json:"sizes"` }
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type CreateCluster ¶
type CreateCluster struct { Name string `json:"name"` Description string `json:"description,omitempty"` ClusterBlueprintId string `json:"clusterBlueprintId"` ApplianceID string `json:"applianceID"` SpaceID string `json:"spaceID"` OidcEnabled bool `json:"oidcEnabled,omitempty"` Oidc *AllOfCreateClusterOidc `json:"oidc,omitempty"` }
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type KubeConfigApiService ¶ added in v0.0.13
type KubeConfigApiService service
func (*KubeConfigApiService) V1ClustersIdKubeconfigGet ¶ added in v0.0.13
func (a *KubeConfigApiService) V1ClustersIdKubeconfigGet(ctx context.Context, id string) (Kubeconfig, *http.Response, error)
KubeConfigApiService Gets a kubeconfig for Cluster Retrieve kubeconfig for specified cluster **Required Permissions to access the API**: - caas.cluster.manage **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster id
@return Kubeconfig
type Kubeconfig ¶ added in v0.0.4
type MachineBlueprint ¶
type MachineBlueprint struct { CreatedDate time.Time `json:"createdDate"` LastUpdateDate time.Time `json:"lastUpdateDate"` Id string `json:"id"` Name string `json:"name"` MachineProvider *MachineProviderName `json:"machineProvider"` WorkerType *MachineWorkerType `json:"workerType"` MachineRoles []MachineRolesType `json:"machineRoles"` Size string `json:"size"` SizeDetail *AllOfMachineBlueprintSizeDetail `json:"sizeDetail"` SystemManaged bool `json:"systemManaged"` ComputeInstanceType string `json:"computeInstanceType"` StorageInstanceType string `json:"storageInstanceType"` Tags map[string]string `json:"tags,omitempty"` ApplianceID string `json:"applianceID"` }
type MachineBlueprints ¶ added in v0.0.3
type MachineBlueprints struct { Count int32 `json:"count"` Total int32 `json:"total"` Items []MachineBlueprint `json:"items"` }
type MachineBlueprintsApiService ¶ added in v0.0.13
type MachineBlueprintsApiService service
func (*MachineBlueprintsApiService) V1MachineblueprintsGet ¶ added in v0.0.13
func (a *MachineBlueprintsApiService) V1MachineblueprintsGet(ctx context.Context, field string) (MachineBlueprints, *http.Response, error)
MachineBlueprintsApiService Gets all Machine Blueprints Retrieves all machine blueprints available for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param field field for all query parameters
@return MachineBlueprints
func (*MachineBlueprintsApiService) V1MachineblueprintsIdDelete ¶ added in v0.0.13
func (a *MachineBlueprintsApiService) V1MachineblueprintsIdDelete(ctx context.Context, id string) (*http.Response, error)
MachineBlueprintsApiService Deletes a Machine Blueprint Delete the specified machine blueprint for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id machine blueprint id
func (*MachineBlueprintsApiService) V1MachineblueprintsIdGet ¶ added in v0.0.13
func (a *MachineBlueprintsApiService) V1MachineblueprintsIdGet(ctx context.Context, id string, field string) (MachineBlueprint, *http.Response, error)
MachineBlueprintsApiService Gets a specific Machine Blueprint Retrieve the specified machine blueprint for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id machine blueprint id
- @param field field for all query parameters
@return MachineBlueprint
func (*MachineBlueprintsApiService) V1MachineblueprintsPost ¶ added in v0.0.13
func (a *MachineBlueprintsApiService) V1MachineblueprintsPost(ctx context.Context, body MachineBlueprint) (MachineBlueprint, *http.Response, error)
MachineBlueprintsApiService Create a Machine Blueprint Creates a new machine blueprint for the current tenant **Required Permissions to access the API**: - caas.cluster.create **Default Roles which can access the API**: - Private Cloud Cluster Owner
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param body machine blueprint to create
@return MachineBlueprint
type MachineProvider ¶ added in v0.0.6
type MachineProvider struct { State string `json:"state"` Health string `json:"health"` CreatedDate time.Time `json:"createdDate"` LastUpdateDate time.Time `json:"lastUpdateDate"` Id string `json:"id"` Name *MachineProviderName `json:"name"` WorkerType *MachineWorkerType `json:"workerType"` OsImages []OsImages `json:"osImages"` Networks []string `json:"networks"` ComputeInstanceTypes []ComputeInstanceTypes `json:"computeInstanceTypes"` StorageInstanceTypes []string `json:"storageInstanceTypes"` }
type MachineProviderName ¶ added in v0.0.15
type MachineProviderName string
const ( QUAKE_MachineProviderName MachineProviderName = "quake" MORPHEUS_MachineProviderName MachineProviderName = "morpheus" MISTIO_MachineProviderName MachineProviderName = "mistio" EC2_MachineProviderName MachineProviderName = "ec2" VMAAS_MachineProviderName MachineProviderName = "vmaas" )
List of MachineProviderName
type MachineProviders ¶ added in v0.0.6
type MachineProviders struct { Count int32 `json:"count"` Total int32 `json:"total"` Items []MachineProvider `json:"items"` }
type MachineProvidersApiService ¶ added in v0.0.13
type MachineProvidersApiService service
func (*MachineProvidersApiService) V1AppliancesIdMachineprovidersGet ¶ added in v0.0.13
func (a *MachineProvidersApiService) V1AppliancesIdMachineprovidersGet(ctx context.Context, id string, localVarOptionals *MachineProvidersApiV1AppliancesIdMachineprovidersGetOpts) (MachineProviders, *http.Response, error)
type MachineProvidersApiV1AppliancesIdMachineprovidersGetOpts ¶ added in v0.0.16
type MachineRolesType ¶ added in v0.0.13
type MachineRolesType string
const ( WORKER_MachineRolesType MachineRolesType = "worker" CONTROLPLANE_MachineRolesType MachineRolesType = "controlplane" ETCD_MachineRolesType MachineRolesType = "etcd" )
List of MachineRolesType
type MachineSet ¶
type MachineSetDetail ¶
type MachineSetDetail struct { Name string `json:"name"` MachineRoles []MachineRolesType `json:"machineRoles"` MachineProvider *MachineProviderName `json:"machineProvider"` Size string `json:"size"` SizeDetail *AllOfMachineSetDetailSizeDetail `json:"sizeDetail"` ComputeInstanceType string `json:"computeInstanceType"` StorageInstanceType string `json:"storageInstanceType"` Networks []string `json:"networks"` Count int32 `json:"count"` MinSize int32 `json:"minSize"` MaxSize int32 `json:"maxSize"` Machines []Machine `json:"machines"` Tags map[string]string `json:"tags,omitempty"` }
type MachineWorkerType ¶ added in v0.0.13
type MachineWorkerType string
const ( VIRTUAL_MachineWorkerType MachineWorkerType = "Virtual" PHYSICAL_MachineWorkerType MachineWorkerType = "Physical" )
List of MachineWorkerType
type ModelError ¶ added in v0.0.15
type Namespaces ¶ added in v0.0.3
type NamespacesApiService ¶ added in v0.0.13
type NamespacesApiService service
func (*NamespacesApiService) V1ClustersIdNamespacesGet ¶ added in v0.0.13
func (a *NamespacesApiService) V1ClustersIdNamespacesGet(ctx context.Context, id string) (Namespaces, *http.Response, error)
NamespacesApiService Gets all Namespaces for Cluster Retrieve namespaces from specified cluster **Required Permissions to access the API**: - caas.cluster.read **Default Roles which can access the API**: - Private Cloud Cluster Owner - Private Cloud Resource Contributor
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster id
@return Namespaces
type Oidc ¶ added in v0.0.16
type Oidc struct { ClientID string `json:"clientID"` ClientSecret string `json:"clientSecret"` IssuerURL string `json:"issuerURL"` CaCert string `json:"caCert"` ClaimMapping *AllOfOidcClaimMapping `json:"claimMapping,omitempty"` }
type Pagination ¶ added in v0.0.3
type ResourceQuota ¶ added in v0.0.13
type ResourceQuota struct { ResourceQuotaName string `json:"resourceQuotaName"` UsedLimitMemory string `json:"usedLimitMemory"` UsedRequestMemory string `json:"usedRequestMemory"` UsedLimitCPU string `json:"usedLimitCPU"` UsedRequestCPU string `json:"usedRequestCPU"` HardLimitMemory string `json:"hardLimitMemory"` HardLimitCPU string `json:"hardLimitCPU"` HardRequestMemory string `json:"hardRequestMemory"` HardRequestCPU string `json:"hardRequestCPU"` HardRequestStorage string `json:"hardRequestStorage"` Namespace string `json:"namespace"` ClusterID string `json:"clusterID"` NamespaceID string `json:"namespaceID"` }
type ServiceEndpoints ¶
type SitesApiService ¶ added in v0.0.13
type SitesApiService service
func (*SitesApiService) V1AppliancesGet ¶ added in v0.0.13
func (a *SitesApiService) V1AppliancesGet(ctx context.Context, field string) (Appliances, *http.Response, error)
SitesApiService Gets all Sites Retrieve all appliances on which user has access **Required Permissions to access the API**: Any of: - caas.cluster.create - caas.cluster.manage - caas.cluster-resource.manage\" **Default Roles which can access the API**: - Private Cloud Cluster Owner - Private Cloud Resource Contributor
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param field field for all query parameters
@return Appliances
type SizeDetail ¶
type StorageClass ¶
type StorageClass struct { Name string `json:"name"` Id string `json:"id"` Description string `json:"description,omitempty"` GlStorageType string `json:"glStorageType"` AccessProtocol string `json:"accessProtocol"` Iops string `json:"iops"` Encryption string `json:"encryption"` Dedupe string `json:"dedupe"` CostPerGB string `json:"costPerGB"` }
type StorageClasses ¶ added in v0.0.3
type StorageClasses struct { Count int32 `json:"count"` Total int32 `json:"total"` Items []StorageClass `json:"items"` }
type StorageClassesApiService ¶ added in v0.0.13
type StorageClassesApiService service
func (*StorageClassesApiService) V1ClustersIdStorageclassesGet ¶ added in v0.0.13
func (a *StorageClassesApiService) V1ClustersIdStorageclassesGet(ctx context.Context, id string) (StorageClasses, *http.Response, error)
StorageClassesApiService Gets all StorageClasses from Cluster Retrieve the specified storage class information of the cluster **Required Permissions to access the API**: - caas.cluster.read **Default Roles which can access the API**: - Private Cloud Cluster Owner - Private Cloud Resource Contributor
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param id cluster id
@return StorageClasses
type UpdateCluster ¶ added in v0.0.2
type UpdateCluster struct { Description string `json:"description,omitempty"` K8sVersion string `json:"k8sVersion,omitempty"` KubernetesVersion string `json:"kubernetesVersion,omitempty"` MachineSets []UpdateClusterMachineSet `json:"machineSets,omitempty"` DefaultStorageClass string `json:"defaultStorageClass,omitempty"` OidcEnabled bool `json:"oidcEnabled,omitempty"` Oidc *AllOfUpdateClusterOidc `json:"oidc,omitempty"` }
type UpdateClusterMachineSet ¶ added in v0.0.15
type UpdateClusterMachineSet struct { Name string `json:"name,omitempty"` MachineBlueprintId string `json:"machineBlueprintId,omitempty"` MachineBlueprintName string `json:"machineBlueprintName,omitempty"` Count int32 `json:"count,omitempty"` MinSize int32 `json:"minSize,omitempty"` MaxSize int32 `json:"maxSize,omitempty"` }
Source Files ¶
- api_cluster_blueprints.go
- api_cluster_providers.go
- api_clusters.go
- api_kube_config.go
- api_machine_blueprints.go
- api_machine_providers.go
- api_namespaces.go
- api_sites.go
- api_storage_classes.go
- client.go
- configuration.go
- model_all_of_cluster_oidc.go
- model_all_of_cluster_provider_min_master_size.go
- model_all_of_cluster_provider_min_worker_size.go
- model_all_of_create_cluster_oidc.go
- model_all_of_machine_blueprint_size_detail.go
- model_all_of_machine_set_detail_size_detail.go
- model_all_of_oidc_claim_mapping.go
- model_all_of_update_cluster_oidc.go
- model_appliance.go
- model_appliances.go
- model_claim_mapping.go
- model_cluster.go
- model_cluster_blueprint.go
- model_cluster_blueprints.go
- model_cluster_provider.go
- model_cluster_provider_available_capacity.go
- model_cluster_provider_license_info.go
- model_cluster_providers.go
- model_cluster_utilization.go
- model_clusters.go
- model_common.go
- model_compute_instance_types.go
- model_create_cluster.go
- model_empty_body.go
- model_error.go
- model_health.go
- model_kubeconfig.go
- model_licenses.go
- model_machine.go
- model_machine_blueprint.go
- model_machine_blueprints.go
- model_machine_provider.go
- model_machine_provider_name.go
- model_machine_providers.go
- model_machine_roles_type.go
- model_machine_set.go
- model_machine_set_detail.go
- model_machine_worker_type.go
- model_namespace.go
- model_namespaces.go
- model_oidc.go
- model_os_images.go
- model_pagination.go
- model_resource_quota.go
- model_service_endpoints.go
- model_size_detail.go
- model_state.go
- model_storage_class.go
- model_storage_classes.go
- model_update_cluster.go
- model_update_cluster_machine_set.go
- model_user.go
- response.go