Strait Docs
API Reference

Environment-specific configuration and variables

List environments

GET
/v1/environments

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

project_id*string

Response Body

application/json

curl -X GET "http://localhost:8080/v1/environments?project_id=string"
[
  {
    "id": "string",
    "project_id": "string",
    "name": "string",
    "slug": "string",
    "parent_id": "string",
    "variables": {
      "property1": "string",
      "property2": "string"
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
]

Create an environment

POST
/v1/environments

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "http://localhost:8080/v1/environments" \  -H "Content-Type: application/json" \  -d '{    "project_id": "string",    "name": "string",    "slug": "string"  }'
{
  "id": "string",
  "project_id": "string",
  "name": "string",
  "slug": "string",
  "parent_id": "string",
  "variables": {
    "property1": "string",
    "property2": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Get an environment

GET
/v1/environments/{envID}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

envID*string

Response Body

application/json

curl -X GET "http://localhost:8080/v1/environments/string"
{
  "id": "string",
  "project_id": "string",
  "name": "string",
  "slug": "string",
  "parent_id": "string",
  "variables": {
    "property1": "string",
    "property2": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Update an environment

PATCH
/v1/environments/{envID}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

envID*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "http://localhost:8080/v1/environments/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "project_id": "string",
  "name": "string",
  "slug": "string",
  "parent_id": "string",
  "variables": {
    "property1": "string",
    "property2": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

Delete an environment

DELETE
/v1/environments/{envID}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

envID*string

Response Body

curl -X DELETE "http://localhost:8080/v1/environments/string"
Empty

Get resolved variables

GET
/v1/environments/{envID}/variables

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

envID*string

Response Body

application/json

curl -X GET "http://localhost:8080/v1/environments/string/variables"
{
  "property1": "string",
  "property2": "string"
}
Was this page helpful?