Data collection API endpoints

With the Sitefinity Insight API, you can report data to Sitefinity Insight in an easy and straightforward way. You can work with two versions of the API:

  • Sitefinity Insight API v2
    We recommend working with the API v2 endpoints.
  • Sitefinity Insight API v1
    For backward compatibility purposes, the API v1 endpoints are still functional.

For more information, see Sitefinity Insight API versions.

Data collection with Sitefinity Insight API v2

POST /collect/v2/data-centers/{data-center-key}/datasources/{data-source-name}/interactions

Resource information

URL https://api.dec.sitefinity.com/collect/v2/data-centers/{data-center-key}/datasources/{data-source-name}/interactions
HTTP method POST
Description Send a single or a collection of interactions to a data center.
Authentication None.

Parameters

Name Location Required Data type Description
data-center-key URI path Yes Guid The API key of the data center you want to upload the sentences to.
data-source-name URI path Yes String The name of the data source, under which the metadata is reported. Data source name can be 32 characters max. For example, Website.

Request body

Name Required Data type Description
JSON root Yes Interaction or Interaction[]. For details, see Interaction API data type. The interaction or collection of interactions to report to the data center in the data-center-key parameter.

Responses

Name Returned data Description
200 OK Integer The number of successfully imported interactions.
400 Bad Request GeneralErrorResponse Usually returned when the provided data source name is longer than 32 characters.
403 Forbidden GeneralErrorResponse Returned when an invalid API key is provided in the data-center-key parameter. Another reason is when the provided key is valid but the authenticated user does not have access to the data center.

Sample request and response

The following sample request shows how to report just subject metadata, just a sentence, just object metadata, or just mapping, as well as all of them at the same time.

HTTP:

POST https://api.dec.sitefinity.com/collect/v2/data-centers/4we99689-3efa-94d6-8947-8f74819c807d/datasources/crm/interactions

Body JSON:

Sample response:

5

This is the number of interactions reported by the data source.

Data collection with Sitefinity Insight API v1

POST /collect/v1/data-centers/{data-center-key}/mappings

Resource information

URL https://api.dec.sitefinity.com/collect/v1/data-centers/{data-center-key}/mappings
HTTP method POST
Description Creates a single or a collection of mappings in a data center.
Authentication None

Parameters

Name Location Required Data type Description
data-center-key URI path Yes Guid The API key of the data center you want to upload mappings to.

Request body

Name Required Data type Description
JSON root Yes Mapping or Mapping[]. For details, see Mapping API data type. A single mapping or a collection of mappings to be uploaded to the data center.

Reponses

Name Returned data Description
200 OK Integer The number of processed mappings.
403 Forbidden GeneralErrorResponse Returned when an invalid API key is provided in the data-center-key parameter.  Another reason is when the provided key is valid but the authenticated user does not have access to the data center.

Sample request and response

HTTP:

POST https://api.dec.sitefinity.com/collect/v1/data-centers/4we99689-3efa-94d6-8947-8f74819c807d/mappings

Body JSON:

Sample response:

2

The number of mappings processed and uploaded to the data center. 

POST /collect/v1/mapping

Resource information

URL https://api.dec.sitefinity.com/collect/mappings
HTTP method POST
Description Creates a single mapping or a collection of mappings in a data center.
Authentication None

Parameters

Name Location Required Data type Description
x-dataintelligence-datacenterkey Header Yes Guid The API key of the data center you want to upload the mappings to.

Request body

Name Required Data type Description
JSON root Yes Mapping or Mappings[]. For details, see Mapping API data type. A single mapping or a collection of mappings to be uploaded to the data center.

Responses

Name Returned data Description
200 OK Integer The number of processed mappings.
403 Forbidden GeneralErrorResponse Returned when an invalid API key is provided in the x-dataintelligence-datacenterkey parameter.  Another reason is when the provided key is valid but the authenticated user does not have access to the data center.

Sample request and response

HTTP:

POST https://api.dec.sitefinity.com/collect/v1/mappings

Headers:

x-dataintelligence-datacenterkey: 4we99689-3efa-94d6-8947-8f74819c807d

Body JSON:

Sample response:

1

Number of mappings processed and uploaded to the data center.

POST /collect/v1/data-centers/{data-center-key}/metadata/subjects/datasource/{data-source-name}

Resource information

URL https://api.dec.sitefinity.com/collect/v1/data-centers/{data-center-key}/metadata/subjects/datasource/{data-source-name}
HTTP method POST
Description Posting a single or a collection of subject metadata to a data center.
Authentication None

Parameters

Name Location Required Data type Description
data-center-key URI path Yes Guid The API key of the data center you want to upload the subject metadata to.
data-source-name URI path Yes String The name of the data source, under which the metadata is reported. Data source name can be 32 characters max.

Request body

Name Required Data type Description
JSON root Yes SubjectMetadata or SubjectMetadata[]. For details, see Subject metadata API data type. The subject metadata to be uploaded to the data center.

Responses

Name Returned data Description
200 OK Integer The number of successfully imported interactions.
400 Bad Request GeneralErrorResponse Usually returned when the provided data source name is longer than 32 characters.
403 Forbidden GeneralErrorResponse Returned when an invalid API key is provided in the data-center-key parameter. Another reason is when the provided key is valid but the authenticated user does not have access to the data center.

Sample request and response

HTTP:

POST https://api.dec.sitefinity.com/collect/v1/data-centers/4we99689-3efa-94d6-8947-8f74819c807d/metadata/subjects/datasource/mobile

Body JSON:

Sample response:

1

Number of imported interactions.

POST /collect/v1/metadata/subjects

Resource information

URL https://api.dec.sitefinity.com/collect/v1/metadata/subjects
HTTP method POST
Description Posting a single or a collection of subject metadata to a data center.
Authentication None.

Parameters

Name Location Required Data type Description
x-dataintelligence-datacenterkey Header Yes Guid The API key of the data center you want to upload the subject metadata to.
x-dataintelligence-datasource Header Yes String The name of the data source, under which the metadata is reported. Data source name can be 32 characters max.

Request body

Name Required Data type Description
JSON root Yes SubjectMetadata or SubjectMetadata[]. For details, see Subject metadata API data type. The subject metadata to be uploaded to the data center.

Responses

Name Returned data Description
200 OK Integer The number of successfully imported sentences.
400 Bad Request GeneralErrorResponse Usually returned when the provided data source name is longer than 32 characters.
403 Forbidden GeneralErrorResponse Returned when an invalid API key is provided in the data-center-key parameter. Another reason is when the provided key is valid but the authenticated user does not have access to the data center.

Sample request and response

HTTP:

POST https://api.dec.sitefinity.com/collect/v1/data-centers/4we99689-3efa-94d6-8947-8f74819c807d/metadata/subjects/datasource/mobile

Headers:

  • x-dataintelligence-datacenterkey: 4we99689-3efa-94d6-8947-8f74819c807d
  • x-dataintelligence-datasource: mobile

Body JSON:

Sample response:

2

Number of imported sentences.

Was this article helpful?