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.
Value | Description |
---|---|
accepted | |
ambiguous | |
badGateway | |
badRequest | |
conflict | |
continue | |
created | |
expectationFailed | |
forbidden | |
found | |
gatewayTimeout | |
gone | |
httpVersionNotSupported | |
internalServerError | |
lengthRequired | |
methodNotAllowed | |
moved | |
movedPermanently | |
multipleChoices | |
noContent | |
nonAuthoritativeInformation | |
notAcceptable | |
notFound | |
notImplemented | |
notModified | |
oK | |
partialContent | |
paymentRequired | |
preconditionFailed | |
proxyAuthenticationRequired | |
redirect | |
redirectKeepVerb | |
redirectMethod | |
requestEntityTooLarge | |
requestTimeout | |
requestUriTooLong | |
requestedRangeNotSatisfiable | |
resetContent | |
seeOther | |
serviceUnavailable | |
switchingProtocols | |
temporaryRedirect | |
unauthorized | |
unsupportedMediaType | |
unused | |
upgradeRequired | |
useProxy |
JToken
Name | Type | Description |
---|---|---|
first | ||
hasValues |
boolean |
|
item | ||
last | ||
next | ||
parent |
string (JContainer) |
|
path |
string |
|
previous | ||
root | ||
type |
string (JTokenType) |
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. |