The Rest API Connector can be configured using the Aspire Admin UI. It requires the following entities to be created:

  • Credential
  • Connection
  • Connector
  • Seed

Below are the examples of how to create the Credential, Connection, and the Seed. For the general connectors' configuration, please refer to this page.

Create Credential


  1. On the Aspire Admin UI, go to the credentials tab
  2. All existing credentials will be listed. Click on the new button
  3. Enter the new credential description. 
  4. Select rest-api from the Type list.
  5. Select required authentication method: basic, bearer, api-token, azure, none
  6. The description of all "credential" fields can be found here.
    1. Basic:

      1. Login Account

      2. Password
    2. API Token:

      1. Header Name: The name of the header in which the API Token should be included.

      2. Header Token Value: The value of the token to use, should include any value header, such as Bearer in case of bearer tokens.
    3. Bearer:

      1. Login URL: Login URL template

      2. Login Account: Username to authenticate with. Replaces ${loginAccount} within POST login body
      3. Password: Password or token to authenticate with. Replaces ${password} within POST login body
      4. Request Body: The request body of the authentication query
      5. Access token: The result field with access token
      6. Is Form Body: If the request body is a Form Body
      7. Specify the expires field name
        1. Expiration type: "Expires at" or "Expires in"
          1. Expires at:
            1. "Expires at" field name: field name related to the token generated
            2. "Expires at" field date format: field date format of the token
          2. Expires in:
            1. "Expires in" Field name
            2. Time unit: the unit of the timestamp (milliseconds, seconds, minutes or hours)
            3. Expires in specific time? 
              1. Expires in "x" millis, seconds, minutes or hours
              2. Time unit: the unit of the timestamp (milliseconds, seconds, minutes or hours)
      8. Specify Authentication Header Name: if you want to specify the authentication header name. Otherwise, it will use the bearer default format.
        1. Header name: Header name related to the token generated
      9. Other Authentication Headers configuration: Specify other headers for the authentication request
        1. Header Name
        2. Header Value
    4. Azure Credentials:

      1. Client ID: The Application (client) ID that the Azure portal - App registrations page assigned to your app

      2. Client Secret: Needed if the app is a confidential client
      3. Scope: A space-separated list of scopes, or permissions, that the app requires
      4. Tenant: The directory tenant that you want to log the user into. This can be in GUID or friendly name format








Create Connection

  1. On the Aspire Admin UI, go to the connections tab
  2. All existing connections will be listed. Click on the new button
  3. Enter the new connection description. 
  4. Select rest-api from the Type list.
  5. In the "API Base URL:" field, enter your REST service API URL
  6. Connection Timeout: The period of time (ms) after which the connection will be closed if a client connection does not receive a response from the server.
  7. Socket Timeout: The period of time (ms) after which the socket will be closed if a client connection does not receive a response from the server
  8. Max Retries: The number of connections retries
  9. Use Throttling:
    1. API Calls Limit Size: The number of calls that your API can receive within a fixed period of time
    2. API Limit Time: The period of fixed time in which the number of API calls can be received (in milliseconds)
  10. Use Proxy:
    1. Select Protocol: the protocol of the proxy connection
    2. Proxy Host: Your proxy host
    3. Proxy Port: Your proxy port
    4. Use Proxy Authentication:
      1. Proxy Username
      2. Proxy Password
  11. Trust all certificates: If selected, no HTTPS certificate validation will be done

Create Connector


For the creation of the Connector object using the Admin UI, please refer to this page


Create Seed


  1. On the Aspire Admin UI, go to the seeds tab
  2. All existing seeds will be listed. Click on the new button
  3. Enter the new seed description. 
  4. Select rest-api from the Type list.
  5. Specify crawl rule.
  6. The description of all "seed" fields can be found here.
  7. Conditional Script:
    1. If true:
      1. Rule condition: Groovy condition to determine which items should execute this set of queries
    2. If false:
      1. Entity: Entity type to match
  8. Stop querying: If selected, the no other queries will be executed for the given item
  9. Should index: If selected, the item matching this crawl rule will be indexed
  10. Use custom scripted query:
    1. If true:
      1. Is scan query?: Select if the current script should be able to extract new items
      2. Scripted query: Custom query executed with groovy
    2. If false:
      1. Query: The query to execute
      2. HTTP Method (GET, POST, PUT):
        1. If POST or PUT:
          1. Request Body: The body of the request.
      3. JSON Request: Check this option, the request body should be JSON.
        1. If false:
          1. Content Type: The content type to use for the request body
      4. Headers configuration:
        1. Header Name: The name of the header
        2. Value: The value of the header
      5. Query type:
        1. Scan:
          1. Extraction path: The path to the response array that contains the children to extract
          2. Child ID field: Field within each child holding its ID
          3. Entity type: Type given to the items discovered by the scan query, this can be used to match a rule condition by type, if left empty 'entity' will be used
          4. Set Metadata Field: Select if you want to specify the metadata parent field, otherwise all the metadata will be at document root level
            1. Metadata Field Name: Specify the metadata parent field name
          5. Incremental configuration:
            1. Signature JSON Path: JSON path to extract fields to use as signature. Check out https://github.com/json-path/JsonPath for JsonPath documentation
          6. Extended incremental signature: Check this option if extra requests must be executed to obtain metadata needed to calculate modifications properly. Use this option carefully, as this decreases linearly the incremental crawl performance.
            1. Query: The query to execute
            2. HTTP Method (GET, POST, PUT):
              1. If POST or PUT:
                1. Request Body: The body of the request.
            3. Signature JSON Path: JSON path to extract fields to use as signature. Check out https://github.com/json-path/JsonPath for JsonPath documentation
            4. Result field: Internal name of metadata where the results will be extracted into
          7. Enable pagination:
            1. Elastic Scroll: Use Elasticsearch scroll ID for pagination
              1. If false:
                1. Use the next page link from the response: Select if the next page link should be taken from a field in the response
                  1. if true:
                    1. Next page link field: Path to the next page link field in the response, use dots to use fields in hierarchical paths
                    2. Next page from header: Check if the next page link is on the header. Otherwise, the response will be checked
                    3. Next page link is relative: Check if the next page link is relative, i.e: /api/data/9/children/?skip=1&limit=1
                  2. If false:
                    1. Page size: The maximum number of entries the query retrieves per page
                    2. Response contains total count: Check this option if the response has as a response the total number of entities in all pages
                      1. Total field: Path to the total field in the response
                    3. Request params: Check this option if pagination is controlled by request parameters. Properties that you can use: ${pagination.offset} ${pagination.pageNumber} ${pagination.pageSize}
                      1. Parameters template: Parameters template for pagination
                      2. Pagination start index: Select the start index of the pagination






  • No labels