Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Support for /refs endpoints #92

Closed
@aphelionz

Description

@aphelionz

References:

/refs

List links (references) from an object.
curl "http://localhost:5001/api/v0/refs?arg=<ipfs-path>&format=<dst>&edges=<value>&unique=<value>&recursive=<value>&max-depth=-1"

  • Requires object.put Need to refactor tests.
  • Arguments
    • arg [string]: Path to the object(s) to list refs from. Required: yes.
    • format [string]: Emit edges with given format. Available tokens: . Default: . Default: "". Required: no.
    • edges [bool]: Emit edge format: -> . Required: no.
    • unique [bool]: Omit duplicate refs from output. Required: no.
    • recursive [bool]: Recursively list links of child nodes. Required: no.
    • max-depth [int]: Only for recursive refs, limits fetch and listing to the given depth. Default: "-1". Required: no.
  • On success, the call to this endpoint will return with 200 and the following body:
{
  "Err": "<string>",
  "Ref": "<string>"
}

/refs/local

List all local references.
curl "http://localhost:5001/api/v0/refs/local"

  • Test requires IPFS add, perhaps we can refactor to ipfs.dag.put
  • This endpoint takes no arguments.
  • On success, the call to this endpoint will return with 200 and the following body:
{
  "Err": "<string>",
  "Ref": "<string>"
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions