Skip to content

Initialize Connection Context

Properties

  • Input
  • URL
    • Type:string
    • Description: The AIForged API base URL. Default ishttps://portal.aiforged.com.
    • Default Value:"https://portal.aiforged.com"
  • Username
    • Type:string
    • Description: Your AIForged username.
  • Password (Plain Text)
    • Type:string
    • Description: Your AIForged password in plain text. Use the secure option if possible.
  • Password (Secure String, Recommended)
    • Type:SecureString
    • Description: Your AIForged password inSystem.Security.SecureStringformat.
  • Connection Timeout
    • Type:TimeSpan?
    • Description: The API connection timeout.
    • Default Value:TimeSpan.FromMinutes(30)
  • Proxy Server
    • Type:string
    • Description: Proxy server address.
  • Proxy Username
    • Type:string
    • Description: Proxy username.
  • Proxy Password (Plain Text)
    • Type:string
    • Description: Proxy password in plain text.
  • Proxy Secure Password (Secure String, Recommended)
    • Type:SecureString
    • Description: Proxy password inSystem.Security.SecureStringformat.
  • Request Logging
    • Type:bool?
    • Description: Enable or disable logging of API requests.
    • Default Value:false
  • Response Logging
    • Type:bool?
    • Description: Enable or disable logging of API responses.
    • Default Value:false
  • Throw on Exception
    • Type:bool?
    • Description: Specify whether to throw exceptions.
    • Default Value:true
  • Output
  • User Info
    • Type:AIForged.API.UserViewModel
    • Description: Outputs the user information for the authenticated user.

Usage

  1. Setup Activity:
  2. Add the "Initialize Connection Context" activity to your UiPath workflow.
  3. Configure the required input arguments:
    • URL: Provide the API base URL if different from the default.
    • Username: Enter your AIForged username.
    • Password or Secure Password: Enter your AIForged password in either plain text or secure string format.
  4. Optionally, configure:
    • Connection Timeout: Set a custom timeout for the API connection.
    • Proxy Server and Credentials: Specify proxy settings if required.
    • Logging and Exception Handling: Adjust logging and exception handling options as needed.
  5. Execution:
  6. The activity executes asynchronously, establishing a connection to the AIForged API and initializing the connection context.
  7. It uses the provided credentials and configuration to authenticate and set up the context.
  8. Output:
  9. The activity outputs anAPI.Contextobject, which can be used in subsequent activities within the scope.
  10. Additionally, it providesUser Info, which contains details about the authenticated user.

Considerations

  • Security: Use secure strings for passwords to enhance security. Avoid using plain text passwords where possible.
  • Proxy Configuration: Ensure proxy settings are correct if your network requires proxy authentication.
  • Error Handling: Consider how exceptions should be handled in your workflow, using theThrow on Exceptionproperty to control behavior.