Trabalhar com a API de limite work

Nesta página: Saiba como usar a API Adobe Journey Optimizer Capping para criar, configurar, implantar e monitorar configurações de limite de ponto de extremidade que limitam chamadas a sistemas externos.

A API de limite ajuda a criar, configurar e monitorar as configurações de limite.

Esta seção fornece informações globais sobre como trabalhar com a API. Uma descrição detalhada da API está disponível na documentação das APIs do Adobe Journey Optimizer.

Descrição da API de limite e coleção do Postman description

A tabela abaixo lista os comandos disponíveis para a API de limitação. Informações detalhadas, incluindo amostras de solicitações, parâmetros e formatos de resposta estão disponíveis na documentação das APIs do Adobe Journey Optimizer.

Método
Caminho
Descrição
POST
list/endpointConfigs
Obter uma lista das configurações de limite de endpoint
POST
/endpointConfigs
Criar uma configuração de limite de endpoint
POST
/endpointConfigs/{uid}/deploy
Implantar uma configuração de limite de ponto de extremidade
POST
/endpointConfigs/{uid}/undeploy
Desimplantar uma configuração de limite de endpoint
POST
/endpointConfigs/{uid}/canDeploy
Verificar se uma configuração de limite de ponto de extremidade pode ser implantada ou não
PUT
/endpointConfigs/{uid}
Atualizar uma configuração de limite de ponto de extremidade
GET
/endpointConfigs/{uid}
Recuperar uma configuração de limite de ponto de extremidade
DELETE
/endpointConfigs/{uid}
Excluir uma configuração de limite de ponto de extremidade

Quando uma configuração é criada ou atualizada, uma verificação é executada automaticamente para garantir a sintaxe e a integridade do payload.
Se ocorrerem alguns problemas, a operação retornará avisos ou erros para ajudá-lo a corrigir a configuração.

Além disso, uma coleção do Postman está disponível aqui para ajudá-lo na configuração de teste.

Esta coleção foi configurada para compartilhar a coleção de Variáveis Postman gerada por meio das Integrações do Console Adobe I/O > Experimente > Baixar para Postman, que gera um arquivo de Ambiente Postman com os valores de integrações selecionados.

Após o download e o upload para o Postman, é necessário adicionar três variáveis: {JO_HOST},{BASE_PATH} e {SANDBOX_NAME}.

  • {JO_HOST} : Journey Optimizer URL do Gateway.
  • {BASE_PATH} : ponto de entrada da API.
  • {SANDBOX_NAME} : o cabeçalho x-sandbox-name (por exemplo, “prod”) correspondente ao nome da sandbox na qual as operações da API ocorrerão. Consulte a visão geral das sandboxes para obter mais informações.

Configuração do endpoint

Esta é a estrutura básica de uma configuração de endpoint:

{
    "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>
            }
        },
        ...
    }
}
IMPORTANT
O parâmetro maxHttpConnections é opcional. Ela permite restringir o número de conexões que o Journey Optimizer abrirá com o sistema externo.
O valor máximo que pode ser definido é 400. Se nada for especificado, o sistema poderá abrir até vários milhares de conexões, dependendo do dimensionamento dinâmico do sistema.
Quando a configuração de limitação é implantada, se nenhum valor maxHttpConnections tiver sido definido, um maxHttpConnections = -1 padrão será adicionado à configuração implantada, e o Journey Optimizer usará o valor padrão do sistema.

Exemplo:

{
  "url": "https://api.example.org/data/2.5/*",
  "methods": [
    "GET"
  ],
  "services": {
    "action": {
      "rating": {
        "maxCallsCount": 500,
        "periodInMs": 1000
      }
    }
  }
}
IMPORTANT
A configuração só estará ativa depois de chamar o ponto de extremidade deploy.

Aviso e erros

Quando um método canDeploy é chamado, o processo valida a configuração e retorna o status de validação identificado por sua Identificação Exclusiva:

"ok" or "error"

Os possíveis erros são:

  • ERR_ENDPOINTCONFIG_100: configuração de limitação: url ausente ou inválida
  • ERR_ENDPOINTCONFIG_101: configuração de limitação: url malformada
  • ERR_ENDPOINTCONFIG_102: configuração de limitação: url malformada: curinga na url não permitido no host:port
  • ERR_ENDPOINTCONFIG_103: configuração de limitação: métodos HTTP ausentes
  • ERR_ENDPOINTCONFIG_104: configuração de limitação: nenhuma classificação de chamada definida
  • ERR_ENDPOINTCONFIG_107: configuração de limitação: contagem máxima inválida de chamadas (maxCallsCount)
  • ERR_ENDPOINTCONFIG_108: configuração de limitação: contagem máxima de chamadas inválida (periodInMs)
  • ERR_ENDPOINTCONFIG_111: configuração de limitação: não é possível criar a configuração de ponto de extremidade: carga inválida
  • ERR_ENDPOINTCONFIG_112: configuração de limitação: não é possível criar a configuração de ponto de extremidade: esperando uma carga JSON
  • ERR_AUTHORING_ENDPOINTCONFIG_1: nome de serviço inválido <!--<given value>-->: deve ser ‘dataSource’ ou ‘action’
  • ERR_AUTHORING_ENDPOINTCONFIG_2: ponto de extremidade não incluído na lista de permissões: contate o administrador
    • Se você vir esse erro ao tentar configurar uma regra de limitação para uma ação personalizada, verifique se está definindo “ação” (não “dataSource”) como o nome do serviço na carga de criação ou atualização. Veja o exemplo acima.

O aviso potencial é:

ERR_ENDPOINTCONFIG_106: configuração de limitação: máximo de conexões HTTP não definidas: sem limitação por padrão

Casos de uso

Esta seção lista casos de uso importantes para gerenciar configurações de limite no Journey Optimizer e os comandos de API associados necessários para implementar o caso de uso.

Detalhes sobre cada comando de API estão disponíveis na descrição da API e coleção do Postman.

Criar e implantar uma nova configuração de limite

Chamadas de API a serem usadas:

  1. list - Recupera as configurações existentes.
  2. create - Cria uma nova configuração.
  3. candeploy - Verifica se a configuração pode ser implantada.
  4. deploy - Implanta a configuração.
Atualizar e implantar uma configuração de limitação (ainda não implantada)

Chamadas de API a serem usadas:

  1. list - Recupera as configurações existentes.
  2. get - Obtém detalhes de uma configuração específica.
  3. update - Modifica a configuração.
  4. candeploy - Verifica a qualificação da implantação.
  5. deploy - Implanta a configuração.
Desimplantar e excluir uma configuração de limite implantada

Chamadas de API a serem usadas:

  1. list - Recupera as configurações existentes.
  2. undeploy - Desimplanta a configuração.
  3. delete - Remove a configuração.
Excluir uma configuração de limite implantada em uma etapa

Em apenas uma chamada de API, você pode desimplantar e excluir a configuração usando o parâmetro forceDelete.

Chamadas de API a serem usadas:

  1. list - Recupera as configurações existentes.
  2. delete(com parâmetro forceDelete) - Força a exclusão de uma configuração implantada em uma única etapa.
Atualizar uma configuração de limite já implantada
note
NOTE
Uma reimplantação é necessária após atualizar uma configuração já implantada.

Chamadas de API a serem usadas:

  1. list - Recupera as configurações existentes.
  2. get - Obtém detalhes de uma configuração específica.
  3. update - Modifica a configuração.
  4. undeploy - Desimplanta a configuração antes de aplicar as alterações.
  5. candeploy - Verifica a qualificação da implantação.
  6. deploy - Implanta a configuração atualizada.
AI Knowledge Reference

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 = -1 is 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 = -1 is 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”.
recommendation-more-help
journey-optimizer-help