Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Confluence Connector can be configured using the Rest API. 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 Connector, please check refer to this page.

Easy Heading Free
navigationTitleOn this Page
navigationExpandOptionexpand-all-by-default

Create Credential


FieldRequiredDefaultMultipleNotesExample
typeYes-NoThe value must be "confluence"."confluence"
descriptionYes-NoName of the confluence object."My Confluence"
propertiesYes-NoConfiguration object
userYes-NoUser nameUsername."admin"
passwordYes-NoPassword or the token in case of Cloud"adminPassword"
domainNo-NoDomain used to login log in to Confluence. If the domain is not required by the environment, it is ignored."CompanyDomain"
userFormsAuthNofalseNoUse login.action POST action to authenticate instead of using BASIC Authorization headers (only for On-Premise version)false
cookieTimeoutNo3000NoCookie Timeout (in secs)2000

Example

Code Block
themeRDark
titlePOST aspire/_api/credentials
{
    "type": "confluence",
    "description": "My Confluence Credential",
    "properties": {
        "user": "admin",
        "password": "adminPassword"
    }
}

Create Connection


FieldRequiredDefaultMultipleNotesExample
typeYes-NoThe value must be "confluence"."confluence"
descriptionYes-NoName of the connection object."My Confluence Connection"
throttlePolicyNo-NoId ID of the throttle policy that applies to this connection object."6b235b333a1b"
routingPoliciesNo[ ]YesThe ids IDs of the routing policies that this connection will use.["17f75ce7d0c7", "d42780003b36"]
credentialYes-NoId ID of the credential"6b235b333a1b"
propertiesYes-NoConfiguration object
urlYes-NoURL to access the Confluence server in the form of: http://{servername}{:port} In some Confluence installations you must add '/confluence' to the end of the server name – e.g http://wiki.local.search/confluence . The connector uses REST API to communicate with Confluence. To verify REST append /rest/api/space at the end of the URL. Test it in a browser."http://confluence.company.com/"
cloudNofalseNoSelect if your server is in the Cloudtrue
indexContainersNotrueNoSelect if containers (space, page, blog) are to be indexed. Clear to index attachments only.false
scanRecursivelyNotrueNoSelect if subfolders are to be scanned.false
scanExcludedItemsNofalseNoSelect so that the scanner will scan sub items of container items excluded by a pattern (because it matches an exclude pattern or because it doesn't match an include pattern).true
stopCrawlOnScannerErrorNotrueNoIf enabled, crawled will stop if a scanner error is thrown (i.e. a space has no sufficient permissions or does not exist). An error is logged otherwise, and the crawl continues.false
anonymousAccessAllowedNofalseNo

Select to indicate anonymous access is allowed in the Confluence instance. If anonymous (or public) access is allowed on your Confluence instance, you can check the "Anonymous access allowed" checkbox. To see if anonymous access is allowed, please see access in your Confluence instance. This has its meaning when Aspire creates ACL's. Basically, if Confluence space has anonymous access allowed, Aspire will assign ACL "public" “public” to it instead of other defined space permissions. But it does not work that way that for all objects to get automatically ACL “public” when anonymous access is allowed. Pages that have explicit restrictions should retain their ACL’s. Only pages that have inherited security from the space with anonymous access allowed would get ACL’s “public”.

true






limitItemContentSizeNofalseNoImpose a max limit for on the size of the page content that can be extracted from Confluence or the time it takes to read the content. Pages /w content over this size or which take longer then than the timeout will have their content replaced with a configurable string. These pages will still have their metadata extracted.true
maxItemContentSize true10000NoThe maximum allowed content size (in kilobytes.)20000
readItemContentTimeout true30NoThe maximum amount of time (in secs) to wait while reading the content bytes.20
fetchMetadataWhenContentFails falsefalseNoIf the REST API call to get the Page content fails, fetch the metadata only.true
removedContentReplacement falseItemContentRemovedNoA string/token to replace the content when the content exceeds the max allowed size, or it cannot be read in the allotted time or the REST content fetch request fails."ContentRemoved"






connectionTimeoutNo15000No

Maximum time to wait (in millismilliseconds) for the connection

30000
readTimeoutNo30000NoMaximum time to wait for read (in millismilliseconds)40000
retriesNo3NoMaximum number of retries for a failed document1
retryDelayNo15000NoRetry delay (in millismilliseconds)30000
maxRetryDelayNo600000NoMaximum retry delay (in millismilliseconds)500000
retryDelayMultiplierNo1.0No

Retry delay multiplier

1.5






resultSetLimitNo100NoThe maximum number of records to be retrieved at a time per page through the Confluence REST API.200
logRestAPINofalseNoSelect to Log REST API requests details on the INFO level.true

Example

Code Block
themeRDark
titlePOST aspire/_api/connections
{
   "type": confluence,
   "description": "Confluence",
    "properties": {
        "url": "https://coreengtest.atlassian.net",
        "cloud": true,
        "indexContainers": true,
        "scanRecursively": true,
        "scanExcludedItems": false,
        "stopCrawlOnScannerError": true,
        "anonymousAccessAllowed": false,
        "limitItemContentSize": false,
        "connectionTimeout": "15000",
        "readTimeout": "30000",
        "retries": "3",
        "retryDelay": "15000",
        "maxRetryDelay": "600000",
        "retryDelayMultiplier": "1.0",
        "resultSetLimit": "100",
        "logRestAPI": false
    }
}

Update Connection


FieldRequiredDefaultMultipleNotesExample
idYes-NoId ID of the connection to update"d442adcab4b0",
descriptionNo-NoName of the connection object."My RDB Connection"
throttlePolicyNo-NoId ID of the throttle policy that applies to this connection object."b3a9-6b235b333a1b"
routingPoliciesNo[ ]YesThe ids IDs of the routing policies that this connection will use.["17f75ce7d0c7", "d42780003b36"]
credentialNo-NoId ID of the credential"6b235b333a1b"
propertiesNo-NoConfiguration object
(see create connection)




Example

Code Block
themeRDark
titlePUT aspire/_api/connections/89d6632a-a296-426c-adb0-d442adcab4b0
{
   "id": "89d6632a-a296-426c-adb0-d442adcab4b0",
   "description": "Confluence",
     "properties": {
        "url": "https://coreengtest.atlassian.net",
        "cloud": true,
        "indexContainers": true,
        "scanRecursively": true,
        "scanExcludedItems": false,
        "stopCrawlOnScannerError": true,
        "anonymousAccessAllowed": false,
        "limitItemContentSize": false,
        "connectionTimeout": "15000",
        "readTimeout": "30000",
        "retries": "3",
        "retryDelay": "15000",
        "maxRetryDelay": "600000",
        "retryDelayMultiplier": "1.0",
        "resultSetLimit": "100",
        "logRestAPI": false
    } 
}

Create Connector


For the creation of the Connector object using the Rest API check , please refer to this page

Update Connector


For the update of the Connector object using the Rest API, check this page

Create Seed


FieldRequiredDefaultMultipleNotesExample
typeYes-NoThe value must be "confluence"."confluence"
descriptionYes-NoName of the seed object."My Confluence Seed"
connectorYes-NoThe id ID of the connector to be used with this seed. The connector type must match the seed type."e3ca414b0d31"
connectionYes-NoThe id ID of the connection to be used with this seed. The connection type must match the seed type."e4a663fe9ee6"
workflowsNo[ ]YesThe ids IDs of the workflows that will be executed for the documents crawled.["5696c3f0bda4"]
throttlePolicyNo-NoId ID of the throttle policy that applies to this seed object."6b235b333a1b"
routingPoliciesNo[ ]YesThe ids IDs of the routing policies that this seed will use.["17f75ce7d0c7", "d42780003b36"]
tagsNo[ ]YesThe tags of the seed. These can be used to filter the seed.["tag1", "tag2"]
propertiesYes-NoConfiguration object
useKeysForSpacesListNotrueNoIf turned on, all Space Inclusion/Exclusion lists should specify Space Keys. Otherwise, Space Names should be used.false






spacesNo-YesCrawl only these spaces[ { "space": "PEPO" } ]
spaceYes-NoThe key or name of the space to be crawled.






spacesFileNo-NoPath to the file that contains spaces, keys or names to be crawled. 1 space per line. If set, the spaces coming from this file override the space list provided in the Config UI."/path/to/file/that/contains/spaces"






excludedSpacesNo-YesDo Not crawl only spaces[ { "space": "PEPO" } ]
spaceNo-NoKey or Name of space to be excluded from crawling. Use the display name of the space.






excludedSpacesFileNo-NoPath to the file that contains spaces, keys or names to be excluded from the crawl. 1 space per line. If set, the spaces coming from this file override the excluded space list provided in the Config UI."/path/to/file/that/contains/excluded_spaces"






excludePersonalSpacesNotrueNoExclude personal spacesfalse
excludeArchivedSpacesNotrueNoExclude archived spacesfalse
includesNo

[ ]

YesPatterns to match against document URL, if any of them match, the document will be included in the crawl.[ ".*pdf$", ".*docx$" ]
excludesNo[ ]YesPatterns to match against document URL, if any of them match, the document will be excluded from the crawl.[ ".*png$", ".*jpeg$" ]
includeAttachmentsNofalseNoSelect to include attachments in the crawltrue
includeCommentsNofalseNoSelect to include comments in the crawltrue

Example

Code Block
themeRDark
titlePOST aspire/_api/seeds
{
  "type": "confluence",
  "description": "Confluence",
   "properties": {
        "useKeyForSpacesLists": true,
        "spaces": [
            {
                "space": "PEPO"
            }
        ],
        "spacesFile": "",
        "excludedSpaces": [],
        "excludedSpacesFile": "",
        "excludePersonalSpaces": true,
        "excludeArchivedSpaces": true,
        "includes": [],
        "excludes": [],
        "includeAttachments": false,
        "includeComments": false
    }
}

Update Seed


FieldRequiredDefaultMultipleNotesExample
idYes-NoId ID of the seed to update"2f287669-d163-4e35-ad17-6bbfe9df3778"
(see the "Create seed" for other fields)




Example

Code Block
themeRDark
titlePUT aspire/_api/seeds/2f287669-d163-4e35-ad17-6bbfe9df3778
{
  "id": "2f287669-d163-4e35-ad17-6bbfe9df3778",
  "seed": "test_db",
  "description": "RDB_Test",
  "properties": {
      "useKeyForSpacesLists": true,
      "spaces": [
          {
              "space": "PEPO"
          }
      ],
      "spacesFile": "",
      "excludedSpaces": [],
      "excludedSpacesFile": "",
      "excludePersonalSpaces": true,
      "excludeArchivedSpaces": true,
      "includes": [],
      "excludes": [],
      "includeAttachments": false,
      "includeComments": false
  }
}

Disable checkingPremium suggestionsDisable checkingPremium suggestionsDisable checkingPremium suggestionsDisable checkingPremium suggestions

Disable checkingPremium suggestionsDisable checkingPremium suggestionsDisable checkingPremium suggestionsDisable checkingPremium suggestions