The API specification to add content to the Schul-Cloud. This is the Resources API from the architecture. It should be the minimal example of what works for all content providers.
The design process follows the Collective Code Construction Contract.
These are the API endpoints defined in the documentation.
The resources API is specified in the api-definition. You can view it on swaggerhub. This API is tested and implemented by the schul_cloud_resources_server_tests. If you want to implement the API, please refer to the tests.
Errors follow the error schema.
The API only specifies how to authenticate. Depending on the implementation, it differs where you get the authentication from.
A recommendation is that if you could not authenticate, the server shows a page telling you where to get accepted credentials.
The api specifies authentication via api key and basic authentication. If you want to add another authentication mechanism, please open an issue.
It is clearly defined how to do basic access authentication.
Instead of no authentication and basic authentication,
the Authorization
header can be set to support api key authentication.
Example:
Authorization: api-key key=base64encodedkey
Because the Authorization
header is used, one cannot authenticate with both,
an api key and basic authentication.
Further Reading:
This API is tested and implemented by the schul_cloud_search_tests. If you want to implement the API, please refer to the tests.
GET /v1/search?Q=WORDS?filter[ATTRIBUTE]=...&filter[ATTRIBIUTE2]=...&page[offset]=SKIP?page[limit]=LIMIT
Search for some words and filter the result.
WORDS
. They should search at least these object attributes:filter[title]=my%20title
objects: [ {"license": ["MIT", "GPL"]}, {"license": ["MIT"]} ]
query: `?filter[license]=GPL`
result: [ {"license": ["MIT", "GPL"]} ]
page[offset]
(optional)page[limit]
(optional)
how many object shall be returned.Result:
Content-Type
: application/vnd.api+json
400
also see error object on how to create informative errors about query parameters
If the server does not support sorting as specified in the query parameter sort, it MUST return 400 Bad Request.
Related Work:
DONE
DateTime
Language
Learning Resource Type
Interactivity Type
active, expositive, mixedTODO
The automated build is done by Travis-CI. It does the following: