1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Postmanを使ってみた

Posted at

1.概要

API (Application Programming Interface)を呼び出すツール・実行サービスの1つで有名なPostmanを使ってみた。今回はAPIキーが不要かつ面白そうなAPIであるPokéAPIを利用してみる。

2.手順

PokeAPIの確認

トップページにサンプルとして、APIエンドポイント(グレーの部分)とそれを含めたURL(グレー+白の部分)が生成されている。これをそのまま使う。
image.png

Postmanの準備

まずはPostmanに登録し、トップ画面にアクセス
image.png

今回はテンプレを活用するので、REST API Basicsを選択し、GETメソッドでディグダ(英語圏ではdittoって言うらしいw)のデータ取得する。
BaseURLをPokeAPIでしたグレーの内容に修正し、後続のURLパラメータ(/pokemon/ditto)と入力する。
最後に右にあるSendボタンでGo!
image.png

JSON形式で様々なディグダの情報が取得される。じめん属性からどのポケモンシリーズで登場したかも事細かに取得できた。
image.png

3.まとめ

今回は、APIを簡単に呼び出すPostmanを使う方法を解説した。
IT初心者でも使いやすいので、APIとはなんだろう?という方はこれを使って実際の動作を見てみるとよいかと思う。
APIの幅広い分野で活用され奥も深いので、ぜひ世界中のありとあらゆるAPIサービスをPostmanで呼び出してみてほしい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?