Download OpenAPI specification:Download
Authenticates a user and creates a session
code required | string |
{- "id": "73089155726360582",
- "name": "reset",
- "email": "reset@chef.io",
- "token": "0b79bab50daca910b000d4f1a2b675d604257e42",
- "flags": 0,
- "oauth_token": "bb79bab50dbcab10b000d4f1a2bb75d604257e42"
}
Retrieves the list of reverse dependencies for this package (on-prem setup not supported).
origin required | string |
name required | string |
{- "origin": "core",
- "name": "linux-headers",
- "rdeps": [
- "core/redis"
]
}
Retrieves the list of reverse dependencies for this package, collated into build groups that can be build in parallel (on-prem setup not supported)
origin required | string |
name required | string |
{- "origin": "core",
- "name": "linux-headers",
- "rdeps": [
- {
- "group": 0,
- "idents": [
- "core/redis",
- "core/protobuf"
]
}, - {
- "group": 1,
- "idents": [
- "core/node"
]
}
]
}
Retrieve your personal access tokens
[- {
- "id": 1,
- "account_id": 2,
- "token": "abcdefg",
- "created_at": "2022-01-29 09:42:15.273364+00"
}, - {
- "id": 3,
- "account_id": 21,
- "token": "abcdefgihijk",
- "created_at": "2022-01-31 09:42:15.273364+00"
}
]
Get the status of the given job
jobId required | string |
{- "id": "73089155726360582",
- "origin": "core",
- "project": "nginx",
- "version": "1.0.0",
- "release": "20170505001756",
- "state": "Complete",
- "created_at": "2017-05-05 00:42:35.213765+00",
- "build_started_at": "2017-05-05 00:43:11.729835+00",
- "build_finished_at": "2017-05-05 00:44:00.896919+00"
}
Get the build log (or a portion thereof) for the
given job. Until an SSE endpoint can be implemented,
this endpoint can be used to poll for the logs of a
currently-running job; use of the start
query
parameter ensures that only the portion of the log
that is "new", relative to a prior request, will be
retrieved.
jobId required | string |
start | integer >= 0 Default: 0 Example: start=100 Return the portion of the log output that
starts at the zero-indexed line
specified. A request with no given value
defaults to |
color | boolean Default: false Whether or not to include embedded ANSI color codes in the log output. By default, all ANSI sequences are removed, yielding plain output. The following values are interpreted as
The following values are interpreted as
All other values are considered |
{- "start": 0,
- "stop": 2,
- "content": [
- "this is the first line",
- "this is the second line"
], - "is_complete": false
}
Creates a new project for building a Habitat plan scoped to the given origin. The
resulting project will be created with an identifier containing the origin and name
of the project the plan is building separated by a forward slash (i.e. core/nginx
).
{- "origin": "core",
- "plan_path": "components/builder-api/plan.sh",
- "installation_id": 1234,
- "repo_id": 4567
}
{- "id": "habitat/builder-api",
- "plan_path": "components/builder-api/plan.sh",
}
Update the project matching the given ID
origin required | string |
name required | string |
{- "plan_path": "components/builder-api/plan.sh",
- "github": {
- "organization": "habitat-sh",
- "repo": "habitat"
}
}
Toggle the visibility settings on a project. Public projects that are made private will change to hidden instead. Changes made to a project's visibility settings will cascade to its packages.
origin required | string |
name required | string |
visibility required | string |
Retrieve the most recently started jobs for the given project.
origin required | string |
name required | string |
{- "range_start": 0,
- "range_end": 5,
- "total_count": 6,
- "data": [
- {
- "id": "73089155726360582",
- "origin": "core",
- "project": "nginx",
- "version": "1.0.0",
- "release": "20170505001756",
- "state": "Complete",
- "created_at": "2017-05-05 00:42:35.213765+00",
- "build_started_at": "2017-05-05 00:43:11.729835+00",
- "build_finished_at": "2017-05-05 00:44:00.896919+00"
}
]
}
Get the specified integration
origin required | string |
name required | string |
integration required | string |
{- "id": 1,
- "project_id": 121,
- "integration_id": 14641,
- "origin": "core",
- "body": "NoContent",
- "created_at": "2017-05-05 00:43:11.729835+00"
}
Create a new origin
{- "name": "reset",
- "owner_id": 1965
}
{- "id": 1965,
- "name": "core",
- "owner_id": 3861225,
- "default_package_visibility": "Public"
}
Return list of invitations for the specified origin
origin required | string |
{- "origin": "test",
- "invitations": [
- {
- "id": 1,
- "origin": "test",
- "account_id": 411,
- "account_name": "test",
- "owner_id": 144,
- "ignored": false
}
]
}
Return a list of key revisions for an organization
origin required | string |
[- {
- "origin": "core",
- "revision": "20160423193732",
- "location": "/origins/core/keys/20160423193732"
}, - {
- "origin": "core",
- "revision": "20160423193733",
- "location": "/origins/core/keys/20160423193733"
}
]
Get a list of all secrets for the specified origin
origin required | string |
{- "value": [
- {
- "id": 1,
- "origin_id": 11,
- "name": "origin1",
- "value": "Jpmj1gD9oTFCgz3wSLltt/QB6RTmNRWoUTe+xhDTIHc="
}, - {
- "id": 2,
- "origin_id": 12,
- "name": "origin2",
- "value": "Qpmj1gDxoTFCgz3wSL8nt!Qg9RTmsrroUTe+xhD8IHc="
}
]
}
Get integration for specified origin and name
origin required | string |
integration required | string |
name required | string |
{- "id": 1,
- "origin": "test",
- "integration": "test",
- "name": "test",
- "body": "test"
}
List packages for an origin
origin required | string |
distinct | boolean Default: false Example: distinct=true Whether to show a distinct list of packages or not |
{- "data": [
- {
- "id": 1,
- "owner_id": 2,
- "ident": {
- "origin": "core",
- "name": "redis"
}
}, - {
- "id": 2,
- "owner_id": 2,
- "ident": {
- "origin": "core",
- "name": "gcc"
}
}
]
}
List packages for a specified origin and package name
origin required | string |
name required | string |
{- "data": [
- {
- "id": 1,
- "owner_id": 2,
- "ident": {
- "origin": "core",
- "name": "redis"
}
}
]
}
Returns all versions and a count of releases for each version for a given package
origin required | string |
name required | string |
[- {
- "origin": "core",
- "name": "redis",
- "version": "3.2.1",
- "release_count": 3,
- "latest": "20170215222111",
- "platforms": [
- "linux"
], - "visibility": "Public"
}
]
Get packages with specified origin, package name, and version
origin required | string |
name required | string |
version required | string |
[- {
- "origin": "core",
- "name": "redis",
- "version": "3.2.1",
- "release_count": 3,
- "latest": "20170215222111",
- "platforms": [
- "linux",
- "windows"
], - "visibility": "Public"
}, - {
- "origin": "core",
- "name": "bundler",
- "version": "1.0.1",
- "release_count": 4,
- "latest": "20210215222111",
- "platforms": [
- "linux"
], - "visibility": "Private"
}
]
Get latest package with specified origin, package name, and version
origin required | string |
name required | string |
version required | string |
{- "id": 1,
- "owner_id": 2,
- "ident": {
- "origin": "core",
- "name": "redis"
}
}
Gets package for specified origin, package name, version, and release
origin required | string |
name required | string |
version required | string |
release required | string |
{- "id": 1,
- "owner_id": 2,
- "ident": {
- "origin": "core",
- "name": "redis"
}
}
Gets list of channels for this origin, package name, version, and release
origin required | string |
name required | string |
version required | string |
release required | string |
[- {
- "channel": "stable",
- "created_at": "2020-12-28T20:24:49.588691",
- "promoted_at": "2020-12-28T20:24:49.588691"
}, - {
- "channel": "unstable",
- "created_at": "2021-12-28T20:24:49.588691",
- "promoted_at": "2021-12-28T20:24:49.588691"
}
]
Search for packages with a query string
query required | string |
distinct | boolean Default: false Example: distinct=true Whether to show a distinct list of packages or not |
{- "data": [
- {
- "origin": "core",
- "name": "redis"
}, - {
- "origin": "core",
- "name": "node"
}
]
}
Get local builder events
nextRange required | integer Paginated index of next range to return |
fromDate required | string From date to include in query results (inclusive) |
toDate required | string To date to include in query results (inclusive) |
query required | string Default: "" Query parameters |
[- {
- "range_start": 0,
- "range_end": 1,
- "total_count": 1,
- "data": [
- {
- "operation": "Promote"
}, - {
- "origin": "core"
}, - {
- "channel": "stable"
}, - {
- "package_ident": [
- {
- "origin": "core"
}, - {
- "name": "hab-backline"
}, - {
- "version": "1.6.420"
}, - {
- "release": 20211101174345
}
]
}, - {
- "created_at": "2021-12-28T20:24:49.588691"
}
]
}
]
Get SAAS builder events
nextRange required | integer Paginated index of next range to return |
fromDate required | string From date to include in query results (inclusive) |
toDate required | string To date to include in query results (inclusive) |
query required | string Default: "" Query parameters |
[- {
- "range_start": 0,
- "range_end": 1,
- "total_count": 1,
- "data": [
- {
- "operation": "Promote"
}, - {
- "origin": "core"
}, - {
- "channel": "stable"
}, - {
- "package_ident": [
- {
- "origin": "core"
}, - {
- "name": "hab-backline"
}, - {
- "version": "1.6.420"
}, - {
- "release": 20211101174345
}
]
}, - {
- "created_at": "2021-12-28T20:24:49.588691"
}
]
}
]
List all packages in a channel
origin required | string |
channel required | string |
{- "range_start": 0,
- "range_end": 49,
- "total_count": 8,
- "data": [
- {
- "origin": "core",
- "name": "glibc",
- "version": "2.22",
- "release": "20160612063629"
}, - {
- "origin": "core",
- "name": "linux-headers",
- "version": "4.3",
- "release": "20160612063537"
}
]
}
List latest packages in a channel, by target (required)
origin required | string |
channel required | string |
{- "channel": "stable",
- "target": "x86_64-linux",
- "data": [
- {
- "origin": "core",
- "name": "glibc",
- "version": "2.22",
- "release": "20160612063629"
}, - {
- "origin": "core",
- "name": "linux-headers",
- "version": "4.3",
- "release": "20160612063537"
}
]
}
Get the latest version of the package in this channel that matches the specified identifier
origin required | string |
channel required | string |
pkg required | string |
{- "checksum": "7a998b6a756f7ca769ac75edf66c119d14aa911d7cfb5fd91ad3ff21ddf0d257",
- "config": "",
- "deps": [
- {
- "name": "glibc",
- "origin": "core",
- "release": "20160612063629",
- "version": "2.22"
}
], - "exposes": [ ],
- "ident": {
- "name": "tree",
- "origin": "core",
- "release": "20161102210957",
- "version": "1.7.0"
}, - "manifest": "# core / tree\n\n\n* __Maintainer__: The Habitat Maintainers <humans@habitat.sh>\n* __Version__: 1.7.0\n* __Release__: 20161102210957\n* __Architecture__: x86_64\n* __System__: linux\n* __Target__: x86_64-linux\n* __Upstream URL__: upstream project's website or home page is not defined\n* __License__: gplv2+ \n* __Source__: [http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz](http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz)\n* __SHA__: `6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12`\n* __Path__: `/hab/pkgs/core/tree/1.7.0/20161102210957`\n* __Build Dependencies__: `core/make core/gcc `\n* __Dependencies__: `core/glibc `\n* __Interpreters__: no interpreters or undefined\n\n# Plan\n\n## Build Flags\n\n```bash\nCFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nCPPFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nCXXFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nLDFLAGS: -L/hab/pkgs/core/glibc/2.22/20160612063629/lib -L/hab/pkgs/core/gcc/5.2.0/20161031031637/lib\nLD_RUN_PATH: /hab/pkgs/core/tree/1.7.0/20161102210957/lib:/hab/pkgs/core/glibc/2.22/20160612063629/lib\n```\n\n## Plan Source\n\n```bash\npkg_name=tree\npkg_origin=core\npkg_version=1.7.0\npkg_maintainer=\"The Habitat Maintainers <humans@habitat.sh>\"\npkg_license=('gplv2+')\npkg_source=http://mama.indstate.edu/users/ice/tree/src/tree-${pkg_version}.tgz\npkg_shasum=6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12\npkg_deps=(core/glibc)\npkg_build_deps=(core/make core/gcc)\npkg_bin_dirs=(bin)\npkg_include_dirs=(include)\npkg_lib_dirs=(lib)\n\ndo_build() {\n make\n}\n\ndo_install() {\n sed -i \"s#prefix = /usr#prefix = ${pkg_prefix}#\" Makefile\n make install\n}\n```",
- "tdeps": [
- {
- "name": "glibc",
- "origin": "core",
- "release": "20160612063629",
- "version": "2.22"
}, - {
- "name": "linux-headers",
- "origin": "core",
- "release": "20160612063537",
- "version": "4.3"
}
]
}
Get the latest version of the package in this channel that matches the specified identifier and version
origin required | string |
channel required | string |
pkg required | string |
version required | string |
{ }
Get the package in a channel that matches the specified identifier, version and release
channel required | string |
pkg required | string |
version required | string |
origin required | string |
release required | string |
{ }
Create new package settings entry
origin required | string |
name required | string |
{- "id": 1234567890,
- "origin": "xyz",
- "name": "abc",
- "visibility": "private",
- "owner_id": 77730215748435970,
- "created_at": "2017-05-05 00:42:35.213765+00",
- "updated_at": "2017-05-05 00:42:35.213765+00"
}
Get package settings for top level package
origin required | string |
name required | string |
{- "id": 1234567890,
- "origin": "xyz",
- "name": "abc",
- "visibility": "private",
- "owner_id": 77730215748435970,
- "created_at": "2017-05-05 00:42:35.213765+00",
- "updated_at": "2017-05-05 00:42:35.213765+00"
}
Update a package settings entry
origin required | string |
name required | string |
{- "visibility": "private"
}
{- "id": 1234567890,
- "origin": "xyz",
- "name": "abc",
- "visibility": "private",
- "owner_id": 77730215748435970,
- "created_at": "2017-05-05 00:42:35.213765+00",
- "updated_at": "2017-05-05 00:42:35.213765+00"
}