UNPKG

textiot

Version:

A framework for building web and native (IoT) Dapps on the IPFS network

2,026 lines 63.4 kB
basePath: /api/v0 definitions: api.SubsystemInfo: additionalProperties: type: string type: object ipfs.ConnInfos: properties: peers: items: $ref: '#/definitions/ipfs.connInfo' type: array type: object ipfs.connInfo: properties: addr: type: string direction: type: string latency: type: string muxer: type: string peer: type: string streams: items: $ref: '#/definitions/ipfs.streamInfo' type: array type: object ipfs.streamInfo: properties: protocol: type: string type: object mill.Json: type: object pb.Block: properties: attempts: type: integer author: type: string body: type: string data: type: string date: type: string id: type: string parents: items: type: string type: array status: type: integer target: type: string thread: type: string type: type: integer user: $ref: '#/definitions/pb.User' description: view info type: object type: object pb.BlockList: properties: items: items: $ref: '#/definitions/pb.Block' type: array type: object pb.Cafe: properties: address: type: string api: type: string node: type: string peer: type: string protocol: type: string url: type: string type: object pb.CafeSession: properties: access: type: string cafe: $ref: '#/definitions/pb.Cafe' type: object exp: type: string id: type: string refresh: type: string rexp: type: string subject: type: string type: type: string type: object pb.CafeSessionList: properties: items: items: $ref: '#/definitions/pb.CafeSession' type: array type: object pb.Comment: properties: body: type: string date: type: string id: type: string target: $ref: '#/definitions/pb.FeedItem' type: object user: $ref: '#/definitions/pb.User' type: object type: object pb.CommentList: properties: items: items: $ref: '#/definitions/pb.Comment' type: array type: object pb.Contact: properties: address: type: string avatar: type: string name: type: string peers: items: $ref: '#/definitions/pb.Peer' type: array threads: items: type: string type: array type: object pb.ContactList: properties: items: items: $ref: '#/definitions/pb.Contact' type: array type: object pb.Directory: properties: files: additionalProperties: $ref: '#/definitions/pb.FileIndex' type: object type: object pb.DirectoryList: properties: items: items: $ref: '#/definitions/pb.Directory' type: array type: object pb.ExternalInvite: properties: id: type: string inviter: type: string key: type: string type: object pb.FeedItem: properties: block: type: string payload: type: string thread: type: string type: object pb.FeedItemList: properties: count: type: integer items: items: $ref: '#/definitions/pb.FeedItem' type: array next: type: string type: object pb.File: properties: file: $ref: '#/definitions/pb.FileIndex' type: object index: type: integer links: additionalProperties: $ref: '#/definitions/pb.FileIndex' type: object type: object pb.FileIndex: properties: added: type: string checksum: type: string hash: type: string key: type: string media: type: string meta: type: string mill: type: string name: type: string opts: type: string size: type: integer source: type: string targets: items: type: string type: array type: object pb.Files: properties: block: type: string caption: type: string comments: items: $ref: '#/definitions/pb.Comment' type: array data: type: string date: type: string files: items: $ref: '#/definitions/pb.File' type: array likes: items: $ref: '#/definitions/pb.Like' type: array target: type: string threads: items: type: string type: array user: $ref: '#/definitions/pb.User' type: object type: object pb.FilesList: properties: items: items: $ref: '#/definitions/pb.Files' type: array type: object pb.InviteView: properties: date: type: string id: type: string inviter: $ref: '#/definitions/pb.User' type: object name: type: string type: object pb.InviteViewList: properties: items: items: $ref: '#/definitions/pb.InviteView' type: array type: object pb.Keys: properties: files: additionalProperties: type: string type: object type: object pb.Like: properties: date: type: string id: type: string target: $ref: '#/definitions/pb.FeedItem' type: object user: $ref: '#/definitions/pb.User' type: object type: object pb.LikeList: properties: items: items: $ref: '#/definitions/pb.Like' type: array type: object pb.Link: properties: json_schema: type: string mill: type: string opts: additionalProperties: type: string type: object pin: type: boolean plaintext: type: boolean use: type: string type: object pb.Node: properties: json_schema: type: string links: additionalProperties: $ref: '#/definitions/pb.Link' type: object mill: type: string name: type: string opts: additionalProperties: type: string type: object pin: type: boolean plaintext: type: boolean type: object pb.Notification: properties: actor: type: string block: type: string body: type: string date: type: string id: type: string read: type: boolean subject: type: string subject_desc: type: string target: type: string type: type: integer user: $ref: '#/definitions/pb.User' description: view info type: object type: object pb.NotificationList: properties: items: items: $ref: '#/definitions/pb.Notification' type: array type: object pb.Peer: properties: address: type: string avatar: type: string created: type: string id: type: string inboxes: items: $ref: '#/definitions/pb.Cafe' type: array name: type: string updated: type: string type: object pb.QueryResult: properties: date: type: string id: type: string local: type: boolean value: type: string type: object pb.Summary: properties: account_peer_count: type: integer address: type: string contact_count: type: integer files_count: type: integer id: type: string thread_count: type: integer type: object pb.Text: properties: block: type: string body: type: string comments: items: $ref: '#/definitions/pb.Comment' type: array date: type: string likes: items: $ref: '#/definitions/pb.Like' type: array user: $ref: '#/definitions/pb.User' type: object type: object pb.TextList: properties: items: items: $ref: '#/definitions/pb.Text' type: array type: object pb.Thread: properties: block_count: type: integer head: type: string head_blocks: description: view info items: $ref: '#/definitions/pb.Block' type: array id: type: string initiator: type: string key: type: string name: type: string peer_count: type: integer schema: type: string schema_node: $ref: '#/definitions/pb.Node' type: object sharing: type: integer sk: items: type: integer type: array state: description: 'Deprecated: Do not use.' type: integer type: type: integer whitelist: items: type: string type: array type: object pb.ThreadList: properties: items: items: $ref: '#/definitions/pb.Thread' type: array type: object pb.User: properties: address: type: string avatar: type: string name: type: string type: object info: contact: email: contact@textile.io name: Textile url: https://textile.io/ description: Textile's HTTP REST API Documentation license: name: MIT License url: https://github.com/textileio/go-textile/blob/master/LICENSE termsOfService: https://github.com/textileio/go-textile/blob/master/TERMS title: Textile REST API version: "0" paths: /account: get: description: Shows the local peer's account info as a contact produces: - application/json responses: "200": description: contact schema: $ref: '#/definitions/pb.Contact' "400": description: Bad Request schema: type: string summary: Show account contact tags: - account /account/address: get: description: Shows the local peer's account address produces: - text/plain responses: "200": description: address schema: type: string summary: Show account address tags: - account /account/seed: get: description: Shows the local peer's account seed produces: - text/plain responses: "200": description: seed schema: type: string summary: Show account seed tags: - account /blocks: get: description: |- Paginates blocks in a thread. Blocks are the raw components in a thread. Think of them as an append-only log of thread updates where each update is hash-linked to its parent(s). New / recovering peers can sync history by simply traversing the hash tree. parameters: - default: thread=,offset=,limit=5 description: 'thread: Thread ID, offset: Offset ID to start listing from (omit for latest), limit: List page size (default: 5)' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: blocks schema: $ref: '#/definitions/pb.BlockList' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Paginates blocks in a thread tags: - blocks /blocks/{id}: delete: description: Removes a thread block by ID parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "201": description: block schema: $ref: '#/definitions/pb.Block' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Remove thread block tags: - blocks /blocks/{id}/comment: get: description: Gets a thread comment by block ID parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "200": description: comment schema: $ref: '#/definitions/pb.Comment' "400": description: Bad Request schema: type: string summary: Get thread comment tags: - blocks /blocks/{id}/comments: get: description: Lists comments on a thread block parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "200": description: comments schema: $ref: '#/definitions/pb.CommentList' "500": description: Internal Server Error schema: type: string summary: List comments tags: - blocks post: description: Adds a comment to a thread block parameters: - description: block id in: path name: id required: true type: string - description: urlescaped comment body in: header name: X-Textile-Args required: true type: string produces: - application/json responses: "201": description: comment schema: $ref: '#/definitions/pb.Comment' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Add a comment tags: - blocks /blocks/{id}/files: get: parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "200": description: files schema: $ref: '#/definitions/pb.Files' "404": description: Not Found schema: type: string summary: Gets the metadata for a files block tags: - files /blocks/{id}/files/{index}/{path}/content: get: parameters: - description: block id in: path name: id required: true type: string - description: file index in: path name: index required: true type: string - description: file path in: path name: path required: true type: string produces: - application/json responses: "200": description: OK schema: items: type: integer type: array "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string summary: Gets the decrypted file content of a file within a files block tags: - files /blocks/{id}/files/{index}/{path}/meta: get: parameters: - description: block id in: path name: id required: true type: string - description: file index in: path name: index required: true type: string - description: file path in: path name: path required: true type: string produces: - application/json responses: "200": description: file schema: $ref: '#/definitions/pb.FileIndex' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string summary: Gets the metadata of a file within a files block tags: - files /blocks/{id}/like: get: description: Gets a thread like by block ID parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "200": description: like schema: $ref: '#/definitions/pb.Like' "400": description: Bad Request schema: type: string summary: Get thread like tags: - blocks /blocks/{id}/likes: get: description: Lists likes on a thread block parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "200": description: likes schema: $ref: '#/definitions/pb.LikeList' "500": description: Internal Server Error schema: type: string summary: List likes tags: - blocks post: description: Adds a like to a thread block parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "201": description: like schema: $ref: '#/definitions/pb.Like' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Add a like tags: - blocks /blocks/{id}/meta: get: parameters: - description: block id in: path name: id required: true type: string produces: - application/json responses: "200": description: block schema: $ref: '#/definitions/pb.Block' "404": description: Not Found schema: type: string summary: Gets the metadata for a block tags: - blocks /cafes: get: description: |- List info about all active cafe sessions. Cafes are other peers on the network who offer pinning, backup, and inbox services produces: - application/json responses: "200": description: cafe sessions schema: $ref: '#/definitions/pb.CafeSessionList' "500": description: Internal Server Error schema: type: string summary: List info about all active cafe sessions tags: - cafes post: description: |- Registers with a cafe and saves an expiring service session token. An access token is required to register, and should be obtained separately from the target Cafe parameters: - description: cafe id in: header name: X-Textile-Args required: true type: string - default: token= description: 'token: An access token supplied by the Cafe' in: header name: X-Textile-Opts type: string produces: - application/json responses: "201": description: cafe session schema: $ref: '#/definitions/pb.CafeSession' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Register with a Cafe tags: - cafes /cafes/{id}: delete: description: Deregisters with a cafe (content will expire based on the cafe's service rules) parameters: - description: cafe id in: path name: id required: true type: string responses: "204": description: ok schema: type: string "500": description: Internal Server Error schema: type: string summary: Deregisters a cafe tags: - cafes get: description: |- Gets and displays info about a cafe session. Cafes are other peers on the network who offer pinning, backup, and inbox services parameters: - description: cafe id in: path name: id required: true type: string produces: - application/json responses: "200": description: cafe session schema: $ref: '#/definitions/pb.CafeSession' "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Gets and displays info about a cafe session tags: - cafes /cafes/messages: post: description: |- Check for messages at all cafes. New messages are downloaded and processed opportunistically. produces: - text/plain responses: "200": description: ok schema: type: string "500": description: Internal Server Error schema: type: string summary: Check for messages at all cafes tags: - cafes /config: patch: consumes: - application/json description: |- When patching config values, valid JSON types must be used. For example, a string should be escaped or wrapped in single quotes (e.g., \"127.0.0.1:40600\") and arrays and objects work fine (e.g. '{"API": "127.0.0.1:40600"}') but should be wrapped in single quotes. Be sure to restart the daemon for changes to take effect. See https://tools.ietf.org/html/rfc6902 for details on RFC6902 JSON patch format. parameters: - description: An RFC6902 JSON patch (array of ops) in: body name: patch required: true schema: $ref: '#/definitions/mill.Json' responses: "204": description: No Content schema: type: string "400": description: Bad Request schema: type: string summary: Set/update config settings tags: - config put: consumes: - application/json description: |- Replace entire config file contents. The config command controls configuration variables. It works much like 'git config'. The configuration values are stored in a config file inside the Textile repository. parameters: - description: JSON document in: body name: config required: true schema: $ref: '#/definitions/mill.Json' responses: "204": description: No Content schema: type: string "400": description: Bad Request schema: type: string summary: Replace config settings. tags: - config /config/{path}: get: description: |- Report the currently active config settings, which may differ from the values specifed when setting/patching values. parameters: - description: config path (e.g., Addresses/API) in: path name: path type: string produces: - application/json responses: "200": description: new config value schema: $ref: '#/definitions/mill.Json' "400": description: Bad Request schema: type: string summary: Get active config settings tags: - config /contacts: get: description: Lists known contacts. produces: - application/json responses: "200": description: contacts schema: $ref: '#/definitions/pb.ContactList' "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: List known contacts tags: - contacts /contacts/{address}: delete: description: Removes a known contact parameters: - description: address in: path name: address required: true type: string responses: "204": description: ok schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Remove a contact tags: - contacts get: description: Gets a known contact parameters: - description: address in: path name: address required: true type: string produces: - application/json responses: "200": description: contact schema: $ref: '#/definitions/pb.Contact' "404": description: Not Found schema: type: string summary: Get a known contact tags: - contacts put: consumes: - application/json description: Adds a contact by username or account address to known contacts. parameters: - description: address in: path name: address required: true type: string - description: contact in: body name: contact required: true schema: $ref: '#/definitions/pb.Contact' responses: "204": description: ok schema: type: string "400": description: Bad Request schema: type: string summary: Add to known contacts tags: - contacts /contacts/search: post: description: Search for contacts known locally and on the network parameters: - default: local="false",limit=5,wait=5,address=,username=,events="false" description: 'local: Whether to only search local contacts, remote: Whether to only search remote contacts, limit: Stops searching after limit results are found, wait: Stops searching after ''wait'' seconds have elapsed (max 30s), username: search by username string, address: search by account address string, events: Whether to emit Server-Sent Events (SSEvent) or plain JSON' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: results stream schema: $ref: '#/definitions/pb.QueryResult' "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Search for contacts tags: - contacts /feed: get: description: |- Paginates post (join|leave|files|message) and annotation (comment|like) block types The mode option dictates how the feed is displayed: "chrono": All feed block types are shown. Annotations always nest their target post, i.e., the post a comment is about. "annotated": Annotations are nested under post targets, but are not shown in the top-level feed. "stacks": Related blocks are chronologically grouped into "stacks". A new stack is started if an unrelated block breaks continuity. This mode is used by Textile Photos. Stacks may include: * The initial post with some nested annotations. Newer annotations may have already been listed. * One or more annotations about a post. The newest annotation assumes the "top" position in the stack. Additional annotations are nested under the target. Newer annotations may have already been listed in the case as well. parameters: - default: thread=,offset=,limit=5,mode="chrono" description: 'thread: Thread ID (can also use ''default''), offset: Offset ID to start listing from (omit for latest), limit: List page size (default: 5), mode: Feed mode (one of ''chrono'', ''annotated'', or ''stacks'')' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: feed schema: $ref: '#/definitions/pb.FeedItemList' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Paginates post and annotation block types tags: - feed /file/{hash}/content: get: description: Returns decrypted raw content for file parameters: - description: file hash in: path name: hash required: true type: string produces: - application/octet-stream responses: "200": description: OK schema: type: string "404": description: Not Found schema: type: string summary: File content at hash tags: - files /file/{target}/meta: get: description: Returns the metadata for file parameters: - description: file hash in: path name: hash required: true type: string produces: - application/json responses: "200": description: file schema: $ref: '#/definitions/pb.FileIndex' "404": description: Not Found schema: type: string summary: File metadata at hash tags: - files /files: get: description: Paginates thread files. If thread id not provided, paginate all files. parameters: - default: thread=,offset=,limit=5 description: 'thread: Thread ID. Omit for all, offset: Offset ID to start listing from. Omit for latest, limit: List page size. (default: 5)' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: files schema: $ref: '#/definitions/pb.FilesList' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Paginates thread files tags: - files /invites: get: description: Lists all pending thread invites produces: - application/json responses: "200": description: invites schema: $ref: '#/definitions/pb.InviteViewList' summary: List invites tags: - invites post: description: Creates a direct account-to-account or external invite to a thread parameters: - default: thread=,address= description: 'thread: Thread ID (can also use ''default''), address: Account Address (omit to create an external invite)' in: header name: X-Textile-Opts type: string produces: - application/json responses: "201": description: invite schema: $ref: '#/definitions/pb.ExternalInvite' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Create an invite to a thread tags: - invites /invites/{id}/accept: post: description: |- Accepts a direct peer-to-peer or external invite to a thread. Use the key option with an external invite parameters: - description: invite id in: path name: id required: true type: string - default: key= description: 'key: key for an external invite' in: header name: X-Textile-Opts type: string produces: - application/json responses: "201": description: join block schema: $ref: '#/definitions/pb.Block' "400": description: Bad Request schema: type: string "409": description: Conflict schema: type: string "500": description: Internal Server Error schema: type: string summary: Accept a thread invite tags: - invites /invites/{id}/ignore: post: description: Ignores a direct peer-to-peer invite to a thread parameters: - description: invite id in: path name: id required: true type: string produces: - application/json responses: "200": description: ok schema: type: string "400": description: Bad Request schema: type: string summary: Ignore a thread invite tags: - invites /ipfs/cat/{path}: get: description: Displays the data behind an IPFS CID (hash) or Path parameters: - description: ipfs/ipns cid in: path name: path required: true type: string - default: key= description: 'key: Key to decrypt data on-the-fly' in: header name: X-Textile-Opts type: string produces: - application/octet-stream responses: "200": description: data schema: items: type: integer type: array "400": description: Bad Request schema: type: string "401": description: Unauthorized schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Cat IPFS data tags: - ipfs /ipfs/id: get: description: Displays underlying IPFS peer ID produces: - text/plain responses: "200": description: peer id schema: type: string "500": description: Internal Server Error schema: type: string summary: Get IPFS peer ID tags: - ipfs /ipfs/pubsub/pub/{topic}: post: consumes: - application/octet-stream description: Publishes a message to a given pubsub topic produces: - text/plain responses: "204": description: ok schema: type: string "500": description: Internal Server Error schema: type: string summary: Publish a message tags: - ipfs /ipfs/pubsub/sub/{topic}: get: description: Subscribes to messages on a given topic produces: - text/event-stream with events - ' or just application/json' responses: "200": description: results stream schema: type: string "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Subscribe messages tags: - ipfs /ipfs/swarm/connect: post: description: Opens a new direct connection to a peer using an IPFS multiaddr parameters: - description: peer address in: header name: X-Textile-Args required: true type: string produces: - application/json responses: "200": description: ok schema: items: type: string type: array "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Opens a new direct connection to a peer address tags: - ipfs /ipfs/swarm/peers: get: description: Lists the set of peers this node is connected to parameters: - default: verbose="false",latency="false",streams="false",direction="false" description: 'verbose: Display all extra information, latency: Also list information about latency to each peer, streams: Also list information about open streams for each peer, direction: Also list information about the direction of connection' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: connection schema: $ref: '#/definitions/ipfs.ConnInfos' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: List swarm peers tags: - ipfs /keys/{target}: get: description: Shows file keys under the given target from an add parameters: - description: target id in: path name: target required: true type: string produces: - application/json responses: "200": description: keys schema: $ref: '#/definitions/pb.Keys' "400": description: Bad Request schema: type: string summary: Show file keys tags: - files /logs/{subsystem}: post: description: |- List or change the verbosity of one or all subsystems log output. Textile logs piggyback on the IPFS event logs parameters: - description: subsystem logging identifier (omit for all) in: path name: subsystem type: string - default: level=,tex-only="false" description: 'level: Log-level (one of: debug, info, warning, error, critical, or ' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: subsystems schema: $ref: '#/definitions/api.SubsystemInfo' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Access subsystem logs tags: - utils /messages: get: description: Paginates thread messages parameters: - default: thread=,offset=,limit=10 description: 'thread: Thread ID (can also use ''default'', omit for all), offset: Offset ID to start listing from (omit for latest), limit: List page size (default: 5)' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: messages schema: $ref: '#/definitions/pb.TextList' "400": description: Bad Request schema: type: string "404": description: Not Found schema: type: string "500": description: Internal Server Error schema: type: string summary: Paginates thread messages tags: - messages /messages/{block}: get: description: Gets a thread message by block ID parameters: - description: block id in: path name: block required: true type: string produces: - application/json responses: "200": description: message schema: $ref: '#/definitions/pb.Text' "400": description: Bad Request schema: type: string summary: Get thread message tags: - messages /mills/blob: post: consumes: - multipart/form-data description: |- Takes a binary data blob, and optionally encrypts it, before adding to IPFS, and returns a file object parameters: - description: multipart/form-data file in: formData name: file type: file - default: plaintext=false,use="" description: 'plaintext: whether to leave unencrypted), use: if empty, assumes body contains multipart form file data, otherwise, will attempt to fetch given CID from IPFS' in: header name: X-Textile-Opts type: string produces: - application/json responses: "201": description: file schema: $ref: '#/definitions/pb.FileIndex' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Process raw data blobs tags: - mills /mills/image/exif: post: consumes: - multipart/form-data description: |- Takes an input image, and extracts its EXIF data (optionally encrypting output), before adding to IPFS, and returns a file object parameters: - description: multipart/form-data file in: formData name: file type: file - default: plaintext=false,use="" description: 'plaintext: whether to leave unencrypted, use: if empty, assumes body contains multipart form file data, otherwise, will attempt to fetch given CID from IPFS' in: header name: X-Textile-Opts type: string produces: - application/json responses: "201": description: file schema: $ref: '#/definitions/pb.FileIndex' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Extract EXIF data from image tags: - mills /mills/image/resize: post: consumes: - multipart/form-data description: |- Takes an input image, and resizes/resamples it (optionally encrypting output), before adding to IPFS, and returns a file object parameters: - description: multipart/form-data file in: formData name: file type: file - default: plaintext=false,use="",quality=75,width=100 description: 'plaintext: whether to leave unencrypted, use: if empty, assumes body contains multipart form file data, otherwise, will attempt to fetch given CID from IPFS, width: the requested image width (required), quality: the requested JPEG image quality' in: header name: X-Textile-Opts required: true type: string produces: - application/json responses: "201": description: file schema: $ref: '#/definitions/pb.FileIndex' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Resize an image tags: - mills /mills/json: post: consumes: - multipart/form-data description: |- Takes an input JSON document, validates it according to its json-schema.org definition, optionally encrypts the output before adding to IPFS, and returns a file object parameters: - description: multipart/form-data file in: formData name: file type: file - default: plaintext="false",use="" description: 'plaintext: whether to leave unencrypted, use: if empty, assumes body contains multipart form file data, otherwise, will attempt to fetch given CID from IPFS' in: header name: X-Textile-Opts type: string produces: - application/json responses: "201": description: file schema: $ref: '#/definitions/pb.FileIndex' "400": description: Bad Request schema: type: string "500": description: Internal Server Error schema: type: string summary: Process input JSON data tags: - mills /mills/schema: post: consumes: - application/json description: Takes a JSON-based Schema, validates it, adds it to IPFS, and returns a file object parameters: - description: schema in: body name: schema required: true schema: $ref: '#/definitions/pb.Node' produces: - application/json responses: "201": description: file schema: $ref: '#/definitions/pb.FileIndex' "400": description: Bad Request schema: type: string summary: Validate, add, and pin a new Schema tags: - mills /notifications: get: description: Lists all notifications generated by thread and account activity. produces: - application/json responses: "200": description: notifications schema: $ref: '#/definitions/pb.NotificationList' summary: List notifications tags: - notifications /notifications/{id}/read: post: description: Marks a notifiction as read by ID. Use 'all' to mark all as read. parameters: - description: notification id in: path name: id required: true type: string produces: - application/json responses: "200": description: ok schema: type: string "400": description: Bad Request schema: type: string summary: Mark notifiction as read tags: - notifications /observe/{id}: get: description: |- Observes updates in a thread or all threads. An update is generated when a new block is added to a thread. There are several update types: MERGE, IGNORE, FLAG, JOIN, ANNOUNCE, LEAVE, TEXT, FILES, COMMENT, LIKE parameters: - description: thread id, omit to stream all events in: path name: thread type: string - default: type=,events="false" description: 'type: Or''d list of event types (e.g., FILES|COMMENTS|LIKES) or empty to include all types, events: Whether to emit Server-Sent Events (SSEvent) or plain JSON' in: header name: X-Textile-Opts type: string produces: - application/json responses: "200": description: stream of updates schema: $ref: '#/definitions/pb.FeedItem' "500": description: Internal Server Error schema: type: string summary: Observe thread updates tags: - observe /ping: get: description: Pings another peer on the network, returning online|offline. parameters: - description: peerid in: header name: X-Textile-Args required: true type: string produces: - text/plain responses: "200": description: One of online|offline schema: type: string "400": description: Bad Request sch