--- title: Kubo RPC API description: RPC API v0 reference for Kubo IPFS daemon. --- # Kubo RPC API v0 reference ::: tip Generated on 2023-05-09, from kubo v0.20.0 This document was autogenerated from [v0.20.0](https://github.com/ipfs/kubo/releases/tag/v0.20.0). For issues and support, check out the [http-api-docs](https://github.com/ipfs/ipfs-docs/tree/main/tools/http-api-docs) generator on GitHub. ::: 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. ::: danger NEVER EXPOSE THE RPC API TO THE PUBLIC INTERNET The RPC API provides admin-level access to your Kubo IPFS node, including `/api/v0/config`. It is bound to `localhost` by default on purpose. You should never expose it to the public internet, just like you would never expose a SQL database or other backend service. If you are looking for an interface designed for browsers and public internet, consider implementation-agnostic [HTTP Gateway](../../reference/http/gateway.md) instead. ::: ## Getting started ### Alignment with CLI commands The API under `/api/v0/` is an RPC-style API over HTTP, not a REST API. [Every command](../../reference/kubo/cli.md) usable from the CLI is also available through the HTTP RPC API. For example: ```sh > ipfs swarm peers /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ /ip4/104.236.151.122/tcp/4001/p2p/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx /ip4/104.236.176.52/tcp/4001/p2p/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z > curl -X POST http://127.0.0.1:5001/api/v0/swarm/peers { "Strings": [ "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", "/ip4/104.236.151.122/tcp/4001/p2p/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx", "/ip4/104.236.176.52/tcp/4001/p2p/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z", ] } ``` ### Arguments Arguments are added through the special query string key "arg": ``` > curl -X POST "http://127.0.0.1:5001/api/v0/swarm/disconnect?arg=/ip4/54.93.113.247/tcp/48131/p2p/QmUDS3nsBD1X4XK5Jo836fed7SErTyTuQzRqWaiQAyBYMP" { "Strings": [ "disconnect QmUDS3nsBD1X4XK5Jo836fed7SErTyTuQzRqWaiQAyBYMP success", ] } ``` Note that it can be used multiple times to signify multiple arguments. ### Flags Flags are added through the query string. For example, the `--encoding=json` flag is the `&encoding=json` query parameter below: ``` > curl -X POST "http://127.0.0.1:5001/api/v0/object/get?arg=QmaaqrHyAQm7gALkRW8DcfGX3u8q9rWKnxEMmf7m9z515w&encoding=json" { "Links": [ { "Name": "index.html", "Hash": "QmYftndCvcEiuSZRX7njywX2AGSeHY2ASa7VryCq1mKwEw", "Size": 1700 }, { "Name": "static", "Hash": "QmdtWFiasJeh2ymW3TD2cLHYxn1ryTuWoNpwieFyJriGTS", "Size": 2428803 } ], "Data": "CAE=" } ``` Some flags may be repeated. For example, the `--status` flag may be reused as below: ``` > curl -X POST "http://127.0.0.1:5001/api/v0/pin/remote/service/ls?name=myservice&status=pinned&status=pinning" ``` ::: tip Some arguments may belong only to the CLI but appear here too. These usually belong to client-side processing of input, particularly in the `add` command. Additionally, as a convenience certain CLI commands may allow passing repeated flags as delimited lists such as `ipfs pin remote service ls --status=pinned,pinning`; however, this does not apply to the HTTP API. ::: ## HTTP status codes Status codes used at the RPC layer are simple: - `200` - The request was processed or is being processed (streaming) - `500` - RPC endpoint returned an error - `400` - Malformed RPC, argument type error, etc - `403` - RPC call forbidden - `404` - RPC endpoint doesn't exist - `405` - HTTP Method Not Allowed Status code `500` means that the function _does_ exist, but IPFS was not able to fulfil the request because of an error. To know that reason, you have to look at the error message that is usually returned with the body of the response (if no error, check the daemon logs). Streaming endpoints fail as above, unless they have started streaming. That means they will have sent a `200` status code already. If an error happens during the stream, it will be included in a Trailer response header (some endpoints may additionally include an error in the last streamed object). A `405` error may mean that you are using the wrong HTTP method (i.e. GET instead of POST), and a `403` error occurs in a browser due to Origin / CORS. ## Origin-based security When a request is sent from a browser, HTTP RPC API follows the [Origin-based security model](https://en.wikipedia.org/wiki/Same-origin_policy), and expects the `Origin` HTTP header to be present. The API will return HTTP Error 403 when Origin is missing, does not match the API port, or is not safelisted via `API.HTTPHeaders.Access-Control-Allow-Origin` in the config. ## RPC commands ## /api/v0/add Add a file or directory to IPFS. ### Arguments - `quiet` [bool]: Write minimal output. Required: no. - `quieter` [bool]: Write only final hash. Required: no. - `silent` [bool]: Write no output. Required: no. - `progress` [bool]: Stream progress data. Required: no. - `trickle` [bool]: Use trickle-dag format for dag generation. Required: no. - `only-hash` [bool]: Only chunk and hash - do not write to disk. Required: no. - `wrap-with-directory` [bool]: Wrap files with a directory object. Required: no. - `chunker` [string]: Chunking algorithm, size-[bytes], rabin-[min]-[avg]-[max] or buzhash. Default: `size-262144`. Required: no. - `raw-leaves` [bool]: Use raw blocks for leaf nodes. Required: no. - `nocopy` [bool]: Add the file using filestore. Implies raw-leaves. (experimental). Required: no. - `fscache` [bool]: Check the filestore for pre-existing blocks. (experimental). Required: no. - `cid-version` [int]: CID version. Defaults to 0 unless an option that depends on CIDv1 is passed. Passing version 1 will cause the raw-leaves option to default to true. Required: no. - `hash` [string]: Hash function to use. Implies CIDv1 if not sha2-256. (experimental). Default: `sha2-256`. Required: no. - `inline` [bool]: Inline small blocks into CIDs. (experimental). Required: no. - `inline-limit` [int]: Maximum block size to inline. (experimental). Default: `32`. Required: no. - `pin` [bool]: Pin locally to protect added files from garbage collection. Default: `true`. Required: no. - `to-files` [string]: Add reference to Files API (MFS) at the provided path. Required: no. ### Request Body Argument `path` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'. The `add` command not only allows adding files, but also uploading directories and complex hierarchies. This happens as follows: Every part in the multipart request is a *directory* or a *file* to be added to IPFS. Directory parts have a special content type `application/x-directory`. These parts do not carry any data. The part headers look as follows: ``` Content-Disposition: form-data; name="file"; filename="folderName" Content-Type: application/x-directory ``` File parts carry the file payload after the following headers: ``` Abspath: /absolute/path/to/file.txt Content-Disposition: form-data; name="file"; filename="folderName%2Ffile.txt" Content-Type: application/octet-stream ...contents... ``` The above file includes its path in the "folderName/file.txt" hierarchy and IPFS will therefore be able to add it inside "folderName". The parts declaring the directories are optional when they have files inside and will be inferred from the filenames. In any case, a depth-first traversal of the directory tree is recommended to order the different parts making the request. The `Abspath` header is included for filestore/urlstore features that are enabled with the `nocopy` option and it can be set to the location of the file in the filesystem (within the IPFS root), or to its full web URL. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Bytes": "", "Hash": "", "Name": "", "Size": "" } ``` ### cURL Example `curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/add?quiet=&quieter=&silent=&progress=&trickle=&only-hash=&wrap-with-directory=&chunker=size-262144&raw-leaves=&nocopy=&fscache=&cid-version=&hash=sha2-256&inline=&inline-limit=32&pin=true&to-files="` --- ## /api/v0/bitswap/ledger Show the current ledger for a peer. ### Arguments - `arg` [string]: The PeerID (B58) of the ledger to inspect. Required: **yes**. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Exchanged": "", "Peer": "", "Recv": "", "Sent": "", "Value": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bitswap/ledger?arg="` --- ## /api/v0/bitswap/reprovide Trigger reprovider. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bitswap/reprovide"` --- ## /api/v0/bitswap/stat Show some diagnostic information on the bitswap agent. ### Arguments - `verbose` [bool]: Print extra information. Required: no. - `human` [bool]: Print sizes in human readable format (e.g., 1K 234M 2G). Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "BlocksReceived": "", "BlocksSent": "", "DataReceived": "", "DataSent": "", "DupBlksReceived": "", "DupDataReceived": "", "MessagesReceived": "", "Peers": [ "" ], "ProvideBufLen": "", "Wantlist": [ { "/": "" } ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bitswap/stat?verbose=&human="` --- ## /api/v0/bitswap/wantlist Show blocks currently on the wantlist. ### Arguments - `peer` [string]: Specify which peer to show wantlist for. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Keys": [ { "/": "" } ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bitswap/wantlist?peer="` --- ## /api/v0/block/get Get a raw IPFS block. ### Arguments - `arg` [string]: The CID of an existing block to get. Required: **yes**. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/block/get?arg="` --- ## /api/v0/block/put Store input as an IPFS block. ### Arguments - `cid-codec` [string]: Multicodec to use in returned CID. Default: `raw`. Required: no. - `mhtype` [string]: Multihash hash function. Default: `sha2-256`. Required: no. - `mhlen` [int]: Multihash hash length. Default: `-1`. Required: no. - `pin` [bool]: Pin added blocks recursively. Default: `false`. Required: no. - `allow-big-block` [bool]: Disable block size check and allow creation of blocks bigger than 1MiB. WARNING: such blocks won't be transferable over the standard bitswap. Default: `false`. Required: no. - `format` [string]: Use legacy format for returned CID (DEPRECATED). Required: no. ### Request Body Argument `data` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Key": "", "Size": "" } ``` ### cURL Example `curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/block/put?cid-codec=raw&mhtype=sha2-256&mhlen=-1&pin=false&allow-big-block=false&format="` --- ## /api/v0/block/rm Remove IPFS block(s) from the local datastore. ### Arguments - `arg` [string]: CIDs of block(s) to remove. Required: **yes**. - `force` [bool]: Ignore nonexistent blocks. Required: no. - `quiet` [bool]: Write minimal output. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Error": "", "Hash": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/block/rm?arg=&force=&quiet="` --- ## /api/v0/block/stat Print information of a raw IPFS block. ### Arguments - `arg` [string]: The CID of an existing block to stat. Required: **yes**. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Key": "", "Size": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/block/stat?arg="` --- ## /api/v0/bootstrap Show or edit the list of bootstrap peers. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Peers": [ "" ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bootstrap"` --- ## /api/v0/bootstrap/add Add peers to the bootstrap list. ### Arguments - `arg` [string]: A peer to add to the bootstrap list (in the format '<multiaddr>/<peerID>') Required: no. - `default` [bool]: Add default bootstrap nodes. (Deprecated, use 'default' subcommand instead). Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Peers": [ "" ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bootstrap/add?arg=&default="` --- ## /api/v0/bootstrap/add/default Add default peers to the bootstrap list. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Peers": [ "" ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bootstrap/add/default"` --- ## /api/v0/bootstrap/list Show peers in the bootstrap list. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Peers": [ "" ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bootstrap/list"` --- ## /api/v0/bootstrap/rm Remove peers from the bootstrap list. ### Arguments - `arg` [string]: A peer to add to the bootstrap list (in the format '<multiaddr>/<peerID>') Required: no. - `all` [bool]: Remove all bootstrap peers. (Deprecated, use 'all' subcommand). Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Peers": [ "" ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bootstrap/rm?arg=&all="` --- ## /api/v0/bootstrap/rm/all Remove all peers from the bootstrap list. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Peers": [ "" ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/bootstrap/rm/all"` --- ## /api/v0/cat Show IPFS object data. ### Arguments - `arg` [string]: The path to the IPFS object(s) to be outputted. Required: **yes**. - `offset` [int64]: Byte offset to begin reading from. Required: no. - `length` [int64]: Maximum number of bytes to read. Required: no. - `progress` [bool]: Stream progress data. Default: `true`. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/cat?arg=&offset=&length=&progress=true"` --- ## /api/v0/cid/base32 Convert CIDs to Base32 CID version 1. ### Arguments - `arg` [string]: CIDs to convert. Required: **yes**. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "CidStr": "", "ErrorMsg": "", "Formatted": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/cid/base32?arg="` --- ## /api/v0/cid/bases List available multibase encodings. ### Arguments - `prefix` [bool]: also include the single letter prefixes in addition to the code. Required: no. - `numeric` [bool]: also include numeric codes. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json [ { "Code": "", "Name": "" } ] ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/cid/bases?prefix=&numeric="` --- ## /api/v0/cid/codecs List available CID multicodecs. ### Arguments - `numeric` [bool]: also include numeric codes. Required: no. - `supported` [bool]: list only codecs supported by go-ipfs commands. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json [ { "Code": "", "Name": "" } ] ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/cid/codecs?numeric=&supported="` --- ## /api/v0/cid/format Format and convert a CID in various useful ways. ### Arguments - `arg` [string]: CIDs to format. Required: **yes**. - `f` [string]: Printf style format string. Default: %s. Default: `%s`. Required: no. - `v` [string]: CID version to convert to. Required: no. - `mc` [string]: CID multicodec to convert to. Required: no. - `b` [string]: Multibase to display CID in. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "CidStr": "", "ErrorMsg": "", "Formatted": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/cid/format?arg=&f=%s&v=&mc=&b="` --- ## /api/v0/cid/hashes List available multihashes. ### Arguments - `numeric` [bool]: also include numeric codes. Required: no. - `supported` [bool]: list only codecs supported by go-ipfs commands. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json [ { "Code": "", "Name": "" } ] ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/cid/hashes?numeric=&supported="` --- ## /api/v0/commands List all available commands. ### Arguments - `flags` [bool]: Show command flags. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Name": "", "Options": [ { "Names": [ "" ] } ], "Subcommands": [ { "Name": "", "Options": [ { "Names": [ "" ] } ], "Subcommands": [ "..." ] } ] } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/commands?flags="` --- ## /api/v0/config Get and set IPFS config values. ### Arguments - `arg` [string]: The key of the config entry (e.g. "Addresses.API"). Required: **yes**. - `arg` [string]: The value to set the config entry to. Required: no. - `bool` [bool]: Set a boolean value. Required: no. - `json` [bool]: Parse stringified JSON. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Key": "", "Value": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/config?arg=&arg=&bool=&json="` --- ## /api/v0/config/profile/apply Apply profile to config. ### Arguments - `arg` [string]: The profile to apply to the config. Required: **yes**. - `dry-run` [bool]: print difference between the current config and the config that would be generated. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "NewCfg": { "": "" }, "OldCfg": { "": "" } } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/config/profile/apply?arg=&dry-run="` --- ## /api/v0/config/replace Replace the config with <file>. ### Arguments ### Request Body Argument `file` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/config/replace"` --- ## /api/v0/config/show Output config file contents. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/config/show"` --- ## /api/v0/dag/export Streams the selected DAG as a .car stream on stdout. ### Arguments - `arg` [string]: CID of a root to recursively export Required: **yes**. - `progress` [bool]: Display progress on CLI. Defaults to true when STDERR is a TTY. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/dag/export?arg=&progress="` --- ## /api/v0/dag/get Get a DAG node from IPFS. ### Arguments - `arg` [string]: The object to get Required: **yes**. - `output-codec` [string]: Format that the object will be encoded as. Default: `dag-json`. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/dag/get?arg=&output-codec=dag-json"` --- ## /api/v0/dag/import Import the contents of .car files ### Arguments - `pin-roots` [bool]: Pin optional roots listed in the .car headers after importing. Default: `true`. Required: no. - `silent` [bool]: No output. Required: no. - `stats` [bool]: Output stats. Required: no. - `allow-big-block` [bool]: Disable block size check and allow creation of blocks bigger than 1MiB. WARNING: such blocks won't be transferable over the standard bitswap. Default: `false`. Required: no. ### Request Body Argument `path` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Root": { "Cid": { "/": "" }, "PinErrorMsg": "" }, "Stats": { "BlockBytesCount": "", "BlockCount": "" } } ``` ### cURL Example `curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/dag/import?pin-roots=true&silent=&stats=&allow-big-block=false"` --- ## /api/v0/dag/put Add a DAG node to IPFS. ### Arguments - `store-codec` [string]: Codec that the stored object will be encoded with. Default: `dag-cbor`. Required: no. - `input-codec` [string]: Codec that the input object is encoded in. Default: `dag-json`. Required: no. - `pin` [bool]: Pin this object when adding. Required: no. - `hash` [string]: Hash function to use. Default: `sha2-256`. Required: no. - `allow-big-block` [bool]: Disable block size check and allow creation of blocks bigger than 1MiB. WARNING: such blocks won't be transferable over the standard bitswap. Default: `false`. Required: no. ### Request Body Argument `object data` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Cid": { "/": "" } } ``` ### cURL Example `curl -X POST -F file=@myfile "http://127.0.0.1:5001/api/v0/dag/put?store-codec=dag-cbor&input-codec=dag-json&pin=&hash=sha2-256&allow-big-block=false"` --- ## /api/v0/dag/resolve Resolve IPLD block. ### Arguments - `arg` [string]: The path to resolve Required: **yes**. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Cid": { "/": "" }, "RemPath": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/dag/resolve?arg="` --- ## /api/v0/dag/stat Gets stats for a DAG. ### Arguments - `arg` [string]: CID of a DAG root to get statistics for Required: **yes**. - `progress` [bool]: Return progressive data while reading through the DAG. Default: `true`. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "NumBlocks": "", "Size": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/dag/stat?arg=&progress=true"` --- ## /api/v0/dht/query Find the closest Peer IDs to a given Peer ID by querying the DHT. ### Arguments - `arg` [string]: The peerID to run the query against. Required: **yes**. - `verbose` [bool]: Print extra information. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json { "Extra": "", "ID": "", "Responses": [ { "Addrs": [ "" ], "ID": "peer-id" } ], "Type": "" } ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/dht/query?arg=&verbose="` --- ## /api/v0/diag/cmds List commands run on this IPFS node. ### Arguments - `verbose` [bool]: Print extra information. Required: no. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json [ { "Active": "", "Args": [ "" ], "Command": "", "EndTime": "", "ID": "", "Options": { "": "" }, "StartTime": "" } ] ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/diag/cmds?verbose="` --- ## /api/v0/diag/cmds/clear Clear inactive requests from the log. ### Arguments This endpoint takes no arguments. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/diag/cmds/clear"` --- ## /api/v0/diag/cmds/set-time Set how long to keep inactive requests in the log. ### Arguments - `arg` [string]: Time to keep inactive requests in log. Required: **yes**. ### Response On success, the call to this endpoint will return with 200 and the following body: ```json This endpoint returns a `text/plain` response body. ``` ### cURL Example `curl -X POST "http://127.0.0.1:5001/api/v0/diag/cmds/set-time?arg=