Machine Learning API (v1)

Machine Learning Models

Delete a model Deprecated

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"EDIT","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
engineId
required
string

The id of the engine

modelName
required
string

The model name

organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Responses

Create a new model

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"CREATE","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Request Body schema: application/json
required
engineId
required
object (EngineId)

The id of the engine

exportPeriod
required
string

The period to export data from. Unless an exportOffset is specified, the exportPeriod uses the moment when the model was generated as a base. Must be in the ISO8601 period format (i.e., PyYmMwWdDThHmMsS)

intervalTime
required
integer <int32>

The number of intervalUnit between each run of the job, should be greater than or equal to 1

intervalUnit
required
string
Enum: "DAY" "WEEK" "MONTH"

The duration unit of the interval between each run of the job. See intervalTime

Array of objects (IdAndDisplayNameModel) unique
commandLineParameters
Array of strings
Deprecated
commonFilter
string

The filter to apply to the common event dimensions (shared by all event types) in the export. Multiple filter parameters are joined with the AND operator

customEventFilter
string

The filter to apply to the custom event dimensions in the export. Multiple filter parameters are joined with the AND operator

exportOffset
string

The offset period to apply to the export. An undefined exportOffset means that the exportPeriod is based on the moment when the model was generated. An exportOffset of P1W means that the exportPeriod is based on the moment one week before the model was generated. If specified, must be in the ISO8601 period format (i.e., PyYmMwWdDThHmMsS)

extraConfig
object

A JSON object representing the additional configuration to pass to a model configuration

Array of objects (IdAndDisplayNameModel) unique
modelDisplayName
string

The model display name in the Coveo Cloud V2 administration console

modelName
object (ModelName)

The model name

searchEventFilter
string

The filter to apply to the click and search event dimensions in the export. Multiple filter parameters are joined with the AND operator

versionMatcher
object (VersionExpression)

Deprecated. This parameter is exposed for backward compatibility reasons.

viewEventFilter
string

The filter to apply to the view event dimensions (shared by all event types) in the export. Multiple filter parameters are joined with the AND operator

Responses

Request samples

Content type
application/json
{
  • "apiKeysThatCanEdit": [
    ],
  • "commandLineParameters": [
    ],
  • "commonFilter": "country=='United States'",
  • "customEventFilter": "(customEventValue=='submitButton') AND (customEventType=='caseCreation')",
  • "engineId": "topclicks",
  • "exportOffset": "P1W",
  • "exportPeriod": "P1D",
  • "extraConfig": {
    },
  • "groupsThatCanEdit": [
    ],
  • "intervalTime": 1,
  • "intervalUnit": "WEEK",
  • "modelDisplayName": "MyModelDisplayName",
  • "modelName": "MyModelName",
  • "searchEventFilter": "(originLevel1=~'search' OR originLevel1=~'listings')",
  • "versionMatcher": "Deprecated. This parameter is exposed for backward compatibility reasons.",
  • "viewEventFilter": "viewContentType=@'product'"
}

List all models

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"VIEW","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
organizationId
required
string

The unique identifier of the target Coveo Cloud organization

query Parameters
engines
Array of strings

A list of engine ids

Responses

Get detailed information about all models

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"VIEW","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Responses

Delete a model

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"EDIT","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
modelId
required
string

The unique identifier of the target model

organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Responses

View a model

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"VIEW","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
modelId
required
string

The unique identifier of the target model

organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Responses

Update the configuration of a model

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"EDIT","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
modelId
required
string

The unique identifier of the target model

organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Request Body schema: application/json
required
engineId
required
object (EngineId)

The id of the engine

exportPeriod
required
string

The period to export data from. Unless an exportOffset is specified, the exportPeriod uses the moment when the model was generated as a base. Must be in the ISO8601 period format (i.e., PyYmMwWdDThHmMsS)

intervalTime
required
integer <int32>

The number of intervalUnit between each run of the job, should be greater than or equal to 1

intervalUnit
required
string
Enum: "DAY" "WEEK" "MONTH"

The duration unit of the interval between each run of the job. See intervalTime

Array of objects (IdAndDisplayNameModel) unique
commandLineParameters
Array of strings
Deprecated
commonFilter
string

The filter to apply to the common event dimensions (shared by all event types) in the export. Multiple filter parameters are joined with the AND operator

customEventFilter
string

The filter to apply to the custom event dimensions in the export. Multiple filter parameters are joined with the AND operator

exportOffset
string

The offset period to apply to the export. An undefined exportOffset means that the exportPeriod is based on the moment when the model was generated. An exportOffset of P1W means that the exportPeriod is based on the moment one week before the model was generated. If specified, must be in the ISO8601 period format (i.e., PyYmMwWdDThHmMsS)

