openapi: 3.0.0
info:
title: IPFS RPC Add Diag 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: Diag
paths:
/api/v0/diag/cmds:
post:
operationId: diag/cmds
description: List commands run on this IPFS node.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-diag-cmds
parameters:
- name: verbose
in: query
description: Print extra information.
schema:
type: boolean
responses:
'200':
description: Successful response
content:
application/json:
example:
- Active: <bool>
Args:
- <string>
Command: <string>
EndTime: <timestamp>
ID: <int>
Options:
<string>: <object>
StartTime: <timestamp>
tags:
- Diag
/api/v0/diag/cmds/clear:
post:
operationId: diag/cmds/clear
description: Clear inactive requests from the log.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-diag-cmds-clear
parameters: []
responses:
'200':
description: Successful response
tags:
- Diag
/api/v0/diag/cmds/set-time:
post:
operationId: diag/cmds/set-time
description: Set how long to keep inactive requests in the log.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-diag-cmds-set-time
parameters:
- name: arg
in: query
description: Time to keep inactive requests in log.
required: true
schema:
type: string
responses:
'200':
description: Successful response
tags:
- Diag
/api/v0/diag/profile:
post:
operationId: diag/profile
description: Collect a performance profile for debugging.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-diag-profile
parameters:
- name: output
in: query
description: The path where the output .zip should be stored.
schema:
type: string
default: ./ipfs-profile-[timestamp].zip
- name: collectors
in: query
description: The list of collectors to use for collecting diagnostic data.
schema:
type: array
items:
type: string
- name: profile-time
in: query
description: The amount of time spent profiling. If this is set to 0, then sampling profiles are skipped.
schema:
type: string
default: 30s
- name: mutex-profile-fraction
in: query
description: The fraction 1/n of mutex contention events that are reported in the mutex profile.
schema:
type: integer
default: 4
- name: block-profile-rate
in: query
description: The duration to wait between sampling goroutine-blocking events for the blocking profile.
schema:
type: string
default: 1ms
responses:
'200':
description: Successful response
tags:
- Diag
/api/v0/diag/sys:
post:
operationId: diag/sys
description: Print system diagnostic information.
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-diag-sys
parameters: []
responses:
'200':
description: Successful response
tags:
- Diag
externalDocs:
url: https://docs.ipfs.tech/reference/kubo/rpc/