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

docs:add more detail about nsqlookupd http api #81

Open
ctlove0523 opened this issue Apr 15, 2022 · 0 comments
Open

docs:add more detail about nsqlookupd http api #81

ctlove0523 opened this issue Apr 15, 2022 · 0 comments

Comments

@ctlove0523
Copy link

current description about GET /lookup miss description about response(http status code and http response body),if add more info about response maybe helpful for user(#44 is good).

GET /lookup

Returns a list of producers for a topic

Request Params:

name optional type location description
topic NO String Query the topic to list producers for

Response Params:

name type description
channels List channels of this topic
producers List producer of this topic

Producer

name type description
remote_address String
hostname String
broadcast_address String
tcp_port Int
http_port Int
version String

Request example:

curl -i http://localhost:4161/lookup?topic=test

Response example:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Nsq-Content-Type: nsq; version=1.0

{
    "channels":[

    ],
    "producers":[
        {
            "remote_address":"127.0.0.1:56121",
            "hostname":"DESKTOP-TJTHRU9",
            "broadcast_address":"DESKTOP-TJTHRU9",
            "tcp_port":4150,
            "http_port":4151,
            "version":"1.2.1"
        }
    ]
}

If we think this helpful,i can make a PR to add more description about nsqlookupd's api

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

No branches or pull requests

1 participant