Version: 6.3.3

External-API Skills

General instructions for defining Skills of all types are found here. This page contains details specific to the development of external API type Skills.

Template files

When you run the cortex workspaces generate command or create a Skill in any other way template files are generated. During the Skill Building lifecycle you may modify these files.

  • - a getting started helper
  • skill.yaml - a starter Skill definition for the cortex/external-api runtime
  • message.json- Contains the payload needed to invoke the Skill

The External API file structure looks like this:

├─ skills
│ └─ smmexapi
│ ├─ skill.yaml
│ └─ invoke
│ └─ request
│ └─ message.json
└─ docs
└─ smmexapi

Skill Definition

The Skill provides a wrapper for the action and (optionally the model) that specifies the properties, parameters, and routing required to run.

The Skill is defined in the skill.yaml. For general information about Skills go to the Define Skills page.

Example external-api skill.yaml

camel: 1.0.0
name: smmexapi
title: smmexapi Title
description: smmexapi Description
- name: request
title: request
output: response
runtime: cortex/external-api
- name: response
title: response
- name: url
title: URL
description: http[s]://host:port
required: true
type: String
- name: path
title: API path
description: API URL Path
required: true
type: String
defaultValue: post
- name: method
title: HTTP Method
description: HTTP Method
required: true
type: String
defaultValue: POST
- name: headers.content-type
title: Content-Type header
description: Response Content Type
required: true
type: String
defaultValue: 'application/json'