Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-572

Extend the get-dump-info status endpoint to be more useful

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • API
    • None

      The documentation for this endpoint does not really make it very clear what it's about, or what sort of use case it supports. Especially since it returns info about incremental dumps, not full exports.

      For the id, it might be useful to document that valid values are 1-N, where N is the ID returned when you don't specify one.

      Furthermore, the usefulness of the endpoint would seem to be increased by returning more data, like:

      1. the timestamp in the "normal Listenbrainz" format (i.e. unix timestamp)
      2. perhaps a manifest of the dump
      3. if there is in fact information available about full exports (i.e. id 136 can be determined to be be both an incremental dump and a full export, include that info

      Example: https://api.listenbrainz.org/1/status/get-dump-info?id=136 currently returns:

      {
        "id": 136,
        "timestamp": "20200312-000002"
      }
      

      But if it could return

      {
         "id": 136,
         "timestamp": "20200312-000002",
         "ts": 1583971202,
         "fullexport": true,
         "incremental": true,
         "manifest": {
           "fullexport": {
             "directory": "listenbrainz-dump-136-20200312-000002-full",
             "files": [
               {
                 "name": "listenbrainz-listens-dump-136-20200312-000002-full.tar.xz",
                 "md5": "91a566883c0f8ffe3a06569282e8c051",
                 "sha256": "2ce27db9671675a7bcaa27cc3080315cfa2f21e64c9011bb3df6a1934ff859a2",
               },
               {
                 "name": "listenbrainz-listens-dump-136-20200312-000002-spark-full.tar.xz",
                 "md5": "e6f67c92d465e635e0dc82c71ee31f7b",
                 "sha256": "7090c201f7ca9f613a14a82235dc5cb9bdaeefe4e7cfc3c61dcd4299799a72b8",
               },
               {
                 "name": "listenbrainz-public-dump-136-20200312-000002.tar.xz",
                 "md5": "02b5a4885e98ef9327576ac98ea43dbc",
                 "sha256": "0f32f0b8303e07f22fa8214340b87e6432757b2243136e5265c6905674e9a3e6",
               }
             ]
           },
           "incremental": {
             "directory": "listenbrainz-dump-136-20200312-000002-incremental",
             "files": [
               {
                 "name": "listenbrainz-listens-dump-136-20200312-000002-incremental.tar.xz",
                 "md5": "7a4d5aa59faf6bf3da60224330a3a9be",
                 "sha256": "fef5f41b6c24f52a6728f25fae05b542094837ed7298ca7fa955bad314beed7a",
               },
               {
                 "name": "listenbrainz-listens-dump-136-20200312-000002-spark-incremental.tar.xz",
                 "md5": "15e9a7facacf1cdc05f08927279469ff",
                 "sha256": "6aaedca1a5deab918de2f88b5f0d80dbe0a2ba6d2ebb9f82a06194bcadb5f7f1",
               }
             ]
           }
         }
      }
      

      instead, that would likely be more useful.

      (The above uses regular parens instead of curly ones because of the horrible Jira formatting.)

            Unassigned Unassigned
            zastai Tim Van Holder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package