映画のリストを取得するオペレーションの作成 - Cloud

Talend Cloud API Services Platform入門ガイド

Version
Cloud
Language
日本語
Product
Talend Cloud
Module
Talend API Designer
Talend API Tester
Talend Management Console
Talend Studio
Content
ジョブデザインと開発

Movieデータ型の配列を返すGETオペレーションを作成します。

手順

  1. Moviesセクションの右側にある[+]ボタンをクリックし、[Operation] (オペレーション)を選択します。
  2. 一般情報を以下のように設定します。
    フィールド
    名前 Get a list of movies
    メソッド GET
    パス /movies
    説明 Returns a list of movies available for rental.
    ID getMovies
  3. [RESPONSES] (レスポンス)の横にある[Add] (追加)をクリックし、[Status] (ステータス)フィールドで2XX - Defaultを選択します。
  4. [BODY] (ボディ)の横にある[Add] (追加)をクリックします。
  5. [TYPE] (型)セクションの[Type] (型)リストでArrayを選択し、/リストでMovieを選択します。
  6. [Examples] (例)フィールドに次の例を追加します。
    <movies>
      <movie>
        <movieId>1</movieId>
        <title>The Social Network</title>
        <releaseYear>2010</releaseYear>
        <director>David Fincher</director>
        <price>4.99</price>
      </movie>
      <movie>
        <movieId>2</movieId>
        <title>La La Land</title>
        <releaseYear>2016</releaseYear>
        <director>Damien Chazelle</director>
        <price>5.99</price>
      </movie>
      <movie>
        <movieId>3</movieId>
        <title>Ex Machine</title>
        <releaseYear>2014</releaseYear>
        <director>Alex Garland</director>
        <price>4.99</price>
      </movie>
    </movies>
  7. [Save] (保存)をクリックします。