サービス

OLP CLI は、 HERE Location Services で次の機能をサポートしています。

  • 表示されているすべてのサービスを一覧表示
  • サービスを表示します
  • [ バージョン ] に は、サービスバージョンが一覧表示され
  • 特定 のサービスのマニフェストが表示されます
  • 特定のサービスの OpenAPI 表示

サービスリスト

アクセスを許可されているすべての位置情報サービスが一覧表示されます。

olp service list [command options]

オプションのパラメータ :

  • --credentials <path to credentials file> コマンドで使用する資格情報ファイルの名前。 資格情報ファイルは、プラットフォームポータルとは別にダウンロードされます。
  • --profile <profile name> olpcli.ini ファイルから使用する資格情報プロファイルの名前。
  • --json JSON 形式のサービスのリストを表示します。
  • --quiet サービス HRNS を新しい行に表示します。
  • --scope <project HRN> リクエストのスコープとして使用するプロジェクト HERE リソースネーム を指定します。 で指定された値 --scopehere.token.scope 、コマンドに使用された資格情報ファイルで指定された値よりも優先されます。

資格情報 およびプロファイルの使用方法の詳細について は、「資格情報 の設定」を参照してください。

例 :

以下のコマンドは、アクセス権を持つすべてのサービスを一覧表示します。

olp service list --json

出力 :


{"services": [
    {
        "owner": {
            "creator": "Ru9zEteKdJLTyMf8pDDT",
            "organisation": "org"
        },
        "summary": "The service example for demonstration purposes.",
        "baseUrl": "https://location-service-demo.services.api.platform.here.com",
        "metadata": {
             "environment": "Dev",
             "momVersion": "2.0.1",
             "contentDomain": "Vehicle Routing",
             "odinId": "3473"
        },
        "protocol": "REST",
        "hrn": "hrn:here:service::org:location-service-demo-1",
        "created": "2019-08-06T13:35:50.94598Z",
        "name": "Location Service Demo",
        "state": "Running",
        "dataSources": [{
            "owner": "HERE",
            "schema": "HERE example",
            "name": "HERE example",
            "description": "HERE example data"
            "hrn": "SPACE-ID",
            "kind": "INPUT",
            "type": "DATAHUB",
            "layer": [
                "olp-streaming-layer3",
                "olp-streaming-layer2",
                "olp-streaming-layer1"
            ]
        }],
        "updated": "2019-08-06T13:35:50.94598Z",
        "version": "1.0.0",
        "tags": [
            "HERE",
            "EXAMPLE"
        ]
    }
]}

サービスショー

指定した位置サービスのプロパティを表示します。

olp service show <service HRN> [command options]

必須パラメータ :

  • <service HRN> 表示するサービスの HERE リソースネーム 。

オプションのパラメータ :

  • --credentials <path to credentials file> コマンドで使用する資格情報ファイルの名前。 資格情報ファイルは、プラットフォームポータルとは別にダウンロードされます。
  • --profile <profile name> olpcli.ini ファイルから使用する資格情報プロファイルの名前。
  • --json サービスのプロパティを JSON 形式で表示します。
  • --quiet サービス HERE リソースネーム を表示します。
  • --scope <project HRN> リクエストのスコープとして使用するプロジェクト HERE リソースネーム を指定します。 で指定された値 --scopehere.token.scope 、コマンドに使用された資格情報ファイルで指定された値よりも優先されます。

資格情報 およびプロファイルの使用方法の詳細について は、「資格情報 の設定」を参照してください。

例 :

次のコマンドを実行すると、指定したサービスのプロパティが表示されます。


olp service show hrn:here:service::org:open-vehicle-routing-0 --json

出力 :


{
    "owner": {
        "creator": "QoagGAKgreOKSlypB8M8",
        "organisation": "org"
    },
    "summary": "The Routing - Vehicle service end point calculates routes between two or more locations using various transport modes and provides additional route-related information. The Routing API is customizable so that the route calculation and additional information can be adapted to both consumer and enterprise applications.",
    "baseUrl": "https://vehicle.router.hereapi.com/v0",
    "metadata": {
                "environment": "Dev",
                "momVersion": "2.0.1",
                "contentDomain": "Vehicle Routing",
                "odinId": "3473"
     },
    "protocol": "REST",
    "hrn": "hrn:here::org:routing-vehicle-0",
    "created": "2019-08-06T12:39:00.441365Z",
    "name": "Routing - Vehicle",
    "state": "Running",
    "dataSources": [{
        "owner": "HERE",
        "name": "Here Map Content"
        "schema": "HMC Map Content",
        "hrn": "SPACE-ID",
        "kind": "INPUT",
        "description": "Places layer from the HERE Map Content catalog.",
        "type": "DATAHUB",
        "layer": [
             "olp-streaming-layer3",
             "olp-streaming-layer2",
             "olp-streaming-layer1"
         ]
    }],
    "updated": "2019-08-06T12:39:00.441365Z",
    "version": "1.0.0",
    "tags": [
        "Navigation",
        "Directions",
        "Traffic",
        "Route"
    ]
}

サービスバージョンリスト

指定した位置情報サービスのバージョンを一覧表示します。

olp service version list <service HRN> [command options]

必須パラメータ :

  • <service HRN> バージョンを一覧表示するサービスの HERE リソースネーム 。

