-
GET
/api/v1/definitions
- returns all registered types
-
GET
/api/definition/{type}
- returns the registered type
-
POST
/api/v1/definition
- Sample POST request TestType.json
-
POST
/api/v1/definitions
- Sample POST request TestMultipleType.json
-
POST
/api/v1/schema
- links a JSON Schema with a pre-registered type; subsequent
/api/v1/type
requests will be validated against schema - Validation failures will result in an HTTP/1.1 422 Unprocessable Entity
- Sample POST request TestTypeSchema.json
- links a JSON Schema with a pre-registered type; subsequent
-
DELETE
/api/v1/schema/{type}
- unlinks existing JSON Schema from a pre-registered type; subsequent
/api/v1/type
requests will NOT be validated against schema
- unlinks existing JSON Schema from a pre-registered type; subsequent
-
DELETE
/api/v1/definition/{type}
- deletes a registered type; default configuration has cascading deletes enabled which means that any persistent data from prior POST
/api/v1/type
requests will also be deleted; so use with caution! - However, if
spring.profiles.active
is set tomysql
then when a DELETE request is made only the Class from theclass
table is deleted which orphans entries in other tables
- deletes a registered type; default configuration has cascading deletes enabled which means that any persistent data from prior POST
-
POST
/api/v1/type
- Sample POST request TestTypeData.json
- You are required to send a header named
Type
whose value must match a pre-registered type definition. For the sample case you would sendType: TestType
.
-
POST
/api/v1/types
- Sample POST request TestMultipleContactsData.json
- You are required to send a header named
Type
whose value must match a pre-registered type definition. For the sample case you would sendType: Contact
.
-
GET
/api/v1/type/{type}
- returns records that were created within the last 7 days
-
GET
/api/v1/type/{type}?createdTimeStart=yyyy-MM-ddTHH:mm:ss&createdTimeEnd=yyyy-MM-ddTHH:mm:ss
- returns records that were created between
createdTimeStart
andcreatedTimeEnd
- returns records that were created between
-
GET
/api/v1/type?oid={oid}
- returns record(s) that match the object identifier
-
DELETE
/api/v1/type?oid={oid}
- deletes records (including attribute-values) that match the object identifier
-
PATCH
/api/v1/type?oid={oid}
- update one or more existing type's attribute-value(s)
-
GET
/api/v1/type/{type}?noAudit=true
- return all records for type. No audit trail, only most recent records.
You may wish to review the ER diagram below to fully leverage this feature. Currently, you are limited to registering and executing SELECT
queries and CALL
ing stored procedures.
-
POST
/api/v1/query
-
Sample POST requests:
-
- Consult this Stored Procedure example for a sample HSQLDB based implementation
-
-
DELETE
/api/v1/query/{name}
- deletes the named query
-
GET
/api/v1/queries
- returns all named queries; displays: name, type, query, and parameters
-
GET
/api/v1/query/{name}
- executes a named query that does not require parameters
-
GET
/api/v1/query/{name}?<parameter_key1>=<parameter_value1>&<parameter_key2>=<parameter_key2>...
- executes a named query consuming the parameters supplied in request
-
GET
/api/v1/query/getAttributesCreatedBefore?createdTime=2015-10-01T00:00:00
- will execute the named query
getAttributesCreatedBefore
consuming thecreatedTime
parameter value
- will execute the named query
Note: in case of calling a stored procedure, the stored procedure must already exist in the database!
Dynamic queries are great to get started with, but often you will want more flexibility over query structure. For those situations look into employing a Named Query.
To retrieve a type by any of its attributes you may specify one or more request parameters for query constraints of the form:
<constraint_key>=<attribute_name>|<operator>|<value>|<conjunction>
where
<constraint_key>
may bec
orconstraint
<attribute_name>
is a registered attribute of the type<operator>
is one of Operatorvalue
is (depending upon theoperator
) either a single value or a comma-separated list of valuesconjunction
is one of Conjunction; this value is optional and if not defined then (for more than one constraint) each constraint isOR
ed. All conjunctions must be homogenously defined!
-
GET
/api/v1/type/TestType?c=datetime|lessThan|2015-07-01T10:00:00
- returns
TestType
records that have attributedatetime
less than the day constraint value
- returns
-
GET
/api/v1/type/TestType?constraint=datetime|lessThan|2015-07-01T10:00:00&constraint=varchar|equals|Rush
- returns
TestType
records that match on eitherdatetime
OR
varchar
attributes and constraint values
- returns