No internet connection
  1. Home
  2. Support

Is there any API documentation?

By Tim Martin @timmartin2020-04-21 10:32:32.589Z

I have successfully created an API key, but I can't find any documentation of the API, even a list of what endpoints are available. Where should I be looking?

Solved in post #2, click to view
  • 6 replies
  1. KajMagnus @KajMagnus2020-04-22 02:11:42.461Z

    Hi Tim, I started writing docs here: https://www.talkyard.io/forum/latest/docs — right now there's just one article, about Single Sign-On via API.

    There's an create-new-topics and create-new-replies API too, and soon a search API.

    What could you be interested in doing, via an API?

    ReplySolution
    1. TTim Martin @timmartin2020-04-22 07:28:44.746Z

      Thanks for the information. At the moment I'm still figuring out my design, so I don't have a fixed idea what I need to do, I was hoping to figure out what was possible. My main interest is in providing more integration between the Q&A forum and other pages of my site. So perhaps being able to embed the top 5 most popular questions on topic X within a page relating to that topic (i.e. I'd need an API that can return topics by tag, sorted by popularity or similar). I might also use the API for creating new topics, but it sounds like that's already available.

      To be honest, I'm looking to get an MVP together quite quickly here so I'm not sure that this solution is going to work for me. It's possible we'll come back to it in the longer term.

      1. KajMagnus @KajMagnus2020-04-25 07:21:01.564Z2020-04-25 07:28:01.231Z

        I like the "embed the top 5 most popular questions on topic X within a page relating to that topic" idea.

        I started a list of API ideas here: https://www.talkyard.io/-379/talkyard-api-ideas

        (I'm curious what the MVP will be about? Sorry if maybe I cannot implement features and API endpoints fast enough for your situation — but thanks anyway for the ideas & feedback you posted :- ))

        Maybe this Top 5 Topics in Category / Tag X could be the Search API, but with the full text query left out. Something like: POST /-/v0/search with JSON:

        { searchQuery: {  tagRefs: [tagX],  orderBy: SortOrder.PopularFirst,  limit: 5 }}
        
        1. KajMagnus @KajMagnus2020-04-26 21:41:49.531Z

          @timmartin — I'm almost done adding an "list the X most popular questions on topic X" API. I realize you probably won't use it, because you were short of time — still, it's a good idea. And I think it was good to see how this Find-popular-topics-about-X API, can share code with the upcoming full text search API.

          Seems the find-popular-topics-about-X API will look like:

          POST /-/v0/list  {
            listQuery: { findWhat: 'Pages', lookWhere: { inCategories: [categoryX] },
            orderBy: 'PopularFirst',
            limit: 5,
          }
          

          Whilst, full text search:

          POST /-/v0/search  {
            searchQuery: { freetext: "how climb trees", lookWhere: { inCategories: [categoryX] },
            orderBy: 'PopularFirst',
            limit: 5,
          }
          
      2. In reply toKajMagnus:
        BCraig Bramscher @bramscher2020-04-25 06:26:07.677Z

        Hi! I am trying to use these instructions to conenct with a bubble.io instance. It has an api connector, which I have used for other integrations for SSO. However I can not seem to structure the json properly to have talkyard like the response.

        when i initialize the call, I get BAD REQUEST

        POST /-/v0/sso-upsert-user-generate-login-secret' [Expecting text/json or application/json body]

        I am wondering if I could connect using postman or another way to better troubleshoot this. Or maybe I can not use the standard API connection tools in bubble.io ?

        I am happen to share more details, if I could get it working with Bubble there would be many people that would like to follow my integration with their systems as a lot of people are going with discourse but not terribly happy.

        Thanks

        Craig

        1. KajMagnus @KajMagnus2020-04-25 12:07:21.860Z2020-04-25 12:14:19.531Z

          I replied here, in a new topic:
          https://www.talkyard.io/-380/how-use-talkyard-with-bubbleio — would you like to reply there please :- )