Create a Prompt Template in a Project

post

/ic/api/integration/v1/projects/{projectId}/ai/templates

Creates a new Prompt Template under the specified project.

Request

Path Parameters
Query Parameters
Supported Media Types
Request Body - application/json;charset=utf-8 ()
Root Schema : schema
Match All
Show Source
Nested Schema : IdRs
Match All
Show Source
Nested Schema : GenericRestRs
Type: object
Show Source
Nested Schema : IdRs-allOf[1]
Type: object
Show Source
Nested Schema : type
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : IdRs
Match All
Show Source
Nested Schema : GenericRestRs
Type: object
Show Source
Nested Schema : IdRs-allOf[1]
Type: object
Show Source
Nested Schema : type
Type: object
Show Source

500 Response

Server error
Back to Top

Examples

The following example shows how to create a prompt template in a project by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.

Example: Create a prompt template ORDER_CREATION_PROMPT in project TEST_PROJECT

This command consumes JSON data and creates a prompt template under the specified project.

curl -X POST -H 'Authorization: Bearer access_token' -H "Content-Type:application/json" -d @template.json https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/projects/TEST_PROJECT/ai/templates?integrationInstance=service-instance

Request Body:

The following example shows the contents of the request body in JSON format. This is the content of the template.json file listed in the cURL command with the -d option.

{
  "name": "ORDER_CREATION_PROMPT",
  "code": "ORDER_CREATION_PROMPT",
  "description": "Prompt template for order creation scenarios",
  "content": "Create an order using the provided customer and product details."
}

Attributes

  • name

    A human-readable name for the prompt.

  • code

    A unique identifier for the prompt within the project.

  • description

    A textual description of the prompt’s intent and usage.

  • content

    The actual prompt text provided to the AI model.

Back to Top