communications-mining
latest
false
Importante :
Este conteúdo foi traduzido com auxílio de tradução automática.
UiPath logo, featuring letters U and I in white
Guia do desenvolvedor do Communications Mining
Last updated 19 de nov de 2024

Redefinir um stream

docs image
/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/reset/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/reset

Permissões necessárias: consumir fluxos, exibir rótulos.

  • Bash
    curl -X POST 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "to_comment_created_at": "2020-06-03T16:05:00"
    }'curl -X POST 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "to_comment_created_at": "2020-06-03T16:05:00"
    }'
  • const request = require("request");
    
    request.post(
      {
        url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: { to_comment_created_at: "2020-06-03T16:05:00" },
      },
      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/datasets/project1/collateral/streams/dispute/reset",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: { to_comment_created_at: "2020-06-03T16:05:00" },
      },
      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/datasets/project1/collateral/streams/dispute/reset",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={"to_comment_created_at": "2020-06-03T16:05:00"},
    )
    
    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/datasets/project1/collateral/streams/dispute/reset",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={"to_comment_created_at": "2020-06-03T16:05:00"},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Resposta
    {
      "sequence_id": "4LvtenIBAAA=",
      "status": "ok",
      "stream": {
        "created_at": "2019-08-03T12:30:00.123456Z",
        "dataset_id": "abcdef0123456789",
        "description": "Used by ACME RPA to create tickets for disputes.",
        "id": "0123456789abcdef",
        "model": {
          "version": 8
        },
        "name": "dispute",
        "title": "Collateral Disputes",
        "updated_at": "2019-08-03T12:30:00.123456Z"
      }
    }{
      "sequence_id": "4LvtenIBAAA=",
      "status": "ok",
      "stream": {
        "created_at": "2019-08-03T12:30:00.123456Z",
        "dataset_id": "abcdef0123456789",
        "description": "Used by ACME RPA to create tickets for disputes.",
        "id": "0123456789abcdef",
        "model": {
          "version": 8
        },
        "name": "dispute",
        "title": "Collateral Disputes",
        "updated_at": "2019-08-03T12:30:00.123456Z"
      }
    }
Um fluxo pode ser redefinido para mover sua posição para trás ou para frente no tempo, seja para repetir comentários retornados anteriormente ou para ignorar comentários. O carimbo de data/hora usado para redefinir um stream se refere ao horário em que os comentários foram carregados (ou seja, a propriedade created_at do comentário, em vez de sua propriedade timestamp ).
NomeTipoRequiredDescrição
to_comment_created_atStringsimUm carimbo de data/hora ISO-8601.
A resposta conterá o sequence_id correspondente à nova posição do fluxo.

Esta página foi útil?

Obtenha a ajuda que você precisa
Aprendendo RPA - Cursos de automação
Fórum da comunidade da Uipath
Uipath Logo White
Confiança e segurança
© 2005-2024 UiPath. Todos os direitos reservados.