Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Open edX Bookmarks API
description: APIs for access to Open edX information
contact:
email: contact@academy.dhis2.org
version: v1
servers:
- url: https://academy.dhis2.org/api
security:
- Basic: []
tags:
- name: Bookmarks
paths:
/bookmarks/v1/bookmarks/:
parameters: []
get:
operationId: bookmarks_v1_bookmarks_list
summary: Get a paginated list of bookmarks for a user
description: 'The list can be filtered by passing parameter "course_id="
to only include bookmarks from a particular course.
The bookmarks are always sorted in descending order by creation date.
Each page in the list contains 10 bookmarks by default. The page
size can be altered by passing parameter "page_size=".
To include the optional fields pass the values in "fields" parameter
as a comma separated list. Possible values are:
* "display_name"
* "path"
**Example Requests**
GET /api/bookmarks/v1/bookmarks/?course_id={course_id1}&fields=display_name,path'
parameters:
- name: page
in: query
description: A page number within the paginated result set.
required: false
schema:
type: integer
- name: page_size
in: query
description: Number of results to return per page.
required: false
schema:
type: integer
- name: course_id
in: query
description: The id of the course to limit the list
schema:
type: string
- name: fields
in: query
description: 'The fields to return: display_name, path.'
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
required:
- count
- results
type: object
properties:
count:
type: integer
next:
type:
- string
- 'null'
format: uri
previous:
type:
- string
- 'null'
format: uri
results:
type: array
items:
$ref: '#/components/schemas/Bookmark'
tags:
- Bookmarks
post:
operationId: bookmarks_v1_bookmarks_create
summary: Create a new bookmark for a user
description: 'The POST request only needs to contain one parameter "usage_id".
Http400 is returned if the format of the request is not correct,
the usage_id is invalid or a block corresponding to the usage_id
could not be found.
**Example Requests**
POST /api/bookmarks/v1/bookmarks/
Request data: {"usage_id": }'
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Bookmark'
tags:
- Bookmarks
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Bookmark'
required: true
/bookmarks/v1/bookmarks/{username},{usage_id}/:
parameters:
- name: username
in: path
required: true
schema:
type: string
- name: usage_id
in: path
required: true
schema:
type: string
get:
operationId: bookmarks_v1_bookmarks_read
summary: Get a specific bookmark for a user
description: '**Example Requests**
GET /api/bookmarks/v1/bookmarks/{username},{usage_id}?fields=display_name,path'
responses:
'200':
description: ''
tags:
- Bookmarks
delete:
operationId: bookmarks_v1_bookmarks_delete
description: DELETE /api/bookmarks/v1/bookmarks/{username},{usage_id}
responses:
'204':
description: ''
tags:
- Bookmarks
summary: Bookmarks v1 bookmarks delete
x-summary-source: derived
components:
schemas:
Bookmark:
required:
- course_id
- usage_id
type: object
properties:
id:
title: Id
description: 'The identifier string for the bookmark: {user_id},{usage_id}.'
type: string
readOnly: true
course_id:
title: Course id
description: The identifier string of the bookmark's course.
type: string
usage_id:
title: Usage id
description: The identifier string of the bookmark's XBlock.
type: string
block_type:
title: Block type
type: string
readOnly: true
created:
title: Created
type: string
format: date-time
readOnly: true
securitySchemes:
Basic:
type: http
scheme: basic