communications-mining
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。
UiPath logo, featuring letters U and I in white
Communications Mining 開発者ガイド
Last updated 2024年11月19日

実行元

すべてのソースを取得する

/api/v1/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"
    
  • ノード
    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))
    
  • レスポンス
    {
      "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"
    }

プロジェクトでソースを取得する

/api/v1/sources/<project>

必要な権限: ソースを表示

  • 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"
    
  • ノード
    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))
    
  • レスポンス
    {
      "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"
    }

プロジェクトと名前でソースを取得する

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

必要な権限: ソースを表示

  • 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"
    
  • ノード
    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))
    
  • レスポンス
    {
      "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"
    }

ID でソースを取得する

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

必要な権限: ソースを表示

  • 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"
    
  • ノード
    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))
    
  • レスポンス
    {
      "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"
    }

ソースを作成する

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

必要な権限: ソース管理者

  • 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"
      }
    }'
    
  • ノード
    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))
    
  • レスポンス
    {
      "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"
    }
名前必須説明
languagestring×ソースの第一言語。サポートされている値は、en (英語) および Multilingual (他言語) です。既定値は en です。
titlestring×人間が判読できる 1 行のソース タイトル。
descriptionstring×ソースの長い説明。
should_translateBoolean×必要に応じて、このソースにアップロードされたメッセージを language に翻訳する必要があるかどうかを指定します。既定値は false です。
sensitive_propertiesarray<string>×機密としてマークし、権限のないユーザーに対して非表示にする必要があるプロパティの配列。
bucket_idstring×データの読み込み元バケットの ID。データはコメントに解析され、このソースに読み込まれます。

ソースを更新する

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

必要な権限: ソース管理者

  • 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."
      }
    }'
    
  • ノード
    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))
    
  • レスポンス
    {
      "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"
    }
名前必須説明
titlestring×人間が判読できる 1 行のソース タイトル。
descriptionstring×ソースの長い説明。
should_translateBoolean×必要に応じて、このソースにアップロードされたメッセージを英語に翻訳する必要があるかどうかを指定します。既定値は false です。
sensitive_propertiesarray<string>×機密としてマークし、権限のないユーザーに対して非表示にする必要があるプロパティの配列。
bucket_idstring×データの読み込み元バケットの ID。データはコメントに解析され、このソースに読み込まれます。

ソースを削除する

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

必要な権限: ソース管理者

  • 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"
  • ノード
    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))
    
  • レスポンス
    {
      "status": "ok"
    }{
      "status": "ok"
    }

このページは役に立ちましたか?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
Uipath Logo White
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.