-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The Content Building Block (Content BB) is the service responsible for storing and managing content for the client applications in the Rokwire ecosystem. In general the structure of this content is not prescribed to provide sufficient flexibility for future use, but support is provided for textual and image content. This Building Block can also be integrated with external content providers. Examples of content that can be managed by this building block include UI panel content, profile photos, and Twitter feed data.
API level documentation for this Building Block can be accessed by visiting https://api.rokwire.illinois.edu/content/doc/ui/. This documentation conforms to the OpenAPI 3.0 standard. For the raw YAML documentation, you can visit https://api.rokwire.illinois.edu/content/doc.
This Wiki provides an overview of the functionality included in the Content Building Block. It includes the following sections:
The Content BB supports the management of arbitrary textual content. This could include JSON blobs, HTML, simple paragraphs, or any other type of text-encoded data. Textual Content is stored in a MongoDB collection.
Each individual piece of content is represented as a Content Item. Each Content Item should include a self-contained blob of textual data.
Arbitrary textual content may be retrieved using the /content-items endpoint and managed using the /admin/content-items endpoints. There are also several specific Content Categories that can only be managed through separate APIs with the appropriate permissions.
Below is a list of Content Categories that can be managed separately:
- Student Guide: Student Guide panel content for the Illinois App
- Health Locations: COVID testing locations on campus to be displayed in the Illinois App
- Campus Reminders: Content for campus reminders displayed in the Illinois App
- Gies Nudge Templates: Content for nudge template messages to be sent to Gies students in the Illinois App
- Gies Onboarding Checklist: Content for the task checklist for new Gies students in the Illinois App
- UIUC Onboarding Checklist: Content for the task checklist for new UIUC students in the Illinois App
- Wellness: Wellness panel content for the Illinois App
Every Content Item contains a "category" that associates it with related content. New categories can be defined by simply setting a previously unused category when creating a new Content Item.
Content Items contain the following data:
Name | Key | Type | Required | Description | Example |
---|---|---|---|---|---|
ID | id |
string | true | The unique identifier generated by the system for this item. | 729dc756-d411-407a-944c-fc272197f678 |
Organization ID | org_id |
string | true | The unique identifier of the Organization with which the item is associated. | fc6ab5f8-84ef-414b-b979-c1c7611a4c43 |
Application ID | app_id |
string | false | The unique identifier of the Application with which the item is associated. If not specified, all applications in the Organization will have access. | dabeb056-7796-408c-aa50-397d760be227 |
Category | category |
string | true | The Category for this content item | campus_reminder |
Data | data |
any | true | The data of the content item | {"example": "This is some example data to be stored in a content item"} |
Date Created | date_created |
DateTime | true | The time that this item was originally created | 2022-06-01T12:21:06Z |
Date Updated | date_updated |
DateTime | false | The time that this item was last updated | 2022-06-06T21:23:19Z |
The Content BB supports the management of image content. Image content is stored in an AWS S3 bucket.
Image files can be uploaded using the /admin/image endpoint. When uploading the image, a height, width, and quality can be specified to reformat the image before it is stored. A custom path and file name can also be specified.
Profile Photos are managed separately from other images. These images are profile photos for users of Rokwire applications. These photos are uploaded by the users themselves using the /profile-photo endpoint.
The Content BB can be integrated with external systems in order to manage and abstract content from these systems.
Content can be loaded from a Twitter feed for a specific Twitter user/account through the /twitter/users/{user_id}/tweets endpoint. The Content BB acts as a middle-man for this interaction exposes the same query params that can be provided to the Twitter API. Results of the query will be cached and re-used for identical queries in the future.