Skip to content

Releases: dadi/api

v6.1.0

Choose a tag to compare

@annybs annybs released this 07 Aug 13:09
cd2be4d

DADI API v6.1.0 offers support for Node 20.

Version 6.0.1

Choose a tag to compare

@eduardoboucas eduardoboucas released this 29 Oct 12:25

Fixed

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

Version 6.0.0

Choose a tag to compare

@eduardoboucas eduardoboucas released this 28 Oct 16:10

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)

Version 6.0.0 (RC 1) Pre-release
Pre-release

Choose a tag to compare

@eduardoboucas eduardoboucas released this 28 Aug 12:18
v6.0.0-rc1

Version 6.0.0-rc1

Version 5.0.0

Choose a tag to compare

@eduardoboucas eduardoboucas released this 20 Jun 16:54

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

Choose a tag to compare

@eduardoboucas eduardoboucas released this 24 Jan 15:21

Fixed

  • #530: run afterGet hooks after field hooks

Version 4.4.4

Choose a tag to compare

@eduardoboucas eduardoboucas released this 20 Dec 11:13

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

Choose a tag to compare

@eduardoboucas eduardoboucas released this 29 Nov 12:26

Fixed

  • #519: add URL property to composed Media values

Version 4.4.2

Choose a tag to compare

@eduardoboucas eduardoboucas released this 29 Nov 11:49

Fixed

  • #518: make media field handle null values

Version 4.4.1

Choose a tag to compare

@eduardoboucas eduardoboucas released this 28 Nov 11:52

Fixed

  • #516: make media field handle legacy values