-
Notifications
You must be signed in to change notification settings - Fork 0
Datalake API
API supports Version and Subject right now
Works with token based pagination.
To paginate add next
as GET param. The next
param should come from the client and should be the last fetched element. Together with count
, this returns the next count
entries after next
.
For more information look at the express-cassandra doc.
Every routes params can be configured with queryConfig: normal: single value list: Lists, filtered with contains map: Maps, filtered with contains on key like: For prefix queries using Custom Index (SASI) uniqueKey: Partition key or primary key custom_params: Custom params with name and selected columns, only fetches selected columns
const queryConfig = {
normal: ['master', 'datasource', 'id', 'category', 'name'],
lists: ['aliases'],
maps: ['properties', 'relations'],
like: ['name'],
uniqueKey: 'master',
custom_params: [
{
name: 'noHistory',
options: {
select: ['master', 'id', 'datasource', 'name', 'aliases', 'category', 'properties', 'relations']
}
}
]
};
-
URL: /api/subjects
-
METHOD: GET
Returns "all" subjects.
-
Params
- id: Single or comma seperated list of UUIDs
- master: Master UUID
- count: the number of subjects returned. Default: 50
- name: Prefix of name of the entities
- aliases: Does not work probably some restriction in Cassandra
- category: Exact category
- properties: One exact value of a property
- relations: Does not work probably some restriction in Cassandra
- noHistory: Only fetches attributes and not "_history" columns
-
Params
-
METHOD: POST
Create subject by supplying a body with needed fields. UUID is generated automatically. All not specified fields are null by default.
-
-
URL: /api/subjects/:id
id=[string representing a uuid]
-
METHOD: GET
Returns subject specified by id.
-
METHOD: PUT
Updates subject in database. Body should contain fields and values to update. eg:
{field1: updatedvalue}
-
METHOD: DELETE
Deletes the subject with given id.
-
-
URL: /api/versions
-
METHOD: GET
Returns "all" versions.
-
Params
- count: the number of versions returned. Default: 20
- program: Exact name of the program
- datasources: One exact item inside the datasources list
-
Params
-
METHOD: POST
Create version by supplying a body with needed fields. UUID is generated automatically. All not specified fields are null by default.
-
-
URL: /api/versions/:version
id=[string representing a timeuuid]
-
METHOD: GET
Returns versions specified by version.
-
METHOD: PUT
Updates version in database. Body should contain fields and values to update. eg:
{field1: updatedvalue}
-
METHOD: DELETE
Deletes the version with given version.
-