Mastodon
  • Mastodonの使い方
    • Signing up for an account
    • Setting up your profile
    • Posting toots
    • Using the network features
    • Dealing with unwanted content
    • Promoting yourself and others
    • Set your preferences
    • その他の設定
    • Using Mastodon externally
    • Moving or leaving accounts
  • Mastodonの構築
    • マシンの準備
    • ソースからインストール
    • 環境設定
    • オプションのインストール
      • 全文検索
      • 秘匿サービス
      • シングルサインオン
    • セットアップを完了する
    • 開発者向けコマンドラインを利用する
    • 新しいバージョンへアップグレード
    • サーバのバックアップ
    • 新しいマシンへの移行
    • サーバーのスケールアップ
    • モデレーション
    • トラブルシューティング
  • アプリケーションの開発
    • Getting started with the API
    • Playing with public data
    • Obtaining client app access
    • ログイン
    • ガイドラインとベストプラクティス
    • ライブラリ等
  • コントリビューション
    • 技術的情報
    • 開発環境のセットアップ
    • ソースコードの構造
    • ルーティング
  • スペック
    • ActivityPub
    • WebFinger
    • Security
    • Microformats
    • OAuth
  • REST API
    • OAuthスコープ
  • API一覧
    • apps
      • oauth
    • accounts
      • bookmarks
      • favourites
      • mutes
      • blocks
      • domain_blocks
      • filters
      • reports
      • follow_requests
      • endorsements
      • featured_tags
      • preferences
      • suggestions
    • statuses
      • media
      • polls
      • scheduled_statuses
      • streaming
    • timelines
      • conversations
      • lists
      • markers
    • notifications
      • push
    • search
    • instance
      • trends
      • directory
      • custom_emojis
    • admin
    • proofs
    • oembed
  • APIエンティティ
    • Account
    • Activity
    • Admin::Account
    • Admin::Report
    • Application
    • Attachment
    • Card
    • Context
    • Conversation
    • Emoji
    • Error
    • FeaturedTag
    • Field
    • Filter
    • History
    • IdentityProof
    • Instance
    • List
    • Marker
    • Mention
    • Notification
    • Poll
    • Preferences
    • PushSubscription
    • Relationship
    • Report
    • Results
    • ScheduledStatus
    • Source
    • Status
    • Tag
    • Token

lists

View and manage lists. See also: /api/v1/timelines/list/id for loading a list timeline.

get
Show user's lists

https://mastodon.example/api/v1/lists

Fetch all lists that the user owns.

戻り値: Array of List
OAuth: User token + read:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

ヘッダ
Authorization
必須
string
Bearer <user token>

レスポンス

200: Success

Use id as a parameter for related API calls.

[
  {
    "id": "12249",
    "title": "Friends"
  }
]

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

get
Show a single list

https://mastodon.example/api/v1/lists/:id

Fetch the list with the given ID. Used for verifying the title of a list.

戻り値: List
OAuth: User token + read:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

パス
:id
必須
string
ID of the list in the database
ヘッダ
Authorization
必須
string
Bearer <user token>

レスポンス

200: Success

The list 12249 exists and is owned by you

{
  "id": "12249",
  "title": "Friends"
}

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

404: Not Found

If the ID does not exist or is not owned by you

{
  "error": "Record not found"
}

post
Create a list

https://mastodon.example/api/v1/lists

Create a new list.

戻り値: List
OAuth: User token + write:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

ヘッダ
Authorization
必須
string
Bearer <user token>
フォームのパラメータ
title
必須
string
The title of the list to be created.

レスポンス

200: Success

A list was created successfully with title=test

{
  "id": "13585",
  "title": "test"
}

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

put
Update a list

https://mastodon.example/api/v1/lists/:id

Change the title of a list.

戻り値: List
OAuth: User token + write:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

パス
:id
必須
string
ID of the list in the database
ヘッダ
Authorization
必須
string
Bearer <user token>
フォームのパラメータ
title
必須
string
The title of the list to be updated.

レスポンス

200: Success

The title of list 13585 was successfully updated to title=testing

{
  "id": "13585",
  "title": "testing"
}

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

422: Unprocessable Entity

If the title is blank

{
  "error": "Validation failed: Title can't be blank"
}

delete
Delete a list

https://mastodon.example/api/v1/lists/:id

戻り値: empty object
OAuth: User token + write:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

パス
:id
必須
string
ID of the list in the database
ヘッダ
Authorization
必須
string
Bearer <user token>

レスポンス

200: Success

An empty object will be returned if the list was successfully deleted

{}

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

404: Not Found

ID does not exist or is not owned by you

{
  "error": "The access token is invalid"
}

Accounts in a list

get
View accounts in list

https://mastodon.example/api/v1/lists/:id/accounts

戻り値: Array of Account
OAuth: User token + read:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

パス
:id
必須
string
ID of the list in the database
ヘッダ
Authorization
必須
string
Bearer <user token>
クエリ
max_id
任意
string
Internal parameter. Use HTTP Link header for pagination.
since_id
任意
string
Internal parameter. Use HTTP Link header for pagination.
limit
任意
number
Maximum number of results. Defaults to 40. Max 40. Set to 0 in order to get all accounts without pagination. Pagination is done with the HTTP Link header.

レスポンス

200: Success

[
  {
    "id": "952529",
    ...
  },
  {
    "id": "917388",
    ...
  },
  {
    "id": "869022",
    ...
  },
  {
    "id": "832844",
    ...
  },
  {
    "id": "482403",
    ...
  }
]

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

404: Not Found

The list ID does not exist or is not owned by you

{
  "error": "Record not found"
}

post
Add accounts to list

https://mastodon.example/api/v1/lists/:id/accounts

Add accounts to the given list. Note that the user must be following these accounts.

戻り値: empty object
OAuth: User token + write:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

パス
:id
必須
string
ID of the list in the database
ヘッダ
Authorization
必須
string
Bearer <user token>
フォームのパラメータ
account_ids
必須
array
Array of account IDs to add to the list.

レスポンス

200: Success

{}

401: Unauthorized

{
  "error": "The access token is invalid"
}

404: Not Found

You are not following a given account ID, or you do not own the list ID, or list/account ID does not exist

{
  "error": "Record not found"
}

422: Unprocessable Entity

Account is already in list

{
  "error": "Validation failed: Account has already been taken"
}

delete
Remove accounts from list

https://mastodon.example/api/v1/lists/:id/accounts

Remove accounts from the given list.

戻り値: empty object
OAuth: User token + write:lists
実装履歴:

  • 2.1.0 - 追加

リクエスト

パス
:id
必須
string
ID of the list in the database
ヘッダ
Authorization
必須
string
Bearer <user token>
フォームのパラメータ
account_ids
必須
array
Array of account IDs to remove from the list.

レスポンス

200: Success

Account was successfully removed from the list, or it was already not in the list.

{}

401: Unauthorized

Invalid or missing Authorization header

{
  "error": "The access token is invalid"
}

404: Not Found

List ID is not owned by you or does not exist

{
  "error": "Record not found"
}

最終更新 May 17, 2020 · このページを改善する
他の言語: English

Merch

Tシャツとステッカー(英語)

Mastodonに参加しよう · ブログ · ·

ソースコード · CC BY-SA 4.0 · インプリント