No internet connection
  1. Home
  2. Ideas

API request: export-site-json for a single category

By Christian Scheuer @chrscheuer
    2021-01-02 04:56:53.451Z

    Hi @KajMagnus

    Happy new year :)

    We are starting to integrate Talkyard with Clickup (we switched to Clickup for project management instead of using Monday).

    We've now successfully used the export-site-json function in Talkyard to export all of our existing bug reports in our forum into Clickup for a one-way data sync.

    In Clickup, we can use the project management tools to manage sprints, deadlines, tags, etc.

    We will likely need to update this information multiple times a day. It would be extremely helpful if we didn't need to do a full export-site-json for the whole site, but if we could instead just do it for every page, post, etc. in the category where we have our bug reports.

    The only tables we're currently reading are posts, pages and pagePaths.

    Would it be possible to make such an API? This would be very helpful in our integrations and an easier and quicker thing to get going easily before webhooks are eventually implemented.

    Linked from:

    1. support-chat
    • 7 replies
    1. Hi Christian, happy new year you too,

      We will likely need to update this information multiple times a day.
      It would be extremely helpful if we didn't need to do a full export-site-json for the whole site
      if we could instead just do it for every page, post, etc. in the category where we have our bug reports.

      Yes that'd be good for Ty too (less work for the server).

      Hmm, there's the List API, looks like so:

      // List popular pages in a category:
      //
      //  /-/v0/list  {
      //    listQuery: {
      //      findWhat: 'Pages',
      //      lookWhere: { inCategories: [categoryA, catB, catC] },
      //    }
      //    sortOrder: 'PopularFirst',
      //    limit: 5,
      //  }
      

      If sortOrder was RecentFirst and there also was a createdAtOrAfterMs Unix timestamp parameter
      — could that be what you neeed, any thoughts about that?

      ***

      About polling: Maybe not initially, but some time later, it'd make sense with an outgoing webhook? I remember this topic:

      Oh now I see:

      easier and quicker thing to get going easily before webhooks are eventually implemented

      Ok so I'm thinking that, for you, webhooks might be even better, but polling would be nice enough for now?

      1. CChristian Scheuer @chrscheuer
          2021-01-02 13:25:27.079Z

          If sortOrder was RecentFirst and there also was a createdAtOrAfterMs Unix timestamp parameter
          — could that be what you neeed, any thoughts about that?

          Yes, if we would receive both pages, posts (we need post nr 0 and 1 to get the title and body of the original post) and pagePaths for the category in that API (I don't remember what the list API returns)
          What we need to update for existing threads are the statuses - so, we need to find not just the new ones (createdAtOrAfterMs) but also any page that may have been updated/modified after the last check.

          Ok so I'm thinking that, for you, webhooks might be even better, but polling would be nice enough for now?

          Exactly :)

          1. CChristian Scheuer @chrscheuer
              2021-01-03 14:20:39.686Z

              Hi @KajMagnus

              Just a quick question for now – can export-site-json as it's used today be used with an API user?
              I think you mention somewhere that you need to be logged in as an admin user (so, I'm thinking, in the browser), so not sure if it's also accessible via API?

              1. CChristian Scheuer @chrscheuer
                  2021-01-03 14:44:35.306Z

                  Nevermind - it works :)
                  But yea, a more incremental API would be great to add so we won't put such a strain on the server.

            • In reply tochrscheuer:

              export all of our existing bug reports in our forum into Clickup

              In "how much detail"? The title and Orig Post text — what about replies?
              What about topic status — e.g. closed or solved?

              Oh now I see:

              The only tables we're currently reading are posts, pages and pagePaths

              Ok, so the topic, and the replies, then, I'm thinking

              1. CChristian Scheuer @chrscheuer
                  2021-01-02 13:28:20.671Z

                  Yes exactly, we read:

                  • Is it "closed" and when
                  • Is it "done" and when
                  • What's the post nr 0 body - the title
                  • What's the post nr 1 body - the text

                  But we would reasonably also want to iterate through the posts and make 2-way integration eventually, so we can answer forum posts directly from within Clickup, or, for example, make sure to mark the forum thread as solved, if we mark it as solved in Clickup etc.

                  1. Don't know if there is be one more upcoming (in a few months?) status you'd want: the waiting: true/false status, or (longer name) authorWaitingForReply: true/false.

                    Because sometimes someone asked for help, you replied, and now it's his/her turn to reply next, e.g. provide you with some info you need.

                    Details: API: Being able to fetch Topics based on answered state #post-7

                • Progress
                  with doing this idea
                • @KajMagnus marked this topic as Planned 2021-01-03 21:58:03.507Z.