> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alfresco V1

> The Alfresco V1 connector allows Fusion to crawl and index content stored in an Alfresco Community repository that adheres to the Content Management Interoperability Services (CMIS) standard.

export const schema = {
  "category": "Other",
  "categoryPriority": 1,
  "description": "Connector for Alfresco using Content Management Interoperability Services (CMIS).",
  "properties": {
    "category": {
      "default": "Repository",
      "hints": ["hidden", "readonly"],
      "title": "Category",
      "type": "string"
    },
    "connector": {
      "description": "Connector Type.",
      "hints": ["hidden"],
      "minLength": 1,
      "title": "Connector Type",
      "type": "string"
    },
    "description": {
      "description": "Optional description for this datasource.",
      "title": "Description",
      "type": "string"
    },
    "id": {
      "description": "Unique name for this datasource.",
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "title": "Datasource ID",
      "type": "string"
    },
    "parserId": {
      "description": "Parser used when parsing raw content. Retry parsing setting is available under crawl performance (advance setting)",
      "title": "Parser",
      "type": "string"
    },
    "pipeline": {
      "description": "Name of an existing index pipeline for processing documents.",
      "minLength": 1,
      "title": "Pipeline ID",
      "type": "string"
    },
    "properties": {
      "description": "Datasource configuration properties",
      "properties": {
        "aliasExpiration": {
          "default": 1,
          "description": "The number of crawls after which an alias will expire. The default is 1 crawl.",
          "hints": ["advanced"],
          "title": "Alias expiration",
          "type": "integer"
        },
        "chunkSize": {
          "default": 1,
          "description": "The number of items to batch for each round of fetching. A higher value can make crawling faster, but memory usage is also increased. The default is 1.",
          "hints": ["advanced"],
          "title": "Fetch batch size",
          "type": "integer"
        },
        "collection": {
          "description": "Collection documents will be indexed to.",
          "hints": ["hidden"],
          "pattern": "^[a-zA-Z0-9_-]+$",
          "title": "Collection",
          "type": "string"
        },
        "crawlDBType": {
          "default": "in-memory",
          "description": "The type of crawl database to use, in-memory or on-disk.",
          "enum": ["in-memory", "on-disk"],
          "hints": ["advanced"],
          "title": "Crawl database type",
          "type": "string"
        },
        "db": {
          "description": "Type and properties for a ConnectorDB implementation to use with this datasource.",
          "hints": ["hidden"],
          "properties": {
            "aliases": {
              "default": false,
              "description": "Keep track of original URI-s that resolved to the current URI. This negatively impacts performance and size of DB.",
              "title": "Process Aliases?",
              "type": "boolean"
            },
            "inlinks": {
              "default": false,
              "description": "Keep track of incoming links. This negatively impacts performance and size of DB.",
              "title": "Process Inlinks?",
              "type": "boolean"
            },
            "inv_aliases": {
              "default": false,
              "description": "Keep track of target URI-s that the current URI resolves to. This negatively impacts performance and size of DB.",
              "title": "Process Inverted Aliases?",
              "type": "boolean"
            },
            "type": {
              "default": "com.lucidworks.connectors.db.impl.MapDbConnectorDb",
              "description": "Fully qualified class name of ConnectorDb implementation.",
              "minLength": 1,
              "title": "Implementation Class Name",
              "type": "string"
            }
          },
          "required": ["type"],
          "title": "Connector DB",
          "type": "object"
        },
        "dedupe": {
          "default": false,
          "description": "If true, documents will be deduplicated. Deduplication can be done based on an analysis of the content, on the content of a specific field, or by a JavaScript function. If neither a field nor a script are defined, content analysis will be used.",
          "hints": ["advanced"],
          "title": "Dedupe documents",
          "type": "boolean"
        },
        "dedupeField": {
          "description": "Field to be used for dedupe. Define either a field or a dedupe script, otherwise the full raw content of each document will be used.",
          "hints": ["advanced"],
          "title": "Dedupe field",
          "type": "string"
        },
        "dedupeSaveSignature": {
          "default": false,
          "description": "If true,the signature used for dedupe will be stored in a 'dedupeSignature_s' field. Note this may cause errors about 'immense terms' in that field.",
          "hints": ["advanced"],
          "title": "Save dedupe signature",
          "type": "boolean"
        },
        "dedupeScript": {
          "description": "Custom javascript to dedupe documents. The script must define a 'genSignature(content){}' function, but can use any combination of document fields. The function must return a string.",
          "hints": ["advanced", "code", "javascript"],
          "title": "Dedupe script",
          "type": "string"
        },
        "delete": {
          "default": true,
          "description": "Set to true to remove documents from the index when they can no longer be accessed as unique documents.",
          "title": "Delete dead URIs",
          "type": "boolean"
        },
        "deleteErrorsAfter": {
          "default": -1,
          "description": "Number of fetch failures to tolerate before removing a document from the index. The default of -1 means no fetch failures will be removed.",
          "title": "Fetch failure allowance",
          "type": "integer"
        },
        "depth": {
          "default": -1,
          "description": "Number of levels in a directory or site tree to descend for documents.",
          "title": "Max crawl depth",
          "type": "integer"
        },
        "diagnosticMode": {
          "default": false,
          "description": "Enable to print more detailed information to the logs about each request.",
          "hints": ["advanced"],
          "title": "Diagnostic mode",
          "type": "boolean"
        },
        "emitThreads": {
          "default": 5,
          "description": "The number of threads used to send documents from the connector to the index pipeline. The default is 5.",
          "title": "Emit threads",
          "type": "integer"
        },
        "enable_security_trimming": {
          "properties": {},
          "title": "Enable Security Trimming",
          "type": "object"
        },
        "excludeExtensions": {
          "description": "File extensions that should not to be fetched. This will limit this datasource to all extensions except this list.",
          "items": {
            "type": "string"
          },
          "title": "Excluded file extensions",
          "type": "array"
        },
        "excludeRegexes": {
          "default": [".*IMAP\\s+Attachments.*", ".*IMAP\\s+Home.*", ".*Data\\s+Dictionary.*"],
          "description": "Regular expressions for URI patterns to exclude. This will limit this datasource to only URIs that do not match the regular expression.",
          "items": {
            "type": "string"
          },
          "title": "Exclusive regexes",
          "type": "array"
        },
        "f.cmis_password": {
          "hints": ["secret"],
          "title": "Password",
          "type": "string"
        },
        "f.cmis_repo_url": {
          "description": "The AtomPub connection URL, e.g., 'http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.1/atom'.",
          "title": "CMIS Connection URL",
          "type": "string"
        },
        "f.cmis_session_cache_size": {
          "default": 5,
          "description": "The maximum number of session connections to the repository to cache. Default is 5.",
          "hints": ["advanced"],
          "title": "Session Cache Size",
          "type": "integer"
        },
        "f.cmis_username": {
          "title": "Username",
          "type": "string"
        },
        "f.maxSizeBytes": {
          "default": 4194304,
          "description": "The maximum size, in bytes, of a document to crawl.",
          "title": "Max file size (bytes)",
          "type": "integer"
        },
        "failFastOnStartLinkFailure": {
          "default": true,
          "description": "If true, when Fusion cannot connect to any of the provided start links, the crawl is stopped and an exception logged.",
          "hints": ["advanced"],
          "title": "Fail crawl if start links are invalid",
          "type": "boolean"
        },
        "fetchDelayMS": {
          "default": 0,
          "description": "Number of milliseconds to wait between fetch requests. The default is 0. This property can be used to throttle a crawl if necessary.",
          "hints": ["advanced"],
          "title": "Fetch delay",
          "type": "integer"
        },
        "fetchDelayMSPerHost": {
          "default": false,
          "description": "If true, the 'Fetch delay (ms)' property will be applied for each host.",
          "hints": ["advanced"],
          "title": "Fetch delay per host",
          "type": "boolean"
        },
        "fetchThreads": {
          "default": 5,
          "description": "The number of threads to use during fetching. The default is 5.",
          "title": "Fetch threads",
          "type": "integer"
        },
        "forceRefresh": {
          "default": false,
          "description": "Set to true to recrawl all items even if they have not changed since the last crawl.",
          "hints": ["advanced"],
          "title": "Force recrawl",
          "type": "boolean"
        },
        "includeExtensions": {
          "description": "File extensions to be fetched. This will limit this datasource to only these file extensions.",
          "items": {
            "type": "string"
          },
          "title": "Included file extensions",
          "type": "array"
        },
        "includeRegexes": {
          "description": "Regular expressions for URI patterns to include. This will limit this datasource to only URIs that match the regular expression.",
          "items": {
            "type": "string"
          },
          "title": "Inclusive regexes",
          "type": "array"
        },
        "indexCrawlDBToSolr": {
          "default": false,
          "description": "EXPERIMENTAL: Set to true to index the crawl-database into a 'crawldb_<datasource-ID>' collection in Solr.",
          "hints": ["advanced"],
          "title": "Index crawl database to Solr",
          "type": "boolean"
        },
        "initial_mapping": {
          "category": "Field Transformation",
          "categoryPriority": 6,
          "description": "Provides mapping of fields before documents are sent to an index pipeline.",
          "hints": ["advanced"],
          "properties": {
            "condition": {
              "description": "Define a conditional script that must result in true or false. This can be used to determine if the stage should process or not.",
              "hints": ["code", "javascript", "advanced"],
              "title": "Condition",
              "type": "string"
            },
            "label": {
              "description": "A unique label for this stage.",
              "hints": ["advanced"],
              "maxLength": 255,
              "title": "Label",
              "type": "string"
            },
            "mappings": {
              "default": [{
                "operation": "move",
                "source": "charSet",
                "target": "charSet_s"
              }, {
                "operation": "move",
                "source": "fetchedDate",
                "target": "fetchedDate_dt"
              }, {
                "operation": "move",
                "source": "lastModified",
                "target": "lastModified_dt"
              }, {
                "operation": "move",
                "source": "signature",
                "target": "dedupeSignature_s"
              }, {
                "operation": "move",
                "source": "contentSignature",
                "target": "signature_s"
              }, {
                "operation": "move",
                "source": "length",
                "target": "length_l"
              }, {
                "operation": "move",
                "source": "mimeType",
                "target": "mimeType_s"
              }, {
                "operation": "move",
                "source": "parent",
                "target": "parent_s"
              }, {
                "operation": "move",
                "source": "owner",
                "target": "owner_s"
              }, {
                "operation": "move",
                "source": "group",
                "target": "group_s"
              }],
              "description": "List of mapping rules",
              "hints": ["advanced"],
              "items": {
                "properties": {
                  "operation": {
                    "default": "copy",
                    "description": "The type of mapping to perform: move, copy, delete, add, set, or keep.",
                    "enum": ["copy", "move", "delete", "set", "add", "keep"],
                    "hints": ["advanced"],
                    "title": "Operation",
                    "type": "string"
                  },
                  "source": {
                    "description": "The name of the field to be mapped.",
                    "hints": ["advanced"],
                    "title": "Source Field",
                    "type": "string"
                  },
                  "target": {
                    "description": "The name of the field to be mapped to.",
                    "hints": ["advanced"],
                    "title": "Target Field",
                    "type": "string"
                  }
                },
                "required": ["source"],
                "type": "object"
              },
              "title": "Field Mappings",
              "type": "array"
            },
            "reservedFieldsMappingAllowed": {
              "default": false,
              "hints": ["advanced"],
              "title": "Allow System Fields Mapping?",
              "type": "boolean"
            },
            "skip": {
              "default": false,
              "description": "Set to true to skip this stage.",
              "hints": ["advanced"],
              "title": "Skip This Stage",
              "type": "boolean"
            },
            "unmapped": {
              "description": "If fields do not match any of the field mapping rules, these rules will apply.",
              "hints": ["advanced"],
              "properties": {
                "operation": {
                  "default": "copy",
                  "description": "The type of mapping to perform: move, copy, delete, add, set, or keep.",
                  "enum": ["copy", "move", "delete", "set", "add", "keep"],
                  "hints": ["advanced"],
                  "title": "Operation",
                  "type": "string"
                },
                "source": {
                  "description": "The name of the field to be mapped.",
                  "hints": ["advanced"],
                  "title": "Source Field",
                  "type": "string"
                },
                "target": {
                  "description": "The name of the field to be mapped to.",
                  "hints": ["advanced"],
                  "title": "Target Field",
                  "type": "string"
                }
              },
              "required": ["source"],
              "title": "Unmapped Fields",
              "type": "object"
            }
          },
          "title": "Initial field mapping",
          "type": "object"
        },
        "maxItems": {
          "default": -1,
          "description": "Maximum number of documents to fetch. The default (-1) means no limit.",
          "title": "Max items",
          "type": "integer"
        },
        "parserRetryCount": {
          "default": 0,
          "description": "The maximum number of times the configured parser will try getting content before giving up",
          "exclusiveMaximum": true,
          "exclusiveMinimum": false,
          "maximum": 5,
          "minimum": 0,
          "title": "Max Parser Retries",
          "type": "integer"
        },
        "reevaluateCrawlDbOnStart": {
          "default": false,
          "description": "Reevaluate existing crawldb entries for legality on startup?",
          "hints": ["advanced"],
          "title": "Reevaluate crawldb on start?",
          "type": "boolean"
        },
        "refreshAll": {
          "default": true,
          "description": "Set to true to always recrawl all items found in the crawldb.",
          "hints": ["advanced"],
          "title": "Recrawl all items",
          "type": "boolean"
        },
        "refreshErrors": {
          "default": false,
          "description": "Set to true to recrawl items that failed during the last crawl.",
          "hints": ["advanced"],
          "title": "Recrawl errors",
          "type": "boolean"
        },
        "refreshIDPrefixes": {
          "description": "A prefix to recrawl all items whose IDs begin with this value.",
          "hints": ["advanced"],
          "items": {
            "type": "string"
          },
          "title": "Recrawl ID prefixes",
          "type": "array"
        },
        "refreshIDRegexes": {
          "description": "A regular expression to recrawl all items whose IDs match this pattern.",
          "hints": ["advanced"],
          "items": {
            "type": "string"
          },
          "title": "Recrawl ID regexes",
          "type": "array"
        },
        "refreshOlderThan": {
          "default": -1,
          "description": "Number of seconds to recrawl items whose last fetched date is longer ago than this value.",
          "hints": ["advanced"],
          "title": "Recrawl age",
          "type": "integer"
        },
        "refreshScript": {
          "description": "A JavaScript function ('shouldRefresh()') to customize the items recrawled. ",
          "hints": ["advanced", "code", "javascript"],
          "title": "Recrawl script",
          "type": "string"
        },
        "refreshStartLinks": {
          "default": false,
          "description": "Set to true to recrawl items specified in the list of start links.",
          "hints": ["advanced"],
          "title": "Recrawl start links",
          "type": "boolean"
        },
        "restrictToTree": {
          "default": true,
          "description": "If true, only documents found in a tree below the start links will be fetched.",
          "title": "Restrict to sub-directories and child pages",
          "type": "boolean"
        },
        "restrictToTreeAllowSubdomains": {
          "default": false,
          "description": "If true, any sub-domain will be allowed, even if the crawl is restricted to the tree of items found below the start links.",
          "title": "Allow sub-domains in restrictToTree",
          "type": "boolean"
        },
        "restrictToTreeIgnoredHostPrefixes": {
          "description": "List of host prefixes to ignore when checking links for restrictToTree link-legality checks. For example, 'www.' can be ignored so links with the same domain are allowed.",
          "items": {
            "type": "string"
          },
          "title": "Ignored host prefixes",
          "type": "array"
        },
        "restrictToTreeUseHostAndPath": {
          "default": false,
          "description": "If true, the path in start links will be used to restrict items fetched. For example, if the start link is 'http://host.com/US', this option will limit all followed URLs to this path.",
          "title": "Use paths in restrictToTree",
          "type": "boolean"
        },
        "retainOutlinks": {
          "default": false,
          "description": "Set to true for links found during fetching to be stored in the crawldb. This increases precision in certain recrawl scenarios, but requires more memory and disk space.",
          "hints": ["advanced"],
          "title": "Retain links in the crawldb",
          "type": "boolean"
        },
        "retryEmit": {
          "default": true,
          "description": "Set to true for emit batch failures to be retried on a document-by-document basis.",
          "hints": ["advanced"],
          "title": "Retry emits",
          "type": "boolean"
        },
        "rewriteLinkScript": {
          "description": "A Javascript function 'rewriteLink(link) { }' to modify links to documents before they are fetched.",
          "hints": ["advanced", "code", "javascript"],
          "title": "URI rewrite script",
          "type": "string"
        },
        "startLinks": {
          "default": ["|"],
          "description": "One or more starting URIs for this datasource.",
          "hints": ["hidden"],
          "items": {
            "type": "string"
          },
          "title": "Start Links",
          "type": "array"
        },
        "trackEmbeddedIDs": {
          "default": true,
          "description": "Track IDs produced by splitters to enable dedupe and deletion of embedded content?",
          "hints": ["advanced"],
          "title": "Track embedded IDs?",
          "type": "boolean"
        }
      },
      "propertyGroups": [{
        "label": "Security Trimming",
        "properties": ["enable_security_trimming"]
      }, {
        "label": "Link Discovery",
        "properties": ["restrictToTree", "restrictToTreeAllowSubdomains", "restrictToTreeUseHostAndPath", "restrictToTreeIgnoredHostPrefixes"]
      }, {
        "label": "Limit Documents",
        "properties": ["f.maxSizeBytes", "depth", "maxItems", "includeExtensions", "includeRegexes", "excludeExtensions", "excludeRegexes", "delete", "deleteErrorsAfter"]
      }, {
        "label": "Crawl Performance",
        "properties": ["f.cmis_session_cache_size", "chunkSize", "fetchThreads", "fetchDelayMS", "fetchDelayMSPerHost", "emitThreads", "failFastOnStartLinkFailure", "retryEmit", "parserRetryCount"]
      }, {
        "label": "Dedupe",
        "properties": ["dedupe", "dedupeSaveSignature", "dedupeField", "dedupeScript"]
      }, {
        "label": "Recrawl Rules",
        "properties": ["refreshAll", "refreshStartLinks", "refreshErrors", "refreshOlderThan", "refreshIDPrefixes", "refreshIDRegexes", "refreshScript", "forceRefresh"]
      }, {
        "label": "Crawl History",
        "properties": ["retainOutlinks", "aliasExpiration", "crawlDBType", "indexCrawlDBToSolr", "reevaluateCrawlDbOnStart"]
      }, {
        "label": "Field Mapping",
        "properties": ["initial_mapping"]
      }],
      "title": "Properties",
      "type": "object"
    },
    "type": {
      "description": "Datasource type supported by the selected connector type.",
      "hints": ["hidden"],
      "minLength": 1,
      "title": "Datasource Type",
      "type": "string"
    },
    "type_description": {
      "default": "Connector for Alfresco using Content Management Interoperability Services (CMIS).",
      "hints": ["hidden", "readonly"],
      "title": "Type Description",
      "type": "string"
    }
  },
  "required": ["id", "connector", "type", "pipeline", "properties"],
  "title": "Alfresco",
  "type": "object"
};

