contentsholder/posts.list

作成した記事の一覧を取得

URL

GET /v1.0/contentsholder/posts.list

パラメータ

名前 必須 デフォルト値 説明
unit_id 必須 - コンテンツホルダー・ユニットのID
label 任意 空文字 ラベルによる絞り込み。作成した記事に付与したラベルを指定。空文字の場合は絞り込みをしない。
series_id 任意 空文字 連載による絞り込み。作成した記事がひもづく連載のIDを指定。空文字の場合は絞り込みをしない。
topic_id 任意 空文字 トピックによる絞り込み。作成した記事がひもづくトピックのIDを指定。空文字の場合は絞り込みをしない。
status 任意 空文字 記事の公開状況による絞り込み。下書き(非公開)ならdraft、公開ならpublicを指定。空文字の場合は絞り込みをしない。
published 任意 空文字 公開日時を過ぎている記事のみ絞り込むならtrue。公開日時を過ぎていない記事のみ絞り込むならfalse。空文字の場合は絞り込みをしない。
expired 任意 空文字 公開終了日時を過ぎている記事のみ絞り込む ならtrue。公開終了日時を過ぎていない記事のみ絞り込むならfalse。空文字の場合は絞り込みをしない。
offset 任意 0 取得開始位置。0~5000の範囲で指定。
limit 任意 10 取得件数。1~100の範囲で指定。
sort 任意 created_at 並び順。作成日時の新しい順ならcreated_at、公開日時の新しい順ならpublished_atを指定。

レスポンス

{
    "ok": true,
    "posts": [
        {
            "id": "0123456",
            "url": "https://nordot.app/0123456",
            "title": "桜特集",
            "subtitle": "",
            "status": "public",
            "description": "満開の桜を見に行こう!",
            "source_url": "",
            "published_at": "2017-12-21T02:05:31+00:00",
            "expired_at": "9999-12-31T23:59:59+00:00",
            "created_at": "2017-12-21T02:05:32+00:00",
            "updated_at": "2018-02-06T20:17:23+00:00",
            "cover_image": "https://nordot-res.cloudinary.com/t_size_l/ch/images/0123456/origin_1.jpg",
            "images":[
            {
                "id": "0123456",
                "filename": "0123456.JPG",
                "url": "https://nordot-res.cloudinary.com/t_size_l/ch/images/0123456/origin_1.jpg",
                "url_w": 800,
                "url_h": 1200,
                "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/ch/images/0123456/origin_1.jpg",
                "caption": "",
                "created_at": "2017-11-25T01:42:18+00:00",
                "updated_at": "2017-11-25T01:42:18+00:00"
            },
          ...
          ],
          "labels":[
              {
                  "name": "桜",
                  "count": 5
              },
          ],
          "tags": [
              "天気",
              "ウェザーリポート"
          ],
          "series":{
              "id": "0123455",
              "title": "連載1",
              "description": "",
              "created_at": "2017-02-07T09:30:59+00:00",
              "updated_at": "2017-05-16T05:57:26+00:00",
              "cover_image":{
                "url": "https://nordot-res.cloudinary.com/ch/series/0123455/cover_2.jpg",
                "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/ch/series/0123455/cover_2.jpg"
              }
          },
          "topic":{
              "id": "201631389440476662",
              "title": "トピック1",
              "created_at": "2017-02-07T09:31:09+00:00",
              "updated_at": "2017-02-07T09:31:09+00:00"
          },
          "creator": null,
          "updater":{
              "id": "0012344",
              "email": "nordots@xxx.jp",
              "name": "山田太郎",
              "job_title": "ライター",
              "about": "桜の開花を予想して30年。",
              "accepted_terms_ver": 1,
              "created_at": "2015-11-17T11:33:40+00:00",
              "updated_at": "2018-02-20T11:36:14+00:00",
              "profile_image":{
                "url": "https://nordot-res.cloudinary.com/members/0012344/profile_1.png",
                "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/members/0012344/profile_1.png"
              }
          },
          "authors":[
          ],
          "unit":{
              "id": "1234567",
              "name": "ノアドット新聞",
              "status": "public",
              "signature_color": "0f0f0f",
              "header_type": "background",
              "header_position": "center",
              "copyright_owner": "株式会社ノアドット新聞",
              "default_post_expire_days": 0,
              "created_at": "2015-11-16T19:06:46+00:00",
              "updated_at": "2018-03-05T03:17:04+00:00",
              "header_image":{
                  "url": "https://nordot-res.cloudinary.com/ch/units/1234567/header_69.png",
                  "url_w": 400,
              },
              "profile_image": null,
              "publisher":{
                  "id": "0012345",
                  "name": "株式会社ノアドット新聞",
                  "created_at":
                  "2015-11-16T19:02:38+00:00",
              },
                  "language": "en-US",
                  "timezone": "Asia/Tokyo"
              }
          }
          ],
          "paging":{
              "count": 10,
              "offset": 0,
              "limit": 10,
              "has_next": true
          }
      }
}

postsには、条件に一致したcontentsholder postオブジェクトの配列が入っています。詳細は、 contentsholder postオブジェクトとpagingオブジェクトを参照してください。

エラー

エラーコード 説明
no_unit_id unit_idが必須なのに渡されていない
invalid_unit_id 不正なunit_idの指定
unit_not_found ユニットが見つからない
invalid_label 不正なlabelの指定
invalid_series_id 不正なseries_idの指定
series_not_found 連載が見つからない
invalid_topic_id 不正なtopic_idの指定
topic_not_found トピックが見つからない
invalid_status 不正なstatusの指定
invalid_published 不正なpublishedの指定
invalid_expired 不正なexpiredの指定
invalid_offset 不正なoffsetの指定
invalid_limit 不正なlimitの指定
invalid_sort 不正なsortの指定

上記以外のエラーは、共通エラーの項目を参照してください。