Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404: Not Found when pushing #31

Open
YSmetana opened this issue Sep 25, 2015 · 4 comments
Open

404: Not Found when pushing #31

YSmetana opened this issue Sep 25, 2015 · 4 comments
Labels

Comments

@YSmetana
Copy link

Hi! Giving a try... ;)

Wthats wrong with me?

lufa@lufa-work:~$ http POST http://192.168.0.116:8080/api/v0.1/8caa55c1688e48c28cdf1f8a5e88bd1f/push tile=text key=id_1 data={"text":"Hello World"}
HTTP/1.1 404 Not Found
Content-Length: 69
Content-Type: text/html; charset=UTF-8
Date: Fri, 25 Sep 2015 12:54:35 GMT
Server: TornadoServer/3.0.1

<html><title>404: Not Found</title><body>404: Not Found</body></html>

Server:

root@vm116:~/.tipboard# tipboard runserver 192.168.0.116 8080
Raven is not configured (logging is disabled). Please see the documentation for more information.
[I 150925 15:55:30 console:145] Following keys already in Redis:

[I 150925 15:55:30 console:160] Listening on port 192.168.0.116:8080...
[I 150925 15:55:31 app:160] Web socket opened.
[I 150925 15:55:31 app:166] Subscribed to telelan:events on Redis.
[I 150925 15:55:31 app:123] Message received: update.
[W 150925 15:55:34 web:1514] 404 POST /api/v0.1/8caa55c1688e48c28cdf1f8a5e88bd1f/push/id_1 (192.168.0.150) 0.54ms

Config:

root@vm116:~/.tipboard# cat layout_config.yaml 
details:
    page_title: Empty Dashboard
layout:
    - row_1_of_2:
        - col_1_of_4 flip-time-2:
            - tile_template: text
              tile_id: id_1
              title: text
              classes:

        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:

        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:

        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:

    - row_1_of_2:
        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:

        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:

        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:

        - col_1_of_4:
            - tile_template: empty
              tile_id: empty
              title: Empty Tile
              classes:
@ghost
Copy link

ghost commented Sep 25, 2015

Check if 8caa55c1688e48c28cdf1f8a5e88bd1f' sits in your~/.tipboard/settings-local.py` as API_KEY

Did you try by curl?

curl http://192.168.0.116:8080/api/v0.1/8caa55c1688e48c28cdf1f8a5e88bd1f/push -X POST -d "tile=text" -d "key=id_1" -d 'data={"text": "Hello World!"}'

Try both and provide answers, please.

@YSmetana
Copy link
Author

I have copied wrong key. So sorry...

Works now. Works with curl. httpie need the following syntax:

 lufa@lufa-work:~$ http --form POST http://192.168.0.116:8080/api/v0.1/8caa55c1688e48c28cdf1f8a5e88bdff/push tile=text key=id_1 data='{"text":"Hello World"}'
HTTP/1.1 200 OK
Content-Length: 33
Content-Type: text/html; charset=UTF-8
Date: Fri, 25 Sep 2015 13:22:47 GMT
Server: TornadoServer/3.0.1

Tile's data pushed successfully.

Thank you!

P.S.
Shouldn't I receive 401 Unauthorized or similar in such cases?

@xor-xor
Copy link
Contributor

xor-xor commented Oct 14, 2015

Yes, you are absolutely right - Tipboard should return 401 instead of 404 in such case.

@xor-xor xor-xor added the bug label Oct 14, 2015
@sushmabn
Copy link

[root@localhost .tipboard]# curl http://10.0.0.0:7272/api/v0.1/apikey/push -X POST -d "tile=text" -d "key=01" -d 'data={"text": "Hello World!"}'

<title>504 Gateway Timeout</title>

Gateway Timeout

Server error - server 10.0.0.0 is unreachable at this moment.

Please retry the request or contact your administrator.

How to solve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants