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

118 lines
3.6 KiB
JSON

{
"$schema": "../../shared/schemas/conductor-project.schema.json",
"schemaVersion": "0.1.0",
"project": {
"id": "proj_visual_rest_action_authoring",
"name": "Visual REST Action Authoring",
"description": "Slice 2 fixture covering anonymous visual REST actions, Button onClick assignment, executed request templates, response bindings, and variables.",
"pages": [
{
"id": "page_main",
"name": "Main",
"order": 0,
"components": [
{
"id": "cmp_item_input",
"type": "TextInput",
"name": "itemInput",
"position": { "x": 24, "y": 24 },
"size": { "width": 260, "height": 44 },
"properties": {
"label": "Item ID",
"defaultValue": "demo-42",
"visible": true,
"disabled": false
}
},
{
"id": "cmp_lookup_button",
"type": "Button",
"name": "lookupButton",
"position": { "x": 24, "y": 88 },
"size": { "width": 160, "height": 44 },
"properties": {
"label": "Look up item",
"visible": true,
"disabled": false
},
"events": [
{ "event": "onClick", "actionId": "action_lookup_item" }
]
},
{
"id": "cmp_result",
"type": "JsonViewer",
"name": "lookupResult",
"position": { "x": 24, "y": 152 },
"size": { "width": 420, "height": 220 },
"properties": { "label": "Lookup response", "visible": true }
}
],
"events": []
}
],
"actions": [
{
"id": "action_lookup_item",
"name": "Look up item",
"description": "GET example with headers, query parameters, and a path parameter.",
"method": "GET",
"url": "https://httpbin.org/anything/{{itemId}}",
"headers": {
"Accept": "application/json",
"X-Conductor-Example": "slice-2"
},
"queryParameters": {
"include": "details",
"selectedItem": "{{components.itemInput.value}}",
"limit": "25"
},
"pathParameters": {
"itemId": "demo-42"
},
"bodyTemplate": "",
"authenticationType": "anonymous"
},
{
"id": "action_create_item",
"name": "Create item",
"description": "POST example with a JSON body template and canonical anonymous authentication.",
"method": "POST",
"url": "https://httpbin.org/anything",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
},
"queryParameters": {
"dryRun": "true"
},
"pathParameters": {},
"bodyTemplate": "{\"name\":\"Example item\",\"source\":\"conductor-slice-2\"}",
"authenticationType": "anonymous"
}
],
"bindings": [
{
"id": "binding_response_1",
"source": "actions.action_lookup_item.response.body",
"target": "components.lookupResult.value",
"trigger": "onSuccess"
},
{
"id": "binding_response_2",
"source": "actions.action_lookup_item.response.body.url",
"target": "variables.lastLookupUrl",
"trigger": "onSuccess"
}
],
"variables": {
"lastLookupUrl": {
"type": "string",
"defaultValue": "",
"description": "Ephemeral Preview value populated by the lookup response."
}
},
"settings": {}
}
}