UiPath Documentation
orchestrator
2.2610
true
Orchestrator api guide

アセットの要求

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": []
}

このページは役に立ちましたか?

接続

ヘルプ リソース サポート(opens in new window)

学習する UiPath アカデミー(opens in new window)

質問する UiPath フォーラム(opens in new window)

最新情報を取得