conductor/examples/project-definitions/valid-rest-actions.json

149 lines
4.5 KiB
JSON

{
"$schema": "../../shared/schemas/conductor-project.schema.json",
"schemaVersion": "0.1.0",
"project": {
"id": "proj_rest_actions_showcase",
"name": "REST Actions Showcase",
"description": "Demonstrates all five MVP authentication types and common REST action patterns. This project has no canvas components — it exists purely to validate the REST action model.",
"pages": [
{
"id": "page_home",
"name": "Home",
"components": []
}
],
"actions": [
{
"id": "action_anonymous_get",
"name": "Fetch Public Data",
"description": "Anonymous GET — no credentials required. Fetches a public JSON resource.",
"method": "GET",
"url": "https://api.example.com/public/items",
"headers": {
"Accept": "application/json"
},
"queryParameters": {
"limit": "20",
"offset": "0"
},
"pathParameters": {},
"bodyTemplate": "",
"authenticationType": "anonymous"
},
{
"id": "action_bearer_post",
"name": "Create Item (Bearer Token)",
"description": "Authenticated POST using a Bearer token. The backend resolves the token from a named secret at execution time.",
"method": "POST",
"url": "https://api.example.com/items",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json"
},
"queryParameters": {},
"pathParameters": {},
"bodyTemplate": "{\"name\": \"{{itemName}}\", \"category\": \"{{category}}\"}",
"authenticationType": "bearerToken"
},
{
"id": "action_basic_auth_get",
"name": "Fetch Protected Resource (Basic Auth)",
"description": "GET using HTTP Basic authentication. Username and password are resolved from a server-side secret — never stored in this document.",
"method": "GET",
"url": "https://api.example.com/protected/report",
"headers": {
"Accept": "application/json"
},
"queryParameters": {
"format": "json"
},
"pathParameters": {},
"bodyTemplate": "",
"authenticationType": "basicAuth"
},
{
"id": "action_api_key_header_get",
"name": "Fetch via API Key Header",
"description": "GET authenticated by passing an API key in a request header (e.g. X-API-Key). The key value is resolved server-side.",
"method": "GET",
"url": "https://api.example.com/data/{{datasetId}}",
"headers": {
"Accept": "application/json"
},
"queryParameters": {
"page": "{{page}}"
},
"pathParameters": {
"datasetId": "{{datasetId}}"
},
"bodyTemplate": "",
"authenticationType": "apiKeyHeader"
},
{
"id": "action_api_key_query_get",
"name": "Fetch via API Key Query Parameter",
"description": "GET authenticated by appending an API key as a query parameter. The key value is resolved server-side.",
"method": "GET",
"url": "https://api.example.com/weather",
"headers": {
"Accept": "application/json"
},
"queryParameters": {
"city": "{{city}}",
"units": "metric"
},
"pathParameters": {},
"bodyTemplate": "",
"authenticationType": "apiKeyQueryParameter"
},
{
"id": "action_patch_item",
"name": "Update Item (Bearer Token)",
"description": "PATCH an existing item by path parameter ID.",
"method": "PATCH",
"url": "https://api.example.com/items/{{itemId}}",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json"
},
"queryParameters": {},
"pathParameters": {
"itemId": "{{itemId}}"
},
"bodyTemplate": "{\"status\": \"{{newStatus}}\"}",
"authenticationType": "bearerToken"
},
{
"id": "action_delete_item",
"name": "Delete Item (Bearer Token)",
"description": "DELETE an item by path parameter ID.",
"method": "DELETE",
"url": "https://api.example.com/items/{{itemId}}",
"headers": {
"Accept": "application/json"
},
"queryParameters": {},
"pathParameters": {
"itemId": "{{itemId}}"
},
"bodyTemplate": "",
"authenticationType": "bearerToken"
}
],
"bindings": [],
"variables": {},
"settings": {}
}
}