Generate Project Business Policy JavaScript

post

/ic/api/integration/v1/projects/{projectId}/mcp/policies/business/actions/generate

Generates JavaScript for a project MCP business policy from a selected MCP server tool and free-text business rule prompt.

Request

Path Parameters
Query Parameters
  • This is the name of the service instance. You can get this value from the About page where it is specified in the Service instance field.
    Example:
    example-instance
Supported Media Types
Request Body - application/json; charset=utf-8 ()
Root Schema : schema
Type: object
Business policy JavaScript generation request.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : MCPBusinessPolicyGenerateResponseRs
Type: object
Generated business policy JavaScript response.
Show Source
Nested Schema : config
Type: object
Additional Properties Allowed: true
Policy-type-specific configuration. Its required fields depend on the policy type.
Nested Schema : warnings
Type: array
Warnings produced while generating the policy.
Show Source

400 Response

Malformed parameters

401 Response

Unauthorized or insufficient design-time permissions

404 Response

Project or resource not found, or the MCP feature is not available

500 Response

Server error
Back to Top

Examples

The following example shows how to generate JavaScript for a project MCP business policy from a selected MCP server tool and a free-text business rule prompt 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: Generate Project Business Policy JavaScript

curl --request POST --include \
  --url "${BASE_URL}/ic/api/integration/v1/projects/${PROJECT_ID}/mcp/policies/business/actions/generate?integrationInstance=${INTEGRATION_INSTANCE}" \
  --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json; charset=utf-8" \
  --data-raw '{
  "serverId": "MCP_SERVER",
  "toolName": "get_weather",
  "prompt": "Allow the request only when the city argument is non-empty. Otherwise deny the request."
}'
Back to Top