Using API Caller

How To

  • How to Authenticate
    User accounts are managed in the system repository
    Contact your system admin to Sign up (see API Caller - How to Add Users)
    The environment you are logging to is defined in the address URL
    Log in to the system with your user (email) and your initial password, for example admin@openlegacy.com and password
    Once logged in, you could change your password and log out from the user settings on the application toolbar  

  • How to Import Specification (and add Endpoints to the Endpoints list)
    Clicking on the Specification Editor in the application toolbar will open a Swagger Editor within the application
    You can import Swagger Specification (OpenAPI3 or the system will offer you to automatically convert from Swagger 2.0 to OpenAPI3):
    • Click on File
    • Import file (Add yml file for example)
    • Click on Edit
    • Convert to OpenAPI3 (If needed)

Once the API Specification meets your needs, press on the 'Done' button to review the Endpoints

 

  • How to Perform Endpoints Actions

    • Search Endpoints - Using the Search bar, the user can search Endpoints by name (auto complete search)
    • Publish Endpoints to runtime - The Endpoints are created in 'Draft' Editable Mode.
      Once you would like to use them in runtime, you'll need to 'Publish' them.
      Using the Endpoint menu or by selecting multiple Endpoints and Change the status of chosen Endpoints to “Published” which means they are ready to be used
    • Unpublish - Using the Endpoint menu, click on 'Edit' and change the status of chosen 'Published' endpoint back to “Draft” 
    • Unpublish & Edit - Using the Endpoint menu, click on 'Edit' and change the status of chosen 'Published' Endpoint back to “Draft”, and open an editor to modify the Endpoint’s definition metadata
    • Delete Endpoints - Using the Endpoint menu or by selecting multiple Endpoints, Delete one or more of the generated Endpoints.
      The deletion is permanent and cannot be restored.



    • Edit Endpoints
      In Endpoint 'Draft' mode, you can edit the following from the Edit menu item:
      • fields length (Endpoint metadata definition)
        • For ex: Move to Input →  body →  {field name} → change the field length there
      • Endpoint Base URL
      • Endpoint Path
      • Http Scheme (Http/Https)


  • How to move the EndPoints between environments such as Development, Test and Production
    You can move your Endpoints between environments such as Development, Test, and Production by exporting/importing the Endpoints as a JSON file
    • Import Endpoints - Using the Import Endpoints button on the application bar, Import Endpoints list using as a JSON file 
    • Export Endpoints - Using the Endpoint menu or by selecting multiple Endpoints, Export one or more Endpoints as a JSON file


  • How to Download Client
    Click on the Menu → Generate client to generate the proxy client as Copybooks that correspond to the Endpoint and download them as a zip file
    Move the files to your Mainframe environment, populate them and configure the URI Map
    Make sure the Endpoint has been published (runtime)
    And Call the 3rd Part API


  • How to Add Users

prerequisites: Java 8 installed.

  1. Download the attached jar file.
  2. Open Terminal/CMD.
  3. Run the jar with username and password as arguments:
    java -jar api-caller-user-sctipt-provider-1.0.0-all.jar userName password
  4. The output is a SQL statement that should look like this: 
    INSERT INTO iam.users(id, username, password, roles) VALUES ('2721b79c-a127-451e-8301-00a066d414f9', 'userName', '$2y$10$4dU3pVkXOZZ.Sky0rHzORe9iqR/MRUkGdBp7fh3iHtwybYi6namve', '{admin}');
  5. Execute that SQL statement in your PostgreSQL database.
  6. Done.

api-caller-user-sctipt-provider-1.0.0