openapi: 3.0.3
info:
title: BlueConic REST API v2 Audit Events Models API
description: "Welcome to the [BlueConic](https://www.blueconic.com) REST API v2. Our recently updated APIs offer access to a wealth of resources to interact with BlueConic visitor profiles, segments, interactions, and audit events via OpenAPI and OAuth 2.0 authorization flows making the interconnection between various services more secure, intuitive, and reliable than ever before.\n\nThis page describes how developers can use OAuth 2.0, the industry-standard protocol for authorization, to authorize apps in BlueConic and get started using the BlueConic REST API v2.\n\nLearn more about [how to use the BlueConic REST API v2](https://support.blueconic.com/hc/en-us/articles/200453891-Using-the-BlueConic-REST-API).\n\n# Authorizing an application to use the BlueConic REST API via OAuth 2.0\n\nIf you have an external software application that needs to communicate with BlueConic, you need to allow access to the BlueConic REST API. The authorization process in BlueConic for this access is built to OAuth 2.0 specifications. You can use either of two authorization flows: the authorization code flow and the client credentials flow. The most secure flow is the authorization code flow, intended for use with a user who can log in to BlueConic and authenticate the application to use the BlueConic API. The client credentials flow is easier to implement but lacks security features present in the authorization code flow. The client credentials flow is intended for machine-to-machine applications. \n\n## Using the Authorization code flow\n\nTo use the BlueConic REST API with OAuth 2.0 according to the authorization code flow you need to complete the following steps:\n\n1. Configure BlueConic so your external OAuth 2.0 application can authenticate and use the REST API. This means that you have to:\n - Have a BlueConic user with the \"Applications\" permission. This user can configure the details of the external application in BlueConic.\n - Have a BlueConic user with the \"Authorize Applications\" permission. This user can authorize the external application via the redirect page served by the authorization server.\n - Configure the external application on the BlueConic Access management > Applications tab, so BlueConic can store public client ID and the client secret. The external app uses these properties to perform the initial request for an authorization code.\n\n\n2. Develop an application that can execute OAuth 2.0 REST API requests. Specifically, that means an application that is able to:\n - Generate a code verifier and code challenge.\n - Store the public client ID and client secret as configured in BlueConic (see step 1). \n - Request an authorization code from the BlueConic authorization server. Include the code challenge in the request. \n - Show the user the redirect page served by the BlueConic authorization server, so the user can authenticate with credentials and consent to giving the application BlueConic REST API access.\n - Receive the authorization code from the BlueConic authorization server.\n - Use the authorization code to request an access token (and refresh token) from the BlueConic authorization server. Include the code verifier in the request. You must also provide the client ID and client secret for client authentication. You can do so by sending the client credentials in the body of your POST request.\n - Use the access token to perform REST API requests. \n - Revoke access if the user of the app so chooses (meaning that after this revocation, a new authorization grant is required to use the BlueConic REST API).\n - Handle refresh token rotation. This means that whenever a new access token is requested using the refresh token, a new refresh token is also supplied along with the new access token.\n - Handle all possible responses from the BlueConic REST API appropriately.\n\n[Read more about the Authorization Code Flow](https://support.blueconic.com/hc/en-us/articles/14912561861403)\n\n## Using the Client credentials flow\n\nTo make use of the BlueConic REST API with OAuth 2.0 following the client credentials flow, you need to complete the following steps:\n\n1. Configure BlueConic so your external OAuth 2.0 application can use the REST API. This means that you have to:\n - Have a user with the \"Applications\" permission. This user can configure the details of the external application in BlueConic.\n - Have a user with the \"Authorize Applications\" permission, who also has all permissions needed to use the REST API endpoint that you intend to use.\n - Configure the external application on the Access management > Applications tab, so BlueConic can generate and store the public client ID and client secret for client authentication. Also select at least one scope so the app has access to that part of the REST API.\n \n2. Develop an application that can execute OAuth 2.0 REST API requests. Specifically that means an application that is able to:\n - Store the public client ID and client secret as configured in BlueConic (see above).\n - Use the client ID and client secret to request an access token from the BlueConic authorization server. You can do so by sending the client credentials in the body of your POST request.\n - Use the access token to perform REST API requests.\n - Handle all possible responses from the BlueConic REST API appropriately.\n\n[Read more about the Client Credentials Flow](https://support.blueconic.com/hc/en-us/articles/14912655111963)\n\n# Using the try-out feature\nThe “Try” feature allows you to directly make REST calls to the API server, where you can make requests and see the responses, allowing you to experiment with the BlueConic API and understand how it works.\n\nYou can enter your BlueConic URL in the “API Servers” section. After that, you can try out the calls that don’t require authentication, such as “Get interactions”. You can enter the request parameters and click “Try”.\n\n## OAuth 2.0 authentication\n\nMost calls require OAuth 2.0 authentication, such as “Get audit events”. This can be seen at the right top and under the Request heading of each API method. To use the “Try” feature, you need to authenticate via OAuth 2.0. First create an Application in your BlueConic tenant (see above). When using the Authorization code flow, make sure to set the redirect URL to this tool as specified under the OAuth 2.0 authentication section. After you create the Application, authenticate this tool in the “Authentication” section. Enter the client ID and client secret in the correct OAuth 2.0 flow for which you created the application and press “GET TOKEN”. If the tool got a token successfully, you will see the text “API key applied” just under the “Authentication” heading. In calls that require Authentication, it will say “OAuth (OAuth 2.0) in header”. Now you can use the “Try” feature for calls that require OAuth 2.0. If you hover over the authentication scheme at the top right of an API method, you will see the required scopes (e.g. “Get audit events” has the scope read:audit-events). Make sure you set these scopes for the Application in BlueConic.\n\n# General functionality for all endpoints\n\n1. By using `prettyPrint`, the JSON data is formatted in a way that makes it easier to read and work with. This can be especially useful when working with large or complex JSON datasets. Add the following to the query string of a request to pretty print JSON: `&prettyPrint=true`.\n2. Gzip encoding is a method of compressing data and is commonly used to reduce the size of files sent over the Internet. BlueConic supports this so a client can set the request header `Accept-Encoding: gzip`. BlueConic will then compress the data in its response and send it back to the client with the `Content-Encoding: gzip` header. \n\n"
termsOfService: https://www.blueconic.com/blueconic-terms-and-conditions
contact:
name: Contact us
url: https://support.blueconic.com/hc/en-us/requests/new
license:
name: BlueConic
url: https://github.com/blueconic/openapi/blob/main/LICENSE.MD
version: '100.0'
servers:
- url: https://{blueconicHostname}/rest/v2
description: The BlueConic server
variables:
blueconicHostname:
description: BlueConic server hostname, e.g. 'tenant.blueconic.net'
default: tenantname
tags:
- name: Models
description: 'The following methods allow you to create, modify, retrieve, and delete machine learning Models in ONNX format. See [Models](https://support.blueconic.com/en/articles/307965-real-time-models). '
paths:
/models:
get:
tags:
- Models
summary: Get all models
description: Retrieves all models (without the model binaries).
operationId: getAllModels
parameters:
- name: count
in: query
description: Specifies the number of results to return.
schema:
type: integer
format: int64
default: 20
example: 10
- name: startIndex
in: query
description: Specifies the index of the first item to include in the result.
schema:
type: integer
format: int64
default: 0
example: 0
responses:
'200':
description: Returns the models.
content:
application/json:
schema:
$ref: '#/components/schemas/models'
examples:
Response body:
description: Response body
value: "{\n \"itemsPerPage\": 20,\n \"models\": [\n {\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"modelHash\": \"9a9887d8676976851423ac44de8a97d4\",\n \"modelUrl\": \"/rest/v2/models/2613c9d6-a179-4c79-b6d2-1618a53fbc64/model\",\n \"name\": \"mymodel\",\n \"parameters\": [\n {\n \"id\": \"parameterForModel\",\n \"relation\": \"sets\",\n \"type\": \"GENERAL\",\n \"values\": [\n \"parameter value 1\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n },\n {\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Dialogue model with onnx model set\",\n \"parameters\" : [],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [],\n \"type\" : \"DIALOGUE\"\n }\n ],\n \"startIndex\": 0,\n \"totalPages\": 1,\n \"totalResults\": 2\n}"
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- read:models
post:
tags:
- Models
summary: Create model
description: Create a model.
operationId: createModel
requestBody:
description: "To create a model, a `multipart/form-data` request can be sent to the `/models` endpoint via the `POST` method.
\nThe request body can contain multiple parts, named as follows:
\n\n- `metadata`: The metadata for the model. This is a JSON object that contains the model's metadata properties.\n- `model`: The binary ONNX model, serialized as specified in the ONNX [documentation](https://onnx.ai/onnx/api/serialization.html).\n\nThe `model` part is optional and can be updated later using the `PUT /models/{modelId}` endpoint.
\nThe `metadata` part is required and must be included in the request.\n\n### DIALOGUE and RECOMMENDATION models\n\nWhen creating a model of type `DIALOGUE` or `RECOMMENDATION`, the following property is optional in the `metadata` part:\n- `profilePropertyIds`: The profile property ID's that are used for training the model (for example `['browsername', 'interactions_clicked']`). This is only relevant for models that have a `profile` input.\n\nOnce the model is sufficiently trained, the `featureNames` can be extracted (from a [`DictVectorizer`](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.DictVectorizer.html)) and used to update the model metadata.
\nThe `featureNames` must be defined in the following format and is only required when an ONNX model is provided:\n```json\n{\n \"featureNames\": [\n \"browsername=chrome\",\n \"browsername=edge\",\n \"lastvisitdate\",\n \"interactions_clicked\"\n ]\n}\n```\n\n#### ONNX model requirements\nThe ONNX model must have the following input names:\n* `variant_ids` (str[]): the list of variant IDs to consider in the ONNX model\n* If the model contains a `profile` input name, then the length of the input array should be equal to the length of the `featureNames`.\n\nThe ONNX model must have the following output names:\n* `variant_id` (str): the variant ID that should be served based on the ONNX model outcome\n\n### RECOMMENDATION models\n\nWhen creating a model of type `RECOMMENDATION`, the `metadata` part _can_ contain the following additional property:\n- `storeId`: An optional content/product store ID for which the models is trained. If not provider, the model can work across multiple stores.\n\n#### ONNX model requirements\nThe ONNX model _can_ use one or more of the following input names:\n* `id` (str[]): a list of external item IDs for all relevant items the recommender can choose from\n* `current_item` (str): the id of the current item\n* `profile` (float[]): the profile feature vector, based on the `propertyIds` and `featureNames` of the model\n** If the model contains a `profile` input name, then the length of the input array should be equal to the length of the `featureNames`.\n* `last_order_date` (int64): the number of hours since the last time the product was ordered by the customer\n* `shoppingcart` (int64): whether the item is currently in the customer’s cart\n* `viewed` (int64): the number of times the item was viewed by the customer\n* `ordered` (int64): the number of times the item was ordered by the customer\n* `recent_view` (int64): the number of times the item was viewed in the configured timeframe\n* `recent_click` (int64): the number of times the item was clicked in the configured timeframe\n* `recent_entrypage` (int64): the number of times the item was the landing page in the configured timeframe\n* `recent_recommendation_view` (int64): the number of times the item was viewed in a recommendation in the configured timeframe\n* `recent_shoppingcart` (int64): the number of times the item was added to a shoppingcart in the configured timeframe\n* `recent_order` (int64): the number of times the item was ordered in the configured timeframe\n\nThe ONNX model must have the following output names:\n* `score` (float[]): the `score` that should be used to rank the recommendations. A list of scores between 0 and 1 for all items.\n\n### CONTINUOUS models\n\nWhen creating a model of type `CONTINUOUS`, the `metadata` part _can_ contain the following additional properties:\n- `profilePropertyIds`: The profile property ID's that are used as input features for the model (for example `['age', 'lifetime_value']`). This is only relevant for models that have a `profile` input.\n- `segmentId`: An optional segment ID to restrict model execution to profiles that are a member of this segment. If not provided, the model is executed for all profiles.\n\nOnce the model is sufficiently trained, the `featureNames` can be extracted (from a [`DictVectorizer`](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.DictVectorizer.html)) and used to update the model metadata.
\nThe `featureNames` must be defined in the following format and is only required when the ONNX model has a `profile` input:\n```json\n{\n \"featureNames\": [\n \"age\",\n \"lifetime_value\",\n \"purchase_frequency\",\n \"browsername=edge\"\n ]\n}\n```\n\nThe model is automatically executed when a profile is loaded (via web) or when relevant profile properties are updated (any source). All outputs the model defines will be stored as profile properties on the profile.\n\n#### ONNX model requirements\nThe ONNX model _can_ use the following input name:\n* `profile` (float[]): the profile feature vector, based on the `profilePropertyIds` and `featureNames` of the model. This input is optional — if not present, the model is executed without any profile input.\n * If the model contains a `profile` input name, then the length of the input array should be equal to the length of the `featureNames`.\n\nThe ONNX model can have any number of output names. Each output will be stored as a profile property with the same name on the profile."
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/CreateModelBean'
required: true
responses:
'200':
description: Returns the created model.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelBean'
examples:
Response body with ONNX model (GENERAL):
description: Response body with ONNX model (GENERAL)
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"modelHash\": \"9a9887d8676976851423ac44de8a97d4\",\n \"modelUrl\": \"/rest/v2/models/2613c9d6-a179-4c79-b6d2-1618a53fbc64/model\",\n \"name\": \"mymodel with onnx model set\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
Response body with ONNX model (DIALOGUE):
description: Response body with ONNX model (DIALOGUE)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Dialogue model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [ ],\n \"type\" : \"DIALOGUE\"\n}"
Response body with ONNX model (RECOMMENDATION):
description: Response body with ONNX model (RECOMMENDATION)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Recommendation model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [ ],\n \"type\" : \"RECOMMENDATION\",\n \"storeId\": \"e7b65b21-3e6b-4009-8b6b-3cd26862a689\"\n}"
Response body with ONNX model (CONTINUOUS):
description: Response body with ONNX model (CONTINUOUS)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"id\" : \"882c7614-4456-4ca8-83d3-17f768b5ca15\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"3e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/882c7614-4456-4ca8-83d3-17f768b5ca15/model\",\n \"name\" : \"Continuous model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"segmentId\" : \"c82c7614-4456-4ca8-83d3-17f768b5ca99\",\n \"tags\" : [ ],\n \"type\" : \"CONTINUOUS\"\n}\n"
Response body without ONNX model (GENERAL):
description: Response body without ONNX model (GENERAL)
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"name\": \"mymodel without onnx model set\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
'400':
description: The metadata JSON is invalid or the ONNX model is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequestBean'
examples:
Response body with error in metadata:
description: Response body with error in metadata
value: "{\n \"code\": 400,\n \"errors\": [\n {\n \"message\": \"Unrecognized field \\\\\"non_existing_field\\\\\" (class com.blueconic.services.model.rest.ModelBean), not marked as ignorable\"\n }\n ],\n \"message\": \"Bad Request\"\n}"
Response body with error in ONNX model:
description: Response body with error in ONNX model
value: "{\n \"code\": 400,\n \"errors\": [\n {\n \"message\": \"Invalid model: Error code - ORT_INVALID_GRAPH - message: This is an invalid model. Type Error: Type 'seq(map(string,tensor(float)))' of input parameter (output_probability) of operator (Cast) in node (Cast1) is invalid.\"\n }\n ],\n \"message\": \"Bad Request\"\n}"
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'413':
description: Model is too large, cannot exceed 20MB.
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- write:models
/models/{model}:
get:
tags:
- Models
summary: Get one model
description: Retrieves a single model (without the model binary).
operationId: getOneModelMetadata
parameters:
- name: model
in: path
description: The ID of the model.
required: true
schema:
type: string
examples:
UUID of the model:
description: UUID of the model
value: 2613c9d6-a179-4c79-b6d2-1618a53fbc64
responses:
'200':
description: Returns the model.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelBean'
examples:
Response body (GENERAL):
description: Response body (GENERAL)
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"modelHash\": \"9a9887d8676976851423ac44de8a97d4\",\n \"modelUrl\": \"/rest/v2/models/2613c9d6-a179-4c79-b6d2-1618a53fbc64/model\",\n \"name\": \"mymodel\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
Response body (DIALOGUE):
description: Response body (DIALOGUE)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Dialogue model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [ ],\n \"type\" : \"DIALOGUE\"\n}"
Response body (RECOMMENDATION):
description: Response body (RECOMMENDATION)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Recommendation model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [ ],\n \"type\" : \"RECOMMENDATION\",\n \"storeId\": \"e7b65b21-3e6b-4009-8b6b-3cd26862a689\"\n}"
Response body (CONTINUOUS):
description: Response body (CONTINUOUS)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"id\" : \"882c7614-4456-4ca8-83d3-17f768b5ca15\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"3e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/882c7614-4456-4ca8-83d3-17f768b5ca15/model\",\n \"name\" : \"Continuous model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"segmentId\" : \"c82c7614-4456-4ca8-83d3-17f768b5ca99\",\n \"tags\" : [ ],\n \"type\" : \"CONTINUOUS\"\n}\n"
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'404':
description: The model doesn't exist.
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- read:models
put:
tags:
- Models
summary: Update model
description: Update a model by id.
operationId: updateModel
parameters:
- name: model
in: path
description: The ID of the model to update.
required: true
schema:
type: string
examples:
UUID of the model:
description: UUID of the model
value: 2613c9d6-a179-4c79-b6d2-1618a53fbc64
requestBody:
description: "To update a model, a `multipart/form-data` request can be sent to the `/models` endpoint via the `PUT` method.
\nThe request body can contain multiple parts, named as follows:
\n\n- `metadata`: The updated metadata for the model. This is a JSON object that contains the model's metadata properties.\n- `model`: The binary ONNX model, serialized as specified in the ONNX [documentation](https://onnx.ai/onnx/api/serialization.html).\n\nBoth parts are optional, meaning that you can update the metadata without providing a new model, or you can provide a new model without updating the metadata.
\nFor the `metadata` part, no partial updates are supported. The entire metadata object must be provided in the request.
\nAt least one part needs to be supplied, otherwise a HTTP 400 is returned.\n\n### DIALOGUE and RECOMMENDATION models\n\nWhen updating a model of type `DIALOGUE`or `RECOMMENDATION`, the `metadata` part must contain the following additional property:\n- `profilePropertyIds`: The profile property ID's that are used for training the model (for example `['browsername', 'interactions_clicked']`).\n\nOnce the model is sufficiently trained, the `featureNames` can be extracted (from a [`DictVectorizer`](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.DictVectorizer.html)) and used to update the model metadata.
\nThe `featureNames` must be defined in the following format and is only required when an ONNX model is provided:\n```json\n{\n \"featureNames\": [\n \"browsername=chrome\",\n \"browsername=edge\",\n \"lastvisitdate\",\n \"interactions_clicked\"\n ]\n}\n```\n\n#### ONNX model requirements\nThe ONNX model must have the following input names:\n* `variant_ids` (str[]): the list of variant IDs to consider in the ONNX model\n* If the model contains a `profile` input name, then the length of the input array should be equal to the length of the `featureNames`.\n\nThe ONNX model must have the following output names:\n* `variant_id` (str): the variant ID that should be served based on the ONNX model outcome\n\n### RECOMMENDATION models\n\nWhen updating a model of type `RECOMMENDATION`, the `metadata` part _can_ contain the following additional property:\n- `storeId`: An optional content/product store ID for which the models is trained. If not provider, the model can work across multiple stores.\n\n#### ONNX model requirements\nThe ONNX model _can_ use one or more of the following input names:\n* `id` (str[]): a list of external item IDs for all relevant items the recommender can choose from\n* `current_item` (str): the id of the current item\n* `profile` (float[]): the profile feature vector, based on the `propertyIds` and `featureNames` of the model\n** If the model contains a `profile` input name, then the length of the input array should be equal to the length of the `featureNames`.\n* `last_order_date` (int64): the number of hours since the last time the product was ordered by the customer\n* `shoppingcart` (int64): whether the item is currently in the customer’s cart\n* `viewed` (int64): the number of times the item was viewed by the customer\n* `ordered` (int64): the number of times the item was ordered by the customer\n* `recent_view` (int64): the number of times the item was viewed in the configured timeframe\n* `recent_click` (int64): the number of times the item was clicked in the configured timeframe\n* `recent_entrypage` (int64): the number of times the item was the landing page in the configured timeframe\n* `recent_recommendation_view` (int64): the number of times the item was viewed in a recommendation in the configured timeframe\n* `recent_shoppingcart` (int64): the number of times the item was added to a shoppingcart in the configured timeframe\n* `recent_order` (int64): the number of times the item was ordered in the configured timeframe\n\nThe ONNX model must have the following output names:\n* `score` (float[]): the `score` that should be used to rank the recommendations. A list of scores between 0 and 1 for all items.\n\n### CONTINUOUS models\n\nWhen updating a model of type `CONTINUOUS`, the `metadata` part _can_ contain the following additional properties:\n- `profilePropertyIds`: The profile property ID's that are used as input features for the model (for example `['age', 'lifetime_value']`). This is only relevant for models that have a `profile` input.\n- `segmentId`: An optional segment ID to restrict model execution to profiles that are a member of this segment. If not provided, the model is executed for all profiles.\n\nOnce the model is sufficiently trained, the `featureNames` can be extracted (from a [`DictVectorizer`](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.DictVectorizer.html)) and used to update the model metadata.
\nThe `featureNames` must be defined in the following format and is only required when the ONNX model has a `profile` input:\n```json\n{\n \"featureNames\": [\n \"age\",\n \"lifetime_value\",\n \"purchase_frequency\",\n \"browsername=edge\"\n ]\n}\n```\n\nThe model is automatically executed when a profile is loaded (via web) or when relevant profile properties are updated (any source). All outputs the model defines will be stored as profile properties on the profile.\n\n#### ONNX model requirements\nThe ONNX model _can_ use the following input name:\n* `profile` (float[]): the profile feature vector, based on the `profilePropertyIds` and `featureNames` of the model. This input is optional — if not present, the model is executed without any profile input.\n * If the model contains a `profile` input name, then the length of the input array should be equal to the length of the `featureNames`.\n\nThe ONNX model can have any number of output names. Each output will be stored as a profile property with the same name on the profile."
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/UpdateModelBean'
required: true
responses:
'200':
description: Returns the updated model.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelBean'
examples:
Response body with ONNX model (GENERAL):
description: Response body with ONNX model (GENERAL)
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"modelHash\": \"9a9887d8676976851423ac44de8a97d4\",\n \"modelUrl\": \"/rest/v2/models/2613c9d6-a179-4c79-b6d2-1618a53fbc64/model\",\n \"name\": \"mymodel with onnx model set\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
Response body with ONNX model (DIALOGUE):
description: Response body with ONNX model (DIALOGUE)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Dialogue model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [ ],\n \"type\" : \"DIALOGUE\"\n}"
Response body with ONNX model (RECOMMENDATION):
description: Response body with ONNX model (RECOMMENDATION)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ],\n \"id\" : \"682c7614-4456-4ca8-83d3-17f768b5ca14\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"2e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/682c7614-4456-4ca8-83d3-17f768b5ca14/model\",\n \"name\" : \"Recommendation model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"tags\" : [ ],\n \"type\" : \"RECOMMENDATION\",\n \"storeId\": \"e7b65b21-3e6b-4009-8b6b-3cd26862a689\"\n}"
Response body with ONNX model (CONTINUOUS):
description: Response body with ONNX model (CONTINUOUS)
value: "{\n \"creationDate\" : \"2025-05-01T08:16:00.458Z\",\n \"creator\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"featureNames\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"id\" : \"882c7614-4456-4ca8-83d3-17f768b5ca15\",\n \"lastModifiedDate\" : \"2025-05-14T11:38:42.535Z\",\n \"lastModifiedUser\" : {\n \"fullName\" : \"ondemand@blueconic.com\",\n \"userName\" : \"ondemand@blueconic.com\"\n },\n \"modelHash\" : \"3e9f9c2e7384dd83f0aa015f4c88342f\",\n \"modelUrl\" : \"/rest/v2/models/882c7614-4456-4ca8-83d3-17f768b5ca15/model\",\n \"name\" : \"Continuous model with onnx model set\",\n \"parameters\" : [ ],\n \"profilePropertyIds\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"segmentId\" : \"c82c7614-4456-4ca8-83d3-17f768b5ca99\",\n \"tags\" : [ ],\n \"type\" : \"CONTINUOUS\"\n}\n"
Response body without ONNX model (GENERAL):
description: Response body without ONNX model (GENERAL)
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"name\": \"mymodel without onnx model set\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
'400':
description: The metadata JSON is invalid or the ONNX model is invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequestBean'
examples:
Response body with error in metadata:
description: Response body with error in metadata
value: "{\n \"code\": 400,\n \"errors\": [\n {\n \"message\": \"Unrecognized field \\\\\"non_existing_field\\\\\" (class com.blueconic.services.model.rest.ModelBean), not marked as ignorable\"\n }\n ],\n \"message\": \"Bad Request\"\n}"
Response body with error in ONNX model:
description: Response body with error in ONNX model
value: "{\n \"code\": 400,\n \"errors\": [\n {\n \"message\": \"Invalid model: Error code - ORT_INVALID_GRAPH - message: This is an invalid model. Type Error: Type 'seq(map(string,tensor(float)))' of input parameter (output_probability) of operator (Cast) in node (Cast1) is invalid.\"\n }\n ],\n \"message\": \"Bad Request\"\n}"
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'413':
description: Model is too large, cannot exceed 20MB.
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- write:models
delete:
tags:
- Models
summary: Delete model
description: Delete a model by id.
operationId: deleteModel
parameters:
- name: model
in: path
description: The ID of the model to delete.
required: true
schema:
type: string
examples:
UUID of the model:
description: UUID of the model
value: 2613c9d6-a179-4c79-b6d2-1618a53fbc64
responses:
'200':
description: Returns the deleted model.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelBean'
examples:
Response body with ONNX model:
description: Response body with ONNX model
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"modelHash\": \"9a9887d8676976851423ac44de8a97d4\",\n \"modelUrl\": \"/rest/v2/models/2613c9d6-a179-4c79-b6d2-1618a53fbc64/model\",\n \"name\": \"mymodel with onnx model set\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
Response body without ONNX model:
description: Response body without ONNX model
value: "{\n \"creationDate\": \"2025-04-17T14:00:46.920Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"somedescription\",\n \"id\": \"2613c9d6-a179-4c79-b6d2-1618a53fbc64\",\n \"lastModifiedDate\": \"2025-04-17T14:00:46.920Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"name\": \"mymodel without onnx model set\",\n \"parameters\": [\n {\n \"id\": \"abc\",\n \"values\": [\n \"123\"\n ]\n }\n ],\n \"tags\": [],\n \"type\": \"GENERAL\"\n}"
'400':
description: The model cannot be deleted because it's still in use by other related objects.
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- write:models
/models/{model}/model:
get:
tags:
- Models
summary: Get model binary
description: Retrieves the model binary if set, HTTP 404 otherwise. The response will contain an `Etag` header with the hash of the model, which can be used to perform a conditional request.
operationId: getModelONNXBinary
parameters:
- name: model
in: path
description: The ID of the model.
required: true
schema:
type: string
examples:
UUID of the model:
description: UUID of the model
value: 2613c9d6-a179-4c79-b6d2-1618a53fbc64
- name: etag
in: query
description: The etag of the model. Can be used to do a conditional request, as alternative to using the `If-None-Match` header.
schema:
type: string
responses:
'200':
description: Returns the model binary.
content:
application/octet-stream: {}
'304':
description: Model is not modified (based on `etag` or `If-None-Match` header).
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'404':
description: The model doesn't exist.
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- read:models
components:
schemas:
CreateModelBean:
type: object
description: Multipart form data bean for creating a model.
properties:
metadata:
type: object
format: application/json
description: The model metadata in JSON format (required)
example: "{\n \"featureNames\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"name\" : \"Continuous model with onnx model set\",\n \"profilePropertyIds\" : [ \"age\", \"lifetime_value\", \"purchase_frequency\" ],\n \"segmentId\" : \"c82c7614-4456-4ca8-83d3-17f768b5ca99\",\n \"type\" : \"CONTINUOUS\"\n}\n"
properties:
creationDate:
type: string
format: date-time
description: The creation date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
creator:
$ref: '#/components/schemas/UserBean'
description:
type: string
description: The description.
featureNames:
type: array
description: The features that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS` and when an ONNX model is provided.
items:
type: string
description: The features that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS` and when an ONNX model is provided.
id:
type: string
description: The object ID.
lastModifiedDate:
type: string
format: date-time
description: The last modified date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
lastModifiedUser:
$ref: '#/components/schemas/UserBean'
modelHash:
type: string
description: The model hash which can be used to do conditional requests for retrieving the model binary. Either via the `etag` querystring parameter or the `If-None-Match` header.
readOnly: true
modelUrl:
type: string
description: The model url of the binary model. If not set, the model has no binary yet.
readOnly: true
name:
type: string
description: The object name.
parameters:
type: array
description: The parameters of the object, containing optional key/values pairs.
items:
$ref: '#/components/schemas/parameter'
profilePropertyIds:
type: array
description: The profile properties that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
items:
type: string
description: The profile properties that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
segmentId:
type: string
description: The segment ID this model is designated for (can be empty if the model can work on more than one segment). Only relevant for models of type `CONTINUOUS`.
storeId:
type: string
description: The store ID of the content/product store this model is designated for (can be empty if the model can work on more than one store). Only relevant for models of type `RECOMMENDATION`.
tags:
type: array
description: The tags (i.e. labels).
example: Address
items:
type: string
description: The tags (i.e. labels).
example: Address
type:
type: string
description: The type of the model. Must be one of the allowed model types `GENERAL`, `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
enum:
- GENERAL
- DIALOGUE
- RECOMMENDATION
- CONTINUOUS
required:
- type
model:
type: string
format: binary
description: The ONNX model to store (optional). This should be a valid ONNX model serialized as specified here.
writeOnly: true
required:
- metadata
UpdateModelBean:
type: object
description: Multipart form data bean for updating a model.
properties:
metadata:
type: object
format: application/json
description: The model metadata in JSON format (optional)
example: "{\n \"name\": \"my updated name\",\n \"description\": \"An updated model description\",\n \"parameters\": [\n {\n \"id\": \"parameterForModel\",\n \"values\": [\n \"updated parameter value 1\"\n ]\n }\n ],\n \"type\": \"DIALOGUE\",\n \"profilePropertyIds\" : [ \"browsername\", \"interactions_clicked\" ],\n \"featureNames\" : [ \"browsername=chrome\", \"browsername=edge\", \"browsername=ie\", \"interactions_clicked\" ]\n}\n"
properties:
creationDate:
type: string
format: date-time
description: The creation date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
creator:
$ref: '#/components/schemas/UserBean'
description:
type: string
description: The description.
featureNames:
type: array
description: The features that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS` and when an ONNX model is provided.
items:
type: string
description: The features that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS` and when an ONNX model is provided.
id:
type: string
description: The object ID.
lastModifiedDate:
type: string
format: date-time
description: The last modified date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
lastModifiedUser:
$ref: '#/components/schemas/UserBean'
modelHash:
type: string
description: The model hash which can be used to do conditional requests for retrieving the model binary. Either via the `etag` querystring parameter or the `If-None-Match` header.
readOnly: true
modelUrl:
type: string
description: The model url of the binary model. If not set, the model has no binary yet.
readOnly: true
name:
type: string
description: The object name.
parameters:
type: array
description: The parameters of the object, containing optional key/values pairs.
items:
$ref: '#/components/schemas/parameter'
profilePropertyIds:
type: array
description: The profile properties that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
items:
type: string
description: The profile properties that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
segmentId:
type: string
description: The segment ID this model is designated for (can be empty if the model can work on more than one segment). Only relevant for models of type `CONTINUOUS`.
storeId:
type: string
description: The store ID of the content/product store this model is designated for (can be empty if the model can work on more than one store). Only relevant for models of type `RECOMMENDATION`.
tags:
type: array
description: The tags (i.e. labels).
example: Address
items:
type: string
description: The tags (i.e. labels).
example: Address
type:
type: string
description: The type of the model. Must be one of the allowed model types `GENERAL`, `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
enum:
- GENERAL
- DIALOGUE
- RECOMMENDATION
- CONTINUOUS
required:
- type
model:
type: string
format: binary
description: The ONNX model to update (optional). This should be a valid ONNX model serialized as specified here.
writeOnly: true
ErrorRequestBean:
type: object
properties:
code:
type: integer
format: int32
errors:
type: array
items:
$ref: '#/components/schemas/ErrorBean'
message:
type: string
UserBean:
type: object
description: BlueConic user.
properties:
fullName:
type: string
description: The full name of the user.
userName:
type: string
description: The username.
readOnly: true
ModelBean:
type: object
properties:
creationDate:
type: string
format: date-time
description: The creation date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
creator:
$ref: '#/components/schemas/UserBean'
description:
type: string
description: The description.
featureNames:
type: array
description: The features that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS` and when an ONNX model is provided.
items:
type: string
description: The features that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS` and when an ONNX model is provided.
id:
type: string
description: The object ID.
lastModifiedDate:
type: string
format: date-time
description: The last modified date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
lastModifiedUser:
$ref: '#/components/schemas/UserBean'
modelHash:
type: string
description: The model hash which can be used to do conditional requests for retrieving the model binary. Either via the `etag` querystring parameter or the `If-None-Match` header.
readOnly: true
modelUrl:
type: string
description: The model url of the binary model. If not set, the model has no binary yet.
readOnly: true
name:
type: string
description: The object name.
parameters:
type: array
description: The parameters of the object, containing optional key/values pairs.
items:
$ref: '#/components/schemas/parameter'
profilePropertyIds:
type: array
description: The profile properties that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
items:
type: string
description: The profile properties that are used in the model. Only required for models of type `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
segmentId:
type: string
description: The segment ID this model is designated for (can be empty if the model can work on more than one segment). Only relevant for models of type `CONTINUOUS`.
storeId:
type: string
description: The store ID of the content/product store this model is designated for (can be empty if the model can work on more than one store). Only relevant for models of type `RECOMMENDATION`.
tags:
type: array
description: The tags (i.e. labels).
example: Address
items:
type: string
description: The tags (i.e. labels).
example: Address
type:
type: string
description: The type of the model. Must be one of the allowed model types `GENERAL`, `DIALOGUE`, `RECOMMENDATION` or `CONTINUOUS`.
enum:
- GENERAL
- DIALOGUE
- RECOMMENDATION
- CONTINUOUS
required:
- type
models:
type: object
properties:
itemsPerPage:
type: integer
format: int32
description: Number of results per page.
readOnly: true
models:
type: array
items:
$ref: '#/components/schemas/ModelBean'
startIndex:
type: integer
format: int32
description: The start index.
readOnly: true
totalPages:
type: integer
format: int32
description: The total number of pages.
readOnly: true
totalResults:
type: integer
format: int32
description: The total number of results.
readOnly: true
parameter:
type: object
description: The parameters of the object, containing optional key/values pairs.
properties:
id:
type: string
description: The unique identifier of the parameter.
relation:
type: string
description: The relation of the parameter.
type:
type: string
description: The type of the parameter.
values:
type: array
description: The values of the parameter.
items:
type: string
description: The values of the parameter.
ErrorBean:
type: object
properties:
field:
type: string
message:
type: string
securitySchemes:
oauth2:
type: oauth2
description: 'Authenticates a registered OAuth 2.0 client. The Authorization code flow and Client credentials flow are supported. Make sure to select the correct flow based on which flow the registered client supports. The client id and client secret can be found in BlueConic by opening the registered client under *Settings* > *Access management* > *Applications*.
**NOTE:** When using the Authorization code flow, the redirect URL of the registered client in BlueConic must be set to `https://rest.apidoc.blueconic.com/oauth-receiver.html` and ''Send Proof Key for Code Exchange'' must be enabled.
To use a Bearer token for authentication, follow these steps:
1. Acquire the token through authentication.
2. Include the token in the request''s Authorization header as Bearer \.
3. Send the request to access protected resources.
4. Handle token expiration by refreshing or obtaining a new token.'
flows:
clientCredentials:
tokenUrl: /rest/v2/oauth/token
authorizationCode:
authorizationUrl: /rest/v2/oauth/authorize
tokenUrl: /rest/v2/oauth/token
refreshUrl: /rest/v2/oauth/token