Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Latest commit

 

History

History
358 lines (253 loc) · 13.6 KB

File metadata and controls

358 lines (253 loc) · 13.6 KB

QoveryApi.ProjectEnvironmentVariableApi

All URIs are relative to https://api.qovery.com

Method HTTP request Description
createProjectEnvironmentVariable POST /project/{projectId}/environmentVariable Add an environment variable to the project
createProjectEnvironmentVariableAlias POST /project/{projectId}/environmentVariable/{environmentVariableId}/alias Create an environment variable alias at the project level
createProjectEnvironmentVariableOverride POST /project/{projectId}/environmentVariable/{environmentVariableId}/override Create an environment variable override at the project level
deleteProjectEnvironmentVariable DELETE /project/{projectId}/environmentVariable/{environmentVariableId} Delete an environment variable from a project
editProjectEnvironmentVariable PUT /project/{projectId}/environmentVariable/{environmentVariableId} Edit an environment variable belonging to the project
listProjectEnvironmentVariable GET /project/{projectId}/environmentVariable List project environment variables

createProjectEnvironmentVariable

EnvironmentVariable createProjectEnvironmentVariable(projectId, opts)

Add an environment variable to the project

  • Add an environment variable to the project. - If the environment variable key already exists, then it will be replaced by the new one. - If the environment variable value points toward an existing environment variable key, it will be considered as an alias.

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.ProjectEnvironmentVariableApi();
let projectId = "projectId_example"; // String | Project ID
let opts = {
  'environmentVariableRequest': new QoveryApi.EnvironmentVariableRequest() // EnvironmentVariableRequest | 
};
apiInstance.createProjectEnvironmentVariable(projectId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectId String Project ID
environmentVariableRequest EnvironmentVariableRequest [optional]

Return type

EnvironmentVariable

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createProjectEnvironmentVariableAlias

EnvironmentVariable createProjectEnvironmentVariableAlias(projectId, environmentVariableId, opts)

Create an environment variable alias at the project level

  • Allows you to add an alias at project level on an existing environment variable having higher scope, in order to customize its key. - You only have to specify a key in the request body - The system will create a new environment variable at project level with the same value as the one corresponding to the variable id in the path - The response body will contain the newly created variable - Information regarding the aliased_variable will be exposed in the "aliased_variable" field of the newly created variable - You can't create an alias on an alias

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.ProjectEnvironmentVariableApi();
let projectId = "projectId_example"; // String | Project ID
let environmentVariableId = "environmentVariableId_example"; // String | Environment Variable ID
let opts = {
  'key': new QoveryApi.Key() // Key | 
};
apiInstance.createProjectEnvironmentVariableAlias(projectId, environmentVariableId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectId String Project ID
environmentVariableId String Environment Variable ID
key Key [optional]

Return type

EnvironmentVariable

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createProjectEnvironmentVariableOverride

EnvironmentVariable createProjectEnvironmentVariableOverride(projectId, environmentVariableId, opts)

Create an environment variable override at the project level

  • Allows you to override at project level an environment variable that has a higher scope. - You only have to specify a value in the request body - The system will create a new environment variable at project level with the same key as the one corresponding to the variable id in the path - The response body will contain the newly created variable - Information regarding the overridden_variable will be exposed in the "overridden_variable" field of the newly created variable

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.ProjectEnvironmentVariableApi();
let projectId = "projectId_example"; // String | Project ID
let environmentVariableId = "environmentVariableId_example"; // String | Environment Variable ID
let opts = {
  'value': new QoveryApi.Value() // Value | 
};
apiInstance.createProjectEnvironmentVariableOverride(projectId, environmentVariableId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectId String Project ID
environmentVariableId String Environment Variable ID
value Value [optional]

Return type

EnvironmentVariable

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteProjectEnvironmentVariable

deleteProjectEnvironmentVariable(projectId, environmentVariableId)

Delete an environment variable from a project

  • To delete an environment variable you must have the project user permission - You can't delete a BUILT_IN variable - If you delete a variable having override or alias, the associated override/alias will be deleted as well

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.ProjectEnvironmentVariableApi();
let projectId = "projectId_example"; // String | Project ID
let environmentVariableId = "environmentVariableId_example"; // String | Environment Variable ID
apiInstance.deleteProjectEnvironmentVariable(projectId, environmentVariableId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
projectId String Project ID
environmentVariableId String Environment Variable ID

Return type

null (empty response body)

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

editProjectEnvironmentVariable

EnvironmentVariable editProjectEnvironmentVariable(projectId, environmentVariableId, environmentVariableEditRequest)

Edit an environment variable belonging to the project

  • You can't edit a BUILT_IN variable - For an override, you can't edit the key - For an alias, you can't edit the value - An override can only have a scope lower to the variable it is overriding (hierarchy is BUILT_IN > PROJECT > ENVIRONMENT > APPLICATION)

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.ProjectEnvironmentVariableApi();
let projectId = "projectId_example"; // String | Project ID
let environmentVariableId = "environmentVariableId_example"; // String | Environment Variable ID
let environmentVariableEditRequest = new QoveryApi.EnvironmentVariableEditRequest(); // EnvironmentVariableEditRequest | 
apiInstance.editProjectEnvironmentVariable(projectId, environmentVariableId, environmentVariableEditRequest, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectId String Project ID
environmentVariableId String Environment Variable ID
environmentVariableEditRequest EnvironmentVariableEditRequest

Return type

EnvironmentVariable

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listProjectEnvironmentVariable

EnvironmentVariableResponseList listProjectEnvironmentVariable(projectId)

List project environment variables

Example

import QoveryApi from 'qovery_api';
let defaultClient = QoveryApi.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure Bearer (JWT) access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new QoveryApi.ProjectEnvironmentVariableApi();
let projectId = "projectId_example"; // String | Project ID
apiInstance.listProjectEnvironmentVariable(projectId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectId String Project ID

Return type

EnvironmentVariableResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json