diff --git a/apiary.apib b/apiary.apib index 9be795f..ccc17ad 100644 --- a/apiary.apib +++ b/apiary.apib @@ -940,34 +940,133 @@ Gets the value currently published at an IPNS name # Group object Interact with ipfs objects. -## data [GET /object/data] +`ipfs object` is a plumbing command used to manipulate DAG objects +directly. -+ Response 200 (text/plain) +## data [GET /object/data{?arg}] +Outputs the raw bytes in an IPFS object + +`ipfs object data` is a plumbing command for retreiving the raw bytes stored in +a DAG node. It outputs to stdout, and is a base58 encoded +multihash. -## get [GET /object/get] +Note that the "--encoding" option does not affect the output, since the +output is the raw data of the object. + ++ Parameters + + arg (string, optional) - Key of the object to retrieve, in base58-encoded multihash format + Response 200 (text/plain) -## links [GET /object/links] +## get [GET /object/get{?arg,&encoding}] +Get and serialize the DAG node named by + +`ipfs object get` is a plumbing command for retreiving DAG nodes. +It serializes the DAG node to the format specified by the "--encoding" +flag. It outputs to stdout, and is a base58 encoded multihash. + ++ Parameters + + arg (string, required) - Key of the object to retrieve (in base58-encoded multihash format) + + encoding (enum[string], optional) - Serializes the DAG node to the format specified + + Default: `protobuf` + + Members: + + `protobuf` + + `json` + + `xml` + Response 200 (text/plain) -## new [GET /object/new] +## links [GET /object/links{?arg}] +Outputs the links pointed to by the specified object + +`ipfs object links` is a plumbing command for retreiving the links from +a DAG node. It outputs to stdout, and is a base58 encoded +multihash. + ++ Parameters + + arg (string, required) - Key of the object to retrieve, in base58-encoded multihash format + Response 200 (text/plain) -## patch [GET /object/patch] +## new [GET /object/new{?arg}] +Creates a new object from an ipfs template + +`ipfs object new` is a plumbing command for creating new DAG nodes. +By default it creates and returns a new empty merkledag node, but +you may pass an optional template argument to create a preformatted +node. + ++ Parameters + + arg (string, required) - optional template to use + + Available templates: + * unixfs-dir + + Response 200 (text/plain) -## put [GET /object/put] +## patch [GET /object/patch{?arg1,arg2,&name,ref}] +Create a new merkledag object based on an existing one + +`ipfs object patch ` is a plumbing command used to +build custom DAG objects. It adds and removes links from objects, creating a new object as a result. This is the merkle-dag version of modifying an object. It can also set the data inside a node with `set-data` and append to that data as well with `append-data`. + ++ Parameters + + arg1 (string, required) - the hash of the node to modify + + arg2 (enum[string], required) - the operation to perform + + Members: + + `add-link` - with ` `, adds a link to a node + + `rm-link` - with ``, removes a link from a node + + `set-data` - sets a nodes data from stdin + + `append-data` - appends to a nodes data from stdin + + name (string, optional) - used with `` and `` + + ref (string, optional) - used with ` ` + + create (boolean, optional) - create intermediate directories on `` + Response 200 (text/plain) -## stat [GET /object/stat] +## put [GET /object/put{?arg,&inputenc}] +Stores input as a DAG object, outputs its key + +`ipfs object put` is a plumbing command for storing DAG nodes. +It reads from stdin, and the output is a base58 encoded multihash. + +Data should be in the format specified by the --inputenc flag. + ++ Parameters + + arg (string, required) - Data to be stored as a DAG object + + inputenc (enum[string], optional) - Encoding type of input data + + Default: `json` + + Members: + + `protobuf` + + `json` + Response 200 (text/plain) + + Body + + ``` + added QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V + ``` +## stat [GET /object/stat{?arg}] +Get stats for the DAG node named by + +`ipfs object stat` is a plumbing command to print DAG node statistics. + is a base58 encoded multihash. + ++ Parameters + + arg (string, required) - Key of the object to retrieve (in base58-encoded multihash format) + ++ Response 200 (application/json) + + + Attributes + - `Hash`: "QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V" (string) - number of links in link table + - `NumLinks`: 0 (number) - number of links in link table + - `BlockSize`: 5 (number) - size of the raw, encoded data + - `LinksSize`: 2 (number) - size of the links segment + - `DataSize`: 3 (number) - size of the data segment + - `CumulativeSize`: 5 (number) - cumulative size of object and its references + # Group pin ## add [GET /pin/add] diff --git a/test b/test deleted file mode 100644 index e69de29..0000000