Content Resource

The content resource provides endpoints for searching and viewing content items, as well as viewing related items. This resource also provides the ability to upload, edit, and delete content items in the EdGate data repository.


Search content items

View in API Navigator

Search and filter content items. Defaults to 25 returned results with paging options available.

 

Request

GET /content/


Parameters

Field Description Location Type
q Search query text Query string string
filters Comma separated list of name/value pairs.  Field name and value are delimited with a pipe character “|”.  Available filter fields and values can be found via the /content/filters endpoint. Query string string
limit The number of results to return (default is 25) Query string integer
offset Numbering of record to begin the results at (used for paging) Query string integer

 

Response

This returns a Search Result JSON object (see Table 5)

 

Table 5 - Search Result JSON object

Field Description Type
status Status object Status JSON object
status.code Response code integer
status.message Status message text string
resultcount Number of total search results integer
offset Numeric index of the starting record in the result set integer
limit The number of results returned in the response integer
results Result set for the search List of Content objects (see Table 6 for definition)

 

Table 6 - Content object

Field Description Type
guid GUID of content item string
id Client provided unique ID for item string
title Title of content item string
description Description of content item string
url URL of content item string
grade Grade levels associated with content item List (string)
subject Subject areas item belongs to (based on categorization within EdGate’s concept taxonomy) List (string)
content_set_id ID of content set the item belongs to.  ID values can be looked up in the /profile/ endpoint integer
metadata Metadata field/value pairs List
metadata.name Name of metadata field string
metadata.value Value of metadata field string

 


 

View available metadata filter options

View in API Navigator

This endpoint returns a list of all filterable metadata fields and available values for content within the current profile.  These fields and values can be used to filter results within the content search endpoint.

 

Request

GET /content/filters

 

Response

The response contains a list of filter JSON objects.  This contains the name of the field, and possible values, and counts of how many occurrences of the value within the field

 

Table 7 - Filter object

 

Field Description type
field The name of the filter field string
facets A list of facet values and their counts list
facets.value The value of the facet string
facets.count A count of how many occurrences of the value exist in the content integer

 


 

View metadata for a single content item

View in API Navigator

Retrieve all metadata for a specific content item

 

Request

GET /content/{GUID}

 

Parameters

Field Description Location Type
GUID GUID of the content item path string

 

Response

This endpoint returns a single Content object (see Table 6)

 


 

View metadata for a single content item using client ID

View in API Navigator

Retrieve all metadata for a specific content item using an ID provided by the client

 

Request

GET /content/byid/{ID}

 

Parameters

Field Description Location Type
ID ID of the content item provided by the client path string

 

Response

This endpoint returns a single Content object (see Table 6)

 


 

Upload content items

View in API Navigator

This endpoint allows the client to import metadata for one or more content items into the EdGate repository.

 

Request

POST /content/

 

Parameters

Field Description Location Type
items List of content submission objects (see Table 8) Request body List *

 

* - Note: if only one content item is being uploaded, submission body must be a JSON formatted array with a single object

 

Table 8 - Content Submission object

Field Description Type
id Client provided unique ID for item string
title Title of content item string
description Description of content item string
url URL of content item string
grade Grade levels associated with content item List (string)
content_set_id ID of content set the item belongs to.  ID values can be looked up in the /profile/ endpoint integer
metadata Additional metadata field/value pairs List
metadata.name Name of metadata field string
metadata.value Value of metadata field string

 

Response

This endpoint returns a list of submission status objects, corresponding to the number of items uploaded.  Each object gives a status of whether or not the item was saved successfully and a GUID for the item, if successful.

 

Table 9 - Submission Status object

Field Description Type
status Status code for submission integer
message Status message string
guid GUID of item in EdGate repository string

 


 

Edit content items

View in API Navigator

This endpoint allows the client to edit metadata for one or more content items from their profile

 

Request

PUT /content/

 

Parameters

Field Description Location Type
items List of content item objects (see Table 6) body List *

 

* - Note: if only one content item is being edited, submission body must be a JSON formatted array with a single object

 

Response

This endpoint returns a list of status objects, corresponding to the number of items edited.  Each object gives a status of whether or not the item was saved successfully.

 

Table 10 - Status object

Field Description Type
status Status code for edit integer
message Status message string

 


 

Delete content items

View in API Navigator

This endpoint allows the client to remove one or more content items from their profile

 

Request

DELETE /content/

 

Parameters

Field Description Location Type
items List of content item GUIDs body List (string)*

 

* - Note: if only one content item is being deleted, submission body must be a JSON formatted array with a single value

 

Response

This endpoint returns a list of status objects, corresponding to the number of items deleted.  Each object gives a status of whether or not the item was successfully deleted. (See Table 10)

 


 

Get related content

View in API Navigator

This endpoint allows a client to look up content covering similar concept areas for a specific content item.

 

Request

GET /content/related/{GUID}

 

Parameters

Field Description Location Type
guid GUID of content item path string
filters Comma separated list of name/value pairs.  Field name and value are delimited with a pipe character “|”.  Available filter fields and values can be found via the /content/filters endpoint. Query string string
limit The number of results to return (default is 25) Query string integer
offset Numbering of record to begin the results at (used for paging) Query string integer

 

Response

This returns a Search Result JSON object (see Table 5)

 


 

Create Content Sets

View in API Navigator

This endpoint allows the client to create one or more content sets within the repository.  All content sets must have a unique name.

 

Request

POST /content/sets

 

Parameters

Field Description Location Type
set_name List of new content set names Request body List *

 

* - Note: if only one content set is being created, submission body must be a JSON formatted array

 

Response

This endpoint returns a list of content set submission status objects(see Table 11), corresponding to the number of sets created.  Each object gives a status of whether or not the item was saved successfully and a GUID for the item, if successful.

 

Table 11 - Content Set Submission Status object

Field Description Type
status Status code for submission integer
message Status message string
set_id ID of new content set created string

 

Update Content Sets

View in API Navigator

This endpoint allows the client to edit the names of one or more content sets within the repository.  All content sets must have a unique name.

 

Request

PUT /content/sets

 

Parameters

Field Description Location Type
sets List of content set objects (see Table 12) Request body List *

 * - Note: if only one content set is being edited, submission body must be a JSON formatted array

Table 12 - Content Set Object

Field Description Type
set_id ID of the conten set string
name Name of the content set string

 

Response

This endpoint returns a list of status objects(see Table 10), corresponding to the number of sets created.  Each object gives a status of whether or not the set was saved successfully.


Delete Content Sets

View in API Navigator

This endpoint allows the client to delete one or more content sets within the repository.  **NOTE** - Any content associated with this content set will also be removed.

 

Request

DELETE /content/sets

 

Parameters

Field Description Location Type
set_id List of content set IDs Request body List *

 

* - Note: if only one content set is being deleted, submission body must be a JSON formatted array

 

Response

This endpoint returns a list of submission status objects(see Table 10), corresponding to the number of sets removed.  Each object gives a status of whether or not the item was removed successfully.