orchestrator
2023.10
false
UiPath logo, featuring letters U and I in white
Guide de l'API Orchestrator
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 22 juin 2024

Requêtes relatives aux transactions

Remarque : les éléments de la file d'attente ne peuvent être traités que par les Robots. Par exemple, l'envoi d'une requête POST au point de terminaison /odata/Queues/UiPathODataSvc.StartTransaction nécessite des informations qui ne sont disponibles que pour le Robot.

Affichage de l'historique d'un élément

L'appel suivant permet d'afficher toutes les actions par lesquelles un élément spécifique de file d'attente est passé.

Obtenir

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItemEvents/UiPath.Server.Configuration.OData.GetQueueItemEventsHistory(queueItemId=1050203)?$orderby=Timestamp&$top=10

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemEvents",
    "@odata.count": 5,
    "value": [
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T16:02:59.09Z",
            "Action": "Create",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "New",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 18276
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T18:15:04.46Z",
            "Action": "Status",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 20333
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T18:15:05.07Z",
            "Action": "Edit",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 20334
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T18:15:05.507Z",
            "Action": "Edit",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "Failed",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 20335
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-08T10:47:40.463Z",
            "Action": "Edit",
            "Data": null,
            "UserId": 583,
            "UserName": "admin",
            "Status": "Failed",
            "ReviewStatus": "None",
            "ReviewerUserId": 583,
            "ReviewerUserName": "admin",
            "Id": 21240
        }
    ]
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemEvents",
    "@odata.count": 5,
    "value": [
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T16:02:59.09Z",
            "Action": "Create",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "New",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 18276
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T18:15:04.46Z",
            "Action": "Status",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 20333
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T18:15:05.07Z",
            "Action": "Edit",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 20334
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-07T18:15:05.507Z",
            "Action": "Edit",
            "Data": null,
            "UserId": 910,
            "UserName": "DocBot",
            "Status": "Failed",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "ReviewerUserName": null,
            "Id": 20335
        },
        {
            "QueueItemId": 1050203,
            "Timestamp": "2018-03-08T10:47:40.463Z",
            "Action": "Edit",
            "Data": null,
            "UserId": 583,
            "UserName": "admin",
            "Status": "Failed",
            "ReviewStatus": "None",
            "ReviewerUserId": 583,
            "ReviewerUserName": "admin",
            "Id": 21240
        }
    ]
}

Récupération du délai d'exécution moyen pour une file d'attente spécifique

La requête suivante permet de voir le délai d'exécution moyen des éléments dans une file d'attente indiquée.

Remarque : Ce type de requête peut être uniquement filtré selon le nom de la file d'attente ou la description, et pas l'ID de file d'attente.

Obtenir

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueProcessingRecords/UiPathODataSvc.RetrieveQueuesProcessingStatus?$filter=QueueDefinitionName eq 'DocQueue'

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Core.Model.Queues.QueueProcessingStatus)",
    "@odata.count": 1,
    "value": [
        {
            "ItemsToProcess": 682,
            "ItemsInProgress": 0,
            "QueueDefinitionId": 188,
            "QueueDefinitionName": "DocQueue",
            "QueueDefinitionDescription": null,
            "QueueDefinitionAcceptAutomaticallyRetry": true,
            "QueueDefinitionMaxNumberOfRetries": 5,
            "QueueDefinitionEnforceUniqueReference": false,
            "ProcessingMeanTime": 2.15,
            "SuccessfulTransactionsNo": 0,
            "ApplicationExceptionsNo": 0,
            "BusinessExceptionsNo": 883,
            "SuccessfulTransactionsProcessingTime": 0,
            "ApplicationExceptionsProcessingTime": 0,
            "BusinessExceptionsProcessingTime": 2.15,
            "TotalNumberOfTransactions": 883,
            "LastProcessed": "2018-03-07T18:20:29.3833333Z"
        }
    ]
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Collection(UiPath.Core.Model.Queues.QueueProcessingStatus)",
    "@odata.count": 1,
    "value": [
        {
            "ItemsToProcess": 682,
            "ItemsInProgress": 0,
            "QueueDefinitionId": 188,
            "QueueDefinitionName": "DocQueue",
            "QueueDefinitionDescription": null,
            "QueueDefinitionAcceptAutomaticallyRetry": true,
            "QueueDefinitionMaxNumberOfRetries": 5,
            "QueueDefinitionEnforceUniqueReference": false,
            "ProcessingMeanTime": 2.15,
            "SuccessfulTransactionsNo": 0,
            "ApplicationExceptionsNo": 0,
            "BusinessExceptionsNo": 883,
            "SuccessfulTransactionsProcessingTime": 0,
            "ApplicationExceptionsProcessingTime": 0,
            "BusinessExceptionsProcessingTime": 2.15,
            "TotalNumberOfTransactions": 883,
            "LastProcessed": "2018-03-07T18:20:29.3833333Z"
        }
    ]
}