extraConfig
object

A JSON object representing the additional configuration to pass to a model configuration

Array of objects (IdAndDisplayNameModel) unique
modelDisplayName
string

The model display name in the Coveo Cloud V2 administration console

modelName
object (ModelName)

The model name

searchEventFilter
string

The filter to apply to the click and search event dimensions in the export. Multiple filter parameters are joined with the AND operator

versionMatcher
object (VersionExpression)

Deprecated. This parameter is exposed for backward compatibility reasons.

viewEventFilter
string

The filter to apply to the view event dimensions (shared by all event types) in the export. Multiple filter parameters are joined with the AND operator

Responses

Request samples

Content type
application/json
{
  • "apiKeysThatCanEdit": [
    ],
  • "commandLineParameters": [
    ],
  • "commonFilter": "country=='United States'",
  • "customEventFilter": "(customEventValue=='submitButton') AND (customEventType=='caseCreation')",
  • "engineId": "topclicks",
  • "exportOffset": "P1W",
  • "exportPeriod": "P1D",
  • "extraConfig": {
    },
  • "groupsThatCanEdit": [
    ],
  • "intervalTime": 1,
  • "intervalUnit": "WEEK",
  • "modelDisplayName": "MyModelDisplayName",
  • "modelName": "MyModelName",
  • "searchEventFilter": "(originLevel1=~'search' OR originLevel1=~'listings')",
  • "versionMatcher": "Deprecated. This parameter is exposed for backward compatibility reasons.",
  • "viewEventFilter": "viewContentType=@'product'"
}

getModelDetailsById

Get detailed information about a specific model

Privilege required

{"owner":"COVEO_ML","targetDomain":"MODELS","type":"VIEW","targetId":"*"}
Authorizations:
oauth2
path Parameters
modelId
required
string

The unique identifier of the target model

organizationId
required
string

The unique identifier of the target Coveo Cloud organization

Responses

Advanced Model Configurations

List advanced registration configuration files for the model

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"VIEW","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
required
string
Example: My_Model_ID

The unique identifier of the target model

required
string

The unique identifier of the target Coveo Cloud organization

Responses

Delete configuration file for the model.

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"EDIT","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
configurationType
required
string
Enum: "STOPWORDS" "BLOCKLISTS" "ID_MAPPING" "DEFAULT_QUERIES"
Example: BLOCKLISTS

The type of advanced configuration file.

required
string
Example: My_Model_ID

The unique identifier of the target model

required
string

The unique identifier of the target Coveo Cloud organization

query Parameters
string
Example: languageCode=en

The language of the configuration file to retrieve. Only required when the specified modelConfigFileType is language-specific (e.g., STOPWORDS), and ignored otherwise. If specified, must be an ISO 639-1 code, or the string 'commons'

Responses

Download the specified configuration file for the model

Privilege required ``` {"owner":"COVEO_ML","targetDomain":"MODELS","type":"VIEW","targetId":"*"} ```
Authorizations:
oauth2
path Parameters
configurationType
required
string
Enum: "STOPWORDS" "BLOCKLISTS" "ID_MAPPING" "DEFAULT_QUERIES"
Example: BLOCKLISTS

The type of advanced configuration file.

required
string
Example: My_Model_ID

The unique identifier of the target model

required
string

The unique identifier of the target Coveo Cloud organization

query Parameters
string
Example: languageCode=en

The language of the configuration file to retrieve. It must be an ISO 639-1 code, or the string 'commons'

Responses

upload

Upload configuration file for the model. Maximum file size allowed: 10 MB.

Privilege required

{"owner":"COVEO_ML","targetDomain":"MODELS","type":"EDIT","targetId":"*"}
Authorizations:
oauth2
path Parameters
configurationType
required
string
Enum: "STOPWORDS" "BLOCKLISTS" "ID_MAPPING" "DEFAULT_QUERIES"
Example: BLOCKLISTS

The type of advanced configuration file.

required
string
Example: My_Model_ID

The unique identifier of the target model

required
string

The unique identifier of the target Coveo Cloud organization

query Parameters
string
Example: languageCode=en

The language of the configuration file to retrieve. It must be an ISO 639-1 code, or the string 'commons'

Request Body schema: multipart/form-data
configFile
required
string <binary>

The configuration file to be uploaded.

Responses

Streaming Model Response

Get model response events for a query stream

Authorizations:
oauth2
path Parameters
required
string

The unique identifier of the target Coveo Cloud organization

streamId
required
string

Unique Identifier for the response stream.

Responses