export const SchemaParamFields = ({schema}) => {
  const sanitize = str => {
    if (typeof str !== "string") return str;
    return str.replace(/^"(.*)"$/s, "$1").replace(/\\/g, "").replace(/"/g, "'");
  };
  const formatDescription = str => {
    const s = sanitize(str);
    return (/[.!?]\)*$/).test(s) ? s : `${s}.`;
  };
  const {description, properties = {}, required: requiredProps = []} = schema;
  const visibleProps = useMemo(() => Object.entries(properties).filter(([, prop]) => !prop.hints?.includes("hidden")), [properties]);
  return <div>
      {description && <p>{formatDescription(description)}</p>}

      {visibleProps.map(([name, prop]) => {
    const isRequired = requiredProps.includes(name);
    const hasDefault = prop.default !== undefined;
    const rawDefault = prop.default;
    const isComplexDefault = hasDefault && (typeof rawDefault === "object" || typeof rawDefault === "string" && (rawDefault.length > 20 || rawDefault.includes('"')));
    const fieldProps = {
      key: name,
      body: prop.title || name,
      type: prop.type,
      ...prop.title && ({
        post: [<><span className="text-stone-400 dark:text-stone-500">API property: </span>{name}</>]
      }),
      ...isRequired && ({
        required: true
      }),
      ...!isComplexDefault && hasDefault ? {
        default: sanitize(String(rawDefault))
      } : {}
    };
    const isObject = prop.type === "object" && prop.properties;
    const isArrayOfObjects = prop.type === "array" && prop.items?.type === "object" && prop.items.properties;
    return <ParamField {...fieldProps}>
            {prop.description && <p>{formatDescription(prop.description)}</p>}

            {isComplexDefault && <div className="flex">
                <p>
                  <strong>Default:</strong>
                </p>
                <pre className="!my-0">
                  <code>
                    {JSON.stringify(rawDefault, null, 2)}
                  </code>
                </pre>
              </div>}

            {isArrayOfObjects && <div className="flex">
              <p>
                <strong>Object attributes:</strong>
              </p>
              <pre className="!my-0">
                <code>
                  {'{\n'}
                  {Object.entries(prop.items.properties).map(([iname, iprop]) => <>
                      {`  ${iname}`}
                      {prop.items?.required?.includes(iname) && <span style={{
      color: 'red'
    }}> required</span>}
                      {`: {\n    display name: ${sanitize(iprop.title || '')}\n    type: ${iprop.type}\n  }\n`}
                    </>)}
                  {'}'}
                </code>
              </pre>
              </div>}

            {isObject && <Expandable title="properties">
                <SchemaParamFields schema={{
      properties: prop.properties,
      required: prop.required
    }} />
              </Expandable>}
          </ParamField>;
  })}
    </div>;
};

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/fusion-connectors/connectors/v1/alfresco