Modification du réviseur d'un élément de file d'attente

L'exemple suivant permet de modifier le réviseur de l'élément de transaction en échec avec l'ID 1050200.

Remarque : la valeur du paramètre RowVersion change chaque fois qu'une mise à jour est effectuée sur un élément de la file d'attente. Pour récupérer ces informations, exécutez un appel GET sur le point de terminaison /odata/QueueItems(), tel que https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems(1050200).

Publier

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems/UiPathODataSvc.SetItemReviewer

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Corps de la requête

{
    "queueItems": [{
        "Id": 1050200, 
        "RowVersion":"AAAAAABDIK8="
    }], 
    "userId": 583
}{
    "queueItems": [{
        "Id": 1050200, 
        "RowVersion":"AAAAAABDIK8="
    }], 
    "userId": 583
}

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfInt64",
    "Success": true,
    "Message": null,
    "FailedItems": []
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfInt64",
    "Success": true,
    "Message": null,
    "FailedItems": []
}

Récupération les éléments de file d'attente avec le statut de révision indiqué

Cet exemple permet d'extraire les deux premiers éléments de file d'attente dont le statut de révision est défini sur En révision.

Obtenir

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems?$filter=ReviewStatus eq 'InReview'&$top=2

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
    "@odata.count": 3,
    "value": [
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "Failed",
            "ReviewStatus": "InReview",
            "ReviewerUserId": 583,
            "Key": "e4760d27-a76d-4469-b7e6-fbda2f732b10",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": "BusinessException",
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T18:14:56.633Z",
            "EndProcessing": "2018-03-07T18:14:58.723Z",
            "SecondsInPreviousAttempts": 2,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified credential by using a provided AssetName, and returns a username and a secure password.\"}}",
            "CreationTime": "2018-03-07T16:02:57.547Z",
            "Progress": null,
            "RowVersion": "AAAAAABDFiU=",
            "Id": 1050199,
            "ProcessingException": {
                "Reason": "authentication",
                "Details": null,
                "Type": "BusinessException",
                "AssociatedImageFilePath": null,
                "CreationTime": "2018-03-07T18:14:58.723Z"
            },
            "SpecificContent": {
                "Description": "Gets a specified credential by using a provided AssetName, and returns a username and a secure password."
            },
            "Output": null
        },
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "Failed",
            "ReviewStatus": "InReview",
            "ReviewerUserId": 583,
            "Key": "e90e8067-50fc-407a-9678-eede311f815a",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": "BusinessException",
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T18:14:54.85Z",
            "EndProcessing": "2018-03-07T18:14:57.103Z",
            "SecondsInPreviousAttempts": 2,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved.\"}}",
            "CreationTime": "2018-03-07T16:02:57.287Z",
            "Progress": null,
            "RowVersion": "AAAAAABDFiY=",
            "Id": 1050198,
            "ProcessingException": {
                "Reason": "authentication",
                "Details": null,
                "Type": "BusinessException",
                "AssociatedImageFilePath": null,
                "CreationTime": "2018-03-07T18:14:57.103Z"
            },
            "SpecificContent": {
                "Description": "Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved."
            },
            "Output": null
        }
    ]
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
    "@odata.count": 3,
    "value": [
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "Failed",
            "ReviewStatus": "InReview",
            "ReviewerUserId": 583,
            "Key": "e4760d27-a76d-4469-b7e6-fbda2f732b10",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": "BusinessException",
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T18:14:56.633Z",
            "EndProcessing": "2018-03-07T18:14:58.723Z",
            "SecondsInPreviousAttempts": 2,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified credential by using a provided AssetName, and returns a username and a secure password.\"}}",
            "CreationTime": "2018-03-07T16:02:57.547Z",
            "Progress": null,
            "RowVersion": "AAAAAABDFiU=",
            "Id": 1050199,
            "ProcessingException": {
                "Reason": "authentication",
                "Details": null,
                "Type": "BusinessException",
                "AssociatedImageFilePath": null,
                "CreationTime": "2018-03-07T18:14:58.723Z"
            },
            "SpecificContent": {
                "Description": "Gets a specified credential by using a provided AssetName, and returns a username and a secure password."
            },
            "Output": null
        },
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "Failed",
            "ReviewStatus": "InReview",
            "ReviewerUserId": 583,
            "Key": "e90e8067-50fc-407a-9678-eede311f815a",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": "BusinessException",
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T18:14:54.85Z",
            "EndProcessing": "2018-03-07T18:14:57.103Z",
            "SecondsInPreviousAttempts": 2,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved.\"}}",
            "CreationTime": "2018-03-07T16:02:57.287Z",
            "Progress": null,
            "RowVersion": "AAAAAABDFiY=",
            "Id": 1050198,
            "ProcessingException": {
                "Reason": "authentication",
                "Details": null,
                "Type": "BusinessException",
                "AssociatedImageFilePath": null,
                "CreationTime": "2018-03-07T18:14:57.103Z"
            },
            "SpecificContent": {
                "Description": "Gets a specified asset by using a provided AssetName. If the asset is not global, it must be assigned to the local robot in order to be retrieved."
            },
            "Output": null
        }
    ]
}

