Sur cette page : découvrez comment utiliser l’API Capping d’Adobe Journey Optimizer pour créer, configurer, déployer et surveiller les configurations de limitation des points d’entrée qui limitent les appels aux systèmes externes.
L’API Capping vous permet de créer, configurer et surveiller vos configurations de limitation.
Cette section fournit des informations générales sur l’utilisation de l’API. Consultez la description détaillée de l’API dans la Documentation des API Adobe Journey Optimizer.
Description de l’API de limitation et collection Postman description
Le tableau ci-dessous répertorie les commandes disponibles pour l’API de limitation. Des informations détaillées, notamment des exemples de requête, des paramètres et des formats de réponse, sont disponibles dans la documentation des API Adobe Journey Optimizer.
{uid}/deploy{uid}/undeploy{uid}/canDeploy{uid}{uid}{uid}Lorsqu’une configuration est créée ou mise à jour, une vérification est automatiquement effectuée pour garantir la syntaxe et l’intégrité de la payload.
Si certains problèmes se produisent, l’opération renvoie des avertissements ou des erreurs pour vous aider à corriger la configuration.
En outre, une collection Postman est disponible ici pour vous aider lors de la configuration de test.
Elle a été créée pour partager la collection de variables Postman générée dans Intégrations de la console Adobe I/O > Essayer > Télécharger pour Postman, qui génère un fichier d’environnement Postman contenant les valeurs d’intégration sélectionnées.
Une fois le téléchargement puis le chargement effectués dans Postman, vous devez ajouter trois variables : {JO_HOST}, {BASE_PATH} et {SANDBOX_NAME}.
{JO_HOST}: URL de passerelle Journey Optimizer{BASE_PATH}: point d’entrée pour l’API.{SANDBOX_NAME}: l’en-tête x-sandbox-name (par exemple, « prod ») correspondant au nom sandbox dans lequel les opérations d’API auront lieu. Pour plus d’informations, consultez la Présentation des sandbox.
Configuration du point d’entrée
Voici la structure de base d’une configuration de point d’entrée :
{
"url": "<endpoint URL>", //wildcards are allowed in the endpoint URL
"methods": [ "<HTTP method such as GET, POST, >, ...],
"services": {
"<service name>": { . //must be "action" or "dataSource"
"maxHttpConnections": <max connections count to the endpoint (optional)>
"rating": {
"maxCallsCount": <max calls to be performed in the period defined by period/timeUnit>,
"periodInMs": <integer value greater than 0>
}
},
...
}
}
maxHttpConnections n’a été fournie, une valeur par défaut maxHttpConnections = -1 est ajoutée dans la configuration déployée, et Journey Optimizer utilise la valeur système par défaut.Exemple :
{
"url": "https://api.example.org/data/2.5/*",
"methods": [
"GET"
],
"services": {
"action": {
"rating": {
"maxCallsCount": 500,
"periodInMs": 1000
}
}
}
}
Avertissement et erreurs
Lorsqu’une méthode canDeploy est appelée, le processus valide la configuration et renvoie le statut de validation identifié par son identifiant unique, au choix :
"ok" or "error"
Les erreurs potentielles sont les suivantes :
- ERR_ENDPOINTCONFIG_100: capping config: missing or invalid url
- ERR_ENDPOINTCONFIG_101: capping config: malformed url
- ERR_ENDPOINTCONFIG_102: capping config: malformed url: wildchar in url not allowed in host:port
- ERR_ENDPOINTCONFIG_103: capping config: missing HTTP methods
- ERR_ENDPOINTCONFIG_104: capping config: no call rating defined
- ERR_ENDPOINTCONFIG_107: capping config: invalid max calls count (maxCallsCount)
- ERR_ENDPOINTCONFIG_108: capping config: invalid max calls count (periodInMs)
- ERR_ENDPOINTCONFIG_111: capping config: can’t create endpoint config: invalid payload
- ERR_ENDPOINTCONFIG_112: capping config: can’t create endpoint config: expecting a JSON payload
- ERR_AUTHORING_ENDPOINTCONFIG_1: invalid service name
<!--<given value>-->: must be ‘dataSource’ or ‘action’ - ERR_AUTHORING_ENDPOINTCONFIG_2 : point d’entrée non whitelisté : contactez votre administrateur
- Si cette erreur s’affiche lorsque vous tentez de configurer une règle de limitation pour une action personnalisée, assurez-vous de définir « action » (et non « dataSource ») comme nom de service dans la payload de création ou de mise à jour. Voir l’exemple ci-dessus.
L’avertissement potentiel est :
ERR_ENDPOINTCONFIG_106: capping config: max HTTP connections not defined: no limitation by default
Cas d’utilisation
Cette section répertorie les principaux cas d’utilisation de la gestion des configurations de limitation dans Journey Optimizer et les commandes API associées requises pour mettre en œuvre le cas d’utilisation.
Des détails sur chaque commande d’API sont disponibles dans la description de l’API et collection Postman.
Appels API à utiliser :
list: récupère les configurations existantes.create: crée une configuration.candeploy: vérifie que la configuration peut être déployée.deploy: déploie la configuration.
Appels API à utiliser :
list: récupère les configurations existantes.get: récupère les détails d’une configuration spécifique.update: modifie la configuration.candeploy: vérifie l’éligibilité du déploiement.deploy: déploie la configuration.
Appels API à utiliser :
list: récupère les configurations existantes.undeploy: annule le déploiement de la configuration.delete: supprime la configuration.
En un seul appel API, vous pouvez annuler le déploiement et supprimer la configuration à l’aide du paramètre forceDelete.
Appels API à utiliser :
list: récupère les configurations existantes.delete(avec le paramètreforceDelete) : force la suppression d’une configuration déployée en une seule étape.
| note |
|---|
| NOTE |
| Un redéploiement est nécessaire après la mise à jour d’une configuration déployée. |
Appels API à utiliser :
list: récupère les configurations existantes.get: récupère les détails d’une configuration spécifique.update: modifie la configuration.undeploy: annule le déploiement de la configuration avant d’appliquer les modifications.candeploy: vérifie l’éligibilité du déploiement.deploy: déploie la configuration mise à jour.
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: The Adobe Journey Optimizer Capping API lets you create, configure, deploy, and monitor endpoint capping configurations that limit calls to external systems.
Intents:
- List, create, retrieve, update, and delete endpoint capping configurations with the Capping API.
- Deploy and undeploy an endpoint capping configuration, and check with canDeploy whether an endpoint capping configuration can be deployed.
- Define an endpoint configuration with a URL, HTTP methods, a service name, and a call rating (maxCallsCount and periodInMs).
- Undeploy and delete a deployed capping configuration in one API call with the forceDelete parameter.
- Test capping configurations with the Capping API Postman collection.
Glossary:
- Endpoint capping configuration (product-specific): a configuration that limits calls to an external system, defined by an endpoint URL, HTTP methods, and services with a call rating.
- maxHttpConnections (product-specific): an optional parameter that restricts the number of connections Journey Optimizer opens to the external system.
- maxCallsCount (product-specific): the maximum number of calls to be performed in the period set in the rating of an endpoint configuration.
- forceDelete (product-specific): a parameter of the delete call that undeploys and deletes a deployed configuration in one API call.
Guardrails:
- The max value that can be set for maxHttpConnections is 400 (hard limit).
- If no maxHttpConnections value is specified, the system may open up to multiple thousands of connections depending on the dynamic scaling of the system.
- When the capping configuration is deployed and no maxHttpConnections value has been set, a default
maxHttpConnections = -1is added into the deployed configuration, and Journey Optimizer uses the default system value. - The service name in an endpoint configuration must be “action” or “dataSource”.
- periodInMs takes an integer value greater than 0.
- Wildcards are allowed in the endpoint URL.
- A capping configuration is only active after calling the deploy endpoint.
- A redeployment is required after updating an already deployed capping configuration.
Prerequisites and permissions:
- To use the Postman collection, once the Postman Environment file is downloaded and uploaded into Postman, you need to add three variables:
{JO_HOST}(the Journey Optimizer Gateway URL),{BASE_PATH}(the entry point for the API), and{SANDBOX_NAME}(the header x-sandbox-name, for example ‘prod’, corresponding to the sandbox name where the API operations take place). - The Postman Environment file is generated via Adobe I/O Console’s Integrations > Try it out > Download for Postman, with the selected integrations values.
Terminology:
- Canonical name: Adobe Journey Optimizer — Acronym: AJO — variants: Journey Optimizer
- Canonical name: Capping API — variants: capping API
- Canonical name: canDeploy — variants: candeploy
FAQ:
- When does a capping configuration become active? A capping configuration is only active after calling the deploy endpoint.
- What happens when a capping configuration is created or updated? A check is automatically performed to guarantee the syntax and the integrity of the payload. If some problems occur, the operation returns warnings or errors to help you correct the configuration.
- What does canDeploy return? When the canDeploy method is called, the process validates the configuration and returns the validation status “ok” or “error”.
- What happens if maxHttpConnections is not set? The system may open up to multiple thousands of connections depending on the dynamic scaling of the system. At deployment, a default
maxHttpConnections = -1is added and Journey Optimizer uses the default system value. - Is a redeployment required after updating a deployed capping configuration? Yes. A redeployment is required after updating an already deployed configuration.
- Can I undeploy and delete a deployed capping configuration in one API call? Yes. Use the delete call with the forceDelete parameter.
- What do I do if ERR_AUTHORING_ENDPOINTCONFIG_2 appears when configuring a capping rule for a custom action? Make sure “action” (not “dataSource”) is set as the service name in the create or update payload.
Troubleshooting:
- ERR_ENDPOINTCONFIG_100:
capping config: missing or invalid url. - ERR_ENDPOINTCONFIG_101:
capping config: malformed url. - ERR_ENDPOINTCONFIG_102:
capping config: malformed url: wildchar in url not allowed in host:port. - ERR_ENDPOINTCONFIG_103:
capping config: missing HTTP methods. - ERR_ENDPOINTCONFIG_104:
capping config: no call rating defined. - ERR_ENDPOINTCONFIG_107:
capping config: invalid max calls count (maxCallsCount). - ERR_ENDPOINTCONFIG_108:
capping config: invalid max calls count (periodInMs). - ERR_ENDPOINTCONFIG_111:
capping config: can't create endpoint config: invalid payload. - ERR_ENDPOINTCONFIG_112:
capping config: can't create endpoint config: expecting a JSON payload. - ERR_AUTHORING_ENDPOINTCONFIG_1:
invalid service name ...: must be 'dataSource' or 'action'. - ERR_AUTHORING_ENDPOINTCONFIG_2:
endpoint not whitelisted: please contact your administrator. If this error appears when configuring a capping rule for a custom action, make sure “action” (not “dataSource”) is set as the service name in the create or update payload. - ERR_ENDPOINTCONFIG_106 (warning):
capping config: max HTTP connections not defined: no limitation by default.
Examples:
- Endpoint capping configuration for the action service: URL
https://api.example.org/data/2.5/*, method GET, rating with maxCallsCount 500 and periodInMs 1000.
Personas:
- developer: Can list, create, retrieve, update, delete, deploy and undeploy endpoint capping configurations with the Capping API. Can check with canDeploy whether an endpoint capping configuration can be deployed. Can undeploy and delete a deployed configuration in one API call with the forceDelete parameter. The page states that the max value that can be set for maxHttpConnections is 400. Where: “Capping API description & Postman collection”.
Onboarding:
- Level: Beginner
- First minimal step: Call list to retrieve existing capping configurations.
- Success check: When the canDeploy method is called, it returns the validation status “ok”.