You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each item is a { key , value, created, updated } object (I'd like a name for this wrapper - Record?)
Other metadata, like end_offset for paged results, is included at the top of the object as siblings of results
POST /collections
Upsert values into a collection
POST /collections/{collection_name}
Values are uploaded as a JSON object in the body as an array of { key, value, ...meta } objects (where meta is not used now but would be a collection of metadata properties)
Returns 404 if the collection does not exist
Returns 201 if any new values were created
Returns 200 otherwise
New values will be assigned a created_at and updated_at timestamp. Existing values will have their updated_at changed.
Returns
For any 20x payload, return a JSON summary in the form:
{ upserted: 101, errors: [{}] }
DELETE /collections
Remove values from a collection
DELETE /collections/{collection_name}/{key}
Key can include multiple wildcards * for pattern matching
Query params:
updated_after / created_after only returns records GTE this the start of (last second? of) this date
updated_before / created_before only returns records LTE the end of (last second? of) this date
Returns
If possible, return a JSON summary in the form:
{ deleted: 101, keys: [...]}
The text was updated successfully, but these errors were encountered:
Re: #2190
Provide an HTTP endpoint that exposes methods that calls functions inside the Collection context.
Streaming is a requirement of this feature, we should be using features like
send_chunked
andchunk
(from Plug).Auth
Access to this API must be authenticated using either a Users access token, or a RunToken, in the Authentication Header
API spec
GET /collections
Fetches/searches for values within a collection
/collections/<collection_name>
returns everything in the collection*
for pattern matchingupdated_after
/created_after
only returns records GTE this the start of (last second? of) this dateupdated_before
/created_before
only returns records LTE the end of (last second? of) this datelimit
only return the first N recordsoffset
search from this offset in the dbmeta
flag to include metadata (timestamps) in as a_meta
key on each valueReturns:
Each item is a
{ key , value, created, updated }
object (I'd like a name for this wrapper - Record?)Other metadata, like
end_offset
for paged results, is included at the top of the object as siblings ofresults
POST /collections
Upsert values into a collection
{ key, value, ...meta }
objects (where meta is not used now but would be a collection of metadata properties)Returns
For any 20x payload, return a JSON summary in the form:
DELETE /collections
Remove values from a collection
*
for pattern matchingupdated_after
/created_after
only returns records GTE this the start of (last second? of) this dateupdated_before
/created_before
only returns records LTE the end of (last second? of) this dateReturns
If possible, return a JSON summary in the form:
The text was updated successfully, but these errors were encountered: