Environment Variables API


Create an environment variable

POST /environment_variables

Parameters

name
required: true
scope: environment_variable
Name of the variable
value
required: true
scope: environment_variable
Value of the variable
application_id
required: true
Id of the application to associate with this variable
environment_id
required: true
Id of the environment to associate with this variable

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
            "environment_variable": {
              "name": "BASE_SECRET",
              "value": "78ac2299ca2874eed52f435126bd65eb17d01dc55092091f1f7a3d6b1f68174a"
            },
            "application_id": 7,
            "environment_id": 7
          }
            
          

Response

          Status: 201 Created
          Content-Type: application/json; charset=utf-8
          
            
          {
            "environment_variable": {
              "id": 10,
              "application": "https://api.engineyard.com/applications/7",
              "application_id": 7,
              "application_name": "5b5c051eba88ffcdbfdc",
              "environment": "https://api.engineyard.com/environments/7",
              "environment_id": 7,
              "environment_name": "e57070",
              "name": "BASE_SECRET",
              "sensitive": false,
              "value": "78ac2299ca2874eed52f435126bd65eb17d01dc55092091f1f7a3d6b1f68174a"
            }
          }
            
          








List all environment variables

GET /environment_variables

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "environment_variables": [
              {
                "id": 2,
                "application": "https://api.engineyard.com/applications/1",
                "application_id": 1,
                "application_name": "26ecbd4e78cc886cba3c",
                "environment": "https://api.engineyard.com/environments/1",
                "environment_id": 1,
                "environment_name": "e6f42e",
                "name": "SECRET_BASE",
                "sensitive": false,
                "value": "775e2fce8052c236f8048cadb26ac04f"
              },
              {
                "id": 2,
                "application": "https://api.engineyard.com/applications/1",
                "application_id": 1,
                "application_name": "26ecbd4e78cc886cba3c",
                "environment": "https://api.engineyard.com/environments/1",
                "environment_id": 1,
                "environment_name": "e6f42e",
                "name": "SECRET_BASE",
                "sensitive": false,
                "value": "775e2fce8052c236f8048cadb26ac04f"
              }
            ]
          }
            
          








List environment variables associated with application

GET /applications/:application_id/environment_variables

Parameters

application_id
required: true
Id of application

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "environment_variables": [
              {
                "id": 3,
                "application": "https://api.engineyard.com/applications/2",
                "application_id": 2,
                "application_name": "d2254382f3c9f7428721",
                "environment": "https://api.engineyard.com/environments/2",
                "environment_id": 2,
                "environment_name": "5f3e59",
                "name": "TWITTER_SECRET",
                "sensitive": false,
                "value": "fcb77b529799692e8e42b82171537009"
              }
            ]
          }
            
          








List environment variables associated with environment

GET /environments/:environment_id/environment_variables

Parameters

environment_id
required: true
Id of environment

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "environment_variables": [
              {
                "id": 8,
                "application": "https://api.engineyard.com/applications/5",
                "application_id": 5,
                "application_name": "f853cbaaa274afcd060d",
                "environment": "https://api.engineyard.com/environments/5",
                "environment_id": 5,
                "environment_name": "87eb79",
                "name": "DB_PASSWORD",
                "sensitive": false,
                "value": "601eca024e"
              },
              {
                "id": 8,
                "application": "https://api.engineyard.com/applications/5",
                "application_id": 5,
                "application_name": "f853cbaaa274afcd060d",
                "environment": "https://api.engineyard.com/environments/5",
                "environment_id": 5,
                "environment_name": "87eb79",
                "name": "DB_PASSWORD",
                "sensitive": false,
                "value": "601eca024e"
              }
            ]
          }
            
          








Show an environment variable

GET /environment_variables/:environment_variable_id

Parameters

environment_variable_id
required: true
Id of requested environment variable

Request

          Accept: application/vnd.engineyard.v3+json
          Content-Type: application/json
          
            
          {
          }
            
          

Response

          Status: 200 OK
          Content-Type: application/json; charset=utf-8
          
            
          {
            "environment_variable": {
              "id": 9,
              "application": "https://api.engineyard.com/applications/6",
              "application_id": 6,
              "application_name": "6baff6c4ac5cf3dee466",
              "environment": "https://api.engineyard.com/environments/6",
              "environment_id": 6,
              "environment_name": "196847",
              "name": "MY_VAR",
              "sensitive": false,
              "value": "123"
            }
          }