Creating a Push Source

A Push source requires you to use the Push API to manage its content, whereas a non-Push source manages its content with Coveo crawlers.

If you want to index content from enterprise systems for which no specific or generic connector is appropriate in the Coveo Cloud platform Coveo Cloud platform (see Available Coveo Cloud V2 Connectors), you need to create a Push source.

Prerequisites:

Use the Create a source from simple configuration operation to create a Push source in a Coveo Cloud organization.

Request template

POST https://platform.cloud.coveo.com/rest/organizations/<MyOrganizationId>/sources HTTP/1.1
 
Content-Type: application/json
Accept: application/json
Authorization: Bearer <MyAccessToken>

Payload

{
  "sourceType": "PUSH",
  "name": <MyPushSourceName>,
  "sourceVisibility": <"PRIVATE"|"SECURED"|"SHARED">,
  "pushEnabled": true
}

In the request path:

In the Authorization HTTP header:

In the request body:

  • Replace <MyPushSourceName> with a meaningful name string.

    You cannot change the name of a source once it has been created, so make sure you choose one that fits the intended content of that source.

  • Replace <"PRIVATE"|"SECURED"|"SHARED"> with one of the valid sourceVisibility strings.

    • The sourceVisibility you choose should correspond to the specific needs of your Push source (see Content Security). Out of the box behavior is summarized by the following table:

      sourceVisibility Items can be accessed by Permission level
      PRIVATE Source owner only Source
      SECURED Allowed users only Item
      SHARED Any user Source
    • You can set source-level permissions for PRIVATE and SHARED sources by modifying their JSON configuration (see Source JSON Modification Examples).

The body of a successful response contains information about the source you just created. The id property value is important, as it is a required parameter in many Coveo Cloud platform REST API operations. You can always retrieve this ID later (see Retrieving the ID of a Source).

Immediately after you create a secured Push source, you should create a security identity provider for it (see Creating a Security Identity Provider for a Secured Push Source). A security identity provider allows you to push expandable identity definitions in order to faithfully replicate the security model of the system you are planning to index with your source.

Sample Request

Creating a secured Push source

POST https://platform.cloud.coveo.com/rest/organizations/mycoveocloudv2organizationg8tp8wu3/sources HTTP/1.1
 
Content-Type: application/json
Accept: application/json
Authorization: Bearer **********-****-****-****-************

Payload

{
  "sourceType": "PUSH",
  "name": "My Secured Push Source",
  "sourceVisibility": "SECURED",
  "pushEnabled": true
}

Successful response - 201 Created

 {
  "sourceType": "PUSH",
  "id": "mycoveocloudv2organizationg8tp8wu3-rp5rxzbdz753uhndklv2ztkfgy",
  "name": "My Secured Push Source",
  "owner": "asmith@example.com",
  "sourceVisibility": "SECURED",
  "information": {
    // ...Additional source information...
  },
  "pushEnabled": true,
  // ...Additional information...
}