オプションのパラメータ :

  • --credentials <path to credentials file> コマンドで使用する資格情報ファイルの名前。 資格情報ファイルは、プラットフォームポータルとは別にダウンロードされます。
  • --profile <profile name> olpcli.ini ファイルから使用する資格情報プロファイルの名前。
  • --json サービスバージョンリストを JSON 形式で表示します。
  • --quiet サービスバージョンを表示します。
  • --scope <project HRN> リクエストのスコープとして使用するプロジェクト HERE リソースネーム を指定します。 で指定された値 --scopehere.token.scope 、コマンドに使用された資格情報ファイルで指定された値よりも優先されます。

資格情報 およびプロファイルの使用方法の詳細について は、「資格情報 の設定」を参照してください。

例 :

次のコマンドを実行すると、指定したサービスのバージョンのリストが表示されます。


olp service version list hrn:here:service::org:open-vehicle-routing-0 --json

出力 :


{"serviceVersions": [
    {
        "versionDescription": "Update message 4",
        "version": "3.1.3",
        "updated": "2019-10-11T12:32:41.970332Z"
    },
    {
        "versionDescription": "Update message 3",
        "version": "3.1.2",
        "updated": "2019-10-11T12:31:22.436954Z"
    },
    {
        "versionDescription": "Update message 2",
        "version": "3.1.1",
        "updated": "2019-10-04T13:44:21.514794Z"
    }
]}

サービスマニフェストが表示されます

特定のサービスのマニフェストを表示します

olp service manifest show <service HRN> [command options]

必須パラメータ :

  • <service HRN> マニフェストを表示するサービスの HERE リソースネーム 。

オプションのパラメータ :

  • --credentials コマンドで使用する資格情報 ファイルの名前。 資格情報 ファイルは、 OLP ポータル とは別にダウンロードされます。
  • --profile olpcli.ini ファイルから使用する資格情報プロファイルの名前。
  • --quiet サービス HERE リソースネーム を表示します。
  • --scope <project HRN> リクエストのスコープとして使用するプロジェクト HERE リソースネーム を指定します。 で指定された値 --scopehere.token.scope 、コマンドに使用された資格情報ファイルで指定された値よりも優先されます。

資格情報およびプロファイルの使用方法の詳細について は、「資格情報の設定」を参照してください。

例 :

次のコマンドは、マニフェストファイルを示しています。

olp service manifest {{book.filtered.hrnPrefix}}:service::org:open-vehicle-routing-0

出力 :

    manifest: 0.0.2

    id: add-test-${unique-value}-15
    name: Add test ${unique-value}
    label: "(private beta)"
    notice: "This service is currently being tested and is not yet available for public use."
    summary: >-
      The HERE Geocode service converts street addresses to geo-coordinates and vice-versa with forward geocoding, including landmarks and
      reverse geocoding. Intention is to find a specific location, not a list of potentially interesting places.
    base-url: https://hereapi.com
    tags:
      - SEARCH
      - HERE
      - PLACES
      - POIS
    version: 15.2.1
    data-sources:
      - name: HERE Places
        owner: HERE
        description: Places layer from the HERE Map Content catalog.
        schema: HMC Places
    data-sources-notice: Want to use your own data? We can help you import and prepare it.
    deployments:
      - region: us-east-1
        workers-count: 2
        worker-size: 10
      - region: eu-west-1
        workers-count: 3
        worker-size: 5
    developer-guide-url: https://here-tech.skawa.fun/olp/documentation/

Service OpenAPI の表示

特定のサービスの OpenAPI 仕様を表示します。

olp service openapi show <service HRN> [command options]

必須パラメータ :

  • <service HRN> OpenAPI ファイルを表示するサービスの HERE リソースネーム 。

オプションのパラメータ :

  • --credentials コマンドで使用する資格情報 ファイルの名前。 資格情報 ファイルは、 OLP ポータル とは別にダウンロードされます。
  • --profile olpcli.ini ファイルから使用する資格情報プロファイルの名前。
  • --quiet サービス HERE リソースネーム を表示します。
  • --scope <project HRN> リクエストのスコープとして使用するプロジェクト HERE リソースネーム を指定します。 で指定された値 --scopehere.token.scope 、コマンドに使用された資格情報ファイルで指定された値よりも優先されます。

資格情報およびプロファイルの使用方法の詳細について は、「資格情報の設定」を参照してください。

例 :

次のコマンドは、サービスの OpenAPI ファイルを示しています。

olp service openapi {{book.filtered.hrnPrefix}}:service::org:open-vehicle-routing-0

出力 :

openapi: 3.0.2
servers:
  - description: Apisprout Auto Mocking
    url: 'http://olp-docs.ad.here.com:5000'
  - url: 'http://localhost:8888'
    variables: {}
info:
  description: The service provides service management operations.
  version: 1.0.0
  title: Service API v1
  license:
    name: 'https://confluence.in.here.com/display/TEW/Describe+Your+API'
tags:
  - name: service
    description: Manage services
    externalDocs:
      description: Find out more
      url: 'http://here.com'
paths:
  /services:
    get:
      tags:
        - service
      summary: Get a list of all services
      description: Lists all available services.
      operationId: getServices
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Service'
        '401':
          description: Unathorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'

」に一致する結果は 件です

    」に一致する結果はありません