ServiceEndpointRestClient class
Base class that should be used (derived from) to make requests to VSS REST apis
- Extends
Constructors
Service |
Properties
RESOURCE_AREA_ID |
Methods
Constructor Details
ServiceEndpointRestClient(IVssRestClientOptions)
new ServiceEndpointRestClient(options: IVssRestClientOptions)
Parameters
- options
- IVssRestClientOptions
Property Details
RESOURCE_AREA_ID
static RESOURCE_AREA_ID: string
Property Value
string
Method Details
addServiceEndpointExecutionRecords(ServiceEndpointExecutionRecordsInput, string)
Add service endpoint execution records.
function addServiceEndpointExecutionRecords(input: ServiceEndpointExecutionRecordsInput, project: string): Promise<ServiceEndpointExecutionRecord[]>
Parameters
Service endpoint execution records to add.
- project
-
string
Project ID or project name
Returns
Promise<ServiceEndpointExecutionRecord[]>
createAadOAuthRequest(string, string, AadLoginPromptOption, string, boolean)
function createAadOAuthRequest(tenantId: string, redirectUri: string, promptOption?: AadLoginPromptOption, completeCallbackPayload?: string, completeCallbackByAuthCode?: boolean): Promise<string>
Parameters
- tenantId
-
string
- redirectUri
-
string
- promptOption
- AadLoginPromptOption
- completeCallbackPayload
-
string
- completeCallbackByAuthCode
-
boolean
Returns
Promise<string>
createOAuthConfiguration(OAuthConfigurationParams)
function createOAuthConfiguration(configurationParams: OAuthConfigurationParams): Promise<OAuthConfiguration>
Parameters
- configurationParams
- OAuthConfigurationParams
Returns
Promise<OAuthConfiguration>
createServiceEndpoint(ServiceEndpoint)
Creates a new service endpoint
function createServiceEndpoint(endpoint: ServiceEndpoint): Promise<ServiceEndpoint>
Parameters
- endpoint
- ServiceEndpoint
Service endpoint to create
Returns
Promise<ServiceEndpoint>
deleteOAuthConfiguration(string)
function deleteOAuthConfiguration(configurationId: string): Promise<OAuthConfiguration>
Parameters
- configurationId
-
string
Returns
Promise<OAuthConfiguration>
deleteServiceEndpoint(string, string[], boolean)
Delete a service endpoint
function deleteServiceEndpoint(endpointId: string, projectIds: string[], deep?: boolean): Promise<void>
Parameters
- endpointId
-
string
Endpoint Id of endpoint to delete
- projectIds
-
string[]
project Ids from which endpoint needs to be deleted
- deep
-
boolean
delete the spn created by endpoint
Returns
Promise<void>
executeServiceEndpointRequest(ServiceEndpointRequest, string, string)
Proxy for a GET request defined by a service endpoint.
function executeServiceEndpointRequest(serviceEndpointRequest: ServiceEndpointRequest, project: string, endpointId: string): Promise<ServiceEndpointRequestResult>
Parameters
- serviceEndpointRequest
- ServiceEndpointRequest
Service endpoint request.
- project
-
string
Project ID or project name
- endpointId
-
string
Id of the service endpoint.
Returns
Promise<ServiceEndpointRequestResult>
getAzureManagementGroups()
Returns list of azure subscriptions
function getAzureManagementGroups(): Promise<AzureManagementGroupQueryResult>
Returns
Promise<AzureManagementGroupQueryResult>
getAzureSubscriptions()
Returns list of azure subscriptions
function getAzureSubscriptions(): Promise<AzureSubscriptionQueryResult>
Returns
Promise<AzureSubscriptionQueryResult>
getOAuthConfiguration(string)
function getOAuthConfiguration(configurationId: string): Promise<OAuthConfiguration>
Parameters
- configurationId
-
string
Returns
Promise<OAuthConfiguration>
getOAuthConfigurations(string, OAuthConfigurationActionFilter)
function getOAuthConfigurations(endpointType?: string, actionFilter?: OAuthConfigurationActionFilter): Promise<OAuthConfiguration[]>
Parameters
- endpointType
-
string
- actionFilter
- OAuthConfigurationActionFilter
Returns
Promise<OAuthConfiguration[]>
getServiceEndpointDetails(string, string, ServiceEndpointActionFilter, boolean)
Get the service endpoint details.
function getServiceEndpointDetails(project: string, endpointId: string, actionFilter?: ServiceEndpointActionFilter, loadConfidetantialData?: boolean): Promise<ServiceEndpoint>
Parameters
- project
-
string
Project ID or project name
- endpointId
-
string
Id of the service endpoint.
- actionFilter
- ServiceEndpointActionFilter
Action filter for the service connection. It specifies the action which can be performed on the service connection.
- loadConfidetantialData
-
boolean
Flag to include confidential details of service endpoint. This is for internal use only.
Returns
Promise<ServiceEndpoint>
getServiceEndpointExecutionRecords(string, string, number, number)
Get service endpoint execution records.
function getServiceEndpointExecutionRecords(project: string, endpointId: string, top?: number, continuationToken?: number): Promise<PagedList<ServiceEndpointExecutionRecord>>
Parameters
- project
-
string
Project ID or project name
- endpointId
-
string
Id of the service endpoint.
- top
-
number
Number of service endpoint execution records to get.
- continuationToken
-
number
A continuation token, returned by a previous call to this method, that can be used to return the next set of records
Returns
Promise<PagedList<ServiceEndpointExecutionRecord>>
getServiceEndpoints(string, string, string[], string[], string, boolean, boolean, ServiceEndpointActionFilter)
Get the service endpoints.
function getServiceEndpoints(project: string, type?: string, authSchemes?: string[], endpointIds?: string[], owner?: string, includeFailed?: boolean, includeDetails?: boolean, actionFilter?: ServiceEndpointActionFilter): Promise<ServiceEndpoint[]>
Parameters
- project
-
string
Project ID or project name
- type
-
string
Type of the service endpoints.
- authSchemes
-
string[]
Authorization schemes used for service endpoints.
- endpointIds
-
string[]
Ids of the service endpoints.
- owner
-
string
Owner for service endpoints.
- includeFailed
-
boolean
Failed flag for service endpoints.
- includeDetails
-
boolean
Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests
- actionFilter
- ServiceEndpointActionFilter
The "actionFilter" parameter allows users to evaluate requestor permissions and retrieve a list of endpoints that match the specified conditions, ensuring that only relevant endpoints are returned based on their permissions
Returns
Promise<ServiceEndpoint[]>
getServiceEndpointsByNames(string, string[], string, string[], string, boolean, boolean)
Get the service endpoints by name.
function getServiceEndpointsByNames(project: string, endpointNames: string[], type?: string, authSchemes?: string[], owner?: string, includeFailed?: boolean, includeDetails?: boolean): Promise<ServiceEndpoint[]>
Parameters
- project
-
string
Project ID or project name
- endpointNames
-
string[]
Names of the service endpoints.
- type
-
string
Type of the service endpoints.
- authSchemes
-
string[]
Authorization schemes used for service endpoints.
- owner
-
string
Owner for service endpoints.
- includeFailed
-
boolean
Failed flag for service endpoints.
- includeDetails
-
boolean
Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests
Returns
Promise<ServiceEndpoint[]>
getServiceEndpointsWithRefreshedAuthentication(RefreshAuthenticationParameters[], string, string[])
Gets the service endpoints and patch new authorization parameters
function getServiceEndpointsWithRefreshedAuthentication(refreshAuthenticationParameters: RefreshAuthenticationParameters[], project: string, endpointIds: string[]): Promise<ServiceEndpoint[]>
Parameters
- refreshAuthenticationParameters
Scope, Validity of Token requested.
- project
-
string
Project ID or project name
- endpointIds
-
string[]
Ids of the service endpoints.
Returns
Promise<ServiceEndpoint[]>
getServiceEndpointTypes(string, string)
Get service endpoint types.
function getServiceEndpointTypes(type?: string, scheme?: string): Promise<ServiceEndpointType[]>
Parameters
- type
-
string
Type of service endpoint.
- scheme
-
string
Scheme of service endpoint.
Returns
Promise<ServiceEndpointType[]>
getVstsAadTenantId()
function getVstsAadTenantId(): Promise<string>
Returns
Promise<string>
queryServiceEndpoint(DataSourceBinding, string)
Proxy for a GET request defined by a service endpoint. The request is authorized using a data source in service endpoint. The response is filtered using an XPath/Json based selector.
function queryServiceEndpoint(binding: DataSourceBinding, project: string): Promise<string[]>
Parameters
- binding
- DataSourceBinding
Describes the data source to fetch.
- project
-
string
Project ID or project name
Returns
Promise<string[]>
querySharedProjects(string, string)
function querySharedProjects(endpointId: string, project: string): Promise<ProjectReference[]>
Parameters
- endpointId
-
string
- project
-
string
Returns
Promise<ProjectReference[]>
shareEndpointWithProject(string, string, string)
function shareEndpointWithProject(endpointId: string, fromProject: string, withProject: string): Promise<void>
Parameters
- endpointId
-
string
- fromProject
-
string
- withProject
-
string
Returns
Promise<void>
shareServiceEndpoint(ServiceEndpointProjectReference[], string)
Share service endpoint across projects
function shareServiceEndpoint(endpointProjectReferences: ServiceEndpointProjectReference[], endpointId: string): Promise<void>
Parameters
- endpointProjectReferences
Project reference details of the target project
- endpointId
-
string
Endpoint Id of the endpoint to share
Returns
Promise<void>
updateOAuthConfiguration(OAuthConfigurationParams, string)
function updateOAuthConfiguration(configurationParams: OAuthConfigurationParams, configurationId: string): Promise<OAuthConfiguration>
Parameters
- configurationParams
- OAuthConfigurationParams
- configurationId
-
string
Returns
Promise<OAuthConfiguration>
updateServiceEndpoint(ServiceEndpoint, string, string)
Update the service endpoint
function updateServiceEndpoint(endpoint: ServiceEndpoint, endpointId: string, operation?: string): Promise<ServiceEndpoint>
Parameters
- endpoint
- ServiceEndpoint
Updated data for the endpoint
- endpointId
-
string
Endpoint Id of the endpoint to update
- operation
-
string
operation type
Returns
Promise<ServiceEndpoint>
updateServiceEndpoints(ServiceEndpoint[])
Update the service endpoints.
function updateServiceEndpoints(endpoints: ServiceEndpoint[]): Promise<ServiceEndpoint[]>
Parameters
- endpoints
Names of the service endpoints to update.
Returns
Promise<ServiceEndpoint[]>