Links

Deployment

Create the plugin and its version

If plugin doesn't already exist, we'll create it with its first version.
post
https://api.mediarithmics.com
/v1/plugins
Declare the plugin
You can retrieve a specific plugin information or check your plugin with
get
https://api.mediarithmics.com
/v1/plugins/:plugin_id
Check your plugin
post
https://api.mediarithmics.com
/v1/plugins/:plugin_id/versions
Declare a version

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

DOUBLE

"value": {
"value": 12.45
}

INT

"value": {
"value": 12
}

BOOLEAN

"value": {
"value": true
}

ASSET (deprecated)

"value": {
"original_file_name": "cat.png",
"asset_id": "1333",
"file_path": "/1/public/assets/cat.png"
}

ASSET_FILE

"value": {
"original_name": "cat.png",
"asset_id": "1333",
"path": "/1/public/assets/cat.png"
}

ASSET_FOLDER

"value": {
"original_name": "cat.png",
"asset_id": "1333",
"path": "/1/public/assets/cat.png"
}

DATA_FILE

"value": {
"uri": "mics://data_file/tenants/1234/bid_optimizer/shiny/default.conf",
"last_modified": null
}

URL

"value": {
"url": "https://www.google.com"
}

STRING

"value": {
"value": "iframe"
}

AD_LAYOUT

"value": {
"id": "12",
"version": "34"
}

STYLE_SHEET

"value": {
"id": "12",
"version": "34"
}

PIXEL_TAG

"value": {
"value": "https://impfr.tradedoubler.com/imp?[...]"
}

RECOMMENDER

"value": {
"recommender_id": "1"
}

NATIVE_IMAGE (deprecated)

"value": {
"required_display": true,
"height": 300,
"width": 600,
"type": 1, // We are using the OpenRTB Dynamic Native Ads API 1.2 referential here
"original_file_name": "cat.png",
"asset_id": "1333",
"file_path": "/1/public/assets/cat.png"
}
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)

"value": {
"required_display": true,
"value": "Everything is awesome!"
}

NATIVE_DATA (deprecated)

"value": {
"required_display": true,
"type": 1, // We are using the OpenRTB Dynamic Native Ads API 1.2 referential here
"value": "5 Stars"
}

Elements associated with your version

get
https://api.mediarithmics.com
/v1/plugins/:plugin_id/versions/:version_id/properties
Retrieve properties
put
https://api.mediarithmics.com
/v1/plugins/:plugin_id/versions/:version_id/configuration_file/technical_name=:technical_name
Upload a configuration file

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.
get
https://api.mediarithmics.com
/v1/plugins/:pluginId/versions/:versionId/external_services
Check external services
post
https://api.mediarithmics.com
/v1/plugins/:pluginId/versions/:versionId/external_services
Add an external service
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

Setup the build

This step is getting a rework. Stay tuned! You can contact your Account manager for additional information on how to build your code before deploying it into the platform.
post
https://api.mediarithmics.com
/v1/plugins/:pluginId/versions/:versionId/containers/action
Deploy a build
The deployment can take from 5 to 10 minutes.
get
https://admin-api.mediarithmics.com
/v1/plugins/:pluginId/versions/:versionId/containers
Check deployment status

Updating a plugin

When to create a new version

You want to create a new version:
  • To edit properties.
  • To let already added plugins keep their existing behavior.
For example, you won't create a new version if you fix something in the code, or change a delay in a configuration file. But you'll create a new version if the user should enter a new property value or if your code changes so that existing plugins shouldn't use it.

What to do when creating a new version

When creating a new version, you'll have to:
  • Redeclare properties, changed or not
  • Reupload your configuration files, changed or not
  • Redeclare external services, changed or not. Ensure they are enabled.
  • Redeploy your code. Think about updating the version number in the build definition.
  • Redeclare the layouts

What to do when updating the code of a version

You can update
You can't update
Configuration files
Properties
External services
Code
Layouts
Last modified 1yr ago