communications-mining
latest
false
Important :
Ce contenu a été traduit à l'aide d'une traduction automatique.
UiPath logo, featuring letters U and I in white
Guide du développeur Communications Mining
Last updated 19 nov. 2024

Sources

Obtenir toutes les sources

/api/v1/sources

Autorisations requises : afficher les sources

  • Bash
    curl -X GET 'https://<my_api_endpoint>/api/v1/sources' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X GET 'https://<my_api_endpoint>/api/v1/sources' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Nœud
    const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources",
        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",
        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",
        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",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "sources": [
        {
          "created_at": "2016-02-10T23:13:28.340295+00:00",
          "description": "An optional long form description.",
          "id": "18ba5ce699f8da1f",
          "last_modified": "2016-02-10T23:13:28.340295+00:00",
          "name": "example",
          "owner": "<project>",
          "sensitive_properties": [],
          "should_translate": false,
          "title": "An Example Source",
          "updated_at": "2016-02-10T23:13:28.340295+00:00"
        }
      ],
      "status": "ok"
    }{
      "sources": [
        {
          "created_at": "2016-02-10T23:13:28.340295+00:00",
          "description": "An optional long form description.",
          "id": "18ba5ce699f8da1f",
          "last_modified": "2016-02-10T23:13:28.340295+00:00",
          "name": "example",
          "owner": "<project>",
          "sensitive_properties": [],
          "should_translate": false,
          "title": "An Example Source",
          "updated_at": "2016-02-10T23:13:28.340295+00:00"
        }
      ],
      "status": "ok"
    }

Récupérer des sources par projet

/api/v1/sources/<project>

Autorisations requises : afficher les sources

  • Bash
    curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Nœud
    const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>",
        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>",
        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>",
        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>",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "sources": [
        {
          "created_at": "2016-02-10T23:13:28.340295+00:00",
          "description": "An optional long form description.",
          "id": "18ba5ce699f8da1f",
          "last_modified": "2016-02-10T23:13:28.340295+00:00",
          "name": "example",
          "owner": "<project>",
          "sensitive_properties": [],
          "should_translate": false,
          "title": "An Example Source",
          "updated_at": "2016-02-10T23:13:28.340295+00:00"
        }
      ],
      "status": "ok"
    }{
      "sources": [
        {
          "created_at": "2016-02-10T23:13:28.340295+00:00",
          "description": "An optional long form description.",
          "id": "18ba5ce699f8da1f",
          "last_modified": "2016-02-10T23:13:28.340295+00:00",
          "name": "example",
          "owner": "<project>",
          "sensitive_properties": [],
          "should_translate": false,
          "title": "An Example Source",
          "updated_at": "2016-02-10T23:13:28.340295+00:00"
        }
      ],
      "status": "ok"
    }

Récupérer une source par projet et par nom

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

Autorisations requises : afficher les sources

  • Bash
    curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>/example' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X GET 'https://<my_api_endpoint>/api/v1/sources/<project>/example' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Nœud
    const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/example",
        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>/example",
        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>/example",
        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>/example",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An optional long form description.",
        "id": "18ba5ce699f8da1f",
        "last_modified": "2016-02-10T23:13:28.340295+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-10T23:13:28.340295+00:00"
      },
      "status": "ok"
    }{
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An optional long form description.",
        "id": "18ba5ce699f8da1f",
        "last_modified": "2016-02-10T23:13:28.340295+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-10T23:13:28.340295+00:00"
      },
      "status": "ok"
    }

Obtenir une source par ID

/api/v1/sources/id:<source_id>

Autorisations requises : afficher les sources

  • Bash
    curl -X GET 'https://<my_api_endpoint>/api/v1/sources/id:18ba5ce699f8da1f' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X GET 'https://<my_api_endpoint>/api/v1/sources/id:18ba5ce699f8da1f' \
        -H "Authorization: Bearer $REINFER_TOKEN"
    
  • Nœud
    const request = require("request");
    
    request.get(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/id:18ba5ce699f8da1f",
        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/id:18ba5ce699f8da1f",
        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/id:18ba5ce699f8da1f",
        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/id:18ba5ce699f8da1f",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An optional long form description.",
        "id": "18ba5ce699f8da1f",
        "language": "en",
        "last_modified": "2016-02-10T23:13:28.340295+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-10T23:13:28.340295+00:00"
      },
      "status": "ok"
    }{
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An optional long form description.",
        "id": "18ba5ce699f8da1f",
        "language": "en",
        "last_modified": "2016-02-10T23:13:28.340295+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-10T23:13:28.340295+00:00"
      },
      "status": "ok"
    }

Créer une source

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

