communications-mining
latest
false
Wichtig :
Dieser Inhalt wurde maschinell übersetzt.
UiPath logo, featuring letters U and I in white

Communications Mining-Entwicklerhandbuch

Letzte Aktualisierung 26. Nov. 2024

Anmerkungen

Fügen Sie Kommentare hinzu oder aktualisieren Sie sie

/api/v1/sources/<project>/<source_name>/sync

Erforderliche Berechtigungen: Nachrichten bearbeiten.

Wichtig:

Abrechenbarer Vorgang

Ihnen wird 1 AI Unit pro erstelltem Kommentar oder pro aktualisiertem Kommentar (basierend auf der eindeutigen ID) in Rechnung gestellt, wenn dessen Text geändert wurde.

  • Bash
    curl -X POST 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "comments": [
        {
          "id": "0123456789abcdef",
          "messages": [
            {
              "body": {
                "text": "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob"
              },
              "from": "bob@organisation.org",
              "sent_at": "2011-12-11T11:05:10.000000+00:00",
              "subject": {
                "text": "Today'"'"'s figures"
              },
              "to": [
                "alice@company.com"
              ]
            }
          ],
          "timestamp": "2011-12-11T11:05:10.000000+00:00",
          "user_properties": {
            "string:Recipient Domain": "company.com",
            "string:Sender Domain": "organisation.org"
          }
        },
        {
          "id": "abcdef0123456789",
          "messages": [
            {
              "body": {
                "text": "Hi Bob,\n\nI think these are the wrong numbers - could you check?\n\nThanks again,\nAlice"
              },
              "from": "alice@company.com",
              "sent_at": "2011-12-11T11:18:43.000000+00:00",
              "subject": {
                "text": "Today'"'"'s figures"
              },
              "to": [
                "bob@organisation.org"
              ]
            }
          ],
          "timestamp": "2011-12-11T11:18:43.000000+00:00",
          "user_properties": {
            "string:Recipient Domain": "organisation.org",
            "string:Sender Domain": "company.com"
          }
        }
      ]
    }'curl -X POST 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "comments": [
        {
          "id": "0123456789abcdef",
          "messages": [
            {
              "body": {
                "text": "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob"
              },
              "from": "bob@organisation.org",
              "sent_at": "2011-12-11T11:05:10.000000+00:00",
              "subject": {
                "text": "Today'"'"'s figures"
              },
              "to": [
                "alice@company.com"
              ]
            }
          ],
          "timestamp": "2011-12-11T11:05:10.000000+00:00",
          "user_properties": {
            "string:Recipient Domain": "company.com",
            "string:Sender Domain": "organisation.org"
          }
        },
        {
          "id": "abcdef0123456789",
          "messages": [
            {
              "body": {
                "text": "Hi Bob,\n\nI think these are the wrong numbers - could you check?\n\nThanks again,\nAlice"
              },
              "from": "alice@company.com",
              "sent_at": "2011-12-11T11:18:43.000000+00:00",
              "subject": {
                "text": "Today'"'"'s figures"
              },
              "to": [
                "bob@organisation.org"
              ]
            }
          ],
          "timestamp": "2011-12-11T11:18:43.000000+00:00",
          "user_properties": {
            "string:Recipient Domain": "organisation.org",
            "string:Sender Domain": "company.com"
          }
        }
      ]
    }'
    
  • Knoten
    const request = require("request");
    
    request.post(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          comments: [
            {
              id: "0123456789abcdef",
              messages: [
                {
                  body: {
                    text: "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob",
                  },
                  from: "bob@organisation.org",
                  sent_at: "2011-12-11T11:05:10.000000+00:00",
                  subject: { text: "Today's figures" },
                  to: ["alice@company.com"],
                },
              ],
              timestamp: "2011-12-11T11:05:10.000000+00:00",
              user_properties: {
                "string:Recipient Domain": "company.com",
                "string:Sender Domain": "organisation.org",
              },
            },
            {
              id: "abcdef0123456789",
              messages: [
                {
                  body: {
                    text: "Hi Bob,\n\nI think these are the wrong numbers - could you check?\n\nThanks again,\nAlice",
                  },
                  from: "alice@company.com",
                  sent_at: "2011-12-11T11:18:43.000000+00:00",
                  subject: { text: "Today's figures" },
                  to: ["bob@organisation.org"],
                },
              ],
              timestamp: "2011-12-11T11:18:43.000000+00:00",
              user_properties: {
                "string:Recipient Domain": "organisation.org",
                "string:Sender Domain": "company.com",
              },
            },
          ],
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.post(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          comments: [
            {
              id: "0123456789abcdef",
              messages: [
                {
                  body: {
                    text: "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob",
                  },
                  from: "bob@organisation.org",
                  sent_at: "2011-12-11T11:05:10.000000+00:00",
                  subject: { text: "Today's figures" },
                  to: ["alice@company.com"],
                },
              ],
              timestamp: "2011-12-11T11:05:10.000000+00:00",
              user_properties: {
                "string:Recipient Domain": "company.com",
                "string:Sender Domain": "organisation.org",
              },
            },
            {
              id: "abcdef0123456789",
              messages: [
                {
                  body: {
                    text: "Hi Bob,\n\nI think these are the wrong numbers - could you check?\n\nThanks again,\nAlice",
                  },
                  from: "alice@company.com",
                  sent_at: "2011-12-11T11:18:43.000000+00:00",
                  subject: { text: "Today's figures" },
                  to: ["bob@organisation.org"],
                },
              ],
              timestamp: "2011-12-11T11:18:43.000000+00:00",
              user_properties: {
                "string:Recipient Domain": "organisation.org",
                "string:Sender Domain": "company.com",
              },
            },
          ],
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.post(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "comments": [
                {
                    "id": "0123456789abcdef",
                    "timestamp": "2011-12-11T11:05:10.000000+00:00",
                    "messages": [
                        {
                            "from": "bob@organisation.org",
                            "to": ["alice@company.com"],
                            "sent_at": "2011-12-11T11:05:10.000000+00:00",
                            "subject": {"text": "Today's figures"},
                            "body": {
                                "text": "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob"
                            },
                        }
                    ],
                    "user_properties": {
                        "string:Sender Domain": "organisation.org",
                        "string:Recipient Domain": "company.com",
                    },
                },
                {
                    "id": "abcdef0123456789",
                    "timestamp": "2011-12-11T11:18:43.000000+00:00",
                    "messages": [
                        {
                            "from": "alice@company.com",
                            "to": ["bob@organisation.org"],
                            "sent_at": "2011-12-11T11:18:43.000000+00:00",
                            "subject": {"text": "Today's figures"},
                            "body": {
                                "text": "Hi Bob,\n\nI think these are the wrong numbers - could you check?\n\nThanks again,\nAlice"
                            },
                        }
                    ],
                    "user_properties": {
                        "string:Sender Domain": "company.com",
                        "string:Recipient Domain": "organisation.org",
                    },
                },
            ]
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.post(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "comments": [
                {
                    "id": "0123456789abcdef",
                    "timestamp": "2011-12-11T11:05:10.000000+00:00",
                    "messages": [
                        {
                            "from": "bob@organisation.org",
                            "to": ["alice@company.com"],
                            "sent_at": "2011-12-11T11:05:10.000000+00:00",
                            "subject": {"text": "Today's figures"},
                            "body": {
                                "text": "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob"
                            },
                        }
                    ],
                    "user_properties": {
                        "string:Sender Domain": "organisation.org",
                        "string:Recipient Domain": "company.com",
                    },
                },
                {
                    "id": "abcdef0123456789",
                    "timestamp": "2011-12-11T11:18:43.000000+00:00",
                    "messages": [
                        {
                            "from": "alice@company.com",
                            "to": ["bob@organisation.org"],
                            "sent_at": "2011-12-11T11:18:43.000000+00:00",
                            "subject": {"text": "Today's figures"},
                            "body": {
                                "text": "Hi Bob,\n\nI think these are the wrong numbers - could you check?\n\nThanks again,\nAlice"
                            },
                        }
                    ],
                    "user_properties": {
                        "string:Sender Domain": "company.com",
                        "string:Recipient Domain": "organisation.org",
                    },
                },
            ]
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Antwort
    {
      "new": 2,
      "status": "ok",
      "unchanged": 0,
      "updated": 0
    }{
      "new": 2,
      "status": "ok",
      "unchanged": 0,
      "updated": 0
    }

Die ID eines Kommentars macht ihn innerhalb einer Quelle eindeutig kenntlich. Wenn die angegebene Kommentar-ID in der Quelle nicht vorhanden ist, wird ein neuer Kommentar erstellt. Andernfalls wird ein vorhandener Kommentar aktualisiert.

NameTypErforderlichBESCHREIBUNG
commentsarray<Cmment>jaEin Batch von maximal 16384 Kommentaren in dem in Kommentarreferenz beschriebenen Format. Größere Batches sind schneller (pro Kommentar) als kleinere.

VERWENDETE ALLGEMEINEN Feldern

Zugewiesene allgemeine Felder werden beibehalten, es sei denn, der Text hat sich erheblich geändert. Zugewiesene Beschriftungen werden nie verworfen.

GROßE ANFORDERN

Bei großen Anforderungen kann die Antwort dieses Endpunkts länger dauern. Sie sollten Ihr Client-Timeout erhöhen.

Fügen Sie Kommentare aus unformatierten E-Mails hinzu oder aktualisieren Sie sie

/api/v1/sources/<project>/<source_name>/sync-raw-emails

Erforderliche Berechtigungen: Nachrichten bearbeiten

Wichtig:

Abrechenbarer Vorgang

Ihnen wird 1 AI Unit pro erstelltem Kommentar oder pro aktualisiertem Kommentar (basierend auf der Nachrichten-ID der E-Mail) berechnet, wenn der Text geändert wurde.

  • Bash
    curl -X POST 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync-raw-emails' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "documents": [
        {
          "raw_email": {
            "body": {
              "plain": "Hi Bob,\n\nCould you send me today'"'"'s figures?\n\nThanks,\nAlice"
            },
            "headers": {
              "parsed": {
                "Date": "Thu, 09 Jan 2020 16:34:45 +0000",
                "From": "alice@company.com",
                "Message-ID": "abcdef@company.com",
                "References": "<01234@company.com> <56789@company.com>",
                "Subject": "Figures Request",
                "To": "bob@organisation.org"
              }
            }
          },
          "user_properties": {
            "number:Deal Value": 12000,
            "string:City": "London"
          }
        }
      ],
      "include_comments": true,
      "transform_tag": "name.0.ABCD1234"
    }'curl -X POST 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync-raw-emails' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "documents": [
        {
          "raw_email": {
            "body": {
              "plain": "Hi Bob,\n\nCould you send me today'"'"'s figures?\n\nThanks,\nAlice"
            },
            "headers": {
              "parsed": {
                "Date": "Thu, 09 Jan 2020 16:34:45 +0000",
                "From": "alice@company.com",
                "Message-ID": "abcdef@company.com",
                "References": "<01234@company.com> <56789@company.com>",
                "Subject": "Figures Request",
                "To": "bob@organisation.org"
              }
            }
          },
          "user_properties": {
            "number:Deal Value": 12000,
            "string:City": "London"
          }
        }
      ],
      "include_comments": true,
      "transform_tag": "name.0.ABCD1234"
    }'
    
  • Knoten
    const request = require("request");
    
    request.post(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync-raw-emails",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          documents: [
            {
              raw_email: {
                body: {
                  plain:
                    "Hi Bob,\n\nCould you send me today's figures?\n\nThanks,\nAlice",
                },
                headers: {
                  parsed: {
                    Date: "Thu, 09 Jan 2020 16:34:45 +0000",
                    From: "alice@company.com",
                    "Message-ID": "abcdef@company.com",
                    References: "<01234@company.com> <56789@company.com>",
                    Subject: "Figures Request",
                    To: "bob@organisation.org",
                  },
                },
              },
              user_properties: {
                "number:Deal Value": 12000,
                "string:City": "London",
              },
            },
          ],
          include_messages: true,
          transform_tag: "name.0.ABCD1234",
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.post(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync-raw-emails",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          documents: [
            {
              raw_email: {
                body: {
                  plain:
                    "Hi Bob,\n\nCould you send me today's figures?\n\nThanks,\nAlice",
                },
                headers: {
                  parsed: {
                    Date: "Thu, 09 Jan 2020 16:34:45 +0000",
                    From: "alice@company.com",
                    "Message-ID": "abcdef@company.com",
                    References: "<01234@company.com> <56789@company.com>",
                    Subject: "Figures Request",
                    To: "bob@organisation.org",
                  },
                },
              },
              user_properties: {
                "number:Deal Value": 12000,
                "string:City": "London",
              },
            },
          ],
          include_messages: true,
          transform_tag: "name.0.ABCD1234",
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.post(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync-raw-emails",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "transform_tag": "name.0.ABCD1234",
            "documents": [
                {
                    "raw_email": {
                        "headers": {
                            "parsed": {
                                "Message-ID": "abcdef@company.com",
                                "Date": "Thu, 09 Jan 2020 16:34:45 +0000",
                                "Subject": "Figures Request",
                                "From": "alice@company.com",
                                "To": "bob@organisation.org",
                                "References": "<01234@company.com> <56789@company.com>",
                            }
                        },
                        "body": {
                            "plain": "Hi Bob,\n\nCould you send me today's figures?\n\nThanks,\nAlice"
                        },
                    },
                    "user_properties": {
                        "string:City": "London",
                        "number:Deal Value": 12000,
                    },
                }
            ],
            "include_comments": True,
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.post(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/sync-raw-emails",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "transform_tag": "name.0.ABCD1234",
            "documents": [
                {
                    "raw_email": {
                        "headers": {
                            "parsed": {
                                "Message-ID": "abcdef@company.com",
                                "Date": "Thu, 09 Jan 2020 16:34:45 +0000",
                                "Subject": "Figures Request",
                                "From": "alice@company.com",
                                "To": "bob@organisation.org",
                                "References": "<01234@company.com> <56789@company.com>",
                            }
                        },
                        "body": {
                            "plain": "Hi Bob,\n\nCould you send me today's figures?\n\nThanks,\nAlice"
                        },
                    },
                    "user_properties": {
                        "string:City": "London",
                        "number:Deal Value": 12000,
                    },
                }
            ],
            "include_comments": True,
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Antwort
    {
      "comments": [
        {
          "attachments": [],
          "id": "61626364656640636f6d70616e792e636f6d",
          "messages": [
            {
              "body": {
                "text": "Hi Bob,\n\nCould you send me today's figures?"
              },
              "from": "alice@company.com",
              "sent_at": "2020-01-09T16:34:45Z",
              "signature": {
                "text": "Thanks,\nAlice"
              },
              "subject": {
                "text": "Figures Request"
              },
              "to": ["bob@organisation.org"]
            }
          ],
          "source_id": "c1fb849b855841de",
          "text_format": "plain",
          "thread_id": "3c303132333440636f6d70616e792e636f6d3e",
          "timestamp": "2020-01-09T16:34:45Z",
          "uid": "c1fb849b855841de.61626364656640636f6d70616e792e636f6d",
          "user_properties": {
            "number:Deal Value": 12000,
            "number:Participant Count": 2,
            "number:Position in Thread": 3,
            "number:Recipient Count": 1,
            "string:City": "London",
            "string:Has Signature": "Yes",
            "string:Message ID": "abcdef@company.com",
            "string:Sender": "alice@company.com",
            "string:Sender Domain": "company.com",
            "string:Thread": "<01234@company.com>"
          }
        }
      ],
      "new": 1,
      "status": "ok",
      "unchanged": 0,
      "updated": 0
    }{
      "comments": [
        {
          "attachments": [],
          "id": "61626364656640636f6d70616e792e636f6d",
          "messages": [
            {
              "body": {
                "text": "Hi Bob,\n\nCould you send me today's figures?"
              },
              "from": "alice@company.com",
              "sent_at": "2020-01-09T16:34:45Z",
              "signature": {
                "text": "Thanks,\nAlice"
              },
              "subject": {
                "text": "Figures Request"
              },
              "to": ["bob@organisation.org"]
            }
          ],
          "source_id": "c1fb849b855841de",
          "text_format": "plain",
          "thread_id": "3c303132333440636f6d70616e792e636f6d3e",
          "timestamp": "2020-01-09T16:34:45Z",
          "uid": "c1fb849b855841de.61626364656640636f6d70616e792e636f6d",
          "user_properties": {
            "number:Deal Value": 12000,
            "number:Participant Count": 2,
            "number:Position in Thread": 3,
            "number:Recipient Count": 1,
            "string:City": "London",
            "string:Has Signature": "Yes",
            "string:Message ID": "abcdef@company.com",
            "string:Sender": "alice@company.com",
            "string:Sender Domain": "company.com",
            "string:Thread": "<01234@company.com>"
          }
        }
      ],
      "new": 1,
      "status": "ok",
      "unchanged": 0,
      "updated": 0
    }

Jede unformatierte E-Mail wird in einen Communications Mining-Kommentar konvertiert. Communications Mining generiert die ID des Kommentars basierend auf dem „Nachrichten-ID“-Header der E-Mail. Wenn ein Kommentar mit dieser Kommentar-ID in der Quelle nicht vorhanden ist, wird ein neuer Kommentar erstellt. Andernfalls wird ein vorhandener Kommentar aktualisiert.

Beim Konvertieren einer unformatierten E-Mail in einen Kommentar bereinigt Communications Mining den E-Mail-Textkörper und generiert Metadaten aus E-Mail-Headern. Sie können include_comments auf true festlegen, um die generierten Kommentare in die Antwort aufzunehmen. Die Kommentare werden in dem in der Kommentarreferenz beschriebenen Format zurückgegeben.
NameTypErforderlichBESCHREIBUNG
transform_tagstringjaEin Tag, das die E-Mail-Integration identifiziert, von der die Daten gesendet werden. Sie sollten dieses Tag während der Einrichtung der Integrationskonfiguration erhalten haben.
documentsarray<Document>jaEin Batch von maximal 16384 Dokumenten im unten beschriebenen Format. Größere Batches sind schneller (pro Dokument) als kleinere.
include_commentsbooleanneinWenn auf true festgelegt, werden die aus den E-Mails analysierten Kommentare im Antworttext zurückgegeben.
override_user_propertiesarray<string>neinBenutzereigenschaften, die in documents angegeben werden, überschreiben automatisch generierte Benutzereigenschaften, wenn ihr Namen in dieser Liste angezeigt wird. Die Benutzereigenschaftsnamen in dieser Liste müssen ohne das Typpräfix angegeben werden, z. B. als My Property und nicht als string:My Property.

Dabei hat Document das folgende Format:

NameTypErforderlichBESCHREIBUNG
raw_emailRawEmailjaE-Mail-Daten in dem Format, das in der Kommentarreferenz beschrieben ist.
comment_idstringneinIdentifiziert einen Kommentar eindeutig. Wenn keine Kommentar-ID angegeben wird, generiert Communications Mining die Kommentar-ID aus der Nachrichten-ID der E-Mail. Das Format wird in der Kommentarreferenz beschrieben.
user_propertiesmap<string, string | number>neinAlle benutzerdefinierten Metadaten, die für den Kommentar gelten. Das Format wird in der Kommentarreferenz beschrieben.
Hinweis: Einige Benutzereigenschaften werden basierend auf dem E-Mail-Inhalt generiert. Stehen diese mit hochgeladenen Benutzereigenschaften in Konflikt, schlägt die Anforderung mit 422 Unprocessable Entity fehl.
Warnung:

VERWENDETE ALLGEMEINEN Feldern

Communications Mining generiert die Inhalte der „Nachrichten“ des Kommentars aus dem unformatierten E-Mail-Text und einer Teilmenge der unformatierten E-Mail-Header unter Berücksichtigung des angegebenen Transformations-Tags. Zugewiesene allgemeine Felder werden beibehalten, es sei denn, der Text hat sich erheblich geändert. Zugewiesene Beschriftungen werden nie verworfen.

Wichtig:

GROßE ANFORDERN

Bei großen Anforderungen kann die Antwort dieses Endpunkts länger dauern. Sie sollten Ihr Client-Timeout erhöhen.

Kommentare löschen

/api/v1/sources/<project>/<source_name>/comments?id=<comment_id0>[&id=<comment_id1>...]

Erforderliche Berechtigungen: Nachrichten bearbeiten

  • Bash
    curl -X DELETE 'https://<my_api_endpoint>/api/v1/sources/<project>/<source_name>/comments?id=abcdef0123456789' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X DELETE 'https://<my_api_endpoint>/api/v1/sources/<project>/<source_name>/comments?id=abcdef0123456789' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Knoten
    const request = require("request");
    
    request.delete(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source_name>/comments?id=abcdef0123456789",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.delete(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source_name>/comments?id=abcdef0123456789",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.delete(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source_name>/comments?id=abcdef0123456789",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.delete(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source_name>/comments?id=abcdef0123456789",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Antwort
    {
      "status": "ok"
    }{
      "status": "ok"
    }

Einzelne Kommentare können aus einer Quelle gelöscht werden, indem die ID verwendet wird, die beim Hinzufügen des Kommentars angegeben wurde.

Alle mit diesem Kommentar verbundenen Daten werden endgültig gelöscht.

Rufen Sie einen Kommentar nach ID ab

/api/v1/sources/<project>/<source_name>/comments/<comment_id>

Erforderliche Berechtigungen: Quellen anzeigen

  • Bash
    curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/comments/0123456789abcdef' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/comments/0123456789abcdef' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Knoten
    const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/comments/0123456789abcdef",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/comments/0123456789abcdef",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.get(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/comments/0123456789abcdef",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.get(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/comments/0123456789abcdef",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Antwort
    {
      "comment": {
        "context": "1596721237668",
        "created_at": "2020-08-06T13:20:28.531000Z",
        "id": "0123456789abcdef",
        "last_modified": "2020-08-06T13:40:37.668000Z",
        "messages": [
          {
            "body": {
              "text": "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob"
            },
            "from": "bob@organisation.org",
            "sent_at": "2011-12-11T11:05:10Z",
            "subject": {
              "text": "Today's figures"
            },
            "to": ["alice@company.com"]
          }
        ],
        "source_id": "47194279497e141e",
        "text_format": "plain",
        "timestamp": "2011-12-11T11:05:10Z",
        "uid": "47194279497e141e.0123456789abcdef",
        "user_properties": {
          "string:Recipient Domain": "company.com",
          "string:Sender Domain": "organisation.org"
        }
      },
      "status": "ok"
    }{
      "comment": {
        "context": "1596721237668",
        "created_at": "2020-08-06T13:20:28.531000Z",
        "id": "0123456789abcdef",
        "last_modified": "2020-08-06T13:40:37.668000Z",
        "messages": [
          {
            "body": {
              "text": "Alice,\n\nHere are the figures for today.\n\nRegards,\nBob"
            },
            "from": "bob@organisation.org",
            "sent_at": "2011-12-11T11:05:10Z",
            "subject": {
              "text": "Today's figures"
            },
            "to": ["alice@company.com"]
          }
        ],
        "source_id": "47194279497e141e",
        "text_format": "plain",
        "timestamp": "2011-12-11T11:05:10Z",
        "uid": "47194279497e141e.0123456789abcdef",
        "user_properties": {
          "string:Recipient Domain": "company.com",
          "string:Sender Domain": "organisation.org"
        }
      },
      "status": "ok"
    }

Der Kommentar wird in dem in der Kommentarreferenz beschriebenen Format zurückgegeben.

Rufen Sie Kommentare nach Thread-ID ab

/api/v1/sources/<project>/<source_name>/threads?id=<thread_id0>[&id=<thread_id1>...]

Erforderliche Berechtigungen: Quellen anzeigen

  • Bash
    curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/threads?id=185521538102&id=81745162' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>/<source>/threads?id=185521538102&id=81745162' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Knoten
    const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/threads?id=185521538102&id=81745162",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/threads?id=185521538102&id=81745162",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.get(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/threads?id=185521538102&id=81745162",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.get(
        "https://<my_api_endpoint>/api/v1/sources/<project>/<source>/threads?id=185521538102&id=81745162",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Antwort
    {
      "status": "ok",
      "threads": [
        {
          "messages": ["4321dcba.1234", "4321dcba.2345", "4321dcba.3456"],
          "thread_id": "185521538102"
        },
        {
          "messages": [],
          "thread_id": "81745162"
        }
      ]
    }{
      "status": "ok",
      "threads": [
        {
          "messages": ["4321dcba.1234", "4321dcba.2345", "4321dcba.3456"],
          "thread_id": "185521538102"
        },
        {
          "messages": [],
          "thread_id": "81745162"
        }
      ]
    }
Für jede angegebene Thread-ID enthält die Antwort eine Liste von Kommentar-UIDs (im Format source_id.comment_id), die zu diesem Thread gehören. Beachten Sie, dass Sie keinen Fehler erhalten, wenn Sie eine Thread-ID angeben, die nicht vorhanden ist. Stattdessen ist die entsprechende Liste der Kommentare in der Antwort leer.

War diese Seite hilfreich?

Hilfe erhalten
RPA lernen – Automatisierungskurse
UiPath Community-Forum
Uipath Logo White
Vertrauen und Sicherheit
© 2005–2024 UiPath. Alle Rechte vorbehalten