metamaps--metamaps/doc/api/apis/synapses.raml
2016-10-04 15:30:06 +08:00

100 lines
2.7 KiB
Text

#type: collection
get:
is: [ searchable: { searchFields: "desc" }, embeddable: { embedFields: "topic1,topic2,user" }, orderable, pageable ]
responses:
200:
body:
application/json:
example: !include ../examples/synapses.json
post:
body:
application/json:
properties:
desc:
description: text description of this synapse
required: false
category:
description: |
<code>from-to</code> or <code>both</code>
permission:
description: commons, public, or private
topic1_id:
description: the topic being linked from
topic2_id:
description: the topic being linked to
user_id:
description: the creator of the topic
responses:
201:
body:
application/json:
example: !include ../examples/synapse.json
/{id}:
#type: item
get:
is: [ embeddable: { embedFields: "topic1,topic2,user" } ]
responses:
200:
body:
application/json:
example: !include ../examples/synapse.json
put:
body:
application/json:
properties:
desc:
description: text description of this synapse
required: false
category:
description: |
<code>from-to</code> or <code>both</code>
required: false
permission:
description: commons, public, or private
required: false
topic1_id:
description: the topic being linked from
required: false
topic2_id:
description: the topic being linked to
required: false
user_id:
description: the creator of the topic
required: false
responses:
200:
body:
application/json:
example: !include ../examples/synapse.json
patch:
body:
application/json:
properties:
desc:
description: text description of this synapse
required: false
category:
description: |
<code>from-to</code> or <code>both</code>
required: false
permission:
description: commons, public, or private
required: false
topic1_id:
description: the topic being linked from
required: false
topic2_id:
description: the topic being linked to
required: false
user_id:
description: the creator of the topic
required: false
responses:
200:
body:
application/json:
example: !include ../examples/synapse.json
delete:
responses:
204:
description: No content