deck icon indicating copy to clipboard operation
deck copied to clipboard

Provide public REST-API (and or documentation)... [$25 awarded]

Open stefan-niedermann opened this issue 9 years ago • 30 comments

... so one can write native applications that are in sync with the web interface :)


The $25 bounty on this issue has been claimed at Bountysource.

stefan-niedermann avatar Mar 29 '17 20:03 stefan-niedermann

Heya, I do have some in-flight work, but I am in the middle of switching laptops. I realize I'm slow as fuck, but I can spend some time tomorrow evening on this, and a few other evenings this week.

srbaker avatar Apr 09 '18 08:04 srbaker

@srbaker Take your time. If you need any help, maybe you can just ping @putt1ck for that.

juliusknorr avatar Apr 09 '18 09:04 juliusknorr

@srbaker let us know if there's anything we could do to help

putt1ck avatar Apr 13 '18 14:04 putt1ck

Any news? We've got a client project in the pipeline that we'd love to build around NC but we'd need a way to write emails to Deck for it to fly.

putt1ck avatar May 17 '18 14:05 putt1ck

I'll happily take a look at this, a json api would definitely benefit the app :)

NebriBlackwing avatar Jul 12 '18 11:07 NebriBlackwing

@juliushaertl If you don't mind take a quick peak at commit: b2843c858c1ab9b2031a12a698f0b010397f79d5

I'm trying to spit back post data into a DataResponse just to verify my understanding, however when I test it, only the boardId is getting populated, everything else is getting returned as null. In fact if I send up an empty post body, boardId is still getting populated to 1! Seems like it's grabbing the url segments rather than the post.

Most MVC frameworks I've worked with, usually need some kind of denotation that the method in question is a POST, I haven't seen that in nextcloud apps yet. Below is a screenshot from rest client.

UPDATE: turns out the problem was in the rest client that I was trying to use. Switching out that rest client for another and now it's generating the request correctly. API is doing it's thing fine in that initial test :).

NebriBlackwing avatar Jul 12 '18 14:07 NebriBlackwing

I'm trying to spit back post data into a DataResponse just to verify my understanding, however when I test it, only the boardId is getting populated, everything else is getting returned as null. In fact if I send up an empty post body, boardId is still getting populated to 1! Seems like it's grabbing the url segments rather than the post.

You can access the values directly by using $this->request->post['boardId'] or $this->request->urlParams['boardId']

UPDATE: turns out the problem was in the rest client that I was trying to use. Switching out that rest client for another and now it's generating the request correctly. API is doing it's thing fine in that initial test :).

Ah ok, great to hear that.

juliusknorr avatar Jul 14 '18 10:07 juliusknorr

@nextcloud/deck just to be sure nothing gets missed, can I get a list of endpoints that we want to support for the api? We are very close now :+1:

NebriBlackwing avatar Jul 16 '18 22:07 NebriBlackwing

I know that there is already a pull request with a lot of code. I just found kanboard.org which already provides a API with existing Android clients (didn't checked other platforms) so I wonder if it would make sense to copy the API. This way we would be compatible with existing apps.

schiessle avatar Aug 01 '18 07:08 schiessle

The API code is finished, we're just getting through validation checks. Also REST provides a common interface that easily allows data exchange with other applications, so we're already compatible with existing applications.

NebriBlackwing avatar Aug 01 '18 14:08 NebriBlackwing