lotus/documentation/en/api-v0-methods-curio.md
Andrew Jackson (Ajax) 81ba6ab6f0
feat: Curio - Easy Migration (#11617)
* feat: lp mig - first few steps

* lp mig: default tasks

* code comments

* docs

* lp-mig-progress

* shared

* comments and todos

* fix: curio: rename lotus-provider to curio (#11645)

* rename provider to curio

* install gotext

* fix lint errors, mod tidy

* fix typo

* fix API_INFO and add gotext to circleCI

* add back gotext

* add gotext after remerge

* lp: channels doc

* finish easy-migration TODOs

* out generate

* merging and more renames

* avoid make-all

* minor doc stuff

* cu: make gen

* make gen fix

* make gen

* tryfix

* go mod tidy

* minor ez migration fixes

* ez setup - ui cleanups

* better error message

* guided setup colors

* better path to saveconfigtolayer

* loadconfigwithupgrades fix

* readMiner oops

* guided - homedir

* err if miner is running

* prompt error should exit

* process already running, miner_id sectors in migration

* dont prompt for language a second time

* check miner stopped

* unlock repo

* render and sql oops

* curio easyMig - some fixes

* easyMigration runs successfully

* lint

* review fixes

* fix backup path

* fixes1

* fixes2

* fixes 3

---------

Co-authored-by: LexLuthr <88259624+LexLuthr@users.noreply.github.com>
Co-authored-by: LexLuthr <lexluthr@protocol.ai>
2024-03-15 16:38:13 -05:00

283 lines
3.6 KiB
Markdown

# Groups
* [](#)
* [Shutdown](#Shutdown)
* [Version](#Version)
* [Allocate](#Allocate)
* [AllocatePieceToSector](#AllocatePieceToSector)
* [Storage](#Storage)
* [StorageAddLocal](#StorageAddLocal)
* [StorageDetachLocal](#StorageDetachLocal)
* [StorageFindSector](#StorageFindSector)
* [StorageInfo](#StorageInfo)
* [StorageList](#StorageList)
* [StorageLocal](#StorageLocal)
* [StorageStat](#StorageStat)
##
### Shutdown
Trigger shutdown
Perms: admin
Inputs: `null`
Response: `{}`
### Version
Perms: admin
Inputs: `null`
Response: `131840`
## Allocate
### AllocatePieceToSector
Perms: write
Inputs:
```json
[
"f01234",
{
"PublishCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"DealID": 5432,
"DealProposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"DealSchedule": {
"StartEpoch": 10101,
"EndEpoch": 10101
},
"PieceActivationManifest": {
"CID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 2032,
"VerifiedAllocationKey": null,
"Notify": null
},
"KeepUnsealed": true
},
9,
{
"Scheme": "string value",
"Opaque": "string value",
"User": {},
"Host": "string value",
"Path": "string value",
"RawPath": "string value",
"OmitHost": true,
"ForceQuery": true,
"RawQuery": "string value",
"Fragment": "string value",
"RawFragment": "string value"
},
{
"Authorization": [
"Bearer ey.."
]
}
]
```
Response:
```json
{
"Sector": 9,
"Offset": 1032
}
```
## Storage
### StorageAddLocal
Perms: admin
Inputs:
```json
[
"string value"
]
```
Response: `{}`
### StorageDetachLocal
Perms: admin
Inputs:
```json
[
"string value"
]
```
Response: `{}`
### StorageFindSector
Perms: admin
Inputs:
```json
[
{
"Miner": 1000,
"Number": 9
},
1,
34359738368,
true
]
```
Response:
```json
[
{
"ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
"URLs": [
"string value"
],
"BaseURLs": [
"string value"
],
"Weight": 42,
"CanSeal": true,
"CanStore": true,
"Primary": true,
"AllowTypes": [
"string value"
],
"DenyTypes": [
"string value"
]
}
]
```
### StorageInfo
Perms: admin
Inputs:
```json
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8"
]
```
Response:
```json
{
"ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
"URLs": [
"string value"
],
"Weight": 42,
"MaxStorage": 42,
"CanSeal": true,
"CanStore": true,
"Groups": [
"string value"
],
"AllowTo": [
"string value"
],
"AllowTypes": [
"string value"
],
"DenyTypes": [
"string value"
]
}
```
### StorageList
Perms: admin
Inputs: `null`
Response:
```json
{
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8": [
{
"Miner": 1000,
"Number": 100,
"SectorFileType": 2
}
]
}
```
### StorageLocal
Perms: admin
Inputs: `null`
Response:
```json
{
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8": "/data/path"
}
```
### StorageStat
Perms: admin
Inputs:
```json
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8"
]
```
Response:
```json
{
"Capacity": 9,
"Available": 9,
"FSAvailable": 9,
"Reserved": 9,
"Max": 9,
"Used": 9
}
```