openapi: 3.0.0
info:
title: IPFS RPC Add Refs API
version: v0
description: 'When a Kubo IPFS node is running as a daemon, it exposes an HTTP RPC API that allows you to control the node and run the same commands you can from the command line.
In many cases, using this RPC API is preferable to embedding IPFS directly in your program — it allows you to maintain peer connections that are longer lived than your app and you can keep a single IPFS node running instead of several if your app can be launched multiple times. In fact, the `ipfs` CLI commands use this RPC API when operating in online mode.'
x-providerName: IPFS
x-logo:
url: https://raw.githubusercontent.com/ipfs/ipfs-docs/55fe8bc6a53ba3b9023951fb4b432efbbc81fba5/docs/.vuepress/public/images/ipfs-logo.svg
servers:
- description: Local IPFS node
url: http://localhost:5001
- description: Local IPFS node
url: http://127.0.0.1:5001
- description: Infura hosted IPFS node
url: https://ipfs.infura.io:5001
tags:
- name: Refs
paths:
/api/v0/refs:
post:
operationId: refs
description: List links (references) from an object.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-refs
parameters:
- name: arg
in: query
description: Path to the object(s) to list refs from.
required: true
schema:
type: string
- name: format
in: query
description: 'Emit edges with given format. Available tokens: <src> <dst> <linkname>.'
schema:
type: string
default: <dst>
- name: edges
in: query
description: 'Emit edge format: <from> -> <to>.'
schema:
type: boolean
- name: unique
in: query
description: Omit duplicate refs from output.
schema:
type: boolean
- name: recursive
in: query
description: Recursively list links of child nodes.
schema:
type: boolean
- name: max-depth
in: query
description: Only for recursive refs, limits fetch and listing to the given depth.
schema:
type: integer
default: -1
responses:
'200':
description: Successful response
content:
application/json:
example:
Err: <string>
Ref: <string>
tags:
- Refs
/api/v0/refs/local:
post:
operationId: refs/local
description: List all local references.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-refs-local
parameters: []
responses:
'200':
description: Successful response
content:
application/json:
example:
Err: <string>
Ref: <string>
tags:
- Refs
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/