NAV Navigation
Node.js

Reader API v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Authentication

general

get__

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'text/html'

};

fetch('/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /

GET /

Example responses

Responses

Status Meaning Description Schema
200 OK confirmation that the api is running None

Response Schema

activities

get__activity-{id}

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/activity-{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /activity-{id}

GET /activity-:id

Parameters

Name In Type Required Description
id path string true the short id of the activity

Example responses

200 Response

{
  "id": "string",
  "@context": [],
  "type": "Create",
  "object": {
    "type": "Publication",
    "id": "string"
  },
  "target": {
    "type": "Publication",
    "id": "string"
  },
  "actor": {
    "type": "Person",
    "id": "string"
  },
  "json": {},
  "readerId": "string",
  "reader": {
    "id": "string",
    "type": "Person",
    "summaryMap": {
      "en": "string"
    },
    "@context": [],
    "inbox": "string",
    "outbox": "string",
    "name": "string",
    "profile": {},
    "preferences": {},
    "json": {},
    "published": "2019-10-23T17:17:33Z",
    "updated": "2019-10-23T17:17:33Z"
  },
  "summaryMap": {
    "en": "string"
  },
  "published": "2019-10-23T17:17:33Z"
}

Responses

Status Meaning Description Schema
200 OK An Activity object Inline
403 Forbidden Access to activity {id} disallowed None
404 Not Found No Activity with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» @context array false none none
» type string false none none
» object object false none none
»» type string false none none
»» id string(url) false none none
» target object false none none
»» type string false none none
»» id string(url) false none none
» actor object false none none
»» type string false none none
»» id string(url) false none none
» json object false none none
» readerId string(url) false none none
» reader object false none none
»» id string(url) false none none
»» type string false none none
»» summaryMap object false none none
»»» en string false none none
»» @context array false none none
»» inbox string(url) false none none
»» outbox string(url) false none none
»» name string false none none
»» profile object false none none
»» preferences object false none none
»» json object false none none
»» published string(date-time) false none none
»» updated string(date-time) false none none
» summaryMap object false none none
»» en string false none none
» published string(date-time) false none none

Enumerated Values

Property Value
type Create
type Add
type Remove
type Delete
type Update
type Publication
type Note'
type reader:Tag
type Publication
type Note'
type reader:Tag
type Person
type Person

publications

post__reader-:id_file-upload-pub

Code samples

const fetch = require('node-fetch');
const inputBody = '{
  "file": null,
  "documentPath": "string",
  "mediaType": "string",
  "json": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-:id/file-upload-pub',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /reader-:id/file-upload-pub

POST /reader-:id/file-upload-pub

Body parameter

file: null
documentPath: string
mediaType: string
json: string

Parameters

Name In Type Required Description
id path string true the id of the publication
body body object false none
» file body binary false none
» documentPath body string false none
» mediaType body string false none
» json body string false stringified json data

Responses

Status Meaning Description Schema
200 OK file created None
400 Bad Request No file was included with upload OR Error connecting to google bucket None
403 Forbidden Access to publication {id} disallowed None

get__publication-{id}_{path}

Code samples

const fetch = require('node-fetch');

const headers = {
  'Authorization':'Bearer {access-token}'

};

fetch('/publication-{id}/{path}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /publication-{id}/{path}

GET /publication-:id/:path

Parameters

Name In Type Required Description
id path string true the short id of the publication
path path string true the relative path to the document within the publication

Responses

Status Meaning Description Schema
302 Found none None
403 Forbidden none None
404 Not Found none None

get__publication-{id}

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/publication-{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /publication-{id}

GET /publication-:id

Parameters

Name In Type Required Description
id path string true the short id of the publication

Example responses

200 Response

{
  "id": "string",
  "type": "Publication",
  "summaryMap": {
    "en": "string"
  },
  "@context": [],
  "author": [
    {
      "name": "string",
      "type": "Person"
    }
  ],
  "editor": [
    {
      "name": "string",
      "type": "Person"
    }
  ],
  "replies": [
    "string"
  ],
  "description": "string",
  "datePublished": "string",
  "readingOrder": [
    {
      "href": "string",
      "mediaType": "string",
      "rel": "string",
      "name": "string",
      "hreflang": "string",
      "height": 0,
      "width": 0
    }
  ],
  "resources": [
    {
      "href": "string",
      "mediaType": "string",
      "rel": "string",
      "name": "string",
      "hreflang": "string",
      "height": 0,
      "width": 0
    }
  ],
  "links": [
    {
      "href": "string",
      "mediaType": "string",
      "rel": "string",
      "name": "string",
      "hreflang": "string",
      "height": 0,
      "width": 0
    }
  ],
  "position": {},
  "json": {},
  "readerId": "string",
  "reader": {
    "id": "string",
    "type": "Person",
    "summaryMap": {
      "en": "string"
    },
    "@context": [],
    "inbox": "string",
    "outbox": "string",
    "name": "string",
    "profile": {},
    "preferences": {},
    "json": {},
    "published": "2019-10-23T17:17:34Z",
    "updated": "2019-10-23T17:17:34Z"
  },
  "published": "string",
  "updated": "string"
}

Responses

Status Meaning Description Schema
200 OK The publication objects, with a list of document references (document object without the content field) Inline
403 Forbidden Access to publication {id} disallowed None
404 Not Found No Publication with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» summaryMap object false none none
»» en string false none none
» @context array false none none
» author [#/definitions/annotation] false none none
»» name string false none none
»» type string false none none
» editor [#/definitions/annotation] false none none
» replies [string] false none none
» description string false none none
» datePublished string(timestamp) false none none
» readingOrder [#/definitions/link] false none none
»» href string false none none
»» mediaType string false none none
»» rel string false none none
»» name string false none none
»» hreflang string false none none
»» height integer false none none
»» width integer false none none
» resources [#/definitions/link] false none none
» links [#/definitions/link] false none none
» position object false none none
» json object false none none
» readerId string(url) false none none
» reader object false none none
»» id string(url) false none none
»» type string false none none
»» summaryMap object false none none
»»» en string false none none
»» @context array false none none
»» inbox string(url) false none none
»» outbox string(url) false none none
»» name string false none none
»» profile object false none none
»» preferences object false none none
»» json object false none none
»» published string(date-time) false none none
»» updated string(date-time) false none none
» published string(timestamp) false none none
» updated string(timestamp) false none none

Enumerated Values

Property Value
type Publication
type Person
type Organization
type Person

readers

post__reader-{id}_file-upload

Code samples

const fetch = require('node-fetch');
const inputBody = '{
  "files": [
    null
  ]
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}/file-upload',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /reader-{id}/file-upload

POST /reader-:id/file-upload

Body parameter

files:
  - null

Parameters

Name In Type Required Description
id path string true the id of the reader
body body object false none
» files body [binary] false none

Responses

Status Meaning Description Schema
200 OK file created None
400 Bad Request No file was included with upload OR Error connecting to google bucket None
403 Forbidden Access to reader {id} disallowed None
404 Not Found No reader with ID {id} None

get__reader-{id}_activity

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}/activity',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /reader-{id}/activity

GET /reader-:readerId/activity

Parameters

Name In Type Required Description
readerId path string true the id of the reader

Example responses

200 Response

{
  "id": "string",
  "type": "OrderedCollection",
  "summaryMap": {
    "en": "string"
  },
  "@context": [],
  "totalItems": 0,
  "orderedItems": [
    {
      "id": "string",
      "@context": [],
      "type": "Create",
      "object": {
        "type": "Publication",
        "id": "string"
      },
      "target": {
        "type": "Publication",
        "id": "string"
      },
      "actor": {
        "type": "Person",
        "id": "string"
      },
      "json": {},
      "readerId": "string",
      "reader": {
        "id": "string",
        "type": "Person",
        "summaryMap": {
          "en": "string"
        },
        "@context": [],
        "inbox": "string",
        "outbox": "string",
        "name": "string",
        "profile": {},
        "preferences": {},
        "json": {},
        "published": "2019-10-23T17:17:34Z",
        "updated": "2019-10-23T17:17:34Z"
      },
      "summaryMap": {
        "en": "string"
      },
      "published": "2019-10-23T17:17:34Z"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK An outbox with the activity objects for a reader Inline
403 Forbidden Access to reader {id} disallowed None
404 Not Found No Reader with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» summaryMap object false none none
»» en string false none none
» @context array false none none
» totalItems integer false none none
» orderedItems [#/definitions/activity] false none none
»» id string(url) false none none
»» @context array false none none
»» type string false none none
»» object object false none none
»»» type string false none none
»»» id string(url) false none none
»» target object false none none
»»» type string false none none
»»» id string(url) false none none
»» actor object false none none
»»» type string false none none
»»» id string(url) false none none
»» json object false none none
»» readerId string(url) false none none
»» reader object false none none
»»» id string(url) false none none
»»» type string false none none
»»» summaryMap object false none none
»»»» en string false none none
»»» @context array false none none
»»» inbox string(url) false none none
»»» outbox string(url) false none none
»»» name string false none none
»»» profile object false none none
»»» preferences object false none none
»»» json object false none none
»»» published string(date-time) false none none
»»» updated string(date-time) false none none
»» summaryMap object false none none
»»» en string false none none
»» published string(date-time) false none none

Enumerated Values

Property Value
type OrderedCollection
type Create
type Add
type Remove
type Delete
type Update
type Publication
type Note'
type reader:Tag
type Publication
type Note'
type reader:Tag
type Person
type Person

post__reader-{id}_activity

Code samples

const fetch = require('node-fetch');
const inputBody = '{
  "type": "Create",
  "object": {
    "type": "Publication"
  },
  "target": {
    "type": "Publication"
  },
  "json": {},
  "@context": []
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}/activity',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /reader-{id}/activity

POST /reader-:id/activity

Body parameter

{
  "type": "Create",
  "object": {
    "type": "Publication"
  },
  "target": {
    "type": "Publication"
  },
  "json": {},
  "@context": []
}

Parameters

Name In Type Required Description
id path string true none
body body #/definitions/outbox-request false none

Responses

Status Meaning Description Schema
201 Created Successfully completed the activity None
403 Forbidden Access to reader {id} disallowed None
404 Not Found No Reader / Publication / Note with ID {id} None

get__reader-{id}_library

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}/library',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /reader-{id}/library

GET /reader-:id/library

Parameters

Name In Type Required Description
id path string true the short id of the reader
limit query number false the number of library items to return
page query number false none
attribution query string false a search in the attribution field. Will also return partial matches.
role query string false a modifier for attribution to specify the type of attribution
author query string false will return only exact matches.
orderBy query string false used to order either alphabetically by title or by date published (most recent first)
reverse query boolean false a modifier to use with orderBy to reverse the order

Enumerated Values

Parameter Value
role author
role editor
orderBy title
orderBy datePublished

Example responses

200 Response

{
  "id": "string",
  "type": "Collection",
  "summaryMap": {
    "en": "string"
  },
  "@context": [],
  "tags": [
    {
      "id": "string",
      "type": "reader:Tag",
      "name": "string",
      "tagType": "string",
      "published": "string",
      "updated": "string"
    }
  ],
  "totalItems": 0,
  "items": [
    {
      "id": "string",
      "type": "Publication",
      "summaryMap": {
        "en": "string"
      },
      "@context": [],
      "author": [
        {
          "name": "string",
          "type": "Person"
        }
      ],
      "editor": [
        {
          "name": "string",
          "type": "Person"
        }
      ],
      "replies": [
        "string"
      ],
      "json": {},
      "resources": [
        {
          "href": "string",
          "mediaType": "string",
          "rel": "string",
          "name": "string",
          "hreflang": "string",
          "height": 0,
          "width": 0
        }
      ],
      "description": "string",
      "datePublished": "string",
      "readerId": "string",
      "published": "string",
      "updated": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A list of publications for the reader Inline
403 Forbidden Access to reader {id} disallowed None
404 Not Found No Reader with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» summaryMap object false none none
»» en string false none none
» @context array false none none
» tags [#/definitions/tag] false none none
»» id string(url) false none none
»» type string false none none
»» name string false none none
»» tagType string false none none
»» published string(timestamp) false none none
»» updated string(timestamp) false none none
» totalItems integer false none none
» items [#/definitions/publication-ref] false none none
»» id string(url) false none none
»» type string false none none
»» summaryMap object false none none
»»» en string false none none
»» @context array false none none
»» author [#/definitions/annotation] false none none
»»» name string false none none
»»» type string false none none
»» editor [#/definitions/annotation] false none none
»» replies [string] false none none
»» json object false none none
»» resources [#/definitions/link] false none none
»»» href string false none none
»»» mediaType string false none none
»»» rel string false none none
»»» name string false none none
»»» hreflang string false none none
»»» height integer false none none
»»» width integer false none none
»» description string false none none
»» datePublished string(timestamp) false none none
»» readerId string(url) false none none
»» published string(timestamp) false none none
»» updated string(timestamp) false none none

Enumerated Values

Property Value
type Collection
type reader:Tag
type Publication
type Person
type Organization

get__reader-{id}_notes

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}/notes',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /reader-{id}/notes

GET /reader-:id/notes

Parameters

Name In Type Required Description
id path string true the short id of the reader
limit query number false the number of library items to return
page query number false none
document query string false the url of the document the note is associated with. When this filter is used, will not paginate. Will return all results.
publication query string false the id of the publication the note is associated with
type query string false the type of note
search query string false keyword to search for in the content of notes. Not case sensitive.
stack query string false the collection (tag with type 'reader:Stack')
orderBy query string false the property to be used to order the notes. By default will return most recent first.
reverse query boolean false modifier for the orderBy query to return the oldest notes first.

Enumerated Values

Parameter Value
orderBy created
orderBy updated

Example responses

200 Response

{
  "id": "string",
  "type": "Collection",
  "summaryMap": {
    "en": "string"
  },
  "@context": [],
  "totalItems": 0,
  "items": [
    {
      "id": "string",
      "type": "Note",
      "noteType": "string",
      "oa:hasSelector": {},
      "content": "string",
      "@context": [],
      "published": "2019-10-23T17:17:34Z",
      "updated": "2019-10-23T17:17:34Z",
      "publication": {
        "id": "string",
        "author": [
          {
            "name": "string",
            "type": "Person"
          }
        ],
        "editor": [
          {
            "name": "string",
            "type": "Person"
          }
        ],
        "description": "string",
        "datePublished": "string"
      },
      "inReplyTo": "string",
      "context": "string",
      "json": {}
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A list of notes for the reader Inline
403 Forbidden Access to reader {id} disallowed None
404 Not Found No Reader with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» summaryMap object false none none
»» en string false none none
» @context array false none none
» totalItems integer false none none
» items [#/definitions/noteWithPub] false none none
»» id string(url) false none none
»» type string false none none
»» noteType string false none none
»» oa:hasSelector object false none none
»» content string false none none
»» @context array false none none
»» published string(date-time) false none none
»» updated string(date-time) false none none
»» publication object false none none
»»» id string(url) false none none
»»» author [#/definitions/annotation] false none none
»»»» name string false none none
»»»» type string false none none
»»» editor [#/definitions/annotation] false none none
»»» description string false none none
»»» datePublished string(timestamp) false none none
»» inReplyTo string(url) false none The url of the document
»» context string(url) false none The url of the publication
»» json object false none none

Enumerated Values

Property Value
type Collection
type Note
type Person
type Organization

get__reader-{id}

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /reader-{id}

GET /reader-:id

Parameters

Name In Type Required Description
id path string true the id of the reader

Example responses

200 Response

{
  "id": "string",
  "type": "Person",
  "summaryMap": {
    "en": "string"
  },
  "@context": [],
  "inbox": "string",
  "outbox": "string",
  "name": "string",
  "profile": {},
  "preferences": {},
  "json": {},
  "published": "2019-10-23T17:17:34Z",
  "updated": "2019-10-23T17:17:34Z"
}

Responses

Status Meaning Description Schema
200 OK A reader object Inline
403 Forbidden Access to reader {id} disallowed None
404 Not Found No Reader with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» summaryMap object false none none
»» en string false none none
» @context array false none none
» inbox string(url) false none none
» outbox string(url) false none none
» name string false none none
» profile object false none none
» preferences object false none none
» json object false none none
» published string(date-time) false none none
» updated string(date-time) false none none

Enumerated Values

Property Value
type Person

post__readers

Code samples

const fetch = require('node-fetch');
const inputBody = '{
  "name": "string",
  "@context": [],
  "profile": {},
  "preferences": null,
  "json": {}
}';
const headers = {
  'Content-Type':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/readers',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /readers

POST /readers

Body parameter

{
  "name": "string",
  "@context": [],
  "profile": {},
  "preferences": null,
  "json": {}
}

Parameters

Name In Type Required Description
body body #/definitions/readers-request false none

Responses

Status Meaning Description Schema
201 Created Created None
400 Bad Request Reader already exists None

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/reader-{id}/search',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /reader-{id}/search

GET /reader-:id/search

Parameters

Name In Type Required Description
id path string true the short id of the reader
search query string false the string to search against
exact query string false none
publication query string false the id of the publication to search. Should not be used with a collection filter.
collection query string false the name of the collection. Should not be used with a publication filter.

Enumerated Values

Parameter Value
exact true
exact false

Example responses

200 Response

{
  "items": [
    {
      "id": "string",
      "documentId": "string",
      "documentUrl": "string",
      "@context": [],
      "highlights": [
        "string"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK A list search results Inline
403 Forbidden Access to reader {id} disallowed None
404 Not Found No Reader with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» items [#/definitions/search-result] false none none
»» id string false none none
»» documentId string false none none
»» documentUrl string(url) false none none
»» @context array false none none
»» highlights [string] false none none

get__whoami

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/whoami',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /whoami

GET /whoami

Example responses

200 Response

{
  "id": "string",
  "type": "Person",
  "summaryMap": {
    "en": "string"
  },
  "@context": [],
  "inbox": "string",
  "outbox": "string",
  "name": "string",
  "profile": {},
  "preferences": {},
  "json": {},
  "published": "2019-10-23T17:17:34Z",
  "updated": "2019-10-23T17:17:34Z"
}

Responses

Status Meaning Description Schema
200 OK The reader object for the reader currently logged in Inline
404 Not Found No Reader with ID {shortId} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» summaryMap object false none none
»» en string false none none
» @context array false none none
» inbox string(url) false none none
» outbox string(url) false none none
» name string false none none
» profile object false none none
» preferences object false none none
» json object false none none
» published string(date-time) false none none
» updated string(date-time) false none none

Enumerated Values

Property Value
type Person

jobs

get__job-{id}

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/job-{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /job-{id}

GET /job-:id

Parameters

Name In Type Required Description
id path string true the id of the job

Example responses

200 Response

{
  "id": 0,
  "type": "epub",
  "published": "2019-10-23T17:17:34Z",
  "finished": "2019-10-23T17:17:34Z",
  "error": "string",
  "publicationId": "string",
  "status": 302
}

Responses

Status Meaning Description Schema
200 OK A Job Object Inline
404 Not Found No Job with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id integer false none none
» type string false none none
» published string(date-time) false none none
» finished string(date-time) false none none
» error string false none none
» publicationId string false none none
» status integer false none none

Enumerated Values

Property Value
type epub
status 302
status 304
status 500

notes

get__note-{id}

Code samples

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'

};

fetch('/note-{id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /note-{id}

GET /note-:id

Parameters

Name In Type Required Description
id path string true the short id of the note

Example responses

200 Response

{
  "id": "string",
  "type": "Note",
  "noteType": "string",
  "oa:hasSelector": {},
  "content": "string",
  "@context": [],
  "published": "2019-10-23T17:17:34Z",
  "updated": "2019-10-23T17:17:34Z",
  "inReplyTo": "string",
  "context": "string",
  "json": {}
}

Responses

Status Meaning Description Schema
200 OK A Note Object Inline
403 Forbidden Access to note {id} disallowed None
404 Not Found No Note with ID {id} None

Response Schema

Status Code 200

Name Type Required Restrictions Description
» id string(url) false none none
» type string false none none
» noteType string false none none
» oa:hasSelector object false none none
» content string false none none
» @context array false none none
» published string(date-time) false none none
» updated string(date-time) false none none
» inReplyTo string(url) false none The url of the document
» context string(url) false none The url of the publication
» json object false none none

Enumerated Values

Property Value
type Note