Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor formatting update

...

  1. Open Hermod Config file. 

  2. Navigate to the top-level directory where docker-compose.yml is located. The configuration file should then be found in a config/ directory.

    Example: File structure

    Code Block
    mydir/ 
    |-- cacerts 
    |-- certificates 
    |-- config 
    | 
    |-- application.yml -> cod-hermod.yml 
    | `-- cod-hermod.yml 
    `-- docker-compose.yml
  3. Open the configuration file for editing.

    Example: Command to edit configuration file

    Code Block
    languagetext
    vi config/cod-hermod.yml

Application.yml is a link to cod-hermod.yml
Application.yml is the actual file used by the server. 

...

  1. Refresh the configuration:

    Example: Refresh configuration

    Code Block
    languagetext
    curl -X POST http://localhost:20400/<contextPath>/refresh
  2. Test the new key by sending a request using curl (set THE-NEW-KEY below):

    Example: Test API key

    Code Block
    curl -w%{http_code} -X POST \
      http://localhost:20400/<contextPath>/<uriBase>/command/ping \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/json' \
      -H 'x-api-key: THE-NEW-KEY' \
      -d '{
      "commandHeader" : {
        "to": ["api-test"]
      }
    }'
  3. Check the response.

    • If you get a 403 response, you have the wrong API key.

    • If you get a 404 response, then you have the correct API key. A 404 response means that the user api-test isn't found, which is expected at this point.