Creation & Deployment
Summary
Please follow the next steps to Create & Deploy a new plugin:
Create a plugin
Via UI
To create a new plugin:
Click New Plugin.
Configure the following parameters:
Plugin Type
Must be one of the following enums:
ACTIVITY_ANALYZER
, ATTRIBUTION_PROCESSOR, AUDIENCE_SEGMENT_EXTERNAL_FEED, AUDIENCE_SEGMENT_TAG_FEED
, DATAMART_FUNCTION, DISPLAY_AD_RENDERER, EMAIL_ROUTER, EMAIL_TEMPLATE_RENDERER
, ML_FUNCTION, SCENARIO_CUSTOM_ACTION
Organisation
Defines plugin availability.
Use
1
or100
to make the plugin accessible to all organisations.Otherwise, it will be available only within the specified organisation and its sub-organisations.
Group Id
Used to categorize plugins, typically based on customer and type.
Example:
com.mycustomer.plugintype
for a customer-specific plugin.com.mediarithmics.plugintype
for a shared plugin.
Artifact Id
A unique identifier for your plugin. It should not be the same as the group_id
.
When a plugin version has been created, its status is set to DRAFT. As described in Version lifecycle, A DRAFT plugin version can still be edited and is not available to customers.
Via API
To create a plugin using the API, send a POST
request to:
POST
https://api.mediarithmics.com/v1/plugins
Body
plugin_type
string
organisation_id
string
group_id
string
artifact_id
string
Response
Create a version
Via UI
After creating a plugin, you can add a new version.
Click on New Version
Configure your new version:
Version
Must follow the expected format: 1.0.0
, 1.2.0
, 1.2.0-rcl
. The version can include three digits and an optional suffix.
Engine type
Specifies the system where the plugin will be executed.
Plugin properties
Define the context in which the plugin will be used. These properties are sent to your plugin.
provider (mandatory): Name of the plugin version creator.
name (mandatory): Version name
For AUDIENCE_SEGMENT_EXTERNAL_FEED, a specific parameter "Use file delivery" must be set to indicate whether the feed uses the file delivery service. This field is optional and defaults to false.
By API
POST
https://api.mediarithmics.com/v1/plugins/:plugin_id/versions
Path Parameters
plugin_id
integer
The ID of your plugin
Request Body
plugin_properties
array
version_id
string
maintainerId (optinal)
string
file_delivery_activated (optinal)
boolean (false by default)
Additional Notes:
When defining the properties required for your code to run, you can reuse properties from your test files. However, be sure to remove any default values before finalizing the configuration.
Property type objects
Here are the attributes for Property type objects:
Attribute
Type
Description
deletable
boolean
Whether the property can be deleted.
writable
boolean
Whether the property can be overwritten.
origin
string
Three possible values:
PLUGIN_STATIC.
The value is bound to the plugin version and can contains the name of the plugin version, its provider, ...PLUGIN.
These properties are copied on each instance and are usually used as parameters in runtime.INSTANCE.
Properties with this level can be set on a single instance without affecting other instances. They won't be created automatically.
property_type
string
Defines the format of the value object:
DOUBLE
INT
BOOLEAN
ASSET (deprecated)
ASSET_FILE
ASSET_FOLDER
DATA_FILE
URL
STRING
AD_LAYOUT
STYLE_SHEET
PIXEL_TAG
RECOMMENDER
NATIVE_DATA (deprecated)
NATIVE_TITLE (deprecated)
NATIVE_IMAGE (deprecated)
value
object
The default value for the property. The attributes for this object are related to the property_type
. See below.
technical_name
string
Unique identifier for the property.
Values format according to property_type
property_type
DOUBLE
DOUBLE
INT
INT
BOOLEAN
BOOLEAN
ASSET
(deprecated)
ASSET
(deprecated)ASSET_FILE
ASSET_FILE
ASSET_FOLDER
ASSET_FOLDER
DATA_FILE
DATA_FILE
URL
URL
STRING
STRING
AD_LAYOUT
AD_LAYOUT
STYLE_SHEET
STYLE_SHEET
PIXEL_TAG
PIXEL_TAG
RECOMMENDER
RECOMMENDER
NATIVE_IMAGE
(deprecated)
NATIVE_IMAGE
(deprecated)Note about require_display
: when set to true
, it means that this content will always be displayed for all impressions. false
means that it can be discarded for some impressions.
NATIVE_TITLE
(deprecated)
NATIVE_TITLE
(deprecated)NATIVE_DATA
(deprecated)
NATIVE_DATA
(deprecated)Add configuration file(s)
A configuration file is used to store credentials, connection parameters, or other technical settings required for a specific customer, organization or datamart. It typically contains environment-specific values such as API keys, authentication tokens, or endpoint URLs that allow the plugin to function correctly within a given deployment. These files ensure that configurations remain flexible and adaptable without modifying the core plugin code.
Via UI
All configuration files are displayed in the Technical Configuration section of the plugin version.
To add a new configuration file:
Click on the Technical Configuration menu.
Click Add a Technical Configuration.
Enter a name for the configuration file.
Define the content in JSON format.
To update an existing configuration file:
Click Edit in the menu of the configuration file list.
Modify the JSON content as needed.
Click Save to apply the changes.
Via API
To upload or update a configuration file using the API, send a PUT
request to:
PUT
https://api.mediarithmics.com/v1/plugins/:plugin_id/versions/:version_id/configuration_file/technical_name=:technical_name
Path Parameters
plugin_id
integer
The ID of your plugin
version_id
integer
The ID of your version
technical_name
string
File name
Request Body
body
string
The file needs to be sent as the request body in binary format
Add external services
If your code calls external APIs to retrieve/push data from/to external systems (CRMs, Open APIs / recommendation engines / etc..), you'll need to whitelist them.
Via API
POST
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/external_services
Path Parameters
plugin_id
string
The ID of your plugin
version_id
string
The ID of your version
Request Body
technical_name
string
deprecated: Just enter any random string value. We keep this field for legacy reasons and we'll drop it in coming API changes.
url
string
Host of your service. Ex: https://graph.facebook.com
As you'll see in the response, your service may not be enabled. mediarithmics needs to enable each host if it's the first time it is added as an external service. Contact your Account manager with the id of the external service that you wish to enable.
Deploy your code
This step is getting reworked. Stay tuned! You can contact your Account manager for additional information on how to build your code before deploying it into the platform.
Meanwile, please add a look to Coding your plugin section to learn more about this.
Deploy your build
Via UI
Once your configuration is complete and your build is set up, you can deploy your version on the Mediarithmics platform.
Navigate to the Overview tab of your version.
Click Deploy the version.
If your version's engine type is
HOSTED_CONTAINERS
, enter your build tag.For
HOSTED_CONTAINERS
, the version status will be set toDEPLOYING
while the containers are being created.Once deployment is complete, the version status changes to
TESTING
.
Via API
POST
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/containers/action
Path Parameters
plugin_id
integer
The ID of your plugin
version_id
integer
The ID of your version
Headers
Content-Type
string
application/json
Request Body
target_build_tag
string
The build tag you retrieved after your build.
action
string
DEPLOY_PLUGIN
for new versions
UPGRADE_ALL_CONTAINERS
to update the code of an existing version
The deployment can take from 5 to 10 minutes.
Check deployment status
For HOSTED_CONTAINERS
plugins, you must verify whether your version has been deployed in running containers. If no containers are running, the version will not be usable.
Via UI
In the Computing console, after selecting your plugin and its version, you can access the Deployment tab to view key details about your deployment, including the name and number of running containers.
Additionally, you can update your containers by applying a new build tag, allowing you to modify the code without creating a new version. However, this approach should be used only for minor updates, such as debugging your existing version.
Via API
GET
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/containers?organisation_id=:organisationId
Path Parameters
plugin_id
integer
The ID of your plugin
version_id
integer
The ID of your version
organisation_id
interger
The ID of the plugin's organisation
Headers
Content-Type
string
application/json
Last updated
Was this helpful?