uuid ninja

this is a rfc4122 uuid utility. use it to generate uuids (v3-5).

global options
uuid v3 / v5
uuid v4
a7b89c3f-9f18-438f-816a-e01e6a8caae6

api

uuid ninja has a simple API that can be used to easily generate a uuid from anywhere that is capable of issuing an http request.

the API looks for an Accept header. the supported response types are application/json and text/plain. the API defaults to JSON responses.

the available endpoints are as follows:

v3 / v5

the v3 endpoint allows you to generate a v3 uuid:

curl \
    -H "Accept: text/plain" \
    https://uuid.ninja/api/v3/67819eb0-8e4e-4b16-ac0c-963a1f8ecbd9/foo
50da134d-b08f-3157-8315-f2ce12544465

the expected URL is: /api/v3/<namespace uuid>/<name>

to generate a v5 uuid, the URL is almost the exact same, except that v3 should be replaced with v5.

> curl \ 
    -H "Accept: text/plain" \
    https://uuid.ninja/api/v5/67819eb0-8e4e-4b16-ac0c-963a1f8ecbd9/foo
3f56b884-e5d1-5540-b182-aeb6440f09bb

v4

to generate a v4 uuid, is simpler, since no input is required. simply send a request to the v4 endpoint:

> curl https://uuid.ninja/api/v4
{"result":"5b30ca46-9b8b-48e0-b53a-1ccd4b3adc8f"}

then voilà, a v4 uuid.


made out of boredom by nick comer
source: github
copyright © mit licensed 2024