You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The SharePoint 2019 Connector can be configured using the Rest API. It requires the following entities to be created:

  • Credentials
  • Connector
  • Connection
  • Seed

Below are the examples of how to create the Credentials, the Connection and the Seed. For the Connector, please refer to this page.


Create Credentials


FieldRequiredDefaultMultipleNotesExample
typeYes-NoThe value must be "sharepoint-2019"."sharepoint-2019"
descriptionYes-NoShort description or name for the credential."SP19_Prod_Credentials"
throttlePolicyNo-NoThrottle policy ID that will affect all seeds that use this credential.

"4f07e6c5-d2e9-48d8-a55d-094917508c0f"

properties.domainYes-NoDomain for the crawl account when using user/password credentials.

"localDomain"

properties.username Yes-NoUsername for the crawl account when using user/password credentials."aspire_crawl_account"
properties.passwordYes-NoPassword for the crawl account when using user/password credentials. This field can also be sent as an encrypted string. Check the encryption API for more information on how to encrypt.

"password"

Example

POST aspire/_api/credentials
{
    "type": "sharepoint-2019",
    "description": "SP19_Cred",
    "properties": {
        "username": "aspire_crawl_account",
        "password": "encrypted:F8EC95B8007E645EA15E2D5F717EB370DAA4274D73D767DA0AF0F3AB94B8430C81AF774D2A272833C3AA77C4776B75B6" 
     }
}

Update Credentials


FieldRequiredDefaultMultipleNotesExample
idYes-NoID of the credential to update"d42e1872-02c8-4a90-a714-44f15577389a"
typeYes-NoThe value must be "sharepoint-2019"."sharepoint-2019"
descriptionNo-NoShort description or name for the credential."SP19_Prod_Credentials"
throttlePolicyNo-NoThrottle policy ID that will affect all seeds that use this credential.

"4f07e6c5-d2e9-48d8-a55d-094917508c0f"

properties.domainNo-NoDomain for the crawl account when using user/password credentials."localDomain"
properties.usernameNo-NoUsername for the crawl account when using user/password credentials."aspire_crawl_account"
properties.passwordNo-NoPassword for the crawl account when using user/password credentials. This field can also be sent as an encrypted string. Check the encryption API for more information on how to encrypt."password"


Example

PUT /aspire/_api/credentials/d42e1872-02c8-4a90-a714-44f15577389a
{
    "id": "d42e1872-02c8-4a90-a714-44f15577389a",
    "type": "sharepoint-2019",
    "description": "SP19_Cred_new",
    "throttlePolicy": "4f07e6c5-d2e9-48d8-a55d-094917508c0f",
    "properties": {
        "username": "aspire_crawl_account",
        "password": "encrypted:F8EC95B8007E645EA15E2D5F717EB370DAA4274D73D767DA0AF0F3AB94B8430C81AF774D2A272833C3AA77C4776B75B6"
    }
}

Create Connector


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

Update Connector


For the update of the Connector object using the Rest API, refer to this page.

Create Connection


Example

POST /aspire/_api/connections
{
    "type": "sharepoint-2019",
    "description": "SP19_Connection",
    "credential": "d42e1872-02c8-4a90-a714-44f15577389a",
    "throttlePolicy": "4f07e6c5-d2e9-48d8-a55d-094917508c0f",
    "routingPolicies": ["5c7274ef-429b-46ef-8f73-f010e479a467", "9dee4fba-14f2-4afc-a74d-297bcbbd359a"],
    "properties": {
        "serverUrl": "https://contoso.sharepoint.com",
        "indexContainers": false,
        "scanRecursively": true,
        "useSnapshots": false,
        "stopCrawlOnScannerError": true,
        "filterNoCrawl": false,
        "crawlAttachments": true,
        "scanExcludedItems": false,
        "downloadLargeFiles": true,
        "dataSizeThreshold": "100mb",
        "includes": [
            ".*\\.pdf",
            ".*\\.pptx"
        ],
        "excludes": ".*\\.xml",
        "groupPrefixSeparator": "|",
        "lowercaseGE": false,
        "userGroupPageSize": 1000,
        "useAzureGroups": true,
        "azureADSeed": "f5587cee-9116-4011-b3a9-6b235b333a1b",
        "useProxy": true,
        "proxyHost": "proxy.com",
        "proxyPort": 8080,
        "useProxyAuthentication": true,
        "proxyDomain": "DIR",
        "proxyUser": "proxy_user",
        "proxyPassword": "thePassword",
        "requestProperty": [
            {
                "name": "user-agent",
                "value": "agent"
            }
        ],
        "retryCount": 2,
        "retrySleep": "500ms",
        "socketTimeout": "60s",
        "connectTimeout": "60s",
        "connectionRequestTimeout": "60s",
        "idleConnectionTimeout": "5m",
        "maxConnections": 100,
        "maxConnectionsPerRoute": 10
    }
}

