REST API v1.26.11-r4 release

contents (6)

This post covers the changes to the REST API in 1.26.11-r4 compared to 1.26.11-r3.

Rate limiting#

Added a new batch rate limit for POST /v1/*/batch endpoints

  • 20 requests per 60 seconds

Batch#

Added 13 batch endpoints accepting up to 50 items per request ({ "items": [...] })

Item order is preserved and individual item failures return errors per item without failing the rest of the batch

  • POST /v1/hash/batch
  • POST /v1/base64/encode/batch, POST /v1/base64/decode/batch
  • POST /v1/base32/encode/batch, POST /v1/base32/decode/batch
  • POST /v1/hex/encode/batch, POST /v1/hex/decode/batch
  • POST /v1/url/encode/batch, POST /v1/url/decode/batch
  • POST /v1/json/format/batch, POST /v1/json/minify/batch
  • POST /v1/text/slugify/batch
  • POST /v1/color/convert/batch

Encoding, HMAC and JWT#

  • Base32:
    • POST /v1/base32/encode and POST /v1/base32/decode (supports rfc4648, rfc4648_hex and crockford, with optional padding)
  • Hex:
    • POST /v1/hex/encode and POST /v1/hex/decode (supports utf8 and base64 input/output, uppercase output and 0x prefixes)
  • HMAC:
    • POST /v1/hmac and POST /v1/hmac/verify (supports 12 algorithms with utf8, hex, base64 and base64url keys and outputs)
  • JWT:
    • POST /v1/jwt/decode
    • POST /v1/jwt/verify (verifies HS*, RS*, PS*, ES* and EdDSA tokens with secret, pem or jwk keys)
    • POST /v1/jwt/sign

JSON and YAML#

  • POST /v1/json/format
  • POST /v1/json/minify
  • POST /v1/json/compare
  • POST /v1/yaml/validate
  • POST /v1/yaml/to-json

Text, cron, color#

  • POST /v1/text/diff
  • POST /v1/text/slugify
  • POST /v1/cron/parse
  • POST /v1/color/convert (#hex, rgb/rgba, hsl/hsla, hsv, cmyk)

Other changes#

  • POST /v1/url/encode and POST /v1/url/decode added alongside the existing GET routes, with component and form modes
  • /v1/base64/encode and /v1/base64/decode now support url_safe and padding options
  • /v1/hash now supports encoding (hex, base64, base64url), uppercase and seed (for murmur3)
  • /v1/uuid now supports ?version=v4|v7 (defaults to v4)
  • /v1/epoch/{timestamp} now supports ?unit=seconds|milliseconds and returns milliseconds and rfc2822
  • /v1/regex/test now supports U and x flags, named_captures and global: true
  • /v1/random now supports hsv and cmyk formats for type=color
  • /v1/coinflip/verify/{id} now also verifies the stored outcome against the seed hash