Skip to content

Commit cc47a2d

Browse files
authored
Merge pull request ipfs#1423 from ipfs/Omit-RPC-API-NoRemote
2 parents e80da5a + d2be7fb commit cc47a2d

File tree

4 files changed

+5
-210
lines changed

4 files changed

+5
-210
lines changed

docs/reference/kubo/rpc.md

Lines changed: 1 addition & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ I AM SERIOUS, DO NOT EDIT ANYTHING BELOW ;-D
4747
4848
-->
4949

50-
::: tip Generated on 2022-11-22, from kubo v0.17.0
50+
::: tip Generated on 2023-01-19, from kubo v0.17.0
5151
This document was autogenerated from [v0.17.0](https://github.com/ipfs/kubo/releases/tag/v0.17.0).
5252
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.
5353
:::
@@ -904,54 +904,6 @@ On success, the call to this endpoint will return with 200 and the following bod
904904
---
905905

906906

907-
## /api/v0/commands/completion/bash
908-
909-
Generate bash shell completions.
910-
911-
### Arguments
912-
913-
This endpoint takes no arguments.
914-
915-
916-
### Response
917-
918-
On success, the call to this endpoint will return with 200 and the following body:
919-
920-
```json
921-
This endpoint returns a `text/plain` response body.
922-
```
923-
924-
### cURL Example
925-
926-
`curl -X POST "http://127.0.0.1:5001/api/v0/commands/completion/bash"`
927-
928-
---
929-
930-
931-
## /api/v0/commands/completion/fish
932-
933-
Generate fish shell completions.
934-
935-
### Arguments
936-
937-
This endpoint takes no arguments.
938-
939-
940-
### Response
941-
942-
On success, the call to this endpoint will return with 200 and the following body:
943-
944-
```json
945-
This endpoint returns a `text/plain` response body.
946-
```
947-
948-
### cURL Example
949-
950-
`curl -X POST "http://127.0.0.1:5001/api/v0/commands/completion/fish"`
951-
952-
---
953-
954-
955907
## /api/v0/config
956908

957909
Get and set IPFS config values.
@@ -983,30 +935,6 @@ On success, the call to this endpoint will return with 200 and the following bod
983935
---
984936

985937

986-
## /api/v0/config/edit
987-
988-
Open the config file for editing in $EDITOR.
989-
990-
### Arguments
991-
992-
This endpoint takes no arguments.
993-
994-
995-
### Response
996-
997-
On success, the call to this endpoint will return with 200 and the following body:
998-
999-
```json
1000-
This endpoint returns a `text/plain` response body.
1001-
```
1002-
1003-
### cURL Example
1004-
1005-
`curl -X POST "http://127.0.0.1:5001/api/v0/config/edit"`
1006-
1007-
---
1008-
1009-
1010938
## /api/v0/config/profile/apply
1011939

1012940
Apply profile to config.
@@ -1938,32 +1866,6 @@ On success, the call to this endpoint will return with 200 and the following bod
19381866
---
19391867

19401868

1941-
## /api/v0/key/export
1942-
1943-
Export a keypair
1944-
1945-
### Arguments
1946-
1947-
- `arg` [string]: name of key to export Required: **yes**.
1948-
- `output` [string]: The path where the output should be stored. Required: no.
1949-
- `format` [string]: The format of the exported private key, libp2p-protobuf-cleartext or pem-pkcs8-cleartext. Default: `libp2p-protobuf-cleartext`. Required: no.
1950-
1951-
1952-
### Response
1953-
1954-
On success, the call to this endpoint will return with 200 and the following body:
1955-
1956-
```json
1957-
This endpoint returns a `text/plain` response body.
1958-
```
1959-
1960-
### cURL Example
1961-
1962-
`curl -X POST "http://127.0.0.1:5001/api/v0/key/export?arg=<name>&output=<value>&format=libp2p-protobuf-cleartext"`
1963-
1964-
---
1965-
1966-
19671869
## /api/v0/key/gen
19681870

19691871
Create a new keypair
@@ -2132,32 +2034,6 @@ On success, the call to this endpoint will return with 200 and the following bod
21322034
---
21332035

21342036

2135-
## /api/v0/key/rotate
2136-
2137-
Rotates the IPFS identity.
2138-
2139-
### Arguments
2140-
2141-
- `oldkey` [string]: Keystore name to use for backing up your existing identity. Required: no.
2142-
- `type` [string]: type of the key to create: rsa, ed25519. Default: `ed25519`. Required: no.
2143-
- `size` [int]: size of the key to generate. Required: no.
2144-
2145-
2146-
### Response
2147-
2148-
On success, the call to this endpoint will return with 200 and the following body:
2149-
2150-
```json
2151-
This endpoint returns a `text/plain` response body.
2152-
```
2153-
2154-
### cURL Example
2155-
2156-
`curl -X POST "http://127.0.0.1:5001/api/v0/key/rotate?oldkey=<value>&type=ed25519&size=<value>"`
2157-
2158-
---
2159-
2160-
21612037
## /api/v0/log/level
21622038

21632039
Change the logging level.
@@ -2954,30 +2830,6 @@ On success, the call to this endpoint will return with 200 and the following bod
29542830
---
29552831

29562832

2957-
## /api/v0/repo/migrate
2958-
2959-
Apply any outstanding migrations to the repo.
2960-
2961-
### Arguments
2962-
2963-
- `allow-downgrade` [bool]: Allow downgrading to a lower repo version. Required: no.
2964-
2965-
2966-
### Response
2967-
2968-
On success, the call to this endpoint will return with 200 and the following body:
2969-
2970-
```json
2971-
This endpoint returns a `text/plain` response body.
2972-
```
2973-
2974-
### cURL Example
2975-
2976-
`curl -X POST "http://127.0.0.1:5001/api/v0/repo/migrate?allow-downgrade=<value>"`
2977-
2978-
---
2979-
2980-
29812833
## /api/v0/repo/stat
29822834

29832835
Get stats for the currently used repo.
@@ -3870,30 +3722,6 @@ On success, the call to this endpoint will return with 200 and the following bod
38703722
---
38713723

38723724

3873-
## /api/v0/update
3874-
3875-
3876-
3877-
### Arguments
3878-
3879-
- `arg` [string]: Arguments for subcommand. Required: no.
3880-
3881-
3882-
### Response
3883-
3884-
On success, the call to this endpoint will return with 200 and the following body:
3885-
3886-
```json
3887-
This endpoint returns a `text/plain` response body.
3888-
```
3889-
3890-
### cURL Example
3891-
3892-
`curl -X POST "http://127.0.0.1:5001/api/v0/update?arg=<args>"`
3893-
3894-
---
3895-
3896-
38973725
## /api/v0/version
38983726

38993727
Show IPFS version information.
@@ -5331,39 +5159,6 @@ On success, the call to this endpoint will return with 200 and the following bod
53315159
---
53325160

53335161

5334-
## /api/v0/repo/fsck
5335-
5336-
::: warning DEPRECATED
5337-
5338-
This command is deprecated.
5339-
5340-
:::
5341-
5342-
Remove repo lockfiles.
5343-
5344-
### Arguments
5345-
5346-
This endpoint takes no arguments.
5347-
5348-
5349-
### Response
5350-
5351-
On success, the call to this endpoint will return with 200 and the following body:
5352-
5353-
```json
5354-
{
5355-
"Message": "<string>"
5356-
}
5357-
5358-
```
5359-
5360-
### cURL Example
5361-
5362-
`curl -X POST "http://127.0.0.1:5001/api/v0/repo/fsck"`
5363-
5364-
---
5365-
5366-
53675162
## /api/v0/tar/add
53685163

53695164
::: warning DEPRECATED

tools/http-api-docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ After installing you can run:
3939
> http-api-docs
4040
```
4141

42-
This should spit out a Markdown document. This is exactly the `api.md` documentation at https://github.com/ipfs/ipfs-docs/blob/master/docs/reference/http/api.md, so you can redirect the output to just overwrite that file.
42+
This should spit out a Markdown document. This is exactly the `rpc.md` documentation at https://github.com/ipfs/ipfs-docs/blob/master/docs/reference/kubo/rpc.md, so you can redirect the output to just overwrite that file.
4343

4444
## Captain
4545

tools/http-api-docs/endpoints.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func Endpoints(name string, cmd *cmds.Command) (endpoints []*Endpoint) {
9898
var arguments []*Argument
9999
var options []*Argument
100100

101-
ignore := cmd.Run == nil || IgnoreEndpoints[name]
101+
ignore := cmd.Run == nil || IgnoreEndpoints[name] || cmd.NoRemote
102102
if !ignore { // Extract arguments, options...
103103
for _, arg := range cmd.Arguments {
104104
argType := "string"

tools/http-api-docs/markdown.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The RPC API provides admin-level access to your Kubo IPFS node, including `+"`/a
8282
8383
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.
8484
85-
If you are looking for an interface designed for browsers and public internet, consider implementation-agnostic [HTTP Gateway](/reference/http/gateway/) instead.
85+
If you are looking for an interface designed for browsers and public internet, consider implementation-agnostic [HTTP Gateway](../../reference/http/gateway.md) instead.
8686
:::
8787
8888
## Getting started
@@ -91,7 +91,7 @@ If you are looking for an interface designed for browsers and public internet, c
9191
9292
The API under `+"`/api/v0/`"+` is an RPC-style API over HTTP, not a REST API.
9393
94-
[Every command](/reference/kubo/cli/) usable from the CLI is also available through the HTTP RPC API. For example:
94+
[Every command](../../reference/kubo/cli.md) usable from the CLI is also available through the HTTP RPC API. For example:
9595
`+"```sh"+
9696
`
9797
> ipfs swarm peers

0 commit comments

Comments
 (0)