Autorisations requises : administrateur des sources

  • Bash
    curl -X PUT 'https://<my_api_endpoint>/api/v1/sources/<project>/example' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "source": {
        "description": "An optional long form description.",
        "title": "An Example Source"
      }
    }'curl -X PUT 'https://<my_api_endpoint>/api/v1/sources/<project>/example' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "source": {
        "description": "An optional long form description.",
        "title": "An Example Source"
      }
    }'
    
  • Nœud
    const request = require("request");
    
    request.put(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/example",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          source: {
            description: "An optional long form description.",
            title: "An Example Source",
          },
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );const request = require("request");
    
    request.put(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/example",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: {
          source: {
            description: "An optional long form description.",
            title: "An Example Source",
          },
        },
      },
      function (error, response, json) {
        // digest response
        console.log(JSON.stringify(json, null, 2));
      }
    );
  • Python
    import json
    import os
    
    import requests
    
    response = requests.put(
        "https://<my_api_endpoint>/api/v1/sources/<project>/example",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "source": {
                "title": "An Example Source",
                "description": "An optional long form description.",
            }
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))import json
    import os
    
    import requests
    
    response = requests.put(
        "https://<my_api_endpoint>/api/v1/sources/<project>/example",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={
            "source": {
                "title": "An Example Source",
                "description": "An optional long form description.",
            }
        },
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An optional long form description.",
        "id": "18ba5ce699f8da1f",
        "language": "en",
        "last_modified": "2016-02-10T23:13:28.340295+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-10T23:13:28.340295+00:00"
      },
      "status": "ok"
    }{
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An optional long form description.",
        "id": "18ba5ce699f8da1f",
        "language": "en",
        "last_modified": "2016-02-10T23:13:28.340295+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-10T23:13:28.340295+00:00"
      },
      "status": "ok"
    }
NomSaisie de texteRequisDESCRIPTION
languagestringnonLa langue principale de la source. Les valeurs prises en charge sont en (anglais) et multilingue. La valeur par défaut est en.
titlestringnonTitre une ligne lisible par un humain pour la source.
descriptionstringnonUne description plus longue de la source.
should_translatebooleannonSi les messages téléchargés vers cette source doivent être traduits en language le cas échéant. La valeur par défaut est « false ».
sensitive_propertiesarray<string>nonUn tableau de propriétés qui doivent être marqués comme sensibles et masqués pour les utilisateurs non privilégiés.
bucket_idstringnonID d'un compartiment à partir duquel charger des données. Les données seront analysées sous forme de commentaires et chargées dans cette source.

Mettre à jour une source

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

Autorisations requises : administrateur des sources

  • Bash
    curl -X POST 'https://<my_api_endpoint>/api/v1/sources/<project>/example' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "source": {
        "description": "An alternative description."
      }
    }'curl -X POST 'https://<my_api_endpoint>/api/v1/sources/<project>/example' \
        -H "Authorization: Bearer $REINFER_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{
      "source": {
        "description": "An alternative description."
      }
    }'
    
  • Nœud
    const request = require("request");
    
    request.post(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/<project>/example",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: { source: { description: "An alternative description." } },
      },
      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>/example",
        headers: {
          Authorization: "Bearer " + process.env.REINFER_TOKEN,
        },
        json: true,
        body: { source: { description: "An alternative description." } },
      },
      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>/example",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={"source": {"description": "An alternative description."}},
    )
    
    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>/example",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
        json={"source": {"description": "An alternative description."}},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An alternative description.",
        "id": "18ba5ce699f8da1f",
        "language": "en",
        "last_modified": "2016-02-11T08:06:14.944290+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-11T08:06:14.944290+00:00"
      },
      "status": "ok"
    }{
      "source": {
        "created_at": "2016-02-10T23:13:28.340295+00:00",
        "description": "An alternative description.",
        "id": "18ba5ce699f8da1f",
        "language": "en",
        "last_modified": "2016-02-11T08:06:14.944290+00:00",
        "name": "example",
        "owner": "<project>",
        "sensitive_properties": [],
        "should_translate": false,
        "title": "An Example Source",
        "updated_at": "2016-02-11T08:06:14.944290+00:00"
      },
      "status": "ok"
    }
NomSaisie de texteRequisDESCRIPTION
titlestringnonTitre une ligne lisible par un humain pour la source.
descriptionstringnonUne description plus longue de la source.
should_translatebooleannonSi les messages téléchargés vers cette source doivent être traduits en anglais le cas échéant. La valeur par défaut est « false ».
sensitive_propertiesarray<string>nonUn tableau de propriétés qui doivent être marqués comme sensibles et masqués pour les utilisateurs non privilégiés.
bucket_idstringnonID d'un compartiment à partir duquel charger des données. Les données seront analysées sous forme de commentaires et chargées dans cette source.

Supprimer une source

/api/v1/sources/id:<source_id>

Autorisations requises : administrateur des sources

  • Bash
    curl -X DELETE 'https://<my_api_endpoint>/api/v1/sources/id:18ba5ce699f8da1f' \
        -H "Authorization: Bearer $REINFER_TOKEN"curl -X DELETE 'https://<my_api_endpoint>/api/v1/sources/id:18ba5ce699f8da1f' \
        -H "Authorization: Bearer $REINFER_TOKEN"
  • Nœud
    const request = require("request");
    
    request.delete(
      {
        url: "https://<my_api_endpoint>/api/v1/sources/id:18ba5ce699f8da1f",
        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/id:18ba5ce699f8da1f",
        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/id:18ba5ce699f8da1f",
        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/id:18ba5ce699f8da1f",
        headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
    )
    
    print(json.dumps(response.json(), indent=2, sort_keys=True))
    
  • Réponse
    {
      "status": "ok"
    }{
      "status": "ok"
    }

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.