File

src/api/webApi/classes/environments/environmentApi.interface.ts

Index

Methods

Methods

createEnvironment
createEnvironment(name: string, description: string, serviceid: string)

[POST] create environment

Parameters :
Name Type Optional
name string No
description string No
serviceid string No
getEnvironment
getEnvironment(environment: Environment)

[GET] Gets environment by id.

Parameters :
Name Type Optional
environment Environment No
getEnvironments
getEnvironments()

[GET] Gets all environments for specified user.

removeEnvironment
removeEnvironment(environment: Environment)

[DELETE] remove environment {"Result":"Environment 5a4dfbb6e4b002ed7db6579f Removed Successfully"}

Parameters :
Name Type Optional
environment Environment No
Returns : Promise<boolean>
runJobEnvironment
runJobEnvironment(environment: Environment)

[POST] run environment job

Parameters :
Name Type Optional
environment Environment No
Returns : Promise<boolean>
updateEnvironment
updateEnvironment(environment: Environment, newName: string, newDescription: string)

[PUT] updates the name and description

Parameters :
Name Type Optional
environment Environment No
newName string No
newDescription string No
updateResourcesToEnvironment
updateResourcesToEnvironment(environment: Environment, resources: Array)

[PUT] updates the environment with new resource

Parameters :
Name Type Optional
environment Environment No
resources Array<EnvironmentResource> No
import { Environment } from 'api/webApi/data/environments/environment.interface';
import { EnvironmentResource } from 'api/webApi/data/environments/environmentResource.interface';

export interface EnvironmentApi {

  /**
   * [GET]
   * Gets all environments for specified user.
   */
  getEnvironments(): Promise<Array<Environment>>;

  /**
   * [GET]
   * Gets environment by id.
   */
  getEnvironment(environment: Environment): Promise<Environment | null>;

  /**
   * [PUT]
   * updates the name and description
   */
  updateEnvironment(environment: Environment, newName: string, newDescription: string): Promise<null | Environment>;

  /**
   * [POST]
   * create environment
   */
  createEnvironment(name: string, description: string, serviceid: string): Promise<null | Environment>;
  /**
   * [DELETE]
   * remove environment
   * {"Result":"Environment 5a4dfbb6e4b002ed7db6579f Removed Successfully"}
   */
  removeEnvironment(environment: Environment): Promise<boolean>;

  /**
   * [POST]
   * run environment job
   */
  runJobEnvironment(environment: Environment): Promise<boolean>;

  /**
   * [PUT]
   * updates the environment with new resource
   * @param environment
   * @param urlResource
   */
  updateResourcesToEnvironment(environment: Environment, resources: Array<EnvironmentResource>): Promise<Environment | null>;

}

results matching ""

    No results matching ""