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 Entitlements 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: Entitlements
paths:
/entitlements/v1/entitlements/:
parameters: []
get:
operationId: entitlements_v1_entitlements_list
description: 'Override the list method to expire records that are past the
policy and requested via the API before returning those records.'
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
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/CourseEntitlement'
tags:
- Entitlements
summary: Entitlements v1 entitlements list
x-summary-source: derived
post:
operationId: entitlements_v1_entitlements_create
description: ViewSet for the Entitlements API.
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
tags:
- Entitlements
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
required: true
summary: Entitlements v1 entitlements create
x-summary-source: derived
/entitlements/v1/entitlements/{uuid}/:
parameters:
- name: uuid
in: path
required: true
schema:
type: string
pattern: '[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}'
get:
operationId: entitlements_v1_entitlements_read
description: 'Override the retrieve method to expire a record that is past the
policy and is requested via the API before returning that record.'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
tags:
- Entitlements
summary: Entitlements v1 entitlements read
x-summary-source: derived
put:
operationId: entitlements_v1_entitlements_update
description: ViewSet for the Entitlements API.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
tags:
- Entitlements
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
required: true
summary: Entitlements v1 entitlements update
x-summary-source: derived
patch:
operationId: entitlements_v1_entitlements_partial_update
description: ViewSet for the Entitlements API.
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
tags:
- Entitlements
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CourseEntitlement'
required: true
summary: Entitlements v1 entitlements partial update
x-summary-source: derived
delete:
operationId: entitlements_v1_entitlements_delete
description: ViewSet for the Entitlements API.
responses:
'204':
description: ''
tags:
- Entitlements
summary: Entitlements v1 entitlements delete
x-summary-source: derived
/entitlements/v1/entitlements/{uuid}/enrollments:
parameters:
- name: uuid
in: path
required: true
schema:
type: string
format: uuid
post:
operationId: entitlements_v1_entitlements_enrollments_create
description: 'On POST this method will be called and will handle enrolling a user in the
provided course_run_id from the data. This is called on a specific entitlement
UUID so the course_run_id has to correspond to the Course that is assigned to
the Entitlement.
When this API is called for a user who is already enrolled in a run that User
will be unenrolled from their current run and enrolled in the new run if it is
available.'
responses:
'201':
description: ''
tags:
- Entitlements
summary: Entitlements v1 entitlements enrollments create
x-summary-source: derived
delete:
operationId: entitlements_v1_entitlements_enrollments_delete
summary: On DELETE call to this API we will unenroll the course enrollment for the…
description: 'If is_refund parameter is provided then unenroll the user, set Entitlement expiration, and issue
a refund'
responses:
'204':
description: ''
tags:
- Entitlements
components:
schemas:
CourseEntitlement:
required:
- user
- course_uuid
- mode
type: object
properties:
user:
title: User
type: string
pattern: ^[\w.@+-]+$
uuid:
title: Uuid
type: string
format: uuid
readOnly: true
course_uuid:
title: Course uuid
description: UUID for the Course, not the Course Run
type: string
format: uuid
enrollment_course_run:
title: Enrollment course run
type: string
readOnly: true
minLength: 1
expired_at:
title: Expired at
description: The date that an entitlement expired, if NULL the entitlement has not expired.
type:
- string
- 'null'
format: date-time
created:
title: Created
type: string
format: date-time
readOnly: true
modified:
title: Modified
type: string
format: date-time
readOnly: true
mode:
title: Mode
description: The mode of the Course that will be applied on enroll.
type: string
maxLength: 100
minLength: 1
refund_locked:
title: Refund locked
type: boolean
order_number:
title: Order number
type:
- string
- 'null'
maxLength: 128
minLength: 1
support_details:
title: Support details
type: string
readOnly: true
securitySchemes:
Basic:
type: http
scheme: basic