Deployment
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
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 property_type . See below. |
technical_name | string | Unique identifier for the property. |
"value": {
"value": 12.45
}
"value": {
"value": 12
}
"value": {
"value": true
}
"value": {
"original_file_name": "cat.png",
"asset_id": "1333",
"file_path": "/1/public/assets/cat.png"
}
"value": {
"original_name": "cat.png",
"asset_id": "1333",
"path": "/1/public/assets/cat.png"
}
"value": {
"original_name": "cat.png",
"asset_id": "1333",
"path": "/1/public/assets/cat.png"
}
"value": {
"uri": "mics://data_file/tenants/1234/bid_optimizer/shiny/default.conf",
"last_modified": null
}
"value": {
"url": "https://www.google.com"
}
"value": {
"value": "iframe"
}
"value": {
"id": "12",
"version": "34"
}
"value": {
"id": "12",
"version": "34"
}
"value": {
"value": "https://impfr.tradedoubler.com/imp?[...]"
}
"value": {
"recommender_id": "1"
}
"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."value": {
"required_display": true,
"value": "Everything is awesome!"
}
"value": {
"required_display": true,
"type": 1, // We are using the OpenRTB Dynamic Native Ads API 1.2 referential here
"value": "5 Stars"
}
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
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.
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
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.
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
You can update | You can't update |
Configuration files | Properties |
External services | |
Code | |
Layouts | |
Last modified 1yr ago