共用方式為


Endpoints - Update Service Endpoint

更新服務端點

PUT https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1
PUT https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}?operation={operation}&api-version=7.1

URI 參數

名稱 位於 必要 類型 Description
endpointId
path True

string (uuid)

要更新之端點的端點標識碼

organization
path True

string

Azure DevOps 組織的名稱。

api-version
query True

string

要使用的 API 版本。 這應該設定為 『7.1』 以使用此版本的 API。

operation
query

string

作業類型

要求本文

名稱 類型 Description
administratorsGroup

IdentityRef

這是已被取代的欄位。

authorization

EndpointAuthorization

取得或設定與端點通訊的授權數據。

createdBy

IdentityRef

取得或設定建立服務端點之用戶的識別參考。

data

object

description

string

取得或設定端點的描述。

groupScopeId

string (uuid)

這是已被取代的欄位。

id

string (uuid)

取得或設定這個端點的標識碼。

isReady

boolean

EndPoint 狀態指標

isShared

boolean

指出服務端點是否與其他項目共用。

name

string

取得或設定端點的易記名稱。

operationStatus

JObject

建立/刪除端點時發生錯誤訊息

owner

string

端點的擁有者支援的值為 “library”、“agentcloud”

readersGroup

IdentityRef

取得或設定服務端點讀取器群組的識別參考。

serviceEndpointProjectReferences

ServiceEndpointProjectReference[]

共用服務端點的所有其他項目參考。

type

string

取得或設定端點的類型。

url

string

取得或設定端點的 URL。

回應

名稱 類型 Description
200 OK

ServiceEndpoint

成功作業

安全性

oauth2

類型: oauth2
Flow: accessCode
授權 URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
權杖 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

範圍

名稱 Description
vso.serviceendpoint_manage 授與讀取、查詢及管理服務端點的能力。

範例

Update service endpoint

範例要求

PUT https://dev.azure.com/{organization}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1

{
  "data": {},
  "id": "5e47a0d8-c745-44f8-8f93-784f18ff31c4",
  "name": "UpdatedServiceEndpoint",
  "type": "Generic",
  "url": "https://myserver",
  "createdBy": {
    "displayName": "Chuck Reinhart",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e18a1f0a-b112-67fd-a9e0-e3bb081da49e",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.ZTE4YTFmMGEtYjExMi03N2ZkLWE5ZTAtZTNiYjA4MWRhNDll"
      }
    },
    "id": "e18a1f0a-b112-67fd-a9e0-e3bb081da49e",
    "uniqueName": "fabfiber@outlook.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.ZTE4YTFmMGEtYjExMi03N2ZkLWE5ZTAtZTNiYjA4MWRhNDll",
    "descriptor": "msa.ZTE4YTFmMGEtYjExMi03N2ZkLWE5ZTAtZTNiYjA4MWRhNDll"
  },
  "description": "",
  "authorization": {
    "parameters": {
      "username": "myupdatedusername",
      "password": "myupdatedpassword"
    },
    "scheme": "UsernamePassword"
  },
  "isShared": false,
  "isReady": true,
  "owner": "Library",
  "serviceEndpointProjectReferences": [
    {
      "projectReference": {
        "id": "c7e5f0b3-71fa-4429-9fb3-3321963a7c06",
        "name": "TestProject"
      },
      "name": "MyNewServiceEndpoint"
    }
  ]
}

範例回覆

{
  "data": {},
  "id": "5e47a0d8-c745-44f8-8f93-784f18ff31c4",
  "name": "UpdatedServiceEndpoint",
  "type": "Generic",
  "url": "https://myserver",
  "createdBy": {
    "displayName": "Chuck Reinhart",
    "url": "https://vssps.dev.azure.com/fabrikam/_apis/Identities/e18a1f0a-b112-67fd-a9e0-e3bb081da49e",
    "_links": {
      "avatar": {
        "href": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.ZTE4YTFmMGEtYjExMi03N2ZkLWE5ZTAtZTNiYjA4MWRhNDll"
      }
    },
    "id": "e18a1f0a-b112-67fd-a9e0-e3bb081da49e",
    "uniqueName": "fabfiber@outlook.com",
    "imageUrl": "https://dev.azure.com/fabrikam/_apis/GraphProfile/MemberAvatars/msa.ZTE4YTFmMGEtYjExMi03N2ZkLWE5ZTAtZTNiYjA4MWRhNDll",
    "descriptor": "msa.ZTE4YTFmMGEtYjExMi03N2ZkLWE5ZTAtZTNiYjA4MWRhNDll"
  },
  "description": "",
  "authorization": {
    "parameters": {
      "username": "myupdatedusername",
      "password": null
    },
    "scheme": "UsernamePassword"
  },
  "isShared": false,
  "isReady": true,
  "owner": "Library",
  "serviceEndpointProjectReferences": [
    {
      "projectReference": {
        "id": "c7e5f0b3-71fa-4429-9fb3-3321963a7c06",
        "name": "TestProject"
      },
      "name": "MyNewServiceEndpoint"
    }
  ]
}

