Please execute the folowing commands cefore starting the App for the first time.
npm install
npm run migrate
npx sequelize-cli db:seed:all
npm start
Welcome to the Curriki C2E Store Service API documentation. 🎉 🎉 🎉
- Base URL
- Authentication
- C2E Listing Routes
- C2E Subscription Routes
- API Key Routes
- Swagger Documentation
- Database Diagram
- C2E SPECIFICATION DOCUMENT
All endpoints are relative to the base URL:
All endpoints require an x-api-key
header for authentication. Different roles have different API keys for access.
Endpoint to create a new C2E Listing.
- URL:
/c2e-listings
- Method:
POST
- Summary: Create C2E Listing
- Parameters:
x-api-key
(header) - API Key (role: cee-publisher-service)- Type: string
- Default: API Key (role: cee-publisher-service)
- Required: true
payload
(body) - User credentials- Type: object
- Properties:
ceeId
(string) - C2E Id (Example: "5f5e2e3e-3e3e-4e4e-5e5e-6e6e7e7e7e7e")name
(string) - C2E Listing Name (Example: "C2E Listing Name")subject
(array of strings) - Educational subjects (Example: ["Mathematics"])educationLevel
(array of strings) - Education levels (Example: ["Grade 1"])keywords
(array of strings) - Keywords for the listing (Example: ["Mathematics", "Grade 1", "Addition", "Subtraction"])
- Responses:
200
:- Description: Success
- Schema:
{ "code": 200, "message": "Success", "result": "C2E Listing created successfully!" }
400
:- Description: Failed
- Schema:
{ "code": 400, "message": "Failed to create C2E Listing!", "result": null }
Endpoint to retrieve the C2E Player Subscriptions Manifest.
- URL:
/c2e-subscriptions/manifest
- Method:
GET
- Summary: Get C2E Player Subscriptions Manifest
- Parameters:
x-api-key
(header) - API Key (role: cee-player-service)- Type: string
- Default: API Key (role: cee-player-service)
- Required: true
- Responses:
200
:- Description: Success
- Schema:
{ "code": 200, "message": "Success", "result": "C2E Player Subscriptions Manifest" }
400
:- Description: Failed
- Schema:
{ "code": 400, "message": "Failed to show C2E Subscriptions!", "result": null }
Endpoint to get a C2E Stream token.
- URL:
/stream/token
- Method:
GET
- Summary: Get C2E Stream token (called from player service)
- Parameters:
x-api-key
(header) - Authentication and Authorization- Type: string
- Default: APIKey (role: cee-player-service)
- Required: true
subid
(query) - C2E Subscription ID setup on the player service- Type: string
- Required: true
- Responses:
200
:- Description: Success
- Schema:
{ "code": 200, "message": "Success", "result": [ { "ceeId": "C2E ID", "token": "C2E Stream Token", "expiresAt": "C2E Stream Token Expiry Date" } ] }
Endpoint to get a C2E Manifest.
- URL:
/stream/manifest
- Method:
GET
- Summary: Get C2E Manifest (called from player service)
- Parameters:
x-api-key
(header) - Authentication and Authorization- Type: string
- Default: APIKey (role: cee-player-service)
- Required: true
subid
(query) - C2E Subscription ID- Type: string
- Required: true
- Responses:
200
:- Description: Success
- Schema:
{ "code": 200, "message": "Success", "result": [ { "ceeId": "C2E Subscription ID", "manifest": "C2E Manifest" } ] }
Endpoint to retrieve API Keys.
- URL:
/keys
- Method:
GET
- Summary: Get API Keys
- Parameters:
Authorization
(header) - Authorization token- Type: string
- Default: Bearer APIKey
- Required: true
- Responses:
200
:- Description: Success
- Schema:
{ "code": 200, "message": "Success", "result": [ { "key": "APIKey", "clientRole": "cee-publisher-service | cee-player-service", "clientEmail": "demo-c2e-store@curriki.org" } ] }
Swagger Documentation can be found on following link https://service-host/api-docs/