Lire et examiner la documentation Automation Anywhere

Fermer les contenus

Contenus

Ouvrir les contenus

Lister tous les éléments de travail dans une file d'attente

  • Mis à jour le : 5/06/2020
    • 11.3.x
    • Exploration
    • Enterprise
    • Docs API

Lister tous les éléments de travail dans une file d'attente

Automation Anywhere fournit une API REST qui vous permet de récupérer une liste d'éléments de travail dans une file d'attente donnée.

Prérequis

Rôle AAE_Queue Admin
Vous devez disposer d'un compte utilisateur avec le rôle AAE_Queue Admin pour interroger et gérer les files d'attente des charges de travail et les éléments de travail dans Enterprise Control Room.
Jeton JWT (JSON Web Token)
Toutes les API de la Enterprise Control Room requièrent un jeton JWT pour accéder aux API. Générez un jeton d'authentification à l'aide de l'API d'authentification.
  • URL : https://<your_control_room_url>/v2/wlm/queues/{id}/workitems/list.
  • Méthode POST.

Procédure

  1. Ajouter un jeton d’authentification à l’en-tête de demande.
    Remarque : Utilisez l’API d'authentification pour générer un jeton JWT.
  2. Entrez les paramètres suivants dans le corps de la requête.

    Deux entrées sont requises pour cette demande.

    Id
    7
    Request body:
    {
      "filter": {
        "operator": "and",
        "operands": [
          {
            "field": "id",
            "operator": "gt",
            "value": "30800"
          },
          {
            "field": "id",
            "operator": "lt",
            "value": "30900"
          }
        ]
      },
      "page": {
        "length": 3,
        "offset": 0
      }
    }
  3. Envoyer la demande.
    • Dans un client REST, cliquez sur ENVOYER.
    • Dans l’interface Swagger, cliquez sur Exécuter.
    Corps de réponse :
    {
      "page": {
        "offset": 0,
        "total": 229,
        "totalFilter": 12
      },
      "list": [
        {
          "id": "30888",
          "createdBy": "1",
          "createdOn": "2019-09-10T21:09:50.722Z",
          "updatedBy": "0",
          "updatedOn": "2019-09-10T21:13:46.304Z",
          "version": "5",
          "json": {
            "Invoice Id": "INV0004",
            "Customer Name": "APIName1",
            "Amount": 9007199254740991,
            "email": "API123@gmail.com",
            "Invoice Date": "2017-06-12T00:18:48Z"
          },
          "result": "",
          "deviceId": "3",
          "status": "SUCCESSFUL",
          "startTime": "2019-09-10T21:12:16.599Z",
          "endTime": "2019-09-10T21:13:17.062Z",
          "col1": "INV0004",
          "col2": "APIName1",
          "col3": "9.007199254740991E15",
          "col4": "API123@gmail.com",
          "col5": "2017-06-12T00:18:48Z",
          "deviceUserId": "0",
          "queueId": "7",
          "comment": "",
          "automationId": "6",
          "totalPausedTime": "0",
          "error": "",
          "col6": "",
          "col7": "",
          "col8": "",
          "col9": "",
          "col10": ""
        },
        {
          "id": "30889",
          "createdBy": "1",
          "createdOn": "2019-09-10T21:09:51.383Z",
          "updatedBy": "0",
          "updatedOn": "2019-09-10T21:13:46.255Z",
          "version": "5",
          "json": {
            "Invoice Id": "INV0004",
            "Customer Name": "APIName1",
            "Amount": 9007199254740991,
            "email": "API123@gmail.com",
            "Invoice Date": "2017-06-12T00:18:48Z"
          },
          "result": "",
          "deviceId": "4",
          "status": "SUCCESSFUL",
          "startTime": "2019-09-10T21:12:23.841Z",
          "endTime": "2019-09-10T21:13:24.265Z",
          "col1": "INV0004",
          "col2": "APIName1",
          "col3": "9.007199254740991E15",
          "col4": "API123@gmail.com",
          "col5": "2017-06-12T00:18:48Z",
          "deviceUserId": "0",
          "queueId": "7",
          "comment": "",
          "automationId": "6",
          "totalPausedTime": "0",
          "error": "",
          "col6": "",
          "col7": "",
          "col8": "",
          "col9": "",
          "col10": ""
        },
        {
          "id": "30890",
          "createdBy": "1",
          "createdOn": "2019-09-10T21:09:52.324Z",
          "updatedBy": "0",
          "updatedOn": "2019-09-10T21:13:46.347Z",
          "version": "5",
          "json": {
            "Invoice Id": "INV0004",
            "Customer Name": "APIName1",
            "Amount": 9007199254740991,
            "email": "API123@gmail.com",
            "Invoice Date": "2017-06-12T00:18:48Z"
          },
          "result": "",
          "deviceId": "5",
          "status": "SUCCESSFUL",
          "startTime": "2019-09-10T21:12:29.501Z",
          "endTime": "2019-09-10T21:13:30.102Z",
          "col1": "INV0004",
          "col2": "APIName1",
          "col3": "9.007199254740991E15",
          "col4": "API123@gmail.com",
          "col5": "2017-06-12T00:18:48Z",
          "deviceUserId": "0",
          "queueId": "7",
          "comment": "",
          "automationId": "6",
          "totalPausedTime": "0",
          "error": "",
          "col6": "",
          "col7": "",
          "col8": "",
          "col9": "",
          "col10": ""
        }
      ]
    }
    En-tête de réponse :
     cache-control: no-cache, no-store, max-age=0, must-revalidate 
     connection: keep-alive 
     content-security-policy: default-src 'self' 
     content-type: application/json 
     date: Tue, 24 Sep 2019 19:40:09 GMT 
     expires: 0 
     pragma: no-cache 
     transfer-encoding: chunked 
     x-content-type-options: nosniff 
     x-frame-options: SAMEORIGIN 
     x-xss-protection: 1; mode=block 
Envoyer le commentaire