Metamaps API documentation version v2
https://metamaps.cc/api/v2
/topics
get /topics
OAuth 2.0 implementation
Query Parameters
- q: (string)
Search text columns for this string. A query of
"example"
will be passed to SQL asLIKE %example%
. The searchable columns are:name, desc, link
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
user,metacode
- sort: (string)
The name of the comma-separated fields to sort by, prefixed by "-" to sort descending
- page: (integer - default: 1)
The page number
- per: (integer - default: 25)
Number of records per page
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": [
- {
- "id": 670,
- "name": "Metamaps.cc Website",
- "desc": "Metamaps is a great website; check it out below!",
- "link": "https://metamaps.cc",
- "permission": "commons",
- "created_at": "2016-07-02T09:23:30.397Z",
- "updated_at": "2016-07-02T09:23:30.397Z",
- "user_id": 2,
- "metacode_id": 36
- },
- {
- "id": 60,
- "name": "View others on map in realtime",
- "desc": "",
- "link": "",
- "permission": "commons",
- "created_at": "2016-03-31T01:20:26.734Z",
- "updated_at": "2016-03-31T01:20:26.734Z",
- "user_id": 2,
- "metacode_id": 8
- }
- ],
- "page": {
- "current_page": 1,
- "next_page": 2,
- "prev_page": 0,
- "total_pages": 249,
- "total_count": 497,
- "per": 2
- }
-}
-
Secured by oauth_2_0
post /topics
OAuth 2.0 implementation
Body
Type: application/json
Properties- name: required (string)
Topic name; this will be visible on the map
- desc: required (string)
Longer topic description visible when opening a map card
- link: (string)
embed a link to content on the web in the topic card
- permission: required (string)
commons, public, or private
- metacode_id: required (string)
Topic's metacode
HTTP status code 201
Body
Type: application/json
Examples:
{
- "data": {
- "id": 670,
- "name": "Metamaps.cc Website",
- "desc": "Metamaps is a great website; check it out below!",
- "link": "https://metamaps.cc",
- "permission": "commons",
- "created_at": "2016-07-02T09:23:30.397Z",
- "updated_at": "2016-07-02T09:23:30.397Z",
- "user_id": 2,
- "metacode_id": 36
- }
-}
-
Secured by oauth_2_0
get /topics/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Query Parameters
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
user,metacode
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 670,
- "name": "Metamaps.cc Website",
- "desc": "Metamaps is a great website; check it out below!",
- "link": "https://metamaps.cc",
- "permission": "commons",
- "created_at": "2016-07-02T09:23:30.397Z",
- "updated_at": "2016-07-02T09:23:30.397Z",
- "user_id": 2,
- "metacode_id": 36
- }
-}
-
Secured by oauth_2_0
put /topics/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- name: (string)
Topic name; this will be visible on the map
- desc: (string)
Longer topic description visible when opening a map card
- link: (string)
embed a link to content on the web in the topic card
- permission: (string)
commons, public, or private
- metacode_id: (string)
Topic's metacode
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 670,
- "name": "Metamaps.cc Website",
- "desc": "Metamaps is a great website; check it out below!",
- "link": "https://metamaps.cc",
- "permission": "commons",
- "created_at": "2016-07-02T09:23:30.397Z",
- "updated_at": "2016-07-02T09:23:30.397Z",
- "user_id": 2,
- "metacode_id": 36
- }
-}
-
Secured by oauth_2_0
patch /topics/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- name: (string)
Topic name; this will be visible on the map
- desc: (string)
Longer topic description visible when opening a map card
- link: (string)
embed a link to content on the web in the topic card
- permission: (string)
commons, public, or private
- metacode_id: (string)
Topic's metacode
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 670,
- "name": "Metamaps.cc Website",
- "desc": "Metamaps is a great website; check it out below!",
- "link": "https://metamaps.cc",
- "permission": "commons",
- "created_at": "2016-07-02T09:23:30.397Z",
- "updated_at": "2016-07-02T09:23:30.397Z",
- "user_id": 2,
- "metacode_id": 36
- }
-}
-
Secured by oauth_2_0
/synapses
get /synapses
OAuth 2.0 implementation
Query Parameters
- q: (string)
Search text columns for this string. A query of
"example"
will be passed to SQL asLIKE %example%
. The searchable columns are:desc
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
topic1,topic2,user
- sort: (string)
The name of the comma-separated fields to sort by, prefixed by "-" to sort descending
- page: (integer - default: 1)
The page number
- per: (integer - default: 25)
Number of records per page
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": [
- {
- "id": 2,
- "desc": "hello",
- "category": "from-to",
- "permission": "commons",
- "created_at": "2016-03-26T08:02:17.994Z",
- "updated_at": "2016-03-26T08:02:17.994Z",
- "topic1_id": 1,
- "topic2_id": 2,
- "user_id": 2
- },
- {
- "id": 6,
- "desc": "nice",
- "category": "both",
- "permission": "public",
- "created_at": "2016-03-26T08:05:31.563Z",
- "updated_at": "2016-03-26T08:05:31.563Z",
- "topic1_id": 2,
- "topic2_id": 3,
- "user_id": 2
- }
- ],
- "page": {
- "current_page": 1,
- "next_page": 2,
- "prev_page": 0,
- "total_pages": 71,
- "total_count": 142,
- "per": 2
- }
-}
-
Secured by oauth_2_0
post /synapses
OAuth 2.0 implementation
Body
Type: application/json
Properties- desc: (string)
text description of this synapse
- category: required (string)
from-to
orboth
- permission: required (string)
commons, public, or private
- topic1_id: required (string)
the topic being linked from
- topic2_id: required (string)
the topic being linked to
- user_id: required (string)
the creator of the topic
HTTP status code 201
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "desc": "hello",
- "category": "from-to",
- "permission": "commons",
- "created_at": "2016-03-26T08:02:17.994Z",
- "updated_at": "2016-03-26T08:02:17.994Z",
- "topic1_id": 5,
- "topic2_id": 6,
- "user_id": 2
- }
-}
-
Secured by oauth_2_0
get /synapses/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Query Parameters
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
topic1,topic2,user
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "desc": "hello",
- "category": "from-to",
- "permission": "commons",
- "created_at": "2016-03-26T08:02:17.994Z",
- "updated_at": "2016-03-26T08:02:17.994Z",
- "topic1_id": 5,
- "topic2_id": 6,
- "user_id": 2
- }
-}
-
Secured by oauth_2_0
put /synapses/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- desc: (string)
text description of this synapse
- category: (string)
from-to
orboth
- permission: (string)
commons, public, or private
- topic1_id: (string)
the topic being linked from
- topic2_id: (string)
the topic being linked to
- user_id: (string)
the creator of the topic
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "desc": "hello",
- "category": "from-to",
- "permission": "commons",
- "created_at": "2016-03-26T08:02:17.994Z",
- "updated_at": "2016-03-26T08:02:17.994Z",
- "topic1_id": 5,
- "topic2_id": 6,
- "user_id": 2
- }
-}
-
Secured by oauth_2_0
patch /synapses/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- desc: (string)
text description of this synapse
- category: (string)
from-to
orboth
- permission: (string)
commons, public, or private
- topic1_id: (string)
the topic being linked from
- topic2_id: (string)
the topic being linked to
- user_id: (string)
the creator of the topic
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "desc": "hello",
- "category": "from-to",
- "permission": "commons",
- "created_at": "2016-03-26T08:02:17.994Z",
- "updated_at": "2016-03-26T08:02:17.994Z",
- "topic1_id": 5,
- "topic2_id": 6,
- "user_id": 2
- }
-}
-
Secured by oauth_2_0
/maps
get /maps
OAuth 2.0 implementation
Query Parameters
- q: (string)
Search text columns for this string. A query of
"example"
will be passed to SQL asLIKE %example%
. The searchable columns are:name, desc
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
user,topics,synapses,mappings,contributors,collaborators
- sort: (string)
The name of the comma-separated fields to sort by, prefixed by "-" to sort descending
- page: (integer - default: 1)
The page number
- per: (integer - default: 25)
Number of records per page
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": [
- {
- "id": 2,
- "name": "Emergent Network Phenomena",
- "desc": "Example map for the API",
- "permission": "commons",
- "screenshot": "https://s3.amazonaws.com/metamaps-assets/site/missing-map.png",
- "created_at": "2016-03-26T08:02:05.379Z",
- "updated_at": "2016-03-27T07:20:18.047Z",
- "topic_ids": [
- 58,
- 59
- ],
- "synapse_ids": [
- 2
- ],
- "mapping_ids": [
- 94,
- 95,
- 96
- ],
- "collaborator_ids": [],
- "contributor_ids": [
- 2
- ]
- }
- ],
- "page": {
- "current_page": 1,
- "next_page": 2,
- "prev_page": 0,
- "total_pages": 5,
- "total_count": 5,
- "per": 1
- }
-}
-
Secured by oauth_2_0
post /maps
OAuth 2.0 implementation
Body
Type: application/json
Properties- name: required (string)
name
- desc: required (string)
description
- permission: required (string)
commons, public, or private
- screenshot: required (string)
url to a screenshot of the map
- contributor_ids: required (string)
the ids of people who have contributed to the map
- collaborator_ids: required (string)
the ids of people who have edit access to the map
HTTP status code 201
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "name": "Emergent Network Phenomena",
- "desc": "Example map for the API",
- "permission": "commons",
- "screenshot": "https://s3.amazonaws.com/metamaps-assets/site/missing-map.png",
- "created_at": "2016-03-26T08:02:05.379Z",
- "updated_at": "2016-03-27T07:20:18.047Z",
- "topic_ids": [
- 58,
- 59
- ],
- "synapse_ids": [
- 2
- ],
- "mapping_ids": [
- 94,
- 95,
- 96
- ],
- "collaborator_ids": [],
- "contributor_ids": [
- 2
- ]
- }
-}
-
Secured by oauth_2_0
get /maps/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Query Parameters
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
user,topics,synapses,mappings,contributors,collaborators
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "name": "Emergent Network Phenomena",
- "desc": "Example map for the API",
- "permission": "commons",
- "screenshot": "https://s3.amazonaws.com/metamaps-assets/site/missing-map.png",
- "created_at": "2016-03-26T08:02:05.379Z",
- "updated_at": "2016-03-27T07:20:18.047Z",
- "topic_ids": [
- 58,
- 59
- ],
- "synapse_ids": [
- 2
- ],
- "mapping_ids": [
- 94,
- 95,
- 96
- ],
- "collaborator_ids": [],
- "contributor_ids": [
- 2
- ]
- }
-}
-
Secured by oauth_2_0
put /maps/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- name: (string)
name
- desc: (string)
description
- permission: (string)
commons, public, or private
- screenshot: (string)
url to a screenshot of the map
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "name": "Emergent Network Phenomena",
- "desc": "Example map for the API",
- "permission": "commons",
- "screenshot": "https://s3.amazonaws.com/metamaps-assets/site/missing-map.png",
- "created_at": "2016-03-26T08:02:05.379Z",
- "updated_at": "2016-03-27T07:20:18.047Z",
- "topic_ids": [
- 58,
- 59
- ],
- "synapse_ids": [
- 2
- ],
- "mapping_ids": [
- 94,
- 95,
- 96
- ],
- "collaborator_ids": [],
- "contributor_ids": [
- 2
- ]
- }
-}
-
Secured by oauth_2_0
patch /maps/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- name: (string)
name
- desc: (string)
description
- permission: (string)
commons, public, or private
- screenshot: (string)
url to a screenshot of the map
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 2,
- "name": "Emergent Network Phenomena",
- "desc": "Example map for the API",
- "permission": "commons",
- "screenshot": "https://s3.amazonaws.com/metamaps-assets/site/missing-map.png",
- "created_at": "2016-03-26T08:02:05.379Z",
- "updated_at": "2016-03-27T07:20:18.047Z",
- "topic_ids": [
- 58,
- 59
- ],
- "synapse_ids": [
- 2
- ],
- "mapping_ids": [
- 94,
- 95,
- 96
- ],
- "collaborator_ids": [],
- "contributor_ids": [
- 2
- ]
- }
-}
-
Secured by oauth_2_0
/mappings
get /mappings
OAuth 2.0 implementation
Query Parameters
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
user,map
- sort: (string)
The name of the comma-separated fields to sort by, prefixed by "-" to sort descending
- page: (integer - default: 1)
The page number
- per: (integer - default: 25)
Number of records per page
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": [
- {
- "created_at": "2016-03-25T08:44:07.152Z",
- "id": 1,
- "map_id": 1,
- "mappable_id": 1,
- "mappable_type": "Topic",
- "updated_at": "2016-03-25T08:44:07.152Z",
- "user_id": 1,
- "xloc": -271,
- "yloc": 22
- },
- {
- "created_at": "2016-03-25T08:44:13.907Z",
- "id": 2,
- "map_id": 1,
- "mappable_id": 2,
- "mappable_type": "Topic",
- "updated_at": "2016-03-25T08:44:13.907Z",
- "user_id": 1,
- "xloc": -12,
- "yloc": 61
- },
- {
- "created_at": "2016-03-25T08:44:19.333Z",
- "id": 3,
- "map_id": 1,
- "mappable_id": 3,
- "mappable_type": "Topic",
- "updated_at": "2016-03-25T08:44:19.333Z",
- "user_id": 1,
- "xloc": -93,
- "yloc": -90
- },
- {
- "created_at": "2016-03-25T08:44:21.337Z",
- "id": 4,
- "map_id": 1,
- "mappable_id": 1,
- "mappable_type": "Synapse",
- "updated_at": "2016-03-25T08:44:21.337Z",
- "user_id": 1
- }
- ],
- "page": {
- "current_page": 1,
- "next_page": 2,
- "per": 4,
- "prev_page": 0,
- "total_count": 303,
- "total_pages": 76
- }
-}
-
Secured by oauth_2_0
post /mappings
OAuth 2.0 implementation
Body
Type: application/json
Properties- mappable_id: required (string)
id of the topic/synapse to be mapped
- mappable_type: required (string)
Topic or Synapse
- map_id: required (string)
id of the map
- xloc: (string)
(only for Topic mappings) x location on the canvas
- yloc: (string)
(only for Topic mappings) y location on the canvas
HTTP status code 201
Body
Type: application/json
Examples:
{
- "data": {
- "id": 4,
- "created_at": "2016-03-25T08:44:21.337Z",
- "updated_at": "2016-03-25T08:44:21.337Z",
- "mappable_id": 1,
- "mappable_type": "Synapse",
- "user_id": 1,
- "map_id": 1
- }
-}
-
Secured by oauth_2_0
get /mappings/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Query Parameters
- embed: (string)
Comma-separated list of columns to embed. Each embedded column will be returned instead of the corresponding
field_id
orfield_ids
column. For instance,?embed=user
would remove theuser_id
integer field from a response and replace it with auser
object field.Possible embeddable fields are:
user,map
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 4,
- "created_at": "2016-03-25T08:44:21.337Z",
- "updated_at": "2016-03-25T08:44:21.337Z",
- "mappable_id": 1,
- "mappable_type": "Synapse",
- "user_id": 1,
- "map_id": 1
- }
-}
-
Secured by oauth_2_0
put /mappings/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- mappable_id: (string)
id of the topic/synapse to be mapped
- mappable_type: (string)
Topic or Synapse
- map_id: (string)
id of the map
- xloc: (string)
(only for Topic mappings) x location on the canvas
- yloc: (string)
(only for Topic mappings) y location on the canvas
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 4,
- "created_at": "2016-03-25T08:44:21.337Z",
- "updated_at": "2016-03-25T08:44:21.337Z",
- "mappable_id": 1,
- "mappable_type": "Synapse",
- "user_id": 1,
- "map_id": 1
- }
-}
-
Secured by oauth_2_0
patch /mappings/{id}
OAuth 2.0 implementation
URI Parameters
- id: required (string)
Body
Type: application/json
Properties- mappable_id: (string)
id of the topic/synapse to be mapped
- mappable_type: (string)
Topic or Synapse
- map_id: (string)
id of the map
- xloc: (string)
(only for Topic mappings) x location on the canvas
- yloc: (string)
(only for Topic mappings) y location on the canvas
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": {
- "id": 4,
- "created_at": "2016-03-25T08:44:21.337Z",
- "updated_at": "2016-03-25T08:44:21.337Z",
- "mappable_id": 1,
- "mappable_type": "Synapse",
- "user_id": 1,
- "map_id": 1
- }
-}
-
Secured by oauth_2_0
/tokens
post /tokens
OAuth 2.0 implementation
Body
Type: application/json
Properties- description: (string)
short string describing this token
HTTP status code 201
Body
Type: application/json
Examples:
{
- "data": {
- "id": 1,
- "token": "VeI0qAe2bf2ytnrTRxmywsH0VSwuyjK5",
- "description": "Personal token for in-browser testing",
- "created_at": "2016-09-06T03:47:56.553Z"
- }
-}
-
Secured by oauth_2_0
get /tokens/my_tokens
OAuth 2.0 implementation
Query Parameters
- q: (string)
Search text columns for this string. A query of
"example"
will be passed to SQL asLIKE %example%
. The searchable columns are:description
- page: (integer - default: 1)
The page number
- per: (integer - default: 25)
Number of records per page
- sort: (string)
The name of the comma-separated fields to sort by, prefixed by "-" to sort descending
HTTP status code 200
Body
Type: application/json
Examples:
{
- "data": [
- {
- "id": 1,
- "token": "VeI0qAe2bf2ytnrTRxmywsH0VSwuyjK5",
- "description": "Personal token for in-browser testing",
- "created_at": "2016-09-06T03:47:56.553Z"
- }
- ],
- "page": {
- "current_page": 1,
- "next_page": 0,
- "prev_page": 0,
- "total_pages": 1,
- "total_count": 1,
- "per": 25
- }
-}
-