9d821c920b
* reorder authentication to be: token, then oauth, then cookie * all APIs but tokens are accessible anonymously (so add mappings to the list) * fix mapping order
91 lines
2.6 KiB
Text
91 lines
2.6 KiB
Text
#type: collection
|
|
get:
|
|
is: [ searchable: { searchFields: "name, desc, link" }, embeddable: { embedFields: "user,metacode" }, orderable, pageable ]
|
|
securedBy: [ null, token, oauth_2_0, cookie ]
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topics.json
|
|
post:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: Topic name; this will be visible on the map
|
|
desc:
|
|
description: Longer topic description visible when opening a map card
|
|
link:
|
|
description: embed a link to content on the web in the topic card
|
|
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" } ]
|
|
securedBy: [ null, token, oauth_2_0, cookie ]
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
put:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: Topic name; this will be visible on the map
|
|
required: false
|
|
desc:
|
|
description: Longer topic description visible when opening a map card
|
|
required: false
|
|
link:
|
|
description: embed a link to content on the web in the topic card
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
required: false
|
|
metacode_id:
|
|
description: Topic's metacode
|
|
required: false
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
patch:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: Topic name; this will be visible on the map
|
|
required: false
|
|
desc:
|
|
description: Longer topic description visible when opening a map card
|
|
required: false
|
|
link:
|
|
description: embed a link to content on the web in the topic card
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
required: false
|
|
metacode_id:
|
|
description: Topic's metacode
|
|
required: false
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/topic.json
|
|
delete:
|
|
responses:
|
|
204:
|
|
description: No content
|