metamaps--metamaps/doc/api/apis/topics.raml
2016-10-04 15:22:24 +08:00

75 lines
1.8 KiB
Text

#type: collection
get:
is: [ searchable: { searchFields: "name, desc, link" }, embeddable: { embedFields: "user,metacode" }, orderable, pageable ]
responses:
200:
body:
application/json:
example: !include ../examples/topics.json
post:
body:
application/json:
properties:
name:
description: name
desc:
description: description
link:
description: link to content on the web
required: false
permission:
description: commons, public, or private
metacode_id:
description: Topic's metacode
responses:
201:
body:
application/json:
example: !include ../examples/topic.json
/{id}:
#type: item
get:
is: [ embeddable: { embedFields: "user,metacode" } ]
responses:
200:
body:
application/json:
example: !include ../examples/topic.json
put:
body:
application/json:
properties:
name:
description: name
desc:
description: description
link:
description: (optional) link to content on the web
permission:
description: commons, public, or private
responses:
200:
body:
application/json:
example: !include ../examples/topic.json
patch:
body:
application/json:
properties:
name:
description: name
desc:
description: description
link:
description: (optional) link to content on the web
permission:
description: commons, public, or private
responses:
200:
body:
application/json:
example: !include ../examples/topic.json
delete:
responses:
204:
description: No content