KB Article #179925

API Manager or Portal organization registration code, how generated

Problem

  • How is the API Manager organization registration code generated?
  • API Manager UI 8075 > Clients > Organizations > Registration codes.

Resolution

Each registration code is a randomly generated number, that is collision checked after generation.


Specifically it is using the first 6 chars of the toString of a random UUID (version 4).
Example: UUID.randomUUID().toString().substring(0, 6);


Reference:
https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html#randomUUID--
https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)