http://git-wip-us.apache.org/repos/asf/couchdb/blob/1055ea0e/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-json.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-json.xml b/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-json.xml new file mode 100644 index 0000000..6e773d4 --- /dev/null +++ b/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-json.xml @@ -0,0 +1,347 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' + 'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd' [ +<!ENTITY % every.entities SYSTEM "entities.ent"> +%every.entities; +]> +<appendix id="couchdb-api-json"> + + <title>JSON Structure Reference</title> + + <para> + The following appendix provides a quick reference to all the JSON + structures that you can supply to CouchDB, or get in return to + requests. + </para> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/JSON/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//json/json.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/JSON.pm"/> +<table id="table-couchdb-api-json-summary"><title>JSON Structures</title><tgroup cols="1"><colspec colname="desc"/><thead><row><entry>Description</entry></row></thead><tbody><row><entry><link linkend="table-couchdb-api-json_all-docs"> + All Database Documents + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_bulkdocsreturn"> + Bulk Document Response + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_bulkdocs"> + Bulk Documents + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_changes"> + Changes information for a database + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_document"> + CouchDB Document + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_jsonerror"> + CouchDB Error Status + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_db-info"> + CouchDB database information object + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_design-doc"> + Design Document + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_design-doc_info"> + Design Document Information + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_design-doc_info-spatial"> + Design Document spatial index Information + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_document_with_attachments"> + Document with Attachments + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_activetasks"> + List of Active Tasks + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_replication"> + Replication Settings + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_replication-status"> + Replication Status + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_document_with_revs_info"> + Returned CouchDB Document with Detailed Revision Info + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_document_with_revs"> + Returned CouchDB Document with Revision Info + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_returneddocument_with_attachments"> + Returned Document with Attachments + </link></entry></row><row><entry><link linkend="table-couchdb-api-json_security"> + Security Object + </link></entry></row></tbody></tgroup></table> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/JSON/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//json/json.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/JSON.pm"/> +<table id="table-couchdb-api-json_all-docs" class="jsonstructure"><title> + All Database Documents + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>offset</literal> </entry><entry> + Offset where the document list started + </entry></row><row><entry ><literal>rows</literal> <literal>[array]</literal> </entry><entry> + Array of document object + </entry></row><row><entry ><literal>total_rows</literal> </entry><entry> + Number of documents in the database/view + </entry></row><row><entry ><literal>update_seq</literal> (optional) </entry><entry> + Current update sequence for the database + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_bulkdocsreturn" class="jsonstructure"><title> + Bulk Document Response + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>docs</literal> <literal>[array]</literal> </entry><entry> + Bulk Docs Returned Documents + </entry></row><row><entry > <literal>error</literal> </entry><entry> + Error type + </entry></row><row><entry > <literal>id</literal> </entry><entry> + Document ID + </entry></row><row><entry > <literal>reason</literal> </entry><entry> + Error string with extended reason + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_bulkdocs" class="jsonstructure"><title> + Bulk Documents + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>all_or_nothing</literal> (optional) </entry><entry> + Sets the database commit mode to use all-or-nothing semantics + </entry></row><row><entry ><literal>docs</literal> <literal>[array]</literal> </entry><entry> + Bulk Documents Document + </entry></row><row><entry > <literal>_id</literal> (optional) </entry><entry> + Document ID + </entry></row><row><entry > <literal>_rev</literal> (optional) </entry><entry> + Revision ID (when updating an existing document) + </entry></row><row><entry > <literal>_deleted</literal> (optional) </entry><entry> + Whether the document should be deleted + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_changes" class="jsonstructure"><title> + Changes information for a database + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>last_seq</literal> </entry><entry> + Last change sequence number + </entry></row><row><entry ><literal>results</literal> <literal>[array]</literal> </entry><entry> + Changes made to a database + </entry></row><row><entry > <literal>changes</literal> <literal>[array]</literal> </entry><entry> + List of changes, field-by-field, for this document + </entry></row><row><entry > <literal>id</literal> </entry><entry> + Document ID + </entry></row><row><entry > <literal>seq</literal> </entry><entry> + Update sequence number + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_document" class="jsonstructure"><title> + CouchDB Document + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>_id</literal> (optional) </entry><entry> + Document ID + </entry></row><row><entry ><literal>_rev</literal> (optional) </entry><entry> + Revision ID (when updating an existing document) + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_jsonerror" class="jsonstructure"><title> + CouchDB Error Status + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>error</literal> </entry><entry> + Error type + </entry></row><row><entry ><literal>id</literal> </entry><entry> + Document ID + </entry></row><row><entry ><literal>reason</literal> </entry><entry> + Error string with extended reason + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_db-info" class="jsonstructure"><title> + CouchDB database information object + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>committed_update_seq</literal> </entry><entry> + The number of committed update. + </entry></row><row><entry ><literal>compact_running</literal> </entry><entry> + Set to true if the database compaction routine is operating on + this database. + </entry></row><row><entry ><literal>db_name</literal> </entry><entry> + The name of the database. + </entry></row><row><entry ><literal>disk_format_version</literal> </entry><entry> + The version of the physical format used for the data when it is + stored on disk. + </entry></row><row><entry ><literal>disk_size</literal> </entry><entry> + Size in bytes of the data as stored on the disk. Views indexes + are not included in the calculation. + </entry></row><row><entry ><literal>doc_count</literal> </entry><entry> + A count of the documents in the specified database. + </entry></row><row><entry ><literal>doc_del_count</literal> </entry><entry> + Number of deleted documents + </entry></row><row><entry ><literal>instance_start_time</literal> </entry><entry> + Timestamp of when the database was created, expressed in + milliseconds since the epoch. + </entry></row><row><entry ><literal>purge_seq</literal> </entry><entry> + The number of purge operations on the database. + </entry></row><row><entry ><literal>update_seq</literal> </entry><entry> + The current number of updates to the database. + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_design-doc" class="jsonstructure"><title> + Design Document + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>_id</literal> </entry><entry> + Design Document ID + </entry></row><row><entry ><literal>_rev</literal> </entry><entry> + Design Document Revision + </entry></row><row><entry ><literal>views</literal> </entry><entry> + View + </entry></row><row><entry > <literal>viewname</literal> </entry><entry> + View Definition + </entry></row><row><entry > <literal>map</literal> </entry><entry> + Map Function for View + </entry></row><row><entry > <literal>reduce</literal> (optional) </entry><entry> + Reduce Function for View + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_design-doc_info" class="jsonstructure"><title> + Design Document Information + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>name</literal> </entry><entry> + Name/ID of Design Document + </entry></row><row><entry ><literal>view_index</literal> </entry><entry> + View Index + </entry></row><row><entry > <literal>compact_running</literal> </entry><entry> + Indicates whether a compaction routine is currently running on + the view + </entry></row><row><entry > <literal>disk_size</literal> </entry><entry> + Size in bytes of the view as stored on disk + </entry></row><row><entry > <literal>language</literal> </entry><entry> + Language for the defined views + </entry></row><row><entry > <literal>purge_seq</literal> </entry><entry> + The purge sequence that has been processed + </entry></row><row><entry > <literal>signature</literal> </entry><entry> + MD5 signature of the views for the design document + </entry></row><row><entry > <literal>update_seq</literal> </entry><entry> + The update sequence of the corresponding database that has been + indexed + </entry></row><row><entry > <literal>updater_running</literal> </entry><entry> + Indicates if the view is currently being updated + </entry></row><row><entry > <literal>waiting_clients</literal> </entry><entry> + Number of clients waiting on views from this design document + </entry></row><row><entry > <literal>waiting_commit</literal> </entry><entry> + Indicates if there are outstanding commits to the underlying + database that need to processed + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_design-doc_info-spatial" class="jsonstructure"><title> + Design Document spatial index Information + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>name</literal> </entry><entry> + Name/ID of Design Document + </entry></row><row><entry ><literal>spatial_index</literal> </entry><entry> + View Index + </entry></row><row><entry > <literal>compact_running</literal> </entry><entry> + Indicates whether a compaction routine is currently running on + the view + </entry></row><row><entry > <literal>disk_size</literal> </entry><entry> + Size in bytes of the view as stored on disk + </entry></row><row><entry > <literal>language</literal> </entry><entry> + Language for the defined views + </entry></row><row><entry > <literal>purge_seq</literal> </entry><entry> + The purge sequence that has been processed + </entry></row><row><entry > <literal>signature</literal> </entry><entry> + MD5 signature of the views for the design document + </entry></row><row><entry > <literal>update_seq</literal> </entry><entry> + The update sequence of the corresponding database that has been + indexed + </entry></row><row><entry > <literal>updater_running</literal> </entry><entry> + Indicates if the view is currently being updated + </entry></row><row><entry > <literal>waiting_clients</literal> </entry><entry> + Number of clients waiting on views from this design document + </entry></row><row><entry > <literal>waiting_commit</literal> </entry><entry> + Indicates if there are outstanding commits to the underlying + database that need to processed + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_document_with_attachments" class="jsonstructure"><title> + Document with Attachments + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>_id</literal> (optional) </entry><entry> + Document ID + </entry></row><row><entry ><literal>_rev</literal> (optional) </entry><entry> + Revision ID (when updating an existing document) + </entry></row><row><entry ><literal>_attachments</literal> (optional) </entry><entry> + Document Attachment + </entry></row><row><entry > <literal>filename</literal> </entry><entry> + Attachment information + </entry></row><row><entry > <literal>content_type</literal> </entry><entry> + MIME Content type string + </entry></row><row><entry > <literal>data</literal> </entry><entry> + File attachment content, Base64 encoded + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_activetasks" class="jsonstructure"><title> + List of Active Tasks + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>tasks</literal> <literal>[array]</literal> </entry><entry> + Active Task + </entry></row><row><entry > <literal>pid</literal> </entry><entry> + Process ID + </entry></row><row><entry > <literal>status</literal> </entry><entry> + Task status message + </entry></row><row><entry > <literal>task</literal> </entry><entry> + Task name + </entry></row><row><entry > <literal>type</literal> </entry><entry> + Operation Type + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_replication" class="jsonstructure"><title> + Replication Settings + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>cancel</literal> (optional) </entry><entry> + Cancels the replication + </entry></row><row><entry ><literal>continuous</literal> (optional) </entry><entry> + Configure the replication to be continuous + </entry></row><row><entry ><literal>create_target</literal> (optional) </entry><entry> + Creates the target database + </entry></row><row><entry ><literal>doc_ids</literal> (optional) </entry><entry> + Array of document IDs to be synchronized + </entry></row><row><entry ><literal>proxy</literal> (optional) </entry><entry> + Address of a proxy server through which replication should occur + </entry></row><row><entry ><literal>source</literal> </entry><entry> + Source database name or URL + </entry></row><row><entry ><literal>target</literal> </entry><entry> + Target database name or URL + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_replication-status" class="jsonstructure"><title> + Replication Status + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>history</literal> <literal>[array]</literal> </entry><entry> + Replication History + </entry></row><row><entry > <literal>doc_write_failures</literal> </entry><entry> + Number of document write failures + </entry></row><row><entry > <literal>docs_read</literal> </entry><entry> + Number of documents read + </entry></row><row><entry > <literal>docs_written</literal> </entry><entry> + Number of documents written to target + </entry></row><row><entry > <literal>end_last_seq</literal> </entry><entry> + Last sequence number in changes stream + </entry></row><row><entry > <literal>end_time</literal> </entry><entry> + Date/Time replication operation completed + </entry></row><row><entry > <literal>missing_checked</literal> </entry><entry> + Number of missing documents checked + </entry></row><row><entry > <literal>missing_found</literal> </entry><entry> + Number of missing documents found + </entry></row><row><entry > <literal>recorded_seq</literal> </entry><entry> + Last recorded sequence number + </entry></row><row><entry > <literal>session_id</literal> </entry><entry> + Session ID for this replication operation + </entry></row><row><entry > <literal>start_last_seq</literal> </entry><entry> + First sequence number in changes stream + </entry></row><row><entry > <literal>start_time</literal> </entry><entry> + Date/Time replication operation started + </entry></row><row><entry ><literal>ok</literal> </entry><entry> + Replication status + </entry></row><row><entry ><literal>session_id</literal> </entry><entry> + Unique session ID + </entry></row><row><entry ><literal>source_last_seq</literal> </entry><entry> + Last sequence number read from source database + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_document_with_revs_info" class="jsonstructure"><title> + Returned CouchDB Document with Detailed Revision Info + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>_id</literal> (optional) </entry><entry> + Document ID + </entry></row><row><entry ><literal>_rev</literal> (optional) </entry><entry> + Revision ID (when updating an existing document) + </entry></row><row><entry ><literal>_revs_info</literal> <literal>[array]</literal> </entry><entry> + CouchDB Document Extended Revision Info + </entry></row><row><entry > <literal>rev</literal> </entry><entry> + Full revision string + </entry></row><row><entry > <literal>status</literal> </entry><entry> + Status of the revision + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_document_with_revs" class="jsonstructure"><title> + Returned CouchDB Document with Revision Info + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>_id</literal> (optional) </entry><entry> + Document ID + </entry></row><row><entry ><literal>_rev</literal> (optional) </entry><entry> + Revision ID (when updating an existing document) + </entry></row><row><entry ><literal>_revisions</literal> </entry><entry> + CouchDB Document Revisions + </entry></row><row><entry > <literal>ids</literal> <literal>[array]</literal> </entry><entry> + Array of valid revision IDs, in reverse order (latest first) + </entry></row><row><entry > <literal>start</literal> </entry><entry> + Prefix number for the latest revision + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_returneddocument_with_attachments" class="jsonstructure"><title> + Returned Document with Attachments + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>_id</literal> (optional) </entry><entry> + Document ID + </entry></row><row><entry ><literal>_rev</literal> (optional) </entry><entry> + Revision ID (when updating an existing document) + </entry></row><row><entry ><literal>_attachments</literal> (optional) </entry><entry> + Document Attachment + </entry></row><row><entry > <literal>filename</literal> </entry><entry> + Attachment + </entry></row><row><entry > <literal>content_type</literal> </entry><entry> + MIME Content type string + </entry></row><row><entry > <literal>length</literal> </entry><entry> + Length (bytes) of the attachment data + </entry></row><row><entry > <literal>revpos</literal> </entry><entry> + Revision where this attachment exists + </entry></row><row><entry > <literal>stub</literal> </entry><entry> + Indicates whether the attachment is a stub + </entry></row></tbody></tgroup></table><table id="table-couchdb-api-json_security" class="jsonstructure"><title> + Security Object + </title><tgroup cols="2"><colspec colname="item" colwidth="30*"/><colspec colname="desc" colwidth="70*"/><tbody><row><entry ><emphasis role="bold">Field</emphasis></entry><entry><emphasis role="bold">Description</emphasis></entry></row><row><entry ><literal>admins</literal> </entry><entry> + Roles/Users with admin privileges + </entry></row><row><entry > <literal>roles</literal> <literal>[array]</literal> </entry><entry> + List of roles with parent privilege + </entry></row><row><entry > <literal>users</literal> <literal>[array]</literal> </entry><entry> + List of users with parent privilege + </entry></row><row><entry ><literal>readers</literal> </entry><entry> + Roles/Users with reader privileges + </entry></row><row><entry > <literal>roles</literal> <literal>[array]</literal> </entry><entry> + List of roles with parent privilege + </entry></row><row><entry > <literal>users</literal> <literal>[array]</literal> </entry><entry> + List of users with parent privilege + </entry></row></tbody></tgroup></table> + +</appendix>
http://git-wip-us.apache.org/repos/asf/couchdb/blob/1055ea0e/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-localdb.xml ---------------------------------------------------------------------- diff --git a/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-localdb.xml b/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-localdb.xml new file mode 100644 index 0000000..9f7161f --- /dev/null +++ b/share/docs/couchdb-manual-1.1/metadoc-couchdb-api-localdb.xml @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN' + 'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd' [ +<!ENTITY % every.entities SYSTEM "entities.ent"> +%every.entities; +]> +<chapter id="couchdb-api-localdb"> + + <title>CouchDB API Server Local (non-replicating) Document Methods</title> + + <para> + The Local (non-replicating) document interface allows you to create + local documents that are not replicated to other databases. These + documents can be used to hold configuration or other information + that is required specifically on the local CouchDB instance. + </para> + + <para> + Local documents have the following limitations: + </para> + + <itemizedlist> + + <listitem> + <para> + Local documents are not replicated to other databases. + </para> + </listitem> + + <listitem> + <para> + The ID of the local document must be known for the document to + accessed. You cannot obtain a list of local documents from the + database. + </para> + </listitem> + + <listitem> + <para> + Local documents are not output by views, or the + <literal>_all_docs</literal> view. + </para> + </listitem> + + </itemizedlist> + + <para> + Local documents can be used when you want to store configuration or + other information for the curent (local) instance of a given + database. + </para> + + <para> + A list of the available methods and URL paths are provided below: + </para> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/URLAPI/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//urlapi/couchdb.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/URLAPI.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<table id="table-couchdb-api-localdb-summary"><title>Local (non-replicating) Document API + Calls</title><tgroup cols="3"><colspec colname="method"/><colspec colname="path"/><colspec colname="desc"/><thead><row><entry>Method</entry><entry>Path</entry><entry>Description</entry></row></thead><tbody><row><entry><literal>GET</literal></entry><entry><literal>/db/_local/local-doc</literal></entry><entry><link linkend="couchdb-api-localdb_db-local-localdoc_get"> + Returns the latest revision of the non-replicated document + </link></entry></row><row><entry><literal>PUT</literal></entry><entry><literal>/db/_local/local-doc</literal></entry><entry><link linkend="couchdb-api-localdb_db-local-localdoc_put"> + Inserts a new version of the non-replicated document + </link></entry></row><row><entry><literal>DELETE</literal></entry><entry><literal>/db/_local/local-doc</literal></entry><entry><link linkend="couchdb-api-localdb_db-local-localdoc_delete"> + Deletes the non-replicated document + </link></entry></row><row><entry><literal>COPY</literal></entry><entry><literal>/db/_local/local-doc</literal></entry><entry><link linkend="couchdb-api-localdb_db-local-localdoc_copy"> + Copies the non-replicated document + </link></entry></row></tbody></tgroup></table> + + <section id="couchdb-api-localdb_db-local-localdoc_get"> + + <title><literal>GET /db/_local/local-doc</literal></title> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/URLAPI/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//urlapi/couchdb.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/URLAPI.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<informaltable><textobject><phrase>URL API GET /db/_local/local-doc</phrase></textobject><tgroup cols="3"><colspec colname="field"/><colspec colname="info"/><colspec colname="addinfo"/><tbody><row><entry><emphasis role="bold">Method</emphasis></entry><entry namest="info" nameend="addinfo"><literal>GET /db/_local/local-doc</literal></entry></row><row><entry><emphasis role="bold">Request</emphasis></entry><entry namest="info" nameend="addinfo"> + None + </entry></row><row><entry><emphasis role="bold">Response</emphasis></entry><entry namest="info" nameend="addinfo"> + JSON of the returned document + </entry></row><row><entry><emphasis role="bold">Admin Privileges Required</emphasis></entry><entry namest="info" nameend="addinfo">no</entry></row><row><entry><emphasis role="bold">Query Arguments</emphasis></entry><entry><emphasis role="bold">Argument</emphasis></entry><entry><literal>rev</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry> + Specify the revision to return + </entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>yes</entry></row><row><entry></entry><entry><emphasis role="bold">Type</emphasis></entry><entry>string</entry></row><row><entry></entry><entry><emphasis role="bold">Supported Values</emphasis></entry></row><row><entry></entry><entry><literal>true</literal></entry><entry>Includes the revisions</entry></row><row><entry></entry><entry></entry><entry></entry></row><row><entry></entry><entry><emphasis role="bold">Argument</emphasis></entry><entry><literal>revs</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry> + Return a list of the revisions for the document + </entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>yes</entry></row><row><entry></entry><entry><emphasis role="bold">Type</emphasis></entry><entry>boolean</entry></row><row><entry></entry><entry></entry><entry></entry></row><row><entry></entry><entry><emphasis role="bold">Argument</emphasis></entry><entry><literal>revs_info</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry> + Return a list of detailed revision information for the + document + </entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>yes</entry></row><row><entry></entry><entry><emphasis role="bold">Type</emphasis></entry><entry>boolean</entry></row><row><entry></entry><entry><emphasis role="bold">Supported Values</emphasis></entry></row><row><entry></entry><entry><literal>true</literal></entry><entry>Includes the revisions</entry></row><row><entry namest="field" nameend="addinfo"><emphasis role="bold">Return Codes</emphasis></entry></row><row><entry>400</entry><entry namest="info" nameend="addinfo"> + The format of the request or revision was invalid + </entry></row><row><entry>404</entry><entry namest="info" nameend="addinfo"> + The specified document or revision cannot be found, or has been + deleted + </entry></row></tbody></tgroup></informaltable> + + <para> + Gets the specified local document. The semantics are identical to + accessing a standard document in the specified database, except + that the document is not replicated. See + <xref + linkend="couchdb-api-dbdoc_db-doc_get"/>. + </para> + + </section> + + <section id="couchdb-api-localdb_db-local-localdoc_put"> + + <title><literal>PUT /db/_local/local-doc</literal></title> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/URLAPI/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//urlapi/couchdb.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/URLAPI.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<informaltable><textobject><phrase>URL API PUT /db/_local/local-doc</phrase></textobject><tgroup cols="3"><colspec colname="field"/><colspec colname="info"/><colspec colname="addinfo"/><tbody><row><entry><emphasis role="bold">Method</emphasis></entry><entry namest="info" nameend="addinfo"><literal>PUT /db/_local/local-doc</literal></entry></row><row><entry><emphasis role="bold">Request</emphasis></entry><entry namest="info" nameend="addinfo"> + JSON of the document + </entry></row><row><entry><emphasis role="bold">Response</emphasis></entry><entry namest="info" nameend="addinfo"> + JSON with the committed document information + </entry></row><row><entry><emphasis role="bold">Admin Privileges Required</emphasis></entry><entry namest="info" nameend="addinfo">no</entry></row><row><entry namest="field" nameend="addinfo"><emphasis role="bold">Return Codes</emphasis></entry></row><row><entry>201</entry><entry namest="info" nameend="addinfo"> + Document has been created successfully + </entry></row></tbody></tgroup></informaltable> + + <para> + Stores the specified local document. The semantics are identical + to storing a standard document in the specified database, except + that the document is not replicated. See + <xref + linkend="couchdb-api-dbdoc_db-doc_put"/>. + </para> + + </section> + + <section id="couchdb-api-localdb_db-local-localdoc_delete"> + + <title><literal>DELETE /db/_local/local-doc</literal></title> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/URLAPI/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//urlapi/couchdb.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/URLAPI.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<informaltable><textobject><phrase>URL API DELETE /db/_local/local-doc</phrase></textobject><tgroup cols="3"><colspec colname="field"/><colspec colname="info"/><colspec colname="addinfo"/><tbody><row><entry><emphasis role="bold">Method</emphasis></entry><entry namest="info" nameend="addinfo"><literal>DELETE /db/_local/local-doc</literal></entry></row><row><entry><emphasis role="bold">Request</emphasis></entry><entry namest="info" nameend="addinfo"> + None + </entry></row><row><entry><emphasis role="bold">Response</emphasis></entry><entry namest="info" nameend="addinfo"> + JSON with the deleted document information + </entry></row><row><entry><emphasis role="bold">Admin Privileges Required</emphasis></entry><entry namest="info" nameend="addinfo">no</entry></row><row><entry><emphasis role="bold">Query Arguments</emphasis></entry><entry><emphasis role="bold">Argument</emphasis></entry><entry><literal>rev</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry> + Current revision of the document for validation + </entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>yes</entry></row><row><entry></entry><entry><emphasis role="bold">Type</emphasis></entry><entry>string</entry></row><row><entry><emphasis role="bold">HTTP Headers</emphasis></entry><entry><emphasis role="bold">Header</emphasis></entry><entry><literal>If-Match</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry>Current revision of the document for validation</entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>yes</entry></row><row><entry></entry><entry></entry><entry></entry></row><row><entry namest="field" nameend="addinfo"><emphasis role="bold">Return Codes</emphasis></entry></row><row><entry>409</entry><entry namest="info" nameend="addinfo"> + Supplied revision is incorrect or missing + </entry></row></tbody></tgroup></informaltable> + + <para> + Deletes the specified local document. The semantics are identical + to deleting a standard document in the specified database, except + that the document is not replicated. See + <xref + linkend="couchdb-api-dbdoc_db-doc_delete"/>. + </para> + + </section> + + <section id="couchdb-api-localdb_db-local-localdoc_copy"> + + <title><literal>COPY /db/_local/local-doc</literal></title> + + <remark role="dependency-meta" condition="../DocKit/bin/CouchDocs/URLAPI/Parser.pm"/> +<remark role="dependency-meta" condition="../metadocs//urlapi/couchdb.xml"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs/URLAPI.pm"/> +<remark role="dependency-tool" condition="../DocKit/bin/CouchDocs.pm"/> +<informaltable><textobject><phrase>URL API COPY /db/_local/local-doc</phrase></textobject><tgroup cols="3"><colspec colname="field"/><colspec colname="info"/><colspec colname="addinfo"/><tbody><row><entry><emphasis role="bold">Method</emphasis></entry><entry namest="info" nameend="addinfo"><literal>COPY /db/_local/local-doc</literal></entry></row><row><entry><emphasis role="bold">Request</emphasis></entry><entry namest="info" nameend="addinfo"> + None + </entry></row><row><entry><emphasis role="bold">Response</emphasis></entry><entry namest="info" nameend="addinfo"> + JSON of the copied document + </entry></row><row><entry><emphasis role="bold">Admin Privileges Required</emphasis></entry><entry namest="info" nameend="addinfo">no</entry></row><row><entry><emphasis role="bold">Query Arguments</emphasis></entry><entry><emphasis role="bold">Argument</emphasis></entry><entry><literal>rev</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry> + Revision to copy from + </entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>yes</entry></row><row><entry></entry><entry><emphasis role="bold">Type</emphasis></entry><entry>string</entry></row><row><entry><emphasis role="bold">HTTP Headers</emphasis></entry><entry><emphasis role="bold">Header</emphasis></entry><entry><literal>Destination</literal></entry></row><row><entry></entry><entry><emphasis role="bold">Description</emphasis></entry><entry>Destination document (and optional revision)</entry></row><row><entry></entry><entry><emphasis role="bold">Optional</emphasis></entry><entry>no</entry></row><row><entry></entry><entry></entry><entry></entry></row></tbody></tgroup></informaltable> + + <para> + Copies the specified local document. The semantics are identical + to copying a standard document in the specified database, except + that the document is not replicated. See + <xref + linkend="couchdb-api-dbdoc_db-doc_copy"/>. + </para> + + </section> + +</chapter>
