Skip to content

Releases: dadi/api

Version 6.0.1

29 Oct 12:25
Compare
Choose a tag to compare

Fixed

  • 3ce11f6: fix error with non-directory items in collections directory

Version 6.0.0

28 Oct 16:10
Compare
Choose a tag to compare

Added

  • #512: add runHooks parameter to model methods
  • #570: allow customisation of page size in search results
  • #573: add endpoints for creating, managing and deleting collections
  • #578: add super user access type
  • #583: add access keys
  • #586: add media public URL
  • #592: add email address to client records
  • #593: add pagination URLs to metadata block
  • #596: add password reset mechanism

Changed

  • #566: store collection schemas in database
  • #567: remove version from collection endpoint URLs
  • #579: abort app start when token key is not defined
  • #584: respect ACL's fields object when creating and updating documents
  • #588: change status code of batch search endpoint to 202
  • #589: update syntax of Model constructor
  • #590: remove query.useVersionFilter config property

Fixed

  • #551: show validation errors of pre-composed documents
  • #563: objects not accepted as values on Boolean filters
  • #568: wrong page count in search metadata block
  • #572: use correct validation error for missing required fields
  • #576: updating or deleting documents fails on collections with versioning enabled when using @dadi/api-filestore
  • #581: API hangs when filter contains variable starting with $
  • #587: fix batch search index endpoint

BREAKING CHANGES

1. Collection URLs

The structure of collection endpoint URLs has changed from /:version/:database/:name to /:property/:name. In practice, this means that consumers must update the URLs being used to reach API collections by removing the first node (version).

The database property was renamed to property, as it more accurately describes the fact that multiple applications can run on a single API instance, which does not necessarily mean the same separation in terms of databases.

Consumers using API wrapper must upgrade their package to version 4.

2. Model constructor signature

The signature of the Model export has changed. Rather than accepting the name of the collection as a String, it now expects an object with property and name keys, indicating the name of the property (previously called database) and the name of the collection, respectively.

const {Model} = require('@dadi/api')

// Version 5 and prior
Model('books').find({})

// Version 6
Model({property: 'library', name: 'books'}).find({})

3. Require auth key

It is now mandatory to supply a key for signing tokens via the auth.tokenKey configuration properly. It can be a string of any length, as long as it's kept secret.

Failing to provide this configuration property will make API throw a fatal error on startup.

Version 6.0.0 (RC 1)

28 Aug 12:18
Compare
Choose a tag to compare
Version 6.0.0 (RC 1) Pre-release
Pre-release
v6.0.0-rc1

Version 6.0.0-rc1

Version 5.0.0

20 Jun 16:54
Compare
Choose a tag to compare

BREAKING CHANGES

The way API clients are internally stored has changed. After upgrading to 5.0.0, existing clients must be migrated. See https://docs.dadi.cloud/api/5.0#migrating-from-version-4-to-5 for more information.

Added

  • #532: add new endpoints for document versioning
  • #533: compress responses using gzip
  • #538: add global search endpoint and various improvements to search
  • #547: add support for ETag and If-None-Match headers

Changed

  • #534: hash client secrets

Fixed

  • #539: "false" filter on Boolean fields
  • #553: add default value for index keys
  • #558: make Media field output document IDs as String

Version 4.4.5

24 Jan 15:21
Compare
Choose a tag to compare

Fixed

  • #530: run afterGet hooks after field hooks

Version 4.4.4

20 Dec 11:13
Compare
Choose a tag to compare

Changed

  • #524: upgrade @dadi/status package

Fixed

  • #521: PUT request should respect fields parameter in ACL
  • #522: resources API should only list resources which the client has access to
  • #525: required fields should not accept empty strings

Version 4.4.3

29 Nov 12:26
Compare
Choose a tag to compare

Fixed

  • #519: add URL property to composed Media values

Version 4.4.2

29 Nov 11:49
Compare
Choose a tag to compare

Fixed

  • #518: make media field handle null values

Version 4.4.1

28 Nov 11:52
Compare
Choose a tag to compare

Fixed

  • #516: make media field handle legacy values

Version 4.4.0

22 Nov 11:58
Compare
Choose a tag to compare

Added

  • #415: add Media field
  • #451: add new validation module and operators
  • #498: allow bulk upload and deletion of media documents
  • #507: allow arbitrary metadata on media documents
  • #508: support application/json content type when updating media documents
  • #514: add mimeType validation operator and _composed property to media documents

Changed

  • #510: replace spaces with underscores in media document filenames

Fixed

  • #509: use correct response codes when creating and updating media documents