Developer Documentation
All components are hosted at Github. Development follows CESSDA Technical Guidelines.
All commits are tested in CESSDA CI Platform. The platform also
perfoms static analysis using pylint and SonarQube. All components
follow Python PEP8, with an exception in maximun line length. PEP8
mandates 80 characters for each line, but the components allow 120
characters for each line. This exception is reflected in .pylintrc
files in each project’s root.
Python dependencies are version locked for each component in
requirements.txt
files. Every install should use the versions
specified in order to maintain stability and security.
All components rely on Kuha2 interfaces and they all depend on Kuha2 Python packages.
DocStore HTTP API
This is rendered from DocStore openapi.json. Use Swagger GUI for a more complete rendering that includes examples and schemas of request and response payloads.
- POST /v0/studies
Create a new study
- Status Codes
201 Created – Study was created succesfully
400 Bad Request – Bad request
- Request Headers
Content-Type – (Required)
- DELETE /v0/studies
Delete all studies
- Query Parameters
delete_type (string) – Controls delete type: soft or hard. Defaults to soft, which does a logical delete.
- Status Codes
200 OK – Studies were deleted succesfully
400 Bad Request – Bad request
- GET /v0/studies/{resource_id}
Returns a study
- Parameters
resource_id (string) –
- Status Codes
200 OK – Return a study as a JSON document.
- PUT /v0/studies/{resource_id}
Update a study
- Parameters
resource_id (string) –
- Status Codes
200 OK – Study was updated succesfully
400 Bad Request – Bad request
- Request Headers
Content-Type – (Required)
- DELETE /v0/studies/{resource_id}
Delete a study
- Parameters
resource_id (string) –
- Query Parameters
delete_type (string) – Controls delete type: soft or hard. Defaults to soft, which does a logical delete.
- Status Codes
200 OK – Study was deleted succesfully
400 Bad Request – Bad request
409 Conflict – Object is in conflicting state.
- POST /v0/query/studies
Execute query and stream results as JSON documents. Request and response bodies are different in each query type.
- Query Parameters
query_type (string) – Controls the query type. Note that request and response bodies are different for each query type.
- Status Codes
200 OK – Successful query. Response body is different for each query type.
- Request Headers
Content-Type – (Required)