Ajout d'un élément de file d'attente

Cet exemple permet d'ajouter un élément à la file d'attente « DocQueue », avec une haute priorité, des dates de report et d'échéance et deux arguments contenant des valeurs. Tous les éléments ajoutés comme celui-ci ont le statut Nouveau, tout comme l' activité Ajouter un élément de la filed'attente.

Notez que le paramètre SpecificContent doit être uniquement rempli à l'aide de valeurs de primitives.

Publier

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Queues/UiPathODataSvc.AddQueueItem

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Corps de la requête

{
    "itemData": {
        "Priority": "High",
        "DeferDate": "2018-03-21T13:42:27.654Z",
        "DueDate": "2018-03-25T13:42:27.654Z",
        "Name": "DocQueue",
        "SpecificContent": {
            "Email": "obrian@uipath.com", 
            "Name": "O'Brian"
        }
    }
}{
    "itemData": {
        "Priority": "High",
        "DeferDate": "2018-03-21T13:42:27.654Z",
        "DueDate": "2018-03-25T13:42:27.654Z",
        "Name": "DocQueue",
        "SpecificContent": {
            "Email": "obrian@uipath.com", 
            "Name": "O'Brian"
        }
    }
}

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#queueItem/$entity",
    "QueueDefinitionId": 188,
    "OutputData": null,
    "Status": "New",
    "ReviewStatus": "None",
    "ReviewerUserId": null,
    "Key": "e9cb2205-0232-4b99-9556-52dc2e686663",
    "Reference": null,
    "ProcessingExceptionType": null,
    "DueDate": "2018-03-25T13:42:27.654Z",
    "Priority": "High",
    "DeferDate": "2018-03-21T13:42:27.654Z",
    "StartProcessing": null,
    "EndProcessing": null,
    "SecondsInPreviousAttempts": 0,
    "AncestorId": null,
    "RetryNumber": 0,
    "SpecificData": "{\"DynamicProperties\":{\"Email\":\"obrian@uipath.com\",\"Name\":\"O'brian\"}}",
    "CreationTime": "2018-03-21T15:31:27.2699068Z",
    "Progress": null,
    "RowVersion": "AAAAAABDGLk=",
    "Id": 1050947,
    "ProcessingException": null,
    "SpecificContent": {
        "Email": "obrian@uipath.com",
        "Name": "O'Brian"
    },
    "Output": null
}}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#queueItem/$entity",
    "QueueDefinitionId": 188,
    "OutputData": null,
    "Status": "New",
    "ReviewStatus": "None",
    "ReviewerUserId": null,
    "Key": "e9cb2205-0232-4b99-9556-52dc2e686663",
    "Reference": null,
    "ProcessingExceptionType": null,
    "DueDate": "2018-03-25T13:42:27.654Z",
    "Priority": "High",
    "DeferDate": "2018-03-21T13:42:27.654Z",
    "StartProcessing": null,
    "EndProcessing": null,
    "SecondsInPreviousAttempts": 0,
    "AncestorId": null,
    "RetryNumber": 0,
    "SpecificData": "{\"DynamicProperties\":{\"Email\":\"obrian@uipath.com\",\"Name\":\"O'brian\"}}",
    "CreationTime": "2018-03-21T15:31:27.2699068Z",
    "Progress": null,
    "RowVersion": "AAAAAABDGLk=",
    "Id": 1050947,
    "ProcessingException": null,
    "SpecificContent": {
        "Email": "obrian@uipath.com",
        "Name": "O'Brian"
    },
    "Output": null
}}

Ajout de plusieurs éléments de file d'attente

Important :
Si vous êtes affecté à plusieurs dossiers, votre requête doit contenir un en-tête HTTP fournissant le FolderId ou le FolderPath de la file d’attente souhaitée. Voir ici pour plus de détails.
Si elle n'est pas incluse, la requête échoue avec l'erreur suivante : An organization unit is required for this action.

Les exemples ci-dessous nous permettent d'ajouter plusieurs éléments en même temps à la file d'attente « DocTest » qui a été configurée pour autoriser uniquement les références uniques. Une fois les éléments ajoutés, ils ont tous le statut Nouveau (New ).

Il est recommandé de spécifier le type de données pour le contenu Données spécifiques. Par exemple, si le champ Nom contient des données de type String, vous devez ajouter une paire clé:valeur supplémentaire en utilisant la syntaxe suivante "Name@odata.type": "#string". Voir les exemples ci-dessous.

Le premier exemple est réussi, tandis que le second échoue car les éléments manquent des références requises pour les files d'attente à référence unique.

Il existe deux stratégies de téléchargement permettant d'ajouter plusieurs éléments de file d'attente :

  • AllOrNothing : ajoute des éléments de file d'attente uniquement si aucune erreur n'est rencontrée. Sinon, il n'insère rien et renvoie la ligne où l'erreur s'est produite.
  • ProcessAllIndependently : ajoute tous vos éléments et renvoie une liste de tous ceux qui ont échoué.
    Remarque :

    Les requêtes ayant échoué renvoient 200 OK, car les éléments ayant échoué sont renvoyés dans le corps de la réponse, comme vous pouvez le voir dans le deuxième exemple.

    Les seules requêtes qui ne renvoient pas 200 OK sont celles dans lesquelles les paramètres d'entrée sont incorrects.

Requête réussie

Publier

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Queues/UiPathODataSvc.BulkAddQueueItems

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Corps de la requête

