Skip to content

Latest commit

 

History

History
435 lines (294 loc) · 19 KB

EnvironmentsApi.md

File metadata and controls

435 lines (294 loc) · 19 KB

nextgen{{classname}}

All URIs are relative to https://app.harness.io/gateway

Method HTTP request Description
CreateEnvironmentV2 Post /ng/api/environmentsV2 Create an Environment
DeleteEnvironmentV2 Delete /ng/api/environmentsV2/{environmentIdentifier} Delete an Environment by identifier
DeleteServiceOverride Delete /ng/api/environmentsV2/serviceOverrides Delete a ServiceOverride entity
GetEnvironmentAccessList Get /ng/api/environmentsV2/list/access Gets Environment Access list
GetEnvironmentList Get /ng/api/environmentsV2 Gets Environment list for a project
GetEnvironmentV2 Get /ng/api/environmentsV2/{environmentIdentifier} Gets an Environment by identifier
GetServiceOverridesList Get /ng/api/environmentsV2/serviceOverrides Gets Service Overrides list
UpdateEnvironmentV2 Put /ng/api/environmentsV2 Update an Environment by identifier
UpsertEnvironmentV2 Put /ng/api/environmentsV2/upsert Upsert an Environment by identifier
UpsertServiceOverride Post /ng/api/environmentsV2/serviceOverrides Upsert
ImportEnvironment Post ng/api/environmentV2/import Get Environment YAML from Git Repository

CreateEnvironmentV2

ResponseDtoEnvironmentResponse CreateEnvironmentV2(ctx, accountIdentifier, optional) Create an Environment

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiCreateEnvironmentV2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiCreateEnvironmentV2Opts struct

Name Type Description Notes

body | optional.Interface of EnvironmentRequest| Details of the Environment to be created |

Return type

ResponseDtoEnvironmentResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteEnvironmentV2

ResponseDtoBoolean DeleteEnvironmentV2(ctx, environmentIdentifier, accountIdentifier, optional) Delete an Environment by identifier

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
environmentIdentifier string Environment Identifier for the entity
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiDeleteEnvironmentV2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiDeleteEnvironmentV2Opts struct

Name Type Description Notes

ifMatch | optional.String| | orgIdentifier | optional.String| Organization Identifier for the Entity. | projectIdentifier | optional.String| Project Identifier for the Entity. |

Return type

ResponseDtoBoolean

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteServiceOverride

ResponseDtoBoolean DeleteServiceOverride(ctx, accountIdentifier, orgIdentifier, projectIdentifier, optional) Delete a ServiceOverride entity

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
orgIdentifier string Organization Identifier for the Entity.
projectIdentifier string Project Identifier for the Entity.
optional *EnvironmentsApiDeleteServiceOverrideOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiDeleteServiceOverrideOpts struct

Name Type Description Notes

environmentIdentifier | optional.String| Environment Identifier for the Entity. | serviceIdentifier | optional.String| Service Identifier for the Entity. |

Return type

ResponseDtoBoolean

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetEnvironmentAccessList

ResponseDtoListEnvironmentResponse GetEnvironmentAccessList(ctx, accountIdentifier, optional) Gets Environment Access list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiGetEnvironmentAccessListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiGetEnvironmentAccessListOpts struct

Name Type Description Notes

page | optional.Int32| page | [default to 0] size | optional.Int32| size | [default to 100] orgIdentifier | optional.String| Organization Identifier for the Entity. | projectIdentifier | optional.String| Project Identifier for the Entity. | searchTerm | optional.String| The word to be searched and included in the list response | envIdentifiers | optional.Interface of []string| List of EnvironmentIds | sort | optional.Interface of []string| Specifies sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order |

Return type

ResponseDtoListEnvironmentResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetEnvironmentList

ResponseDtoPageResponseEnvironmentResponse GetEnvironmentList(ctx, accountIdentifier, optional) Gets Environment list for a project

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiGetEnvironmentListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiGetEnvironmentListOpts struct

Name Type Description Notes

