Deployment
Create the plugin and its version
If plugin doesn't already exist, we'll create it with its first version.
Declare the plugin
POST
https://api.mediarithmics.com/v1/plugins
Request Body
Name | Type | Description |
---|---|---|
artifact_id | string | Follow the standards of your plugin type documentation |
group_id | string | Follow the standards of your plugin type documentation |
plugin_type | string | Enum
|
organisation_id | string | 1 for generic plugins, or the id of the client's organisation if it's dedicated to one client |
You can retrieve a specific plugin information or check your plugin with
Check your plugin
GET
https://api.mediarithmics.com/v1/plugins/:plugin_id
Path Parameters
Name | Type | Description |
---|---|---|
plugin_id | string | The id of the plugin to retrieve |
Declare a version
POST
https://api.mediarithmics.com/v1/plugins/:plugin_id/versions
While creating the new version, you'll have to define the properties you need for your code to run. Usually, you have already written those properties on your test files, do not hesitate to reuse it but do not forget to remove the default values.
Path Parameters
Name | Type | Description |
---|---|---|
plugin_id | integer | The ID of your plugin |
Request Body
Name | Type | Description |
---|---|---|
plugin_properties | array | The properties of your plugin. Note that "provider" and "name" properties are mandatory. Check the Property object below for format. |
version_id | string |
|
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:
|
property_type | string | Defines the format of the value object:
|
value | object | The default value for the property. The attributes for this object are related to the |
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)Elements associated with your version
Retrieve properties
GET
https://api.mediarithmics.com/v1/plugins/:plugin_id/versions/:version_id/properties
Path Parameters
Name | Type | Description |
---|---|---|
version_id | integer | The ID of your version |
plugin_id | integer | The ID of your plugin |
Upload a configuration file
PUT
https://api.mediarithmics.com/v1/plugins/:plugin_id/versions/:version_id/configuration_file/technical_name=:technical_name
Uploads or updates a configuration file
Path Parameters
Name | Type | Description |
---|---|---|
plugin_id | integer | The ID of your plugin |
version_id | integer | The ID of your version |
technical_name | string | File name |
Request Body
Name | Type | Description |
---|---|---|
body | string | The file needs to be sent as the request body in binary format |
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.
Check external services
GET
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/external_services
Path Parameters
Name | Type | Description |
---|---|---|
plugin_id | string | The ID of your plugin |
version_id | string | The ID of your version |
Add an external service
POST
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/external_services
Path Parameters
Name | Type | Description |
---|---|---|
plugin_id | string | The ID of your plugin |
version_id | string | The ID of your version |
Request Body
Name | Type | Description |
---|---|---|
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: |
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.
Deploy a build
POST
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/containers/action
Path Parameters
Name | Type | Description |
---|---|---|
plugin_id | integer | The ID of your plugin |
version_id | integer | The ID of your version |
Headers
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
Request Body
Name | Type | Description |
---|---|---|
target_build_tag | string | The build tag you retrieved after your build. |
action | string |
|
The deployment can take from 5 to 10 minutes.
Check deployment status
GET
https://api.mediarithmics.com/v1/plugins/:pluginId/versions/:versionId/containers?organisation_id=:organisationId
Path Parameters
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
Content-Type | string | application/json |
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 updated