{
    "queueName": "DocTest",
    "commitType": "AllOrNothing",
    "queueItems": [{
            "Priority": "High",
            "SpecificContent": {
                "Name": "rêvé",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
            "Reference": "ref4"
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "même",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
            "Reference": "ref5"
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "Žao",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
            "Reference": "ref6"
        }
    ]
}{
    "queueName": "DocTest",
    "commitType": "AllOrNothing",
    "queueItems": [{
            "Priority": "High",
            "SpecificContent": {
                "Name": "rêvé",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
            "Reference": "ref4"
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "même",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
            "Reference": "ref5"
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "Žao",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
            "Reference": "ref6"
        }
    ]
}

Codes de réponse

200 OK

Corps de la réponse

{
  "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
  "Success": true,
  "Message": null,
  "FailedItems": []
}{
  "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
  "Success": true,
  "Message": null,
  "FailedItems": []
}

Échec de la requête

Publier

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Queues/UiPathODataSvc.BulkAddQueueItems

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Corps de la requête

{
    "queueName": "DocTest",
    "commitType": "AllOrNothing",
    "queueItems": [{
            "Priority": "High",
            "SpecificContent": {
                "Name": "rêvé",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "même",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "Žao",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
        }
    ]
}{
    "queueName": "DocTest",
    "commitType": "AllOrNothing",
    "queueItems": [{
            "Priority": "High",
            "SpecificContent": {
                "Name": "rêvé",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "même",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
        },
        {
            "Priority": "High",
            "SpecificContent": {
                "Name": "Žao",
                "Name@odata.type": "#String"
            },
            "DeferDate": "2019-03-14T12:20:13.290Z",
            "DueDate": "2019-03-14T12:20:13.290Z",
        }
    ]
}

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
    "Success": false,
    "Message": "Some items have not been inserted.",
    "FailedItems": [{
        "Ordinal": 1,
        "ErrorCode": "TransactionReferenceRequired",
        "ErrorMessage": "Error creating Transaction. Reference is required for Unique Reference Queues."
    }]
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Application.Dto.BulkOperationResponseDto_1OfFailedQueueItemDto",
    "Success": false,
    "Message": "Some items have not been inserted.",
    "FailedItems": [{
        "Ordinal": 1,
        "ErrorCode": "TransactionReferenceRequired",
        "ErrorMessage": "Error creating Transaction. Reference is required for Unique Reference Queues."
    }]
}

Récupération des transactions en fonction de leur état et de leur ID de Robot

L'exemple ci-dessous interroge la base de données Orchestrator concernant les 10 premiers éléments de file d'attente ayant le statut En cours (In Progress), qui ont été traités par le Robot avec l'ID 749. Enfin, les informations du Robot sont développées. Notez que la réponse a été tronquée.

Obtenir

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems?$top=10&$expand=Robot&$filter=Status eq 'InProgress' and Robot/Id eq 749

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
    "@odata.count": 1752,
    "value": [
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "Key": "1c632cc1-44ab-4624-bace-6fbb5fd1c0cd",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": null,
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T15:05:05.113Z",
            "EndProcessing": null,
            "SecondsInPreviousAttempts": 0,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Checks if Stop was triggered in UiPath Orchestrator.\"}}",
            "CreationTime": "2018-03-05T18:39:16.06Z",
            "Progress": null,
            "RowVersion": "AAAAAABC3aA=",
            "Id": 1048065,
            "ProcessingException": null,
            "SpecificContent": {
                "Description": "Checks if Stop was triggered in UiPath Orchestrator."
            },
            "Output": null,
            "Robot": {
                "LicenseKey": null,
                "MachineName": "MBOBOC",
                "Name": "DocBot",
                "Username": "UIPATH\\MADALINA.BOBOC",
                "Description": null,
                "Type": "NonProduction",
                "Password": null,
                "RobotEnvironments": "",
                "Id": 749,
                "ExecutionSettings": null
            }
        },
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "Key": "7dfa834b-8398-476e-bd18-b0fa51d4ddf6",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": null,
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T15:05:04.503Z",
            "EndProcessing": null,
            "SecondsInPreviousAttempts": 0,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Sets the status of a transaction item to Failed or Successful.\"}}",
            "CreationTime": "2018-03-05T18:39:15.627Z",
            "Progress": null,
            "RowVersion": "AAAAAABC3Z8=",
            "Id": 1048064,
            "ProcessingException": null,
            "SpecificContent": {
                "Description": "Sets the status of a transaction item to Failed or Successful."
            },
            "Output": null,
            "Robot": {
                "LicenseKey": null,
                "MachineName": "MBOBOC",
                "Name": "DocBot",
                "Username": "UIPATH\\MADALINA.BOBOC",
                "Description": null,
                "Type": "NonProduction",
                "Password": null,
                "RobotEnvironments": "",
                "Id": 749,
                "ExecutionSettings": null
            }
        }
    ]
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItems",
    "@odata.count": 1752,
    "value": [
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "Key": "1c632cc1-44ab-4624-bace-6fbb5fd1c0cd",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": null,
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T15:05:05.113Z",
            "EndProcessing": null,
            "SecondsInPreviousAttempts": 0,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Checks if Stop was triggered in UiPath Orchestrator.\"}}",
            "CreationTime": "2018-03-05T18:39:16.06Z",
            "Progress": null,
            "RowVersion": "AAAAAABC3aA=",
            "Id": 1048065,
            "ProcessingException": null,
            "SpecificContent": {
                "Description": "Checks if Stop was triggered in UiPath Orchestrator."
            },
            "Output": null,
            "Robot": {
                "LicenseKey": null,
                "MachineName": "MBOBOC",
                "Name": "DocBot",
                "Username": "UIPATH\\MADALINA.BOBOC",
                "Description": null,
                "Type": "NonProduction",
                "Password": null,
                "RobotEnvironments": "",
                "Id": 749,
                "ExecutionSettings": null
            }
        },
        {
            "QueueDefinitionId": 188,
            "OutputData": null,
            "Status": "InProgress",
            "ReviewStatus": "None",
            "ReviewerUserId": null,
            "Key": "7dfa834b-8398-476e-bd18-b0fa51d4ddf6",
            "Reference": "ActivityDescription",
            "ProcessingExceptionType": null,
            "DueDate": null,
            "Priority": "High",
            "DeferDate": null,
            "StartProcessing": "2018-03-07T15:05:04.503Z",
            "EndProcessing": null,
            "SecondsInPreviousAttempts": 0,
            "AncestorId": null,
            "RetryNumber": 0,
            "SpecificData": "{\"DynamicProperties\":{\"Description\":\"Sets the status of a transaction item to Failed or Successful.\"}}",
            "CreationTime": "2018-03-05T18:39:15.627Z",
            "Progress": null,
            "RowVersion": "AAAAAABC3Z8=",
            "Id": 1048064,
            "ProcessingException": null,
            "SpecificContent": {
                "Description": "Sets the status of a transaction item to Failed or Successful."
            },
            "Output": null,
            "Robot": {
                "LicenseKey": null,
                "MachineName": "MBOBOC",
                "Name": "DocBot",
                "Username": "UIPATH\\MADALINA.BOBOC",
                "Description": null,
                "Type": "NonProduction",
                "Password": null,
                "RobotEnvironments": "",
                "Id": 749,
                "ExecutionSettings": null
            }
        }
    ]
}

