Join the conversation

Sign in to join this conversation, and others like it, in the communities you care about.

Wekan

Wekan is an open-source kanban board (Trello like) which allows a card-based task and to-do management.

Wekan / General

POST api user to board

POST api user to board

Wekan / General · January 13, 2020 at 8:41pm

If, through the api, I the create boards with lists and cards, in order for users to see those boards, I need to post the users to a board. I seem to have the syntax correct but am not getting a payload back from node.js . I get no error in the api and the boards, lists and cards get created but only the admin user whose token I am using can see them, just an empty data return (specifically a single empty object (is that the correct response)? When I look up the user I am trying to add to the board, I do not see the board I was trying to add them to. Is there an endpoint that shows either all the users for a board or all the boards for a user?

Is there any way to determine what its doing if I am not getting an error back? If I post the boards with lists and cards the lead admin can see it. If they invite an existing user (in the GUI) (the other user (the only other user in the system) is chosable, then that user indicates they failed to get an e-mail but it says they joined and when you switch logins and login in as the other user you see the board with an accept deny prompt super imposed. But when you look up that user you do not see board accepted.

How do I get error messages? How do I see board a user has accepted? What else can I do to troubleshoot this. the body I am user is isadmin false, commentsonly false, no comments false. url is api/boards/h3F93g2YviwC3J7KJ/members/SXLP3KJme9d4uCo5q/add

What else can I do to troubleshoot this? where is the log file that show the error? Thanks again

Load previous messages

January 14, 2020 at 5:21pm

doing that. That is what is returning an empty object and not adding anything that works to the board for a new user. Seriously. Where are those logs? :) :) :)

    • reply
    • like

    I would presume you did login as admin to Wekan API to get bearer token, and then used that bearer token at that role API call https://github.com/wekan/wekan/wiki/REST-API#example-call---as-form-data

      • reply
      • like

      yes I have and it creates boards and lists and cards fine. But I just noticed two things 1) that I am not including an action parameter in the body (just on the command on the query parameters 2) I only saw three parameters I listed (admin, comments only, no comments), I see a worker in this description. Does either change anything? Not to be a pest but where do I look to get logs? I have spend alot of time searching for them. Where are the logs? Pretty sure that 10 minutes with logs will remove most of the fog about why this is happening. Maybe not, thanks again for your help :)

        Edited
        • reply
        • like

        To get logs, you should build Wekan from source

          • reply
          • like

          and run with meteor command

            • reply
            • like

            Snap has logging disabled mostly, because Snap generates a lot of logs and fills disk space

              • reply
              • like

              Wekan logs are at bash console or browser/inspect/console

                • reply
                • like

                ok no logs with snap. Got it thanks

                  • reply
                  • like

                  ok found it

                    • reply
                    • like

                    you have to include "add" on commandline (query parameter

                      • reply
                      • like

                      AND

                        • reply
                        • like

                        you have to define action in body as "add"

                          • reply
                          • like

                          then it works

                            • reply
                            • like

                            thanks again

                              • reply
                              • like

                              :)

                                • reply
                                • like

                                and BTW

                                  • reply
                                  • like

                                  when it works it still returns an empty object

                                    • reply
                                    • like

                                    but it works - Cool

                                      • reply
                                      • like

                                      What kind of query works? I could add it to wiki.

                                        • reply
                                        • like

                                        /api/boards/{boardid}/members/{MEMBERID/add Body{ "action" : add, "isadmin" : false ...........

                                          • reply
                                          • like

                                          you have to have the "add" one the query line but more importantly you also have to have "action" : "add" in the body.

                                            Edited
                                            • reply
                                            • like

                                            in either case it return an object that is empty {}

                                              • reply
                                              • like

                                              but if you add in the action parameter in the body it does assign that user as a member on that board

                                                • reply
                                                • like

                                                Thank you again Lauri :)

                                                  • reply
                                                  • like