- スタート アップ ガイド
- Swagger の定義
- Orchestrator API
アセットの要求
API endpoints for managing assets, including filtering by name and expanding robot values.
グローバルおよびロボットごとのテキスト アセットでは最大 1,000,000 文字がサポートされます。
$filterクエリは、contains関数で Name パラメーターと Description パラメーターを使用したカスタム フィルターの結果を返します。- ロボットの値 (
GET "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Assets/UiPath.Server.Configuration.OData.GetFiltered?%24expand=UserValues") を拡張するアセット要求は、最初にUserValuesを取得してから、RobotValuesに変換します。
特定のアセットを名前で取得する
GetAssetByName エンドポイントを使用して、特定のアセットを名前で取得できます。これは、アセット名が既にわかっている場合に、オートメーション ワークフローの外部でその値を取得する場合に便利です。
GET
/api/Assets/name/{name}/value
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
| X-UIPATH-OrganizationUnitId | フォルダー ID |
要求の例
GET /api/Assets/name/Testing/value
Authorization: Bearer <your-access-token>
X-UIPATH-OrganizationUnitId: {folderId}
GET /api/Assets/name/Testing/value
Authorization: Bearer <your-access-token>
X-UIPATH-OrganizationUnitId: {folderId}
応答コード
200 OK
応答本文
{
"Name": "Testing",
"ValueType": "Credential",
"Value": "username: Testing",
"StringValue": "",
"BoolValue": false,
"IntValue": 0,
"SecretValue": "",
"CredentialUsername": "Testing",
"CredentialPassword": "<your-password>",
"ExternalName": null,
"CredentialStoreId": 1,
"KeyValueList": [],
"ConnectionData": null,
"Id": 1
}
{
"Name": "Testing",
"ValueType": "Credential",
"Value": "username: Testing",
"StringValue": "",
"BoolValue": false,
"IntValue": 0,
"SecretValue": "",
"CredentialUsername": "Testing",
"CredentialPassword": "<your-password>",
"ExternalName": null,
"CredentialStoreId": 1,
"KeyValueList": [],
"ConnectionData": null,
"Id": 1
}
ロボットごとのアセットを取得する
GET 要求を /odata/Assets/UiPath.Server.Configuration.OData.GetRobotAssetByRobotId() エンドポイントに送信するには、URL で robotId と assetName を指定する必要があります。以下の例に示すように、ロボットごとの資格情報アセットではユーザー名のみが返されます。
GET
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Assets/UiPath.Server.Configuration.OData.GetRobotAssetByRobotId(robotId=193,assetName='Testing')
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
応答コード
200 OK
応答本文
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.Assets.RobotAssetDto",
"Name": "Testing",
"ValueType": "Credential",
"StringValue": "",
"BoolValue": false,
"IntValue": 0,
"CredentialUsername": "DocBot",
"CredentialPassword": ""
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.Assets.RobotAssetDto",
"Name": "Testing",
"ValueType": "Credential",
"StringValue": "",
"BoolValue": false,
"IntValue": 0,
"CredentialUsername": "DocBot",
"CredentialPassword": ""
}
アセットを追加する
次の例では、テキスト型の新しいグローバル アセットを作成できます。
POST
https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Assets
要求ヘッダー
| キー | 値 (Value) |
|---|---|
| 認可 | Bearer |
要求本文
{
"Name": "DocAPITest",
"ValueScope": "Global",
"ValueType": "Text",
"StringValue": "An asset added through an API call"
}
{
"Name": "DocAPITest",
"ValueScope": "Global",
"ValueType": "Text",
"StringValue": "An asset added through an API call"
}
応答コード
200 OK
応答本文
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Assets/$entity",
"Name": "DocAPITest",
"CanBeDeleted": true,
"ValueScope": "Global",
"ValueType": "Text",
"Value": "An asset added through an API call",
"StringValue": "An asset added through an API call",
"BoolValue": false,
"IntValue": 0,
"CredentialUsername": "",
"CredentialPassword": "",
"Id": 455,
"KeyValueList": []
}
{
"@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Assets/$entity",
"Name": "DocAPITest",
"CanBeDeleted": true,
"ValueScope": "Global",
"ValueType": "Text",
"Value": "An asset added through an API call",
"StringValue": "An asset added through an API call",
"BoolValue": false,
"IntValue": 0,
"CredentialUsername": "",
"CredentialPassword": "",
"Id": 455,
"KeyValueList": []
}