question

newuser-31192751-60f9-4267-8c62-20e21fb66062 avatar image

Problem during job definition for interaction model creation

Hello, as title says I had problems with job definition for interaction model creation.

I created my catalog with command : ask smapi create-interaction-model-catalog --catalog-name myCatalogName --profile myProfile


Than a catalog version : ask smapi create-interaction-model-catalog-version --catalog-id myCatalogID --source-type URL --source-url "myJsonUrl" --description "initial" --profile myProfile


Now my catalog is successfully created and i can also check it with the command : ask smapi list-interaction-model-catalogs --profile myProfile
And i become my catalog id and name as it should be.

When I run the command without the profile : ask smapi list-interaction-model-catalogs

Than I don't become the catalog id and name as it should be, so the catalog is created and it is in the right profile.


Than i try to create a job using the following Json file :

{

"vendorId": "myVendorID",

"jobDefinition": {

"type": "ReferenceVersionUpdate",

"resource": {

"type": "InteractionModel",

"locales": ["de-DE"],

"id": "myAlexaSkillID"

},

"references": [{

"type": "Catalog",

"id": "myCatalogID"

}],

"trigger": {

"type": "ReferencedResourceJobsComplete"

},

"publishToLive": false,

"status": "ENABLED"

}

}

with the command : ask smapi create-job-definition-for-interaction-model --job-definition

"file:pathToMyJsonFile" --profile myProfile


Sadly after that command i become always a negative response :

[Error]: {

"name": "ServiceError",

"statusCode": 404,

"headers": [ ........... ],

"response": {

"message": "Dependent entity=myCatalogID not found"

}

}


myCatalogID is correct and it exist on myProfile, same with myVendorID I use the correct one.

Any clue about this error?

smapi
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

newuser-31192751-60f9-4267-8c62-20e21fb66062 avatar image
newuser-31192751-60f9-4267-8c62-20e21fb66062 answered

Ok I've solved the problem by myself.

In case someone need it, the problem was i needed a job of Scheduled type before I create my job of ReferenceVersionUpdate type.


{

"vendorId": "myVendorId",

"jobDefinition": {

"type": "CatalogAutoRefresh",

"resource": {

"type": "Catalog",

"id": "myCatalogID"

},

"trigger": {

"type": "Scheduled",

"hour": integer,

"dayOfWeek": Integer

},

"status": "ENABLED"

}

}

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.