Update Connection

Example

PUT /aspire/_api/connections/89d6632a-a296-426c-adb0-d442adcab4b0
{
	"id": "89d6632a-a296-426c-adb0-d442adcab4b0",
    "type": "sharepoint-2019",
    "description": "SP19_Connection",
    "credential": "d42e1872-02c8-4a90-a714-44f15577389a",
    "throttlePolicy": "4f07e6c5-d2e9-48d8-a55d-094917508c0f",
    "routingPolicies": ["5c7274ef-429b-46ef-8f73-f010e479a467", "9dee4fba-14f2-4afc-a74d-297bcbbd359a"],
    "properties": {
        "serverUrl": "https://contoso.sharepoint.com",
        "indexContainers": false,
        "scanRecursively": true,
        "useSnapshots": false,
        "stopCrawlOnScannerError": true,
        "filterNoCrawl": false,
        "crawlAttachments": true,
        "scanExcludedItems": false,
        "downloadLargeFiles": true,
        "dataSizeThreshold": "100mb",
        "includes": [
            ".*\\.pdf",
            ".*\\.pptx"
        ],
        "excludes": ".*\\.xml",
        "groupPrefixSeparator": "|",
        "lowercaseGE": false,
        "userGroupPageSize": 1000,
        "useAzureGroups": true,
        "azureADSeed": "f5587cee-9116-4011-b3a9-6b235b333a1b",
        "useProxy": true,
        "proxyHost": "proxy.com",
        "proxyPort": 8080,
        "useProxyAuthentication": true,
        "proxyDomain": "DIR",
        "proxyUser": "proxy_user",
        "proxyPassword": "thePassword",
        "requestProperty": [
            {
                "name": "user-agent",
                "value": "agent"
            }
        ],
        "retryCount": 2,
        "retrySleep": "500ms",
        "socketTimeout": "60s",
        "connectTimeout": "60s",
        "connectionRequestTimeout": "60s",
        "idleConnectionTimeout": "5m",
        "maxConnections": 100,
        "maxConnectionsPerRoute": 10
    }
}

Create Seed

Example

POST /aspire/_api/seeds
 {
            "seed": "/sites/DemoSite",
            "type": "sharepoint-2019",
            "description": "sp_seed_api_test",
            "connector": "a3e9e1aa-a0dd-4d12-ae2c-9085e6832f80",
            "connection": "883f7dbe-d965-46ae-92d4-518757788b17",
            "workflows": [],
            "tags": [],
            "properties": {
                "seed": "/sites/DemoSite"
            }
}

Update Seed

Example

PUT /aspire/_api/seeds/dc2a920a-33fd-4c4f-be17-cc53c5238cbe
 {
            "id": "dc2a920a-33fd-4c4f-be17-cc53c5238cbe",
            "seed": "/sites/DemoSite",
            "type": "sharepoint-2019",
            "description": "sp_seed_api_test_updated",
            "connector": "a3e9e1aa-a0dd-4d12-ae2c-9085e6832f80",
            "connection": "883f7dbe-d965-46ae-92d4-518757788b17",
            "workflows": [],
            "tags": [],
            "properties": {
                "seed": "/sites/DemoSite"
            }
}
  • No labels