要详细了解对象关系以及如何在 API 中使用对象关系,请参阅 对象关系 部分。
如需详细了解数据连接,请访问 数据连接 帮助页面。
要获取有关所有服务器数据连接记录的信息,请使用
GET {baseURL}/v3/serverDataConnections
端点。
view (string):可选。可以保留此参数但不为其提供值。您可以从以下值中选择:“默认值”和“全部”。如果此参数设置为“Default”,则将返回一个减小的视图对象。未指定时,将使用“默认值(Default)”。
curl --location --request GET 'http://localhost/webapi/v3/serverDataConnections' \ --header 'Authorization: Bearer BearerTokenGoesHere'
要检索有关特定服务器数据连接的信息,请使用
GET {baseURL}/v3/serverDataConnections /{dataConnectionId}
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以获取有关特定数据连接的信息。
curl --location --request GET 'http://localhost/webapi/v3/serverDataConnections/61dec3bc536c221013530fa' \ --header 'Authorization: Bearer BearerTokenGoesHere'
要更改数据连接的
name
,请使用
PUT {baseURL}/v3/serverDataConnections/{dataConnectionId}
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以指定要更新的数据连接。
updateServerConnectionContract (body):必填。输入数据连接的新名称:
name (string):必填。输入数据连接的新名称。
curl --location --request PUT 'http://localhost/webapi/v3/serverDataConnections/61dec3bc5436c21013530fa' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer BearerTokenGoesHere' \ --data-urlencode 'name=Oracle DB Connection'
要将用户添加到服务器数据连接,请使用
POST {baseURL}/v3/serverDataConnections/{dataConnectionId}/users
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以指定要向其中添加用户的数据连接。
contract (body):必填。输入有关要添加到数据连接的用户的信息:
userId (string):必填。指定要添加到数据连接中的用户的 ID。
curl --location --request POST 'http://localhost/webapi/v3/serverDataConnections/61dec3bc5436c221013530fa/users' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer BearerTokenGoesHere' \ --data-urlencode 'userId=61dec95f5436c22101353193'
要将用户组添加到服务器数据连接,请使用
POST {baseURL}/v3/serverDataConnections/{dataConnectionId}/userGroups
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以指定要向其中添加用户组的数据连接。
contract (body):必填。输入有关要添加到数据连接的用户组的信息:
userGroupId (string):必填。指定要添加到数据连接的用户组的 ID。
curl --location --request POST 'http://localhost/webapi/v3/serverDataConnections/61dec3bc5436c221013530fa/userGroups' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer BearerTokenGoesHere' \ --data-urlencode 'userGroupId=61decb225436c2210135336f'
要从服务器数据连接中移除用户,请使用
DELETE {baseURL}/v3/serverDataConnections/{dataConnectionId}/users/{userId}
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以指定要更新的数据连接。
userId (string):必填。输入要从数据连接中移除的用户 ID。
curl --location --request DELETE 'http://localhost/webapi/v3/serverDataConnections/61dec3bc5436c221013530fa/users/61dec95f5436c22101353193' \ --header 'Authorization: Bearer BearerTokenGoesHere'
要从服务器数据连接中移除用户组,请使用
DELETE {baseURL}/v3/serverDataConnections/{dataConnectionId}/userGroups/{userGroupId}
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以指定要更新的数据连接。
userGroupId (string):必填。输入要从数据连接中移除的用户组 ID。
curl --location --request DELETE 'http://localhost/webapi/v3/serverDataConnections/61dec3bc5436c221013530fa/userGroups/61decb225436c2210135336f' \ --header 'Authorization: Bearer BearerTokenGoesHere'
要删除特定的服务器数据连接,请使用
DELETE {baseURL}/v3/serverDataConnections/{dataConnectionId}
端点。
dataConnectionId (string):必填。输入服务器数据连接 ID 以指定要删除的数据连接。
curl --location --request DELETE 'http://localhost/webapi/v3/serverDataConnections/61dec3bc5436c221013530fa' \ --header 'Authorization: Bearer BearerTokenGoesHere'
目前没有 Server 数据连接的引用。修改数据连接的好处是您可以分配或取消分配对这些连接的访问权限。这有助于启用数据源的特定权限。
GET /v3/serverDataConnections

PUT /v3/serverDataConnections/{dataConnectionId}

如需详细了解 Postman 请求,请访问 如何使用 Postman 帮助页面。