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
98 lines
2.6 KiB
Text
98 lines
2.6 KiB
Text
#type: collection
|
|
get:
|
|
is: [ searchable: { searchFields: "name, desc" }, embeddable: { embedFields: "user,topics,synapses,mappings,contributors,collaborators" }, orderable, pageable ]
|
|
securedBy: [ null, token, oauth_2_0, cookie ]
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/maps.json
|
|
post:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: name
|
|
desc:
|
|
description: description
|
|
permission:
|
|
description: commons, public, or private
|
|
screenshot:
|
|
description: url to a screenshot of the map
|
|
contributor_ids:
|
|
description: the ids of people who have contributed to the map
|
|
collaborator_ids:
|
|
description: the ids of people who have edit access to the map
|
|
responses:
|
|
201:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/map.json
|
|
/{id}:
|
|
#type: item
|
|
get:
|
|
is: [ embeddable: { embedFields: "user,topics,synapses,mappings,contributors,collaborators" } ]
|
|
securedBy: [ null, token, oauth_2_0, cookie ]
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/map.json
|
|
put:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: name
|
|
required: false
|
|
desc:
|
|
description: description
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
required: false
|
|
screenshot:
|
|
description: url to a screenshot of the map
|
|
required: false
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/map.json
|
|
patch:
|
|
body:
|
|
application/json:
|
|
properties:
|
|
name:
|
|
description: name
|
|
required: false
|
|
desc:
|
|
description: description
|
|
required: false
|
|
permission:
|
|
description: commons, public, or private
|
|
required: false
|
|
screenshot:
|
|
description: url to a screenshot of the map
|
|
required: false
|
|
responses:
|
|
200:
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/map.json
|
|
delete:
|
|
responses:
|
|
204:
|
|
description: No content
|
|
/stars:
|
|
post:
|
|
responses:
|
|
201:
|
|
description: Created
|
|
body:
|
|
application/json:
|
|
example: !include ../examples/map.json
|
|
delete:
|
|
responses:
|
|
204:
|
|
description: No content
|