Create

Create An Ephemeral Environment

POST https://api.releasehub.com/api/apps/:app_id/environments/

Add creating a Release Ephemeral Environment to your existing pipelines. By passing in the app you want to create the environment for and the Docker images to to use, you have full control over what is created. Additionally by adding a branch, you're able to continually update the same environment as you push code changes. A Build object will be created upon a successful request and the optional parameters help to fill in data that the Release build system returns. Without the optional data you may find it hard to determine what code is actually running on your environment.

Path Parameters

Name
Type
Description

app_id

integer

Release App ID

Headers

Name
Type
Description

X-Account-ID

integer

Account ID

X-Account-Token

string

Authentication token

Request Body

Name
Type
Description

branch

string

Git branch name

services

object

Object in the form of {service_name: image_name}

commit_short

string

Shortened version of a commit sha, usually seven characters

commit_long

string

Full commit sha

committer

string

Email of the person who created the commit

commit_message

string

Message used for the commit

commit_date

string

Time the commit happened at in the form

\

"YYYY-MM-DD HH:MM:SS -0700". "-0700" is used as an example time zone offset.

logs

array

Array of objects in the form of

\

{level: "info" || "error", message: "message"}

{"message": "Successfully created|updated Environment"}

{% swagger-response status="404" description="If an App cannot be found with the given app_id, a Not Found will be returned. {"error": "Could not find app with id 0"}If a User cannot be found to authenticate either from the committer email or from the App's owner, a Not Found will be returned. {"error": "No user found"}" %}

{"error": "message"}

The following is an example payload with images stored in ECR

{
  "app_id": 1,
  "branch": "auth_test",
  "services": {
    "web": "123.dkr.ecr.us-west-2.amazonaws.com/releaseappuser/test_repo/web:9106aa52e16981a062676f0f5cf7a0ce3ebf00c0",
    "sidekiq": "123.dkr.ecr.us-west-2.amazonaws.com/releaseappuser/test_repo/sidekiq:9106aa52e16981a062676f0f5cf7a0ce3ebf00c0"
  },
  "committer": "releaseappuser@releaseapp.io",
  "commit_message": "testing_message",
  "commit_date": "2020-04-10 13:27:16 -0700",
  "commit_short": "9106aa5",
  "commit_long": "9106aa52e16981a062676f0f5cf7a0ce3ebf00c0",
  "logs": [{level: "info", message: "testing"}, {level: "info", message: "the api"}],
}

Last updated