Please execute the folowing commands before 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 Publisher Service API documentation. ๐ ๐ ๐
- Base URL
- Authentication
- C2E Routes
- C2E Store Routes
- API Key Routes
- Swagger Documentation
- Database Diagram
- C2E TECHNICAL SPECIFICATION DOCUMENT
All endpoints are relative to the base URL:
https://service-host/api/v1
All endpoints require an x-api-key
header for authentication. Different roles have different API keys for access.
Endpoint to publish C2E with required entities.
- URL:
/c2e/publish
- Method:
POST
- Summary: Publish C2E (called from publisher tool)
- Consumes:
application/json
- Produces:
application/json
- Parameters:
x-api-key
(header) - C2E Publisher Service API Key- Type: string
- Default: APIKey (role: cee-publisher-tool)
- Required: true
payload
(body) - C2E entity details- Type: PublishC2ERequest
- Required: true
- Responses:
-
200
:- Schema:
{ "code": 200, "message": "Success", "result": true }
- Schema:
-
400
:- Schema:
{ "code": 400, "message": "Invalid request payload", "result": false }
- Schema:
-
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "C2E Title (which would be the as Educational Experience Title)"
},
"description": {
"type": "string",
"description": "C2E Description (which would be the as Educational Experience description)"
},
"creator": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "C2E Creator Name"
},
"email": {
"type": "string",
"description": "C2E Creator Email"
}
}
},
"storeId": {
"type": "string",
"description": "Unique identifier of the store"
},
"workflowItems": {
"type": "array",
"items": {
"$ref": "#/definitions/C2EWorkflowItem"
}
}
}
}
workflowItems
payload object "#/definitions/C2EWorkflowItem" would be defined as array of following type of objects:
"C2EWorkflowItem": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Educational Experience Title"
},
"description": {
"type": "string",
"description": "Educational Experience description"
},
"type": {
"type": "string",
"description": "Type of the workflow item (e.g., Educational Experience)"
},
"subject": {
"type": "array",
"items": {
"type": "string",
"description": "Educational Experience Subjects"
}
},
"educationLevel": {
"type": "array",
"items": {
"type": "string",
"description": "Educational Experience Education Levels"
}
},
"keywords": {
"type": "array",
"items": {
"type": "string",
"description": "Educational Experience Keywords"
}
},
"url": {
"type": "string",
"description": "Educational Experience C2E Protected URL"
},
"thumbnailUrl": {
"type": "string",
"description": "Educational Experience Thumbnail URL"
},
"media": {
"type": "array",
"items": {
"$ref": "#/definitions/C2EMedia"
}
}
}
}
C2EMedia
payload object "#/definitions/C2EMedia" would be defined as array of following type of objects:
"C2EMedia": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "Identifier for the media"
},
"identifierType": {
"type": "string",
"description": "Type of identifier (e.g., ISBN, DOI, URL, UUID, other)"
},
"name": {
"type": "string",
"description": "Name of the media"
},
"description": {
"type": "string",
"description": "Description of the media"
},
"resource": {
"type": "string",
"description": "Media URL or source identifier for the media"
},
"encodingFormat": {
"type": "string",
"description": "Encoding format of the media (e.g., video/mp4)"
},
"royalty": {
"$ref": "#/definitions/C2EMediaRoyalty"
},
"owner": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "C2E Media Owner Name"
},
"email": {
"type": "string",
"description": "C2E Media Owner Email"
}
}
}
}
}
Endpoint to create C2E Manifest.
- URL:
/c2e/manifest
- Method:
POST
- Summary: Create C2E Manifest (called from store service)
- Consumes:
application/json
- Produces:
application/json
- Parameters:
x-api-key
(header) - API Key- Type: string
- Default: APIKey (role: cee-store-service)
- Required: true
payload
(body) - C2E Manifest Data- Type: CreateC2EManifestRequest
- Required: true
- Responses:
-
200
:- Schema:
{ "code": 200, "message": "Success", "result": true }
- Schema:
-
400
:- Schema:
{ "code": 400, "message": "Invalid request payload", "result": false }
- Schema:
-
{
"type": "object",
"properties": {
"ceeId": {
"type": "string",
"description": "C2E Id (which has already been created in C2E Publisher Service)"
},
"previewCeeSubscription": {
"type": "object",
"properties": {
"ceeListingId": {
"type": "string",
"description": "C2E Listing Id (which has already been created in C2E Store Service)"
},
"type": {
"type": "string",
"description": "C2E Subscription Type (e.g., preview) (which has already been created in C2E Store Service)"
},
"licenseType": {
"type": "string",
"description": "C2E License Type (e.g., Creative Commons) (which has already been created in C2E Store Service)"
},
"licenseTerms": {
"type": "string",
"description": "C2E License Terms (which has already been created in C2E Store Service)"
},
"amount": {
"type": "string",
"description": "C2E Subscription Amount (which has already been created in C2E Store Service)"
},
"currency": {
"type": "string",
"description": "C2E Subscription Currency (e.g., USD) (which has already been created in C2E Store Service)"
},
"copyrightNotice": {
"type": "string",
"description": "C2E Subscription CopyRight Notice (which has already been created in C2E Store Service)"
},
"license": {
"type": "string",
"description": "C2E Subscription License (which has already been created in C2E Store Service)"
},
"clientId": {
"type": "string",
"description": "C2E Subscription Client Id (which is assoicated with Player Service and has already been created in C2E Store Service)"
}
}
},
"licensedCeeSubscription": {
"type": "object",
"properties": {
"ceeListingId": {
"type": "string",
"description": "C2E Listing Id (which has already been created in C2E Store Service)"
},
"type": {
"type": "string",
"description": "C2E Subscription Type (e.g., licensed) (which has already been created in C2E Store Service)"
},
"licenseType": {
"type": "string",
"description": "C2E License Type (e.g., Creative Commons) (which has already been created in C2E Store Service)"
},
"licenseTerms": {
"type": "string",
"description": "C2E License Terms (which has already been created in C2E Store Service)"
},
"amount": {
"type": "string",
"description": "C2E Subscription Amount (which has already been created in C2E Store Service)"
},
"currency": {
"type": "string",
"description": "C2E Subscription Currency (e.g., USD) (which has already been created in C2E Store Service)"
},
"clientId": {
"type": "string",
"description": "C2E Subscription Client Id (which is assoicated with Player Service and has already been created in C2E Store Service)"
}
}
}
}
}
Endpoint to get a C2E Stream token.
- URL:
/stream/token
- Method:
GET
- Summary: Get C2E Stream token (called from store service)
- Parameters:
x-api-key
(header) - Authentication and Authorization- Type: string
- Default: APIKey (role: cee-store-service)
- Required: true
subid
(query) - C2E Subscription ID setup on the store 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 verify a C2E Stream token.
- URL:
/stream/token/verify
- Method:
GET
- Summary: Verify C2E Stream token (called from publisher service)
- Parameters:
x-api-key
(header) - Authentication and Authorization- Type: string
- Default: APIKey (role: cee-publisher-tool)
- Required: true
ceeId
(query) - C2E ID- Type: string
- Required: false
token
(query) - Token- Type: string
- Required: true
- Responses:
200
:- Description: Success
- Schema:
{ "code": 200, "message": "Success", "result": [ { "valid": true | false } ] }
Endpoint to get a C2E Manifest.
- URL:
/stream/manifest
- Method:
GET
- Summary: Get C2E Manifest (called from store service)
- Parameters:
x-api-key
(header) - Authentication and Authorization- Type: string
- Default: APIKey (role: cee-store-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 C2E Stores (called from publisher tool).
- URL:
/c2e-stores
- Method:
GET
- Summary: Get C2E Stores (called from publisher tool)
- Parameters:
x-api-key
(header) - Get C2E Stores- Type: string
- Default: APIKey (role: cee-publisher-tool)
- Required: true
- Responses:
-
200
:- Schema:
{ "code": 200, "message": "Success", "result": [ { "id": "C2E Store ID", "name": "C2E Store Name" } ] }
- Schema:
-
Endpoint to retrieve API Keys.
- URL:
/keys
- Method:
GET
- Summary: Get API Keys
- Parameters:
Authorization
(header) - Authorization- Type: string
- Default: Bearer APIKey
- Required: true
- Responses:
-
200
:- Schema:
{ "code": 200, "message": "Success", "result": [ { "key": "APIKey", "clientRole": "cee-publisher-tool | cee-store-service", "clientEmail": "[email protected]" } ] }
- Schema:
-
Swagger Documentation can be found on following link https://service-host/api-docs/
This README provides a comprehensive overview of the Curriki C2E API endpoints, their functionalities, required parameters, and expected responses. For more detailed information, refer to the OpenAPI spec or the API implementation.
Please replace the placeholders such as <Base URL>
with your actual API base URL.
Feel free to reach out if you have any questions or need further clarification.