定義

名稱 Description
EndpointAuthorization

表示用於服務端點的授權。

IdentityRef
JObject

表示 JSON 物件。

JToken

表示抽象 JSON 令牌。

ProjectReference
ReferenceLinks

表示 REST 參考連結集合的類別。

ServiceEndpoint

表示協調流程作業可使用的端點。

ServiceEndpointProjectReference

EndpointAuthorization

表示用於服務端點的授權。

名稱 類型 Description
parameters

object

取得或設定所選授權配置的參數。

scheme

string

取得或設定用於服務端點驗證的配置。

IdentityRef

名稱 類型 Description
_links

ReferenceLinks

此欄位包含圖表主旨的相關零或更多有趣連結。 您可以叫用這些連結,以取得此圖表主題的其他關聯性或更詳細的資訊。

descriptor

string

描述元是在系統執行時參考圖表主旨的主要方式。 此欄位會唯一識別帳戶和組織之間的相同圖表主題。

directoryAlias

string

已淘汰 - 查詢 IdentityRef “_links” 字典中參考的 Graph 使用者,即可擷取

displayName

string

這是圖形主體的非唯一顯示名稱。 若要變更此欄位,您必須在來源提供者中變更其值。

id

string

imageUrl

string

已淘汰 - 可在 IdentityRef “_links” 字典的 “avatar” 專案中取得

inactive

boolean

已淘汰 - 可藉由查詢 GraphUser “_links” 字典的 “membershipState” 專案中參考的 Graph 成員資格狀態來擷取

isAadIdentity

boolean

已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)

isContainer

boolean

已淘汰 - 可以從描述元的主體類型推斷 (Descriptor.IsGroupType)

isDeletedInOrigin

boolean

profileUrl

string

已淘汰 - 未在 ToIdentityRef 的大部分預先存在實作中使用

uniqueName

string

已淘汰 - 請改用 Domain+PrincipalName

url

string

此 URL 是此圖表主體來源資源的完整路由。

JObject

表示 JSON 物件。

名稱 類型 Description
item

JToken

表示抽象 JSON 令牌。

type

string (JTokenType)

取得這個 JToken 的節點類型。

JToken

表示抽象 JSON 令牌。

名稱 類型 Description
first

JToken

取得此令牌的第一個子令牌。

hasValues

boolean

取得值,指出這個令牌是否具有子令牌。

item

JToken

表示抽象 JSON 令牌。

last

JToken

取得此令牌的最後一個子令牌。

next

JToken

取得這個節點的下一個同層級令牌。

parent

string (JContainer)

取得或設定父代。

path

string

取得 JSON 令牌的路徑。

previous

JToken

取得這個節點的上一個同層級令牌。

root

JToken

取得這個 JToken 的根 JToken。

type

string (JTokenType)

取得這個 JToken 的節點類型。

ProjectReference

名稱 類型 Description
id

string (uuid)

name

string

表示 REST 參考連結集合的類別。

名稱 類型 Description
links

object

連結的只讀檢視。 因為參考連結是只讀的,所以我們只想要將其公開為只讀。

ServiceEndpoint

表示協調流程作業可使用的端點。

名稱 類型 Description
administratorsGroup

IdentityRef

這是已被取代的欄位。

authorization

EndpointAuthorization

取得或設定與端點通訊的授權數據。

createdBy

IdentityRef

取得或設定建立服務端點之用戶的識別參考。

data

object

description

string

取得或設定端點的描述。

groupScopeId

string (uuid)

這是已被取代的欄位。

id

string (uuid)

取得或設定這個端點的標識碼。

isReady

boolean

EndPoint 狀態指標

isShared

boolean

指出服務端點是否與其他項目共用。

name

string

取得或設定端點的易記名稱。

operationStatus

JObject

建立/刪除端點時發生錯誤訊息

owner

string

端點的擁有者支援的值為 “library”、“agentcloud”

readersGroup

IdentityRef

取得或設定服務端點讀取器群組的識別參考。

serviceEndpointProjectReferences

ServiceEndpointProjectReference[]

共用服務端點的所有其他項目參考。

type

string

取得或設定端點的類型。

url

string

取得或設定端點的 URL。

ServiceEndpointProjectReference

名稱 類型 Description
description

string

取得或設定服務端點的描述。

name

string

取得或設定服務端點的名稱。

projectReference

ProjectReference

取得或設定服務端點的項目參考。