cockpit.json•7.66 kB
{
"nodeType": "n8n-nodes-base.cockpit",
"displayName": "Cockpit",
"description": "Consume Cockpit API",
"version": 1,
"properties": [
{
"name": "collection",
"displayName": "Collection Name or ID",
"type": "options",
"default": "",
"description": "Name of the collection to operate on. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
"required": true,
"displayOptions": {
"show": {
"resource": [
"collection"
]
}
}
},
{
"name": "returnAll",
"displayName": "Return All",
"type": "boolean",
"default": false,
"description": "Whether to return all results or only up to a given limit",
"displayOptions": {
"show": {
"operation": [
"getAll"
],
"resource": [
"collection"
]
}
}
},
{
"name": "limit",
"displayName": "Limit",
"type": "number",
"default": 100,
"description": "Max number of results to return",
"typeOptions": {
"minValue": 1,
"maxValue": 500
},
"displayOptions": {
"show": {
"operation": [
"getAll"
],
"resource": [
"collection"
],
"returnAll": [
false
]
}
}
},
{
"name": "options",
"displayName": "Options",
"type": "collection",
"default": {},
"description": "Comma-separated list of fields to get",
"placeholder": "Add option",
"options": [
{
"name": "fields",
"displayName": "Fields",
"type": "string",
"default": "",
"description": "Comma-separated list of fields to get",
"placeholder": "_id,name"
},
{
"name": "filter",
"displayName": "Filter Query",
"type": "json",
"default": "",
"description": "Filter query in <a href=\"https://jeroen.github.io/mongolite/query-data.html\">Mongolite format</a>",
"placeholder": "{\"name\": \"Jim\"}"
},
{
"name": "language",
"displayName": "Language",
"type": "string",
"default": "",
"description": "Return normalized language fields"
},
{
"name": "populate",
"displayName": "Populate",
"type": "boolean",
"default": true,
"description": "Whether to resolve linked collection items"
},
{
"name": "rawData",
"displayName": "RAW Data",
"type": "boolean",
"default": false,
"description": "Whether to return the data exactly in the way it got received from the API"
},
{
"name": "skip",
"displayName": "Skip",
"type": "number",
"default": "",
"description": "Skip number of entries"
},
{
"name": "sort",
"displayName": "Sort Query",
"type": "json",
"default": "",
"description": "Sort query in <a href=\"https://jeroen.github.io/mongolite/query-data.html\">Mongolite format</a>",
"placeholder": "{\"price\": -1}"
}
],
"displayOptions": {
"show": {
"resource": [
"collection"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "id",
"displayName": "Entry ID",
"type": "string",
"default": "",
"required": true,
"displayOptions": {
"show": {
"resource": [
"collection"
],
"operation": [
"update"
]
}
}
},
{
"name": "jsonDataFields",
"displayName": "JSON Data Fields",
"type": "boolean",
"default": false,
"description": "Whether new entry fields should be set via the value-key pair UI or JSON",
"displayOptions": {
"show": {
"resource": [
"collection"
],
"operation": [
"create",
"update"
]
}
}
},
{
"name": "dataFieldsJson",
"displayName": "Entry Data",
"type": "json",
"default": "",
"description": "Entry data to send as JSON",
"displayOptions": {
"show": {
"jsonDataFields": [
true
],
"resource": [
"collection"
],
"operation": [
"create",
"update"
]
}
}
},
{
"name": "dataFieldsUi",
"displayName": "Entry Data",
"type": "fixedCollection",
"default": {},
"description": "Name of the field",
"typeOptions": {
"multipleValues": true
},
"displayOptions": {
"show": {
"jsonDataFields": [
false
],
"resource": [
"collection"
],
"operation": [
"create",
"update"
]
}
}
},
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "getAll",
"description": "Create a collection entry",
"options": [
{
"name": "Create an Entry",
"value": "create",
"description": "Create a collection entry"
},
{
"name": "Get Many Entries",
"value": "getAll",
"description": "Get many collection entries"
},
{
"name": "Update an Entry",
"value": "update",
"description": "Update a collection entry"
}
],
"displayOptions": {
"show": {
"resource": [
"collection"
]
}
}
},
{
"name": "form",
"displayName": "Form",
"type": "string",
"default": "",
"description": "Name of the form to operate on",
"required": true,
"displayOptions": {
"show": {
"resource": [
"form"
]
}
}
},
{
"name": "singleton",
"displayName": "Singleton Name or ID",
"type": "options",
"default": "",
"description": "Name of the singleton to operate on. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
"required": true,
"displayOptions": {
"show": {
"resource": [
"singleton"
]
}
}
},
{
"name": "resource",
"displayName": "Resource",
"type": "options",
"default": "collection",
"options": [
{
"name": "Collection",
"value": "collection"
},
{
"name": "Form",
"value": "form"
},
{
"name": "Singleton",
"value": "singleton"
}
]
}
],
"credentialsConfig": [
{
"name": "cockpitApi",
"required": true
},
{
"name": "resource",
"required": false
}
],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}