Skip to content
Docs
Installs

Create an install of a package

Create an install of a package

client.zones.installs.create(stringzoneID, InstallCreateParams { package_id, inputs, version, xClientRequestID } params, RequestOptionsoptions?): Task { id, created_at, operation, 9 more }
POST/zones/{zone_id}/installs

Create an install of a package

ParametersExpand Collapse
zoneID: string
params: InstallCreateParams { package_id, inputs, version, xClientRequestID }
package_id: string

Body param: Public ID of the package to install.

inputs?: Record<string, unknown>

Body param: Parametric inputs required by the package.

version?: number

Body param: Specific package version to install. Defaults to latest.

xClientRequestID?: string

Header param: Unique request identifier specified by the originating caller and passed along by proxies.

formatuuid
ReturnsExpand Collapse
Task { id, created_at, operation, 9 more }
id: string
created_at: string
formatdate-time
operation: TaskOperation
Accepts one of the following:
"create"
"delete"
status: TaskStatus
Accepts one of the following:
"pending"
"running"
"completed"
"failed"
updated_at: string
formatdate-time
error_message?: string
install_id?: string
package_id?: string
package_slug?: string
package_version?: number
warnings?: Array<Warning>

Informational warnings about the task outcome. For delete tasks, warns when adopted entities (pre-existing resources not created by the catalog) will be preserved rather than deleted.

code: "validation_error" | "bad_request" | "unauthorized" | 6 more
Accepts one of the following:
"validation_error"
"bad_request"
"unauthorized"
"forbidden"
"not_found"
"conflict"
"rate_limit_exceeded"
"internal_error"
"service_unavailable"
details: Array<Detail>
code: "validation_error" | "bad_request" | "unauthorized" | 6 more
Accepts one of the following:
"validation_error"
"bad_request"
"unauthorized"
"forbidden"
"not_found"
"conflict"
"rate_limit_exceeded"
"internal_error"
"service_unavailable"
field: string

valid json path for request body

message: string

error message for specific error

message: string

summary of the error

path: string
formaturl
request_id: string
formatuuid
status: number

HTTP Status Code

timestamp: string
formatdate-time

Create an install of a package

import KeycardAPI from '@keycardai/api';

const client = new KeycardAPI();

const task = await client.zones.installs.create('zone_id', { package_id: 'package_id' });

console.log(task.id);
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "operation": "create",
  "status": "pending",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "install_id": "install_id",
  "links": [
    {
      "href": "href",
      "rel": "rel",
      "properties": {
        "foo": "bar"
      },
      "titles": {
        "foo": "string"
      },
      "type": "type"
    }
  ],
  "package_id": "package_id",
  "package_slug": "package_slug",
  "package_version": 0,
  "warnings": [
    {
      "code": "validation_error",
      "details": [
        {
          "code": "validation_error",
          "field": "field",
          "message": "message"
        }
      ],
      "message": "message",
      "path": "path",
      "request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "status": 0,
      "timestamp": "2019-12-27T18:11:19.117Z"
    }
  ]
}
Returns Examples
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "operation": "create",
  "status": "pending",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "install_id": "install_id",
  "links": [
    {
      "href": "href",
      "rel": "rel",
      "properties": {
        "foo": "bar"
      },
      "titles": {
        "foo": "string"
      },
      "type": "type"
    }
  ],
  "package_id": "package_id",
  "package_slug": "package_slug",
  "package_version": 0,
  "warnings": [
    {
      "code": "validation_error",
      "details": [
        {
          "code": "validation_error",
          "field": "field",
          "message": "message"
        }
      ],
      "message": "message",
      "path": "path",
      "request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "status": 0,
      "timestamp": "2019-12-27T18:11:19.117Z"
    }
  ]
}