Récupération de commentaires pour un élément spécifique

L'exemple ci-dessous affiche tous les commentaires de l'élément de file d'attente avec l'ID 1050204, par ordre croissant de création.

Obtenir

https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItemComments/UiPath.Server.Configuration.OData.GetQueueItemCommentsHistory(queueItemId=1050204)?$orderby=CreationTime%20desc

En-têtes de requête.

Clé (Key)

Valeur (Value)

Autorisation

Porteur

Codes de réponse

200 OK

Corps de la réponse

{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemComments",
    "@odata.count": 2,
    "value": [
        {
            "Text": "needs review asap",
            "QueueItemId": 1050204,
            "CreationTime": "2018-03-08T13:41:49.167Z",
            "UserId": 583,
            "UserName": "admin",
            "Id": 320
        },
        {
            "Text": "fixed. excel hiccup.",
            "QueueItemId": 1050204,
            "CreationTime": "2018-03-08T13:46:48.613Z",
            "UserId": 901,
            "UserName": "dragomirmir",
            "Id": 321
        }
    ]
}{
    "@odata.context": "https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#QueueItemComments",
    "@odata.count": 2,
    "value": [
        {
            "Text": "needs review asap",
            "QueueItemId": 1050204,
            "CreationTime": "2018-03-08T13:41:49.167Z",
            "UserId": 583,
            "UserName": "admin",
            "Id": 320
        },
        {
            "Text": "fixed. excel hiccup.",
            "QueueItemId": 1050204,
            "CreationTime": "2018-03-08T13:46:48.613Z",
            "UserId": 901,
            "UserName": "dragomirmir",
            "Id": 321
        }
    ]
}

Cette page vous a-t-elle été utile ?

Obtenez l'aide dont vous avez besoin
Formation RPA - Cours d'automatisation
Forum de la communauté UiPath
Uipath Logo White
Confiance et sécurité
© 2005-2024 UiPath Tous droits réservés.