aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAndrew Manning <andrew@reticu.li>2016-12-04 08:08:22 -0500
committerAndrew Manning <andrew@reticu.li>2016-12-04 08:08:22 -0500
commit3b3da24823defd89f4ed256b7c45df8b71cb0627 (patch)
tree6aebea23b86aa608c93337c5994f399b20d17586 /doc
parent1f91c2fe1203f6f34a639700e8d9731f51ba1429 (diff)
parentb98fbcce0ce8ba68781cd006e2b12a2ff3303b43 (diff)
downloadvolse-hubzilla-3b3da24823defd89f4ed256b7c45df8b71cb0627.tar.gz
volse-hubzilla-3b3da24823defd89f4ed256b7c45df8b71cb0627.tar.bz2
volse-hubzilla-3b3da24823defd89f4ed256b7c45df8b71cb0627.zip
Merge remote-tracking branch 'upstream/dev' into doco
Diffstat (limited to 'doc')
-rw-r--r--doc/api/api_functions.bb (renamed from doc/api_functions.bb)0
-rw-r--r--doc/api/api_group_members.md16
-rw-r--r--doc/api/api_item_update.md225
-rw-r--r--doc/api/api_posting.bb (renamed from doc/api_posting.bb)0
-rw-r--r--doc/api/api_xchan.md44
-rw-r--r--doc/api/group.md12
-rw-r--r--doc/api_item_store.md104
-rw-r--r--doc/api_zot.md80
8 files changed, 377 insertions, 104 deletions
diff --git a/doc/api_functions.bb b/doc/api/api_functions.bb
index e6cde3dc6..e6cde3dc6 100644
--- a/doc/api_functions.bb
+++ b/doc/api/api_functions.bb
diff --git a/doc/api/api_group_members.md b/doc/api/api_group_members.md
new file mode 100644
index 000000000..f4bcfa4e3
--- /dev/null
+++ b/doc/api/api_group_members.md
@@ -0,0 +1,16 @@
+API group_members
+=================
+
+GET /api/z/1.0/group_members
+
+
+
+Required:
+
+ group_id or group_name
+
+
+Returns:
+
+ abook+xchan (DB join) for each member of the privacy group
+
diff --git a/doc/api/api_item_update.md b/doc/api/api_item_update.md
new file mode 100644
index 000000000..cf1a28044
--- /dev/null
+++ b/doc/api/api_item_update.md
@@ -0,0 +1,225 @@
+API item/update
+===============
+
+
+Usage: POST /api/z/1.0/item/update
+
+Description: item/update posts an item (typically a conversation item or post, but can be any item) using form input.
+
+
+Required:
+
+- body
+
+ text/bbcode contents by default.
+
+
+Optional:
+
+- $_FILES['media']
+
+ uploaded media file to include with post
+
+- title
+
+ title of post/item
+
+- contact_allow
+
+ array of xchan.xchan_hash allowed to view this item
+
+- group_allow
+
+ array of group.hash allowed to view this item
+
+- contact_deny
+
+ array of xchan.xchan_hash not allowed to view this item
+
+- group_deny
+
+ array of group.hash not allowed to view this item
+
+- coord
+
+ geographic coordinates
+
+- location
+
+ freefrom location
+
+- expire
+
+ datetime this post will expire or be removed
+
+- mimetype
+
+ mimetype if not text/bbcode
+
+- parent
+
+ item.id of parent to this post (makes it a comment)
+
+- parent_mid
+
+ alternate form of parent using message_id
+
+- remote_xchan
+
+ xchan.xchan_hash of this message author if not the channel owner
+
+- consensus
+
+ boolean set to true if this is a consensus or voting item (default false)
+
+- nocomment
+
+ boolean set to true if comments are to be disabled (default false)
+
+- origin
+
+ do not use this without reading the code
+
+- namespace
+
+ persistent identity for a remote network or service
+
+- remote_id
+
+ message_id of this resource on a remote network or service
+
+- message_id
+
+ message_id of this item (leave unset to generate one)
+
+- created
+
+ datetime of message creation
+
+- post_id
+
+ existing item.id if this is an edit operation
+
+- app
+
+ application or network name to display with item
+
+- categories
+
+ comma separated categories for this item
+
+- webpage
+
+ item.page_type if not 0
+
+- pagetitle
+
+ for webpage and design elements, the 'page name'
+
+- layout_mid
+
+ item.mid of layout for this design element
+
+- plink
+
+ permalink for this item if different than the default
+
+- verb
+
+ activitystream verb for this item/activity
+
+- obj_type
+
+ activitystream object type for this item/activity
+
+
+
+Example:
+
+curl -u mychannel:mypassword https://xyz.macgirvin.com/api/z/1.0/item/update -d body="hello world"
+
+
+Returns:
+
+
+ {
+
+ "success": true,
+ "item_id": "2245",
+ "item": {
+ "id": "2245",
+ "mid": "14135cdecf6b8e3891224e4391748722114da6668eebbcb56fe4667b60b88249@xyz.macgirvin.com",
+ "aid": "1",
+ "uid": "2",
+ "parent": "2245",
+ "parent_mid": "14135cdecf6b8e3891224e4391748722114da6668eebbcb56fe4667b60b88249@xyz.macgirvin.com",
+ "thr_parent": "14135cdecf6b8e3891224e4391748722114da6668eebbcb56fe4667b60b88249@xyz.macgirvin.com",
+ "created": "2016-12-03 20:00:12",
+ "edited": "2016-12-03 20:00:12",
+ "expires": "0001-01-01 00:00:00",
+ "commented": "2016-12-03 20:00:12",
+ "received": "2016-12-03 20:00:12",
+ "changed": "2016-12-03 20:00:12",
+ "comments_closed": "0001-01-01 00:00:00",
+ "owner_xchan": "pgcJx1IQjuPkx8aI9qheJlBMZzJz-oTPjHy3h5pWlOVOriBO_cSiUhhqwhuZ74TYJ8_ECO3pPiRMWC0q8YPCQg",
+ "author_xchan": "pgcJx1IQjuPkx8aI9qheJlBMZzJz-oTPjHy3h5pWlOVOriBO_cSiUhhqwhuZ74TYJ8_ECO3pPiRMWC0q8YPCQg",
+ "source_xchan": "",
+ "mimetype": "text/bbcode",
+ "title": "",
+ "body": "hello world",
+ "html": "",
+ "app": "",
+ "lang": "",
+ "revision": "0",
+ "verb": "http://activitystrea.ms/schema/1.0/post",
+ "obj_type": "http://activitystrea.ms/schema/1.0/note",
+ "obj": "",
+ "tgt_type": "",
+ "target": "",
+ "layout_mid": "",
+ "postopts": "",
+ "route": "",
+ "llink": "https://xyz.macgirvin.com/display/14135cdecf6b8e3891224e4391748722114da6668eebbcb56fe4667b60b88249@xyz.macgirvin.com",
+ "plink": "https://xyz.macgirvin.com/channel/mychannel/?f=&mid=14135cdecf6b8e3891224e4391748722114da6668eebbcb56fe4667b60b88249@xyz.macgirvin.com",
+ "resource_id": "",
+ "resource_type": "",
+ "attach": "",
+ "sig": "sa4TOQNfHtV13HDZ1tuQGWNBpZp-nWhT2GMrZEmelXxa_IvEepD2SEsCTWOBqM8OKPJLfNy8_i-ORXjrOIIgAa_aT8cw5vka7Q0C8L9eEb_LegwQ_BtH0CXO5uT30e_8uowkwzh6kmlVg1ntD8QqrGgD5jTET_fMQOIw4gQUBh40GDG9RB4QnPp_MKsgemGrADnRk2vHO7-bR32yQ0JI-8G-eyeqGaaJmIwkHoi0vXsfjZtU7ijSLuKEBWboNjKEDU89-vQ1c5Kh1r0pmjiDk-a5JzZTYShpuhVA-vQgEcADA7wkf4lJZCYNwu3FRwHTvhSMdF0nmyv3aPFglQDky38-SAXZyQSvd7qlABHGCVVDmYrYaiq7Dh4rRENbAUf-UJFHPCVB7NRg34R8HIqmOKq1Su99bIWaoI2zuAQEVma9wLqMoFsluFhxX58KeVtlCZlro7tZ6z619-dthS_fwt0cL_2dZ3QwjG1P36Q4Y4KrCTpntn9ot5osh-HjVQ01h1I9yNCj6XPgYJ8Im3KT_G4hmMDFM7H9RUrYLl2o9XYyiS2nRrf4aJHa0UweBlAY4zcQG34bw2AMGCY53mwsSArf4Hs3rKu5GrGphuwYX0lHa7XEKMglwBWPWHI49q7-oNWr7aWwn1FnfaMfl4cQppCMtKESMNRKm_nb9Dsh5e0",
+ "diaspora_meta": "",
+ "location": "",
+ "coord": "",
+ "public_policy": "",
+ "comment_policy": "contacts",
+ "allow_cid": "",
+ "allow_gid": "",
+ "deny_cid": "",
+ "deny_gid": "",
+ "item_restrict": "0",
+ "item_flags": "0",
+ "item_private": "0",
+ "item_origin": "1",
+ "item_unseen": "0",
+ "item_starred": "0",
+ "item_uplink": "0",
+ "item_consensus": "0",
+ "item_wall": "1",
+ "item_thread_top": "1",
+ "item_notshown": "0",
+ "item_nsfw": "0",
+ "item_relay": "0",
+ "item_mentionsme": "0",
+ "item_nocomment": "0",
+ "item_obscured": "0",
+ "item_verified": "1",
+ "item_retained": "0",
+ "item_rss": "0",
+ "item_deleted": "0",
+ "item_type": "0",
+ "item_hidden": "0",
+ "item_unpublished": "0",
+ "item_delayed": "0",
+ "item_pending_remove": "0",
+ "item_blocked": "0"
+ }
+
+ } \ No newline at end of file
diff --git a/doc/api_posting.bb b/doc/api/api_posting.bb
index c708ad143..c708ad143 100644
--- a/doc/api_posting.bb
+++ b/doc/api/api_posting.bb
diff --git a/doc/api/api_xchan.md b/doc/api/api_xchan.md
new file mode 100644
index 000000000..d2b15e04c
--- /dev/null
+++ b/doc/api/api_xchan.md
@@ -0,0 +1,44 @@
+API xchan
+=========
+
+An xchan is a global location independent channel and is the primary record for a network
+identity. It may refer to channels on other websites, networks, or services.
+
+GET /api/z/1.0/xchan
+
+Required: one of [ address, hash, guid ] as GET parameters
+
+Returns a portable xchan structure
+
+Example: https://xyz.macgirvin.com/api/z/1.0/xchan?f=&address=mike@macgirvin.com
+
+Returns:
+
+ {
+ "hash": "jr54M_y2l5NgHX5wBvP0KqWcAHuW23p1ld-6Vn63_pGTZklrI36LF8vUHMSKJMD8xzzkz7s2xxCx4-BOLNPaVA",
+ "guid": "sebQ-IC4rmFn9d9iu17m4BXO-kHuNutWo2ySjeV2SIW1LzksUkss12xVo3m3fykYxN5HMcc7gUZVYv26asx-Pg",
+ "guid_sig": "Llenlbl4zHo6-g4sa63MlQmTP5dRCrsPmXHHFmoCHG63BLq5CUZJRLS1vRrrr_MNxr7zob_Ykt_m5xPKe5H0_i4pDj-UdP8dPZqH2fqhhx00kuYL4YUMJ8gRr5eO17vsZQ3XxTcyKewtgeW0j7ytwMp6-hFVUx_Cq08MrXas429ZrjzaEwgTfxGnbgeQYQ0R5EXpHpEmoERnZx77VaEahftmdjAUx9R4YKAp13pGYadJOX5xnLfqofHQD8DyRHWeMJ4G1OfWPSOlXfRayrV_jhnFlZjMU7vOdQwHoCMoR5TFsRsHuzd-qepbvo3pzvQZRWnTNu6oPucgbf94p13QbalYRpBXKOxdTXJrGdESNhGvhtaZnpT9c1QVqC46jdfP0LOX2xrVdbvvG2JMWFv7XJUVjLSk_yjzY6or2VD4V6ztYcjpCi9d_WoNHruoxro_br1YO3KatySxJs-LQ7SOkQI60FpysfbphNyvYMkotwUFI59G08IGKTMu3-GPnV1wp7NOQD1yzJbGGEGSEEysmEP0SO9vnN45kp3MiqbffBGc1r4_YM4e7DPmqOGM94qksOcLOJk1HNESw2dQYWxWQTBXPfOJT6jW9_crGLMEOsZ3Jcss0XS9KzBUA2p_9osvvhUKuKXbNztqH0oZIWlg37FEVsDs_hUwUJpv2Ar09k4",
+ "pubkey": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7QCwvuEIwCHjhjbpz3Oc\ntyei/Pz9nDksNbsc44Cm8jxYGMXsTPFXDZYCcCB5rcAhPPdZSlzaPkv4vPVcMIrw\n5cdX0tvbwa3rNTng6uFE7qkt15D3YCTkwF0Y9FVZiZ2Ko+G23QeBt9wqb9dlDN1d\nuPmu9BLYXIT/JXoBwf0vjIPFM9WBi5W/EHGaiuqw7lt0qI7zDGw77yO5yehKE4cu\n7dt3SakrXphL70LGiZh2XGoLg9Gmpz98t+gvPAUEotAJxIUqnoiTA8jlxoiQjeRK\nHlJkwMOGmRNPS33awPos0kcSxAywuBbh2X3aSqUMjcbE4cGJ++/13zoa6RUZRObC\nZnaLYJxqYBh13/N8SfH7d005hecDxWnoYXeYuuMeT3a2hV0J84ztkJX5OoxIwk7S\nWmvBq4+m66usn6LNL+p5IAcs93KbvOxxrjtQrzohBXc6+elfLVSQ1Rr9g5xbgpub\npSc+hvzbB6p0tleDRzwAy9X16NI4DYiTj4nkmVjigNo9v2VPnAle5zSam86eiYLO\nt2u9YRqysMLPKevNdj3CIvst+BaGGQONlQalRdIcq8Lin+BhuX+1TBgqyav4XD9K\nd+JHMb1aBk/rFLI9/f2S3BJ1XqpbjXz7AbYlaCwKiJ836+HS8PmLKxwVOnpLMbfH\nPYM8k83Lip4bEKIyAuf02qkCAwEAAQ==\n-----END PUBLIC KEY-----\n",
+ "photo_mimetype": "image/jpeg",
+ "photo_l": "https://xyz.macgirvin.com/photo/350b74555c04429148f2e12775f6c403-4",
+ "photo_m": "https://xyz.macgirvin.com/photo/350b74555c04429148f2e12775f6c403-5",
+ "photo_s": "https://xyz.macgirvin.com/photo/350b74555c04429148f2e12775f6c403-6",
+ "address": "mike@macgirvin.com",
+ "url": "https://macgirvin.com/channel/mike",
+ "connurl": "https://macgirvin.com/poco/mike",
+ "follow": "https://macgirvin.com/follow?f=&url=%s",
+ "connpage": "https://macgirvin.com/connect/mike",
+ "name": "Mike Macgirvin",
+ "network": "zot",
+ "instance_url": "",
+ "flags": "0",
+ "photo_date": "2012-12-06 05:06:11",
+ "name_date": "2012-12-06 04:59:13",
+ "hidden": "1",
+ "orphan": "0",
+ "censored": "0",
+ "selfcensored": "0",
+ "system": "0",
+ "pubforum": "0",
+ "deleted": "0"
+ } \ No newline at end of file
diff --git a/doc/api/group.md b/doc/api/group.md
new file mode 100644
index 000000000..76df1c8e6
--- /dev/null
+++ b/doc/api/group.md
@@ -0,0 +1,12 @@
+API group
+=========
+
+GET /api/z/1.0/group
+
+
+Description: list privacy groups
+
+
+Returns: DB tables of all privacy groups. To use with API group_members, provide group_id from the id element returned in this call, or group_name from the gname returned in this call.
+
+ \ No newline at end of file
diff --git a/doc/api_item_store.md b/doc/api_item_store.md
deleted file mode 100644
index 26b6db121..000000000
--- a/doc/api_item_store.md
+++ /dev/null
@@ -1,104 +0,0 @@
-API item/store
-==============
-
-Usage: POST /api/z/1.0/item/store
-
-Description: item/store posts an item (typically a conversation item or post, but can be any item) using form input.
-
-
-Required:
-
-- body
-
- text/bbcode contents by default.
-
-
-Optional:
-
-- $_FILES['media']
- uploaded media file to include with post
-
-- title
- title of post/item
-
-- contact_allow
- array of xchan.xchan_hash allowed to view this item
-
-- group_allow
- array of group.hash allowed to view this item
-
-- contact_deny
- array of xchan.xchan_hash not allowed to view this item
-
-- group_deny
- array of group.hash not allowed to view this item
-
-- coord
- geographic coordinates
-
-- location
- freefrom location
-
-- expire
- datetime this post will expire or be removed
-
-- mimetype
- mimetype if not text/bbcode
-
-- parent
- item.id of parent to this post (makes it a comment)
-
-- parent_mid
- alternate form of parent using message_id
-
-- remote_xchan
- xchan.xchan_hash of this message author if not the channel owner
-
-- consensus
- boolean set to true if this is a consensus or voting item (default false)
-
-- nocomment
- boolean set to true if comments are to be disabled (default false)
-
-- origin
- do not use this without reading the code
-
-- namespace
- persistent identity for a remote network or service
-
-- remote_id
- message_id of this resource on a remote network or service
-
-- message_id
- message_id of this item (leave unset to generate one)
-
-- created
- datetime of message creation
-
-- post_id
- existing item.id if this is an edit operation
-
-- app
- application or network name to display with item
-
-- categories
- comma separated categories for this item
-
-- webpage
- item.page_type if not 0
-
-- pagetitle
- for webpage and design elements, the 'page name'
-
-- layout_mid
- item.mid of layout for this design element
-
-- plink
- permalink for this item if different than the default
-
-- verb
- activitystream verb for this item/activity
-
-- obj_type
- activitystream object type for this item/activity
-
diff --git a/doc/api_zot.md b/doc/api_zot.md
new file mode 100644
index 000000000..3ba536550
--- /dev/null
+++ b/doc/api_zot.md
@@ -0,0 +1,80 @@
+Zot API
+=======
+
+
+
+api/z/1.0/channel/export/basic
+
+ Export channel data
+
+
+
+api/z/1.0/channel/stream
+
+ Fetch conversation items
+
+
+api/z/1.0/files
+
+ List file storage
+
+api/z/1.0/filemeta
+
+ Export file metadata for any uploaded file
+
+
+api/z/1.0/filedata
+
+ Export file contents for any uploaded file
+
+
+api/z/1.0/file/export
+
+api/z/1.0/file
+
+api/z/1.0/albums
+
+ List photo albums
+
+
+api/z/1.0/photos
+
+ list photo metadata
+
+
+api/z/1.0/photo
+
+
+[api/z/1.0/group](help/api/group)
+
+ List privacy groups
+
+[api/z/1.0/group_members](help/api/group_members)
+
+ List members of a privacy group
+
+
+[api/z/1.0/xchan](help/api/api_xchan)
+
+ Global extended channel (identity) information
+
+[api/z/1.0/item/update](help/api/api_item_update)
+
+ Create or update an item (post, activity, webpage, etc.)
+
+
+api/z/1.0/item/full
+
+ Get all data associated with an item
+
+api/z/1.0/abook
+
+ Connections
+
+api/z/1.0/abconfig
+
+ Connection metadata (such as permissions)
+
+api/z/1.0/perm_allowed
+
+ Check a permission for a given xchan