[mintlify link]: https://doc.lucidworks.com/docs/fusion-connectors/connectors/v1/alfresco

[old doc.lw link]: https://doc.lucidworks.com/fusion-connectors/84

<Callout icon="plug" color="#A4C6F7" iconType="solid">
  **Compatible with Fusion version:** 4.1.0 through 5.12.0
</Callout>

The connector crawls folders, files, and metadata to fetch and index folder structure, binary content such as PDFs, DOCX, and images, and metadata such as title, creator, and modification date.

<Tip>
  **Important**

  V1 deprecation and removal notice

  All V1 connectors are deprecated in Fusion 5.18.0 and later. This means they are no longer being actively developed and will be removed in Fusion 6. V1 connectors were also previously deprecated in Fusion 5.12.0 but remained available in all versions between 5.12.0 and 5.18.0, including the Fusion 5.9.x long-term support release line, to support customers on those versions.

  The replacement for this connector is using the [Alfresco recipe](/docs/fusion-connectors/connectors/rest-v2/recipes/rest-alfresco) with the REST V2 connector.

  If you are using this connector, you must migrate to the replacement connector or a supported alternative before upgrading to Fusion 6. Migrate to the replacement connector as soon as possible to avoid any disruption to your workflows.
</Tip>

This connector was developed for the [Alfresco Community](https://sourceforge.net/projects/alfresco/files/Alfresco%205.0.d%20Community/) content repositories and was not tested on any other versions of Alfresco Community, Alfresco Content Services, or any other CMIS server.

<img src="https://mintcdn.com/lucidworks/Au994d8iJwF79HiU/assets/images/connectors/connector-api-flow-alfresco.png?fit=max&auto=format&n=Au994d8iJwF79HiU&q=85&s=5e491cdedf9bc68e6e506da7bf866eeb" alt="Connector flow" width="4157" height="1915" data-path="assets/images/connectors/connector-api-flow-alfresco.png" />

<LwTemplate />

## Prerequisites

Perform these prerequisites to ensure the connector can reliably access, crawl, and index your data.
Proper setup helps avoid configuration or permission errors, so use the following guidelines to keep your content available for discovery and search in Fusion.

The connector uses the Alfresco Search v1 API and Node API, so ensure the following endpoints are accessible:

* `/alfresco/api/-default-/public/search/versions/1/search`
* `/alfresco/api/-default-/public/alfresco/versions/1/nodes/{id}`
* `/alfresco/api/-default-/public/authentication/versions/1/tickets`

Create a dedicated Alfresco user account with the following:

* Read access to the desired folder paths.
* Permission to access content metadata and binary files.
* If using security trimming, allow access to `/groups` and `/people` endpoints to fetch user and group access metadata.

Before using the connector, confirm the user can access the Alfresco REST API:

```bash theme={"dark"}
curl -u USERNAME:PASSWORD "\https://alfresco.DOMAIN.com/alfresco/api/-default-/public/search/versions/1/search"
```

You should get a JSON response with search results or an empty result set.

## Authentication

Setting up the correct authentication according to your organization's data governance policies helps keep sensitive data secure while allowing authorized indexing.

If authentication is required to access your data, you will need the username and password of an Alfresco user with REST API and read access.

If using authentication, create or identify a service user in Alfresco with the following:

* Read access to the desired content paths.
* Permission to access metadata and download binary files.
* Access to `/people` and `/groups` endpoints if you're enabling security trimming.

## Learn more

<Accordion title="Troubleshoot an Alfresco Datasource">
  The Alfresco Connector is a crawler for the Alfresco server, which adheres to the
  [Content Management Interoperability Services](https://en.wikipedia.org/wiki/Content_Management_Interoperability_Services) (CMIS) standard.

  If you are having issues with your Alfresco datasource, try the troubleshooting steps below:

  ## Check the CMIS connection URL

  Use the following command to validate the CMIS connection URL is correct(replace the username, hostname and port):

  ```bash theme={"dark"}
  curl -v -u <username> "https://<hostname>:<port>/alfresco/api/-default-/public/cmis/versions/1.1/atom"
  ```

  The expected response should be a 200 HTTP status response and an XML file describing the CMIS 1.1 AtomPub Service Document. As a first step, the connector will retrieve and load the AtomPub service document and the information there will be useful for future requests.

  ## Validate URI templates

  The CMIS 1.1 AtomPub service document describes the format of the URLs. For example:

  ```xml wrap theme={"dark"}
  <cmisra:uritemplate>
      <cmisra:template>https://<hostname>:<port>/alfresco/api/-default-/public/cmis/versions/1.1/atom/id?
                      id={id}&amp;filter={filter}&amp;includeAllowableActions={includeAllowableActions}
                      &amp;includeACL={includeACL}&amp;includePolicyIds={includePolicyIds}
                      &amp;includeRelationships={includeRelationships}
                      &amp;renditionFilter={renditionFilter}
      </cmisra:template>
      <cmisra:type>objectbyid</cmisra:type>
      <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
  </cmisra:uritemplate>
  ```

  Those template URIs will be used to build the requests the connector will require to retrieve data from Alfresco server.

  To test if the URI templates are correct, run any of the URI templates on that document, replace the necessary parameters and IDs. For example, to retrieve the root folder using the path parameter: **path=/**

  ```bash theme={"dark"}
  curl -v -u admin "https://<hostname>:<port>/alfresco/api/-default-/public/cmis/versions/1.1/atom/path?path=/&amp;filter=&amp;includeAllowableActions=&amp;includeACL=&amp;includePolicyIds=&amp;includeRelationships=&amp;renditionFilter="
  ```

  The expected response should be a 200 HTTP status response and an XML file describing the root folder. It’s possible to use other URI template queries to validate they are correct.

  ## Check Alfresco opencmis properties

  If a request using the URI template returns a non OK HTTP status, probably the Alfresco opencmis properties are incorrect. To check that:

  * Go to the Alfresco admin console:

  ```bash theme={"dark"}
  http://<your-host-name>:<alfresco-port>/alfresco/service/enterprise/admin
  ```

  * Under the **Support Tools** section, go to the **JMX Settings**
  * Click the **Export** button, under the **Export System Settings** section.
  * That will download a file that is listing all the current Alfresco server properties.
  * Look for the property: **opencmis.server.value**. The URI templates will be built using the URL set in that property.
  * If the URL set in that property is incorrect change it.
  * It would be necessary to change other properties too:

  ```properties theme={"dark"}
  opencmis.context.override=true
  opencmis.context.value=
  opencmis.servletpath.override=true
  opencmis.servletpath.value=
  opencmis.server.override=true
  opencmis.server.value=https://<hostname>:<port>/alfresco/api
  ```

  * Change those properties in the **alfresco-global.properties** file.

  It’s important to configure that value with a correct URL, otherwise the requests will fail and documents can not be indexed.

  Configurations taken from a [related question](https://connect.hyland.com/t5/alfresco-forum/regarding-cmis-1-1-atompub-service-document/m-p/45143) in the Alfresco forum.
</Accordion>

## Configuration

<Tip>
  When entering configuration values in the UI, use *unescaped* characters, such as `\t` for the tab character. When entering configuration values in the API, use *escaped* characters, such as `\\t` for the tab character.
</Tip>

### Security Trimming

The Alfresco V1 connector has a security trimming feature. You can activate security trimming using the **ENABLE SECURITY TRIMMING** checkbox in the UI.

<SchemaParamFields schema={schema} />
