mirror of
https://github.com/directus/directus.git
synced 2026-01-24 14:37:58 -05:00
* Add Quickstart Guide * Update installation * Remove unused files * Update support/backing * Tweaks in concepts * Setup file structure for API reference 2.0 * Setup page layout for reference * Add clean-urls plugin * getting started updates * Finish authentication rest * getting started updates * Render stylus in 2 spaces * Various * Various * Finish activity docs * Add collections reference * Add extension reference * concepts updates * Fields/tweaks * Add files doc * Add revisions * concepts docs * More api reference * Finish rest api reference (finally) * initial concepts * More things * Add assets api ref * Move sections from file to assets * Add environment variables * contributing docs * Add field transforms page * Left align table headers * concept links * Add API config * Fix mobile nav * Add migrating a project * doc link fixes Co-authored-by: Ben Haynes <ben@rngr.org>
1.6 KiB
1.6 KiB
pageClass
| pageClass |
|---|
| page-reference |
Utilities
Various utilities.
Generate a Hash
Generate a hash for a given string.
Request Body
string Required
String to hash.
Returns
Hashed string.
POST /utils/hash/generate
// Request
{
"string": "Hello World!"
}
// Response
{
"data": "$arg...fEfM"
}
Verify a Hash
Verify a string with a hash.
Request Body
string Required
Source string.
hash Required
Hash you want to verify against.
Returns
Boolean.
POST /utils/hash/verify
// Request
{
"string": "Hello World!",
"hash": "$arg...fEfM"
}
// Response
{
"data": true
}
Manually Sort Items in Collection
If a collection has a sort field, this util can be used to move items in that manual order.
Request Body
item Required
Primary key of the item you're moving in the collection.
to Required
Primary key of the item you're moving the source item too.
Returns
Empty body.
POST /utils/sort/:collection
// Request
{
"item": 16,
"to": 51
}
// Empty Response