Orchestrator
2022.10
False
Bannerhintergrundbild
Anleitung für die Orchestrator-API
Letzte Aktualisierung 10. Nov. 2023

Anfragen zu Assets

Hinweis: Globale und Pro Roboter-Textassets unterstützen bis zu 1.000.000 Zeichen.
Wichtig:
  1. $filter-Abfragen geben das Ergebnis eines benutzerdefinierten Filters zurück, der die Parameter Name und Beschreibung in einer contains-Funktion verwendet.
  2. Asset-Anforderungen, die Roboterwerte (GET "/odata/Assets/UiPath.Server.Configuration.OData.GetFiltered?%24expand=UserValues") erweitern, rufen zuerst UserValues ab, das sie dann in RobotValues umwandeln.

Abrufen eines bestimmten Assets

Mit dem folgenden Aufruf können Sie alle verfügbaren Informationen für das Asset mit dem DocAPITest -Namen und der 455 -ID anzeigen.

Abrufen

/odata/Assets/UiPath.Server.Configuration.OData.GetRobotAsset(robotId='455',assetName='DocAPITest')

Anforderungsheader

Schlüssel

Wert

Autorisierung

Inhaber

Antwortcode

200 OK

Antworttext

{
    "@odata.context": "/odata/$metadata#UiPath.Application.Dto.Assets.RobotAssetDto",
    "Name": "DocAPITest",
    "ValueType": "Text",
    "StringValue": "An asset added through an API call",
    "BoolValue": false,
    "IntValue": 0,
    "CredentialUsername": "",
    "CredentialPassword": ""
}{
    "@odata.context": "/odata/$metadata#UiPath.Application.Dto.Assets.RobotAssetDto",
    "Name": "DocAPITest",
    "ValueType": "Text",
    "StringValue": "An asset added through an API call",
    "BoolValue": false,
    "IntValue": 0,
    "CredentialUsername": "",
    "CredentialPassword": ""
}

Abrufen nach Roboter-Assets

Um eine GET-Abfrage an den Endpunkt /odata/Assets/UiPath.Server.Configuration.OData.GetRobotAssetByRobotId() durchzuführen, müssen Sie robotId und assetName in der URL angeben. Bitte beachten Sie, dass nur der Benutzername für Assets nach Roboter-Anmeldedaten zurückgegeben wird, wie Sie im folgenden Beispiel sehen können.

Abrufen

/odata/Assets/UiPath.Server.Configuration.OData.GetRobotAssetByRobotId(robotId=193,assetName='Testing')

Anforderungsheader

Schlüssel

Wert

Autorisierung

Inhaber

Antwortcode

200 OK

Antworttext

{
  "@odata.context": "/odata/$metadata#UiPath.Application.Dto.Assets.RobotAssetDto",
  "Name": "Testing",
  "ValueType": "Credential",
  "StringValue": "",
  "BoolValue": false,
  "IntValue": 0,
  "CredentialUsername": "DocBot",
  "CredentialPassword": ""
}{
  "@odata.context": "/odata/$metadata#UiPath.Application.Dto.Assets.RobotAssetDto",
  "Name": "Testing",
  "ValueType": "Credential",
  "StringValue": "",
  "BoolValue": false,
  "IntValue": 0,
  "CredentialUsername": "DocBot",
  "CredentialPassword": ""
}

Hinzufügen eines Assets

Im folgenden Beispiel können Sie ein neues globales Asset vom Typ Text erstellen.

Posten

/odata/Assets

Anforderungsheader

Schlüssel

Wert

Autorisierung

Inhaber

Anforderungstext

{
    "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"
}

Antwortcode

200 OK

Antworttext

{
    "@odata.context": "/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": "/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": []
}

War diese Seite hilfreich?

Hilfe erhalten
RPA lernen – Automatisierungskurse
UiPath Community-Forum
UiPath Logo weiß
Vertrauen und Sicherheit
© 2005-2024 UiPath. All rights reserved.