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

Latest commit

 

History

History
228 lines (158 loc) · 6.73 KB

File metadata and controls

228 lines (158 loc) · 6.73 KB

QoveryApi.EnvironmentsApi

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

Method HTTP request Description
createEnvironment POST /project/{projectId}/environment Create an environment
getProjectEnvironmentServiceNumber GET /project/{projectId}/environment/stats List total number of services for each environment of the project
getProjectEnvironmentsStatus GET /project/{projectId}/environment/status List environments statuses
listEnvironment GET /project/{projectId}/environment List environments

createEnvironment

Environment createEnvironment(projectId, opts)

Create an environment

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.EnvironmentsApi();
let projectId = "projectId_example"; // String | Project ID
let opts = {
  'createEnvironmentRequest': new QoveryApi.CreateEnvironmentRequest() // CreateEnvironmentRequest | 
};
apiInstance.createEnvironment(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
createEnvironmentRequest CreateEnvironmentRequest [optional]

Return type

Environment

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

getProjectEnvironmentServiceNumber

EnvironmentStatsResponseList getProjectEnvironmentServiceNumber(projectId)

List total number of services for each environment of the project

Returns a list of environment ids, and for each its total numberof services

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.EnvironmentsApi();
let projectId = "projectId_example"; // String | Project ID
apiInstance.getProjectEnvironmentServiceNumber(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

EnvironmentStatsResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

getProjectEnvironmentsStatus

EnvironmentStatusList getProjectEnvironmentsStatus(projectId)

List environments statuses

Returns a list of environments with only their id and status.

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.EnvironmentsApi();
let projectId = "projectId_example"; // String | Project ID
apiInstance.getProjectEnvironmentsStatus(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

EnvironmentStatusList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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

listEnvironment

EnvironmentResponseList listEnvironment(projectId)

List environments

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.EnvironmentsApi();
let projectId = "projectId_example"; // String | Project ID
apiInstance.listEnvironment(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

EnvironmentResponseList

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

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