Skip to content

Add new /batches/:batchId endpoint #5458

@slapec93

Description

@slapec93

Summary

There are 3 endpoints currently:

  • GET /stamps - returns postage batches owned by the node with additional details only known by the owner node, such as utilization and label
  • GET /stamps/:batchId - returns a single postage batch owned by the node with additional details...
  • GET /batches - returns all globally available postage batches with limited information

There is no GET /batches/:batchId endpoint, which is bad for two reasons:

  • No API symmetry
  • When I only want to query a single postage batch not owned by my node, I first have to fetch all of them and then find from the collection. This can waste bandwidth and grow slower when the number of postage batches increase.

Motivation

I wanted to top up somebody else's postage batch, using a simple endpoint to first fetch the actual status of the postage batch

Implementation

Drawbacks

AI Disclosure

  • This issue contains suggestions and text generated by an LLM.
  • I have reviewed the AI generated content thoroughly.
  • I possess the technical expertise to responsibly review the AI generated content mentioned in this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions