Merge a Package - Cognigy Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Merge a Package

POST /v2.0/packages/{packageId}/merge

curl --request POST \
  --url https://api-trial.cognigy.ai/new/v2.0/packages/{packageId}/merge \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "resourceIds": [
    "<string>"
  ],
  "strategies": [
    {
      "_id": "<string>",
      "rename": "new flow",
      "autoRename": true,
      "identityConflictStrategy": "abort",
      "mergeStrategy": {
        "replaceContent": true,
        "replaceStructure": true,
        "localeOverrides": [
          {
            "replaceContent": true,
            "localeId": "<string>"
          }
        ]
      }
    }
  ],
  "localeMapping": [
    {
      "agentLocaleId": "<string>",
      "packageLocaleId": "<string>"
    }
  ]
}
'

Response Codes

Status Code Description
202 Task to merge the Package successfully created.
400 Bad Request Error.
401 Unauthorized Error.
402 Payment Required Error.
403 Forbidden Error.
404 Not Found Error.
405 Method Not Allowed Error.
409 Conflict Error.
413 Payload Too Large Error.
500 Internal Server Error.
501 Not Implemented Error.
502 Bad Gateway Error.
503 Service Unavailable Error.
504 Gateway Timeout Error.

Example Request Body

{
  "resourceIds": [
    "<string>"
  ],
  "strategies": [
    {
      "_id": "<string>",
      "rename": "new flow",
      "autoRename": true,
      "identityConflictStrategy": "abort",
      "mergeStrategy": {
        "replaceContent": true,
        "replaceStructure": true,
        "localeOverrides": [
          {
            "replaceContent": true,
            "localeId": "<string>"
          }
        ]
      }
    }
  ],
  "localeMapping": [
    {
      "agentLocaleId": "<string>",
      "packageLocaleId": "<string>"
    }
  ]
}

Response Example

{
  "_id": "<string>",
  "status": "queued",
  "type": "trainIntents",
  "parameters": {},
  "lastChangedAt": 1594243850,
  "lastCreatedAt": 1594243850,
  "currentStep": 0,
  "totalStep": 100
}

Authorizations

X-API-Key Required in HTTP Header.