Create Operating System

View as Markdown
Create an Operating System for the org. Either `infrastructureProviderId` or `tenantId` must be provided in request data. Both cannot be provided at the same time. If `infrastructureProviderId` is provided in request data, then org must have an Infrastructure Provider entity and its ID should match the query param value. User must have `FORGE_PROVIDER_ADMIN` role. If `tenantId` is provided in request data, then org must have a Tenant entity and its ID should match the query param value. User must have `FORGE_TENANT_ADMIN` role. Only Tenants are allowed to create Operating System for MVP.

Authentication

AuthorizationBearer
``` export JWT_BEARER_TOKEN="<jwt-bearer-token>" # Example org name: "acme-inc export ORG_NAME=<org-name> # Use the JWT bearer token in your API request auth header: curl -v -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $JWT_BEARER_TOKEN" https://carbide-rest-api.carbide.svc.cluster.local/v2/org/$ORG_NAME/carbide/user/current ```

Path parameters

orgstringRequired

Request

This endpoint expects an object.
namestringRequired2-256 characters
Name of the Operating System
descriptionstringOptional
Optional description of the Operating System
siteIdslist of stringsOptional
Specified only one Site if an Operating System is Image based, more than one Site is not supported"
ipxeScriptstring or nullOptional
iPXE script or URL, only applicable for iPXE based OS. Cannot be specified if imageUrl is specified
imageUrlstring or nullOptionalformat: "uri"
Original URL from where the Operating System image can be retreived from, required for image based OS. Cannot be specified if ipxeScript is specified
imageShastring or nullOptional
SHA hash of the image file, required for image based OS
imageAuthTypestring or nullOptional

Authentication type for image URL if needed e.g. basic/bearer/token, required is imageAuthToken is specified

imageAuthTokenstring or nullOptional
Auth token to retrieve the image from image URL, required if imageAuthType is specified
imageDiskstring or nullOptional
Disk path where the image should be mounted, optional
rootFsIdstring or nullOptional

Root filesystem UUID, this or rootFsLabel required for image based OS

rootFsLabelstring or nullOptional

Root filesystem label, this or rootFsId required for image based OS

phoneHomeEnabledboolean or nullOptional
Indicates whether the Phone Home service should be enabled or disabled for Operating System
userDatastring or nullOptional
User data for the Operating System
isCloudInitbooleanOptional
Specified when the Operating System is Cloud Init based
allowOverridebooleanOptional
Indicates if the user data can be overridden at Instance creation time
infrastructureProviderIdstring or nullOptionalformat: "uuid"Deprecated

Deprecated: Infrastructure Provider is now inferred from org membership.

tenantIdstring or nullOptionalformat: "uuid"Deprecated

Deprecated: Tenant is now inferred from org membership.

Response

Created
idstringRead-onlyformat: "uuid"
ID of the Operating System
namestring2-256 characters
Name of the Operating System
descriptionstring
Optional description of the Operating System
infrastructureProviderIdstring or nullformat: "uuid"
Specified if a Provider owns the Operating System
tenantIdstring or nullformat: "uuid"
Specified if a Tenant owns the Operating System
typeenum
Type of the Operating System
Allowed values:
imageUrlstring or nullformat: "uri"
Original URL from where the Operating System image can be retrieved
imageShastring or null
SHA hash of the image file, only present for image based OS
imageAuthTypestring or null
Authentication type for image URL e.g. 'Basic' or 'Bearer'
imageAuthTokenstring or null
Auth token to retrieve the image from image URL
imageDiskstring or null
Disk path where the image should be monuted
rootFsIdstring or null
Root filesystem UUID, only applicable for image based Operating System
rootFsLabelstring or null
Root filesystem label, only applicable for image based Operating System
ipxeScriptstring or null
iPXE script or URL, only applicable for iPXE based Operating System
userDatastring or null
User data for the Operating System
isCloudInitboolean
Specified when the Operating System is Cloud Init based
phoneHomeEnabledboolean
Indicates whether the Phone Home service should be enabled or disabled for Operating System
isActiveboolean
Indicates if the Operating System is active
deactivationNotestring or null
Optional deactivation note if OS is inactive
allowOverrideboolean
Indicates if the user data can be overridden at Instance creation time
siteAssociationslist of objects
Sites the Operating System is synced to
statusenum
Status of the Operating System
statusHistorylist of objects
History of status changes over time
createddatetimeRead-only

Date/time when the Operating System was created

updateddatetimeRead-only

Date/time when the Operating System was updated

Errors

400
Bad Request Error
403
Forbidden Error