Endpointproxy - Execute Service Endpoint Request
Proxy for a GET request defined by a service endpoint.
POST https://dev.azure.com/{organization}/{project}/_apis/serviceendpoint/endpointproxy?endpointId={endpointId}&api-version=5.0-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
project
|
path | True |
string |
Project ID or project name |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '5.0-preview.1' to use this version of the api. |
endpoint
|
query | True |
string |
Id of the service endpoint. |
Request Body
Name | Type | Description |
---|---|---|
dataSourceDetails |
Gets or sets the data source details for the service endpoint request. |
|
resultTransformationDetails |
Gets or sets the result transformation details for the service endpoint request. |
|
serviceEndpointDetails |
Gets or sets the service endpoint details for the service endpoint request. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.serviceendpoint_query | Grants the ability to read and query service endpoints. |
Examples
Execute service endpoint request
Sample Request
POST https://dev.azure.com/fabrikam/DefaultAgileGitProject/_apis/serviceendpoint/endpointproxy?endpointId=96e0fef2-3aaf-456f-bba0-920731ecab83&api-version=5.0-preview.1
{
"dataSourceDetails": {
"dataSourceName": "Jobs",
"parameters": {}
},
"resultTransformationDetails": {
"resultTemplate": "{{#addField jobs 'parentPath' 'name' '/'}}{{#recursiveSelect jobs}}{{#notEquals _class 'com.cloudbees.hudson.plugins.folder.Folder'}}{{#notEquals _class 'org.jenkinsci.plugins.workflow.job.WorkflowJob'}}{ \"Value\" : \"{{#if parentPath}}{{parentPath}}/{{/if}}{{name}}\", \"DisplayValue\" : \"{{#if parentPath}}{{parentPath}}/{{/if}}{{{displayName}}}\" }{{/notEquals}}{{/notEquals}}{{/recursiveSelect}}{{/addField}}"
}
}
Sample Response
{
"result": [
"{ \"Value\" : \"UnitTestJob\", \"DisplayValue\" : \"UnitTestJob\" }",
"{ \"Value\" : \"TestProj\", \"DisplayValue\" : \"TestProj\" }",
"{ \"Value\" : \"PortTests\", \"DisplayValue\" : \"PortTests\" }",
"{ \"Value\" : \"LoadTests\", \"DisplayValue\" : \"LoadTests\" }",
"{ \"Value\" : \"ArtifactJob\", \"DisplayValue\" : \"ArtifactJob\" }"
],
"statusCode": "ok",
"errorMessage": ""
}
Definitions
Name | Description |
---|---|
Authorization |
Represents the header of the REST request. |
Data |
Represents details of the service endpoint data source. |
Endpoint |
Represents the authorization used for service endpoint. |
Http |
Gets or sets the status code of the service endpoint request result. |
JToken | |
Result |
Represents template to tranform the result data. |
Service |
Represents details of the service endpoint. |
Service |
|
Service |
Represents result of the service endpoint request. |
AuthorizationHeader
Represents the header of the REST request.
Name | Type | Description |
---|---|---|
name |
string |
Gets or sets the name of authorization header. |
value |
string |
Gets or sets the value of authorization header. |
DataSourceDetails
Represents details of the service endpoint data source.
Name | Type | Description |
---|---|---|
dataSourceName |
string |
Gets or sets the data source name. |
dataSourceUrl |
string |
Gets or sets the data source url. |
headers |
Gets or sets the request headers. |
|
initialContextTemplate |
string |
Gets or sets the initialization context used for the initial call to the data source |
parameters |
object |
Gets the parameters of data source. |
requestContent |
string |
Gets or sets the data source request content. |
requestVerb |
string |
Gets or sets the data source request verb. Get/Post are the only implemented types |
resourceUrl |
string |
Gets or sets the resource url of data source. |
resultSelector |
string |
Gets or sets the result selector. |
EndpointAuthorization
Represents the authorization used for service endpoint.
Name | Type | Description |
---|---|---|
parameters |
object |
Gets or sets the parameters for the selected authorization scheme. |
scheme |
string |
Gets or sets the scheme used for service endpoint authentication. |
HttpStatusCode
Gets or sets the status code of the service endpoint request result.
Name | Type | Description |
---|---|---|
accepted |
string |
|
ambiguous |
string |
|
badGateway |
string |
|
badRequest |
string |
|
conflict |
string |
|
continue |
string |
|
created |
string |
|
expectationFailed |
string |
|
forbidden |
string |
|
found |
string |
|
gatewayTimeout |
string |
|
gone |
string |
|
httpVersionNotSupported |
string |
|
internalServerError |
string |
|
lengthRequired |
string |
|
methodNotAllowed |
string |
|
moved |
string |
|
movedPermanently |
string |
|
multipleChoices |
string |
|
noContent |
string |
|
nonAuthoritativeInformation |
string |
|
notAcceptable |
string |
|
notFound |
string |
|
notImplemented |
string |
|
notModified |
string |
|
oK |
string |
|
partialContent |
string |
|
paymentRequired |
string |
|
preconditionFailed |
string |
|
proxyAuthenticationRequired |
string |
|
redirect |
string |
|
redirectKeepVerb |
string |
|
redirectMethod |
string |
|
requestEntityTooLarge |
string |
|
requestTimeout |
string |
|
requestUriTooLong |
string |
|
requestedRangeNotSatisfiable |
string |
|
resetContent |
string |
|
seeOther |
string |
|
serviceUnavailable |
string |
|
switchingProtocols |
string |
|
temporaryRedirect |
string |
|
unauthorized |
string |
|
unsupportedMediaType |
string |
|
unused |
string |
|
upgradeRequired |
string |
|
useProxy |
string |
JToken
Name | Type | Description |
---|---|---|
first | ||
hasValues |
boolean |
|
item | ||
last | ||
next | ||
parent |
string |
|
path |
string |
|
previous | ||
root | ||
type |
string |
ResultTransformationDetails
Represents template to tranform the result data.
Name | Type | Description |
---|---|---|
callbackContextTemplate |
string |
Gets or sets the template for callback parameters |
callbackRequiredTemplate |
string |
Gets or sets the template to decide whether to callback or not |
resultTemplate |
string |
Gets or sets the template for result transformation. |
ServiceEndpointDetails
Represents details of the service endpoint.
Name | Type | Description |
---|---|---|
authorization |
Gets or sets the authorization of service endpoint. |
|
data |
object |
Gets or sets the data of service endpoint. |
type |
string |
Gets or sets the type of service endpoint. |
url |
string |
Gets or sets the connection url of service endpoint. |
ServiceEndpointRequest
Name | Type | Description |
---|---|---|
dataSourceDetails |
Gets or sets the data source details for the service endpoint request. |
|
resultTransformationDetails |
Gets or sets the result transformation details for the service endpoint request. |
|
serviceEndpointDetails |
Gets or sets the service endpoint details for the service endpoint request. |
ServiceEndpointRequestResult
Represents result of the service endpoint request.
Name | Type | Description |
---|---|---|
callbackContextParameters |
object |
Gets or sets the parameters used to make subsequent calls to the data source |
callbackRequired |
boolean |
Gets or sets the flat that decides if another call to the data source is to be made |
errorMessage |
string |
Gets or sets the error message of the service endpoint request result. |
result |
Gets or sets the result of service endpoint request. |
|
statusCode |
Gets or sets the status code of the service endpoint request result. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for