page | optional.Int32| Page Index of the results to fetch.Default Value: 0 | [default to 0] size | optional.Int32| Results per page | [default to 100] orgIdentifier | optional.String| Organization Identifier for the Entity. | projectIdentifier | optional.String| Project Identifier for the Entity. | searchTerm | optional.String| The word to be searched and included in the list response | envIdentifiers | optional.Interface of []string| List of EnvironmentIds | sort | optional.Interface of []string| Specifies sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order |

Return type

ResponseDtoPageResponseEnvironmentResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetEnvironmentV2

ResponseDtoEnvironmentResponse GetEnvironmentV2(ctx, environmentIdentifier, accountIdentifier, optional) Gets an Environment by identifier

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
environmentIdentifier string Environment Identifier for the entity
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiGetEnvironmentV2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiGetEnvironmentV2Opts struct

Name Type Description Notes

orgIdentifier | optional.String| Organization Identifier for the Entity. | projectIdentifier | optional.String| Project Identifier for the Entity. | deleted | optional.Bool| Specify whether Environment is deleted or not | [default to false]

Return type

ResponseDtoEnvironmentResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetServiceOverridesList

ResponseDtoPageResponseServiceOverrideResponse GetServiceOverridesList(ctx, accountIdentifier, orgIdentifier, projectIdentifier, environmentIdentifier, optional) Gets Service Overrides list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
orgIdentifier string Organization Identifier for the Entity.
projectIdentifier string Project Identifier for the Entity.
environmentIdentifier string Environment Identifier for the Entity.
optional *EnvironmentsApiGetServiceOverridesListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiGetServiceOverridesListOpts struct

Name Type Description Notes

page | optional.Int32| Page Index of the results to fetch.Default Value: 0 | [default to 0] size | optional.Int32| Results per page | [default to 100] serviceIdentifier | optional.String| Service Identifier for the Entity. | sort | optional.Interface of []string| Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order |

Return type

ResponseDtoPageResponseServiceOverrideResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateEnvironmentV2

ResponseDtoEnvironmentResponse UpdateEnvironmentV2(ctx, accountIdentifier, optional) Update an Environment by identifier

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiUpdateEnvironmentV2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiUpdateEnvironmentV2Opts struct

Name Type Description Notes

body | optional.Interface of EnvironmentRequest| Details of the Environment to be updated | ifMatch | optional.| |

Return type

ResponseDtoEnvironmentResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpsertEnvironmentV2

ResponseDtoEnvironmentResponse UpsertEnvironmentV2(ctx, accountIdentifier, optional) Upsert an Environment by identifier

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiUpsertEnvironmentV2Opts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiUpsertEnvironmentV2Opts struct

Name Type Description Notes

body | optional.Interface of EnvironmentRequest| Details of the Environment to be updated | ifMatch | optional.| |

Return type

ResponseDtoEnvironmentResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpsertServiceOverride

ResponseDtoServiceOverrideResponse UpsertServiceOverride(ctx, accountIdentifier, optional) Upsert

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string Account Identifier for the Entity.
optional *EnvironmentsApiUpsertServiceOverrideOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsApiUpsertServiceOverrideOpts struct

Name Type Description Notes

body | optional.Interface of ServiceOverrideRequest| Details of the Service Override to be upserted |

Return type

ResponseDtoServiceOverrideResponse

Authorization

ApiKey

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ImportEnvironment

ResponseEnvironmentImportResponseDto ImportEnvironment(ctx, accountIdentifier, optional) Get Environment YAML from Git Repository

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountIdentifier string
optional *EnvironmentsV2ApiImportEnvironmentOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a EnvironmentsV2ApiImportEnvironmentOpts struct

Name Type Description Notes

orgIdentifier | optional.String| | projectIdentifier | optional.String| | environmentIdentifier | optional.String| | connectorRef | optional.String| | repoName | optional.String| | branch | optional.String| | filePath | optional.String| | isForceImport | optional.Bool| | [default to false] isHarnessCodeRepo | optional.Bool| |

Return type

ResponseEnvironmentImportResponseDto

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]