Skip to content

Two /tags/{uid} APIs? #1234

@ldeffenb

Description

@ldeffenb

Summary

Apparently there are two different /tags/{uid} APIs implemented, one on the debug port and one on the API port. Consider:

API port:
curl http://127.0.0.1:8080/tags/172117899 2>nul | jq
{
"uid": 172117899,
"startedAt": "2021-02-10T16:44:50.3778219-05:00",
"total": 182,
"processed": 182,
"synced": 182
}

Debug port:
curl http://127.0.0.1:6060/tags/172117899 2>nul | jq
{
"total": 182,
"split": 182,
"seen": 182,
"stored": 182,
"sent": 0,
"synced": 0,
"uid": 172117899,
"address": "",
"startedAt": "2021-02-10T16:44:50.3778219-05:00"
}

From the startedAt timestamps, you can tell these are two different views of the same tag. But the full form is documented in the main API at https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1{uid}/get

And tag isn't even mentioned in the Debug API at: https://docs.ethswarm.org/debug-api/

But yet, in https://github.com/ethersphere/bee/blob/master/openapi/SwarmCommon.yaml you can find both NewTagResponse (the short version) and NewTagDebugResponse (the long version).

Steps to reproduce

Create a tag, upload a file with it, and use the /tags/{uid} on both the gateway and debug port and you'll see the difference.

Expected behavior

I expected only one /tags/{uid} response, and expected the complete documented information one to come out of the gateway port.

Actual behavior

See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions