Common Web Platform API
This API conforms to the JSON API specifications.
Using the API ¶
In order to use the API, you will need to acquire an API token by going to the profile section of the Dashboard (at “naut/profile”), and clicking the “API token” button.
In order to authenticate you must use HTTP Basic Authentication with your email as a username and API token as a password.
Caution: protect the “Authorization” header just as you would any password, i.e. do not send it over email or submit it via Service Desk/Helpdesk. The secret token is easily recoverable from that header.
Example request ¶
Example requestGET/naut/meta
Example URI
Headers
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
X-Api-Version: 2.0
Authorization: Basic am9lQGV4YW1wbGUuY29tOnRlc3Q=
200
Headers
Content-Type: application/vnd.api+json
Body
{
"meta": {
"whoami": "joe@example.com",
"now": "2017-05-09 11:57:00"
}
}
Major releases ¶
2.0
Backwards incompatibilities
-
Changed type of the
status
field in theerrors
structure to string (was numeric). -
Changed type of the
ID
field of the “deployments” resource to string (was numeric). -
Removed
*_ago
and*_nice
datetime fields on the “deployments” resource, replaced with*_unix
.
1.0
Initial release.
Stacks ¶
Stacks collection ¶
List allGET/naut/projects
Will return a list of all stacks that you have the authority to view, with relevant datapoints.
Example URI
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": [
{
"type": "stacks",
"id": "stack1",
"attributes": {
"name": "stack1",
"title": "stack1",
"created": "2014-07-02 00:00:00",
"created_unix": 1388534400,
"repository_url": "https://github.com/mateusz/blank.git",
"alternative_billing_code": "code123",
},
"relationships": {
"environments": {
"data": [
{
"type": "environments",
"id": "Production",
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production"
}
},
{
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
]
}
},
"links": {
"self": "http://example.com/naut/project/stack1"
}
}
]
}
Stack ¶
ViewGET/naut/project/{project_id}
Example URI
- project_id
string
(required) Example: stack1Name of the stack
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "stacks",
"id": 1,
"attributes": {
"name": "stack1",
"title": "stack1",
"created": "2014-07-02 00:00:00",
"created_unix": 1388534400,
"repository_url": "https://github.com/mateusz/blank.git",
"alternative_billing_code": "code123",
},
"relationships": {
"environments": {
"data": [
{
"type": "environments",
"id": "Production",
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production"
}
},
{
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
]
}
},
"links": {
"self": "http://example.com/naut/project/stack1"
}
}
}
Environments ¶
Environment ¶
ViewGET/naut/project/{project_id}/environment/{environment_id}
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "environments",
"id": "prod",
"attributes": {
"name": "Production",
"url": "foo.com",
"framework_version": "4.3.0",
"build_sha": "0cf36448607fe900ecbe48c280440be2d7b9385a",
"build_package": null,
"maintenance_day": "Saturday",
"maintenance_time": "03:00:00",
"maintenance_duration": "02:00:00",
"maintenance_tz": "Pacific/Auckland",
"usage": "Production"
},
"relationships": {
"stack": {
"data": {
"type": "stacks",
"id": "stack1",
"links": {
"self": "http://example.com/naut/project/stack1"
}
}
}
}
}
}
Installed modules ¶
Installed modules ¶
ViewGET/naut/project/{project_id}/environment/{environment_id}/modules{?filters,require_dev}
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
- filters
array
(optional) Example: silverstripe/frameworkModule name as displayed in composer.lock. If not provided data on all modules is returned
- require_dev
boolean
(optional)Include
require-dev
modules (indicated by arequire-dev
attribute in the results)
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": [
{
"type": "module",
"id": "silverstripe/framework",
"attributes": {
"name": "silverstripe/framework",
"version": "3.6.1",
"source": {
"type": "git",
"url": "https://github.com/silverstripe/silverstripe-framework.git",
"reference": "ddff7c5dad117e49a40a3cfe1c16db84fd9b5016"
},
"require": {
"composer/installers": "~1.0",
"php": ">= 5.3.3, <7.2"
},
"type": "silverstripe-module"
},
"is-require-dev": false
}
],
"meta": {
"server_time": "1536898174",
"status_code": 200
}
}
Composer scripts ¶
Composer scripts ¶
ViewGET/naut/project/{project_id}/environment/{environment_id}/scripts
Lists scripts defined in the composer.json
file
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": [
{
"name": "post-install-cmd",
"scripts": [
"@php my-custom-script.php"
]
}
],
"meta": {
"server_time": "1536898174",
"status_code": 200
}
}
Git fetches ¶
Git fetches collection ¶
CreatePOST/naut/project/{project_id}/git/fetches
Queues a new “fetch” on the repository associated with this project.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
202
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "fetches",
"id": 1,
"attributes": {
"status": "n/a"
},
"links": {
"self": "http://example.com/naut/project/stack1/git/fetches/1"
}
}
}
Git fetch ¶
ViewGET/naut/project/{project_id}/git/fetches/{fetch_id}
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- fetch_id
number
(required) Example: 1ID of the git fetch
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "fetches",
"id": 1,
"attributes": {
"status": "Complete"
},
"links": {
"self": "http://example.com/naut/project/stack1/git/fetches/1"
}
}
}
Deployments ¶
Deployments collection ¶
List allGET/naut/project/{project_id}/environment/{environment_id}/deploys{?deployer_email,state,lastedited_from_unix,datestarted_from_unix,datestarted_to_unix,summary,title}
Returns a list of deployments associated to the environment.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
- deployer_email
string
(optional) Example: joe@example.comFilter by deployer
- state
string
(optional) Example: NewFilter by state, one of New,Submitted,Invalid,Approved,Rejected,Queued,Deploying,Aborting,Completed,Failed,Deleted
- lastedited_from_unix
int
(optional) Example: 1267148625Include only deployments edited after this timestamp
- datestarted_from_unix
int
(optional) Example: 1267148625Include only deployments started after this timestamp
- datestarted_to_unix
int
(optional) Example: 4075753425Include only deployments started before this timestamp
- title
string
(optional) Example: Deployment of site v1.0.0Filter by title
- summary
string
(optional) Example: We fixed all the bugs in this deploymentFilter by summary
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": [
{
"type": "deployments",
"id": 1,
"attributes": {
"id": 1,
"date_created_unix": 1388534400,
"date_started_unix": 1388534400,
"date_requested_unix": 1388534400,
"date_approved_unix": 1388534400,
"date_updated_unix": 1388534400,
"title": "Deployment of site v1.0.0",
"summary": "We fixed all the bugs in this deployment",
"deployment_type": "code-only",
"deployment_estimate": "2",
"sha": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"short_sha": "257e0c0",
"commit_subject": "Update README.md",
"commit_message": "Update README.md",
"commit_url": "https://github.com/mateusz/blank/commit/257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"deployer": {
"id": 1,
"email": "joe@example.com",
"role": "Stack Manager",
"name": "Joe Bloggs"
},
"approver": {
"id": 1,
"email": "jane@example.com",
"role": "Stack Manager",
"name": "Jane Bloggs"
},
"bypasser": null,
"state": "Completed",
"is_current_build": false
},
"relationships": {
"environment": {
"data": {
"type": "environments",
"id": "prod",
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production"
}
}
},
"stack": {
"data": {
"type": "stacks",
"id": "stack1",
"links": {
"self": "http://example.com/naut/project/stack1"
}
}
}
},
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production/deploys/1"
}
}
]
}
Deployment creation ¶
CreatePOST/naut/project/{project_id}/environment/{environment_id}/deploys
Create a deployment.
If ref_type
is set to “promote_from_uat” or “redeploy”, pass empty ref
- otherwise it takes precedence, deploying
potentially something unexpected.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
Body
{
"ref": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"ref_type": "sha",
"title": "Deployment of site v1.0.0",
"summary": "We fixed all the bugs in this deployment",
"bypass": false,
"bypass_and_start": true,
"schedule_start_unix": 1511830104,
"schedule_end_unix": 1511837304,
"locked": false
}
Schema
{
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "Reference of the code to be deployed. Can be a branch, tag, SHA or reference to hosted tar.gz package"
},
"ref_type": {
"enum": [
"promote_from_uat",
"sha",
"branch",
"tag",
"redeploy",
"package"
],
"description": "Type of commit reference"
},
"title": {
"type": "string",
"description": "Title of the deployment"
},
"summary": {
"type": "string",
"description": "Summary of the deployment in more detail"
},
"bypass": {
"type": "boolean",
"description": "Bypass approval of deployment. Only possible if user has permission to do so"
},
"bypass_and_start": {
"type": "boolean",
"description": "Bypass approval of deployment and start immediately. Only possible if user has permission to do so"
},
"schedule_start_unix": {
"type": "integer",
"description": "Scheduled start time for deployment. Currently only used internally"
},
"schedule_end_unix": {
"type": "integer",
"description": "Scheduled end time for deployment. Currently only used internally"
},
"locked": {
"type": "boolean",
"description": "Prevent deployment from being deleted or changed by other users"
}
},
"required": [
"ref_type"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
201
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "deployments",
"id": 1,
"attributes": {
"id": 1,
"date_created_unix": 1388534400,
"date_started_unix": 1388534400,
"date_requested_unix": 1388534400,
"date_approved_unix": 1388534400,
"date_updated_unix": 1388534400,
"title": "Deployment of site v1.0.0",
"summary": "We fixed all the bugs in this deployment",
"changes": {
"Code version": {
"from": "-",
"to": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5"
}
},
"deployment_type": "code-only",
"deployment_estimate": "2",
"sha": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"short_sha": "257e0c0",
"commit_subject": "Update README.md",
"commit_message": "Update README.md",
"commit_url": "https://github.com/mateusz/blank/commit/257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"deployer": {
"id": 1,
"email": "joe@example.com",
"role": "Stack Manager",
"name": "Joe Bloggs"
},
"approver": null,
"bypasser": {
"id": 1,
"email": "joe@example.com",
"role": "Stack Manager",
"name": "Joe Bloggs"
},
"state": "Queued",
"is_current_build": true
},
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production/deploys/1"
}
}
}
Deployment ¶
ViewGET/naut/project/{project_id}/environment/{environment_id}/deploys/{deployment_id}
Obtain information about a deployment.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
- deployment_id
number
(required) Example: 1ID of the deployment
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "deployments",
"id": 1,
"attributes": {
"id": 1,
"date_created_unix": 1388534400,
"date_started_unix": 1388534400,
"date_requested_unix": 1388534400,
"date_approved_unix": 1388534400,
"date_updated_unix": 1388534400,
"title": "Deployment of site v1.0.0",
"summary": "We fixed all the bugs in this deployment",
"deployment_type": "code-only",
"deployment_estimate": "2",
"sha": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"short_sha": "257e0c0",
"commit_subject": "Update README.md",
"commit_message": "Update README.md",
"commit_url": "https://github.com/mateusz/blank/commit/257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"deployer": {
"id": 1,
"email": "joe@example.com",
"role": "Stack Manager",
"name": "Joe Bloggs"
},
"approver": {
"id": 1,
"email": "jane@example.com",
"role": "Stack Manager",
"name": "Jane Bloggs"
},
"bypasser": null,
"state": "Completed",
"is_current_build": false
},
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production/deploys/1"
}
}
}
DeleteDELETE/naut/project/{project_id}/environment/{environment_id}/deploys/{deployment_id}
Delete the deployment. This operation is irreversible.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
- deployment_id
number
(required) Example: 1ID of the deployment
204
Start deployment ¶
StartPOST/naut/project/{project_id}/environment/{environment_id}/deploys/start
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
Body
{
"id": 2
}
Schema
{
"type": "string",
"properties": {
"id": {
"type": "integer",
"description": "ID of deployment"
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "deployments",
"id": 2,
"attributes": {
"id": 2,
"date_created_unix": 1388534400,
"date_started_unix": 1388534400,
"date_requested_unix": 1388534400,
"date_approved_unix": 1388534400,
"date_updated_unix": 1388534400,
"title": "Deployment of site v1.0.0",
"summary": "We fixed all the bugs in this deployment",
"changes": {
"Code version": {
"from": "-",
"to": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5"
}
},
"deployment_type": "code-only",
"deployment_estimate": "2",
"sha": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"short_sha": "257e0c0",
"commit_subject": "Update README.md",
"commit_message": "Update README.md",
"commit_url": "https://github.com/mateusz/blank/commit/257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"deployer": {
"id": 1,
"email": "joe@example.com",
"role": "Stack Manager",
"name": "Joe Bloggs"
},
"approver": {
"id": 1,
"email": "jane@example.com",
"role": "Stack Manager",
"name": "Jane Bloggs"
},
"bypasser": null,
"state": "Queued",
"is_current_build": true
},
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production/deploys/1"
}
}
}
Invalidate deployment ¶
Mark an approved deployment as invalid. This is useful for marking an older submitted, or approved deployment as no longer relevant if there is a new one that supersedes it.
InvalidatePOST/naut/project/{project_id}/environment/{environment_id}/deploys/invalidate
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
Body
{
"id": 2
}
Schema
{
"type": "string",
"properties": {
"id": {
"type": "integer",
"description": "ID of deployment"
}
},
"required": [
"id"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "deployments",
"id": 2,
"attributes": {
"id": 2,
"date_created_unix": 1388534400,
"date_started_unix": 1388534400,
"date_requested_unix": 1388534400,
"date_approved_unix": 1388534400,
"date_updated_unix": 1388534400,
"title": "Deployment of site v1.0.0",
"summary": "We fixed all the bugs in this deployment",
"changes": {
"Code version": {
"from": "-",
"to": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5"
}
},
"deployment_type": "code-only",
"deployment_estimate": "2",
"sha": "257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"short_sha": "257e0c0",
"commit_subject": "Update README.md",
"commit_message": "Update README.md",
"commit_url": "https://github.com/mateusz/blank/commit/257e0c0a2441e6c2d52b654cf70d819b4ed79de5",
"deployer": {
"id": 1,
"email": "joe@example.com",
"role": "Stack Manager",
"name": "Joe Bloggs"
},
"approver": null,
"bypasser": null,
"state": "Invalid",
"is_current_build": true
},
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production/deploys/1"
}
}
}
Snapshots ¶
Snapshots collection ¶
List allGET/naut/project/{project_id}/snapshots
Returns a list of snapshots associated with a stack. This will include snapshots in progress - which will be
identifiable by the snapshot_status
of ‘pending’ and empty values for download_link
and size
.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": [
{
"type": "snapshots",
"id": 1,
"attributes": {
"created": "2014-07-02 00:00:00",
"mode": "db",
"can_download": "true",
"can_delete": "true",
"size": "2096",
"snapshot_status": "complete"
},
"relationships": {
"source": {
"data": [
{
"type": "environments",
"id": "Production",
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production"
}
}
]
},
"owner": {
"data": [
{
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
]
}
},
"links": {
"download_link": "https://dash.cwp.govt.nz/path/to/snapshot.sspak"
}
}
]
}
CreatePOST/naut/project/{project_id}/snapshots
Create a snapshot of an environment associated with a stack. This will return a HTTP 202, and link to an interim
transfer object representing snapshotting operation in progress. As soon as the task is completed, a link to snapshot
will be provided in data.relationships.snapshot
- see “Transfer” GET operation for further information.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
Body
{
"environment": "Production",
"mode": "all",
"notes": "before feature X"
}
Schema
{
"type": "object",
"properties": {
"environment": {
"type": "string",
"description": "Name of the environment"
},
"mode": {
"enum": [
"all",
"db",
"assets"
],
"description": "Type of the snapshot to make"
}
"notes": {
"type": "string",
"description": "Name of the environment"
},
},
"required": [
"environment",
"mode"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
202
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "transfers",
"id": 1,
"attributes": {
"status": "n/a",
"direction": "create",
"mode": "db"
},
"relationships": {
"snapshot": {
"data": null
},
"environment": {
"data": {
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
}
},
"links": {
"self": "http://example.com/naut/project/stack1/snapshots/transfer/1"
}
}
}
Snapshot ¶
ViewGET/naut/project/{project_id}/snapshots/{snapshot_id}
Obtain information about a snapshot.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- snapshot_id
number
(required) Example: 1ID of the snapshot
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "snapshots",
"id": 1,
"attributes": {
"created": "2014-07-02 00:00:00",
"mode": "db",
"can_download": "true",
"can_delete": "true",
"size": "2096",
"snapshot_status": "complete",
"is_backup": false,
"is_manual_upload": false,
"notes": null
},
"relationships": {
"source": {
"data": [
{
"type": "environments",
"id": "Production",
"links": {
"self": "http://example.com/naut/project/stack1/environment/Production"
}
}
]
},
"owner": {
"data": [
{
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
]
}
},
"links": {
"download_link": "https://dash.cwp.govt.nz/path/to/snapshot.sspak"
}
}
}
RestorePOST/naut/project/{project_id}/snapshots/{snapshot_id}
Restore snapshot onto an environment. This will return a HTTP 202, and link to an interim transfer object representing snapshotting operation in progress.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- snapshot_id
number
(required) Example: 1ID of the snapshot
Body
{
"environment": "Production",
"mode": "all",
"skip_build": false,
"backup_existing_data": false
}
Schema
{
"type": "object",
"properties": {
"environment": {
"type": "string",
"description": "Name of the environment"
},
"mode": {
"enum": [
"all",
"db",
"assets"
],
"description": "Type of the snapshot to make"
},
"skip_build": {
"type": "boolean",
"description": "Skip dev/build after restoring snapshot. Defaults to false"
},
"backup_existing_data": {
"type": "boolean",
"description": "Backup existing data before restoring. Defaults to true for production environments"
}
},
"required": [
"environment",
"mode"
],
"$schema": "http://json-schema.org/draft-04/schema#"
}
202
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "transfers",
"id": 2,
"attributes": {
"status": "n/a",
"direction": "restore",
"mode": "db",
"skip_build": false
},
"relationships": {
"snapshot": {
"data": {
"type": "snapshots",
"id": 1,
"links": {
"self": "http://example.com/naut/project/stack1/snapshots/1"
}
}
},
"environment": {
"data": {
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
}
},
"links": {
"self": "http://example.com/naut/project/stack1/snapshots/transfer/1"
}
}
}
DeleteDELETE/naut/project/{project_id}/snapshots/{snapshot_id}
Delete the snapshot. This operation is irreversible.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- snapshot_id
number
(required) Example: 1ID of the snapshot
204
Transfer ¶
Transfers represent snapshotting operations in progress.
ViewGET/naut/project/{project_id}/snapshots/transfer/{transfer_id}
Obtain information about a transfer.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- transfer_id
number
(required) Example: 1ID of the transfer
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "transfers",
"id": 1,
"attributes": {
"status": "Finished",
"direction": "restore",
"mode": "db",
"skip_build": true
},
"relationships": {
"snapshot": {
"data": {
"type": "snapshots",
"id": 1,
"links": {
"self": "http://example.com/naut/project/stack1/snapshots/1"
}
}
},
"environment": {
"data": {
"type": "environments",
"id": "UAT",
"links": {
"self": "http://example.com/naut/project/stack1/environment/UAT"
}
}
}
},
"links": {
"self": "http://example.com/naut/project/stack1/snapshots/transfer/1"
}
}
}
Environment lock ¶
Environment lock ¶
LockPOST/naut/project/{project_id}/environment/{environment_id}/lock
Lock an environment so that deployments and snapshots cannot be performed.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
Body
{
"lock_message": "This environment is currently under maintenance"
}
Schema
{
"type": "object",
"properties": {
"lock_message": {
"type": "string",
"description": "Reason for lock"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
202
Headers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "environmentlock",
"id": "stack1:Production",
"attributes": {
"locked": true,
"lock_message": "This environment is currently under maintenance"
}
}
}
UnlockDELETE/naut/project/{project_id}/environment/{environment_id}/lock
Removes an existing environment lock.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
- environment_id
string
(required) Example: ProductionName of the environment
204
Team ¶
Team collection ¶
List allGET/naut/project/{project_id}/team
Return a list of all users on the stack.
Example URI
- project_id
string
(required) Example: stack1Name of the stack
200
Headers
Content-Type: application/vnd.api+json
Body
{
"data": [
{
"type": "users",
"id": "1",
"attributes": {
"username": "jbloggs",
"first_name": "Joe",
"surname": "Bloggs",
"email": "joe@example.com",
"role": "Stack Manager",
"mfa": true
},
"relationships": {
"stack": {
"data": {
"type": "stacks",
"id": "stack1",
"links": {
"self": "http://example.com/naut/project/stack1"
}
}
}
}
}
]
}