{ "openapi": "3.0.0", "info": { "title": "Skylar Compliance API", "x-logo": { "url": "data:image/png;base64,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", "backgroundColor": "#1565c0", "altText": "Skylar Compliance" }, "version": "2.0", "description": "For any queries or issues, please use the [ScienceLogic Portal](https://support.sciencelogic.com).\n\nThe Skylar Compliance RESTful API allows you to trigger all of Skylar Compliance's operations programatically.\nSkylar Compliance's web interface uses the same API for all its operations. Everything you can do through the UI can\nbe done through this API.\n\nWe are using [swagger-codegen-cli (3.0.0 branch)](https://github.com/swagger-api/swagger-codegen/tree/3.0.0) to\ngenerate a Go client library for running end to end tests internally:\n\n```bash\njava -jar swagger-codegen-cli.jar generate --lang=go --input-spec=swagger.json --output=swagger\n```\n\n# Authentication\n\nThe Skylar Compliance API supports cookie based authentication for its web interface and token based authentication for\nprogrammatic integrations.\n\n\n\n\n# Errors\n\nThe API uses standard HTTP status codes to indicate the success or failure of an API call.\nThe body of the response will be JSON in the following format:\n\n```json\n{\n \"message\": \"Input validation failed\",\n \"errors\": {\n \"Foo\": [\n \"Foo must not be left blank\",\n \"Foo needs to be at least four characters\"\n ],\n \"Bar.Foo\": [\n \"Member fields can get individual errors\"\n ],\n \"Baz[0]\": [\n \"Array can have entries get individual errors\"\n ],\n \"Baz[1]\": [\n \"Array can have entries get individual errors\"\n ],\n \"Bar.Foo.Baz[123].Quoo\": [\n \"Example of a nested array error\"\n ]\n }\n}\n```\n\nThe `errors` field can give additional details for parts of a request that led to the current error.\n\n# Pagination\n\nMost endpoints that return a list of entities such as devices, credentials, users, etc. support pagination. Please\nuse `limit` and `offset` query parameters to specify the range of records you would like to retrieve. Paginated\nendpoints will return the requested offset, limit and total in the response JSON.\n\n```json\n{\n offset: 123,\n limit: 100,\n total: 500,\n data: []\n}\n```\n\n# Rate limiting\n\nOnly the login endpoint is rate limited. The maximum number of login attempts per minute is set \naccording to the `MaxLoginAttemptsPerMinute` configuration. The default value is 3 login attempts per minute.\n\n# Schedules\n\nIn order to express periodic events, Skylar Compliance uses a cron-like syntax.\n\nA schedule expression consists of seven parts:\n\n```\n \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 minute (0 - 59)\n \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 hour (0 - 23)\n \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of the month (1 - 31)\n \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 month (1 - 12)\n \u2502 \u2502 \u2502 \u2502 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 day of the week (0 - 6) (Sunday to Saturday) or\n \u2502 \u2502 \u2502 \u2502 \u2502 day of the week / every X weeks\n \u2502 \u2502 \u2502 \u2502 \u2502\n \u2502 \u2502 \u2502 \u2502 \u2502\n0 * * * * * *\n```\n\nAs an extension to the normal `crontab` syntax Skylar Compliance will interpret a step (indicated by a `/` character) in\nthe day of the week section as the number of weeks between scheduled events. For example the day of week section\n`4/5` will cause the event to trigger every 5 weeks on the 4th day of the week (Thursday).\n\n**Please note:** Even though the first and last part are ignored, they _have_ to be provided regardless!\n\n# Encryption\n\nWhen starting up Retorepoint, the data partition will be encrypted. Programmatic access to the API via token will\nnot be possible until Skylar Compliance has decrypted its encrypted partition.\n\nAll endpoints will return `503 Service Unavailable` with a JSON payload as shown below until the correct encryption\npassword has been sent via `POST /login` and decryption has finished.\n\n```json\n{\n \"EncryptionStatus\": \"Encrypted\"\n}\n```\n\n`EncryptionStatus` will be set to `Decrypting` during decryption and could end up being set to `Failure` in case\nit was impossible to decrypt the encrypted data partition.\n\n# Skylar Compliance Unavailable\n\nWhenever an installation or update is requested, the box is unable to fulfill any API request.\n\nAll endpoints will return `503 Service Unavailable` with a JSON payload as shown below until the server finishes\ninstalling/updating.\n\n```json\n{\n \"Status\": \"Installing\"\n}\n```\n\n ```json\n{\n \"Status\": \"Updating\"\n}\n```\n" }, "servers": [ { "url": "/api/v2" } ], "tags": [ { "name": "Agent", "description": "Agents allow a Skylar Compliance appliance to manage devices located on a remote or otherwise disjointed network, not\ndirectly routable by Skylar Compliance, without the need of complex firewall changes, Network Address Translation, or\nVPNs. For instance, a Service Provider can set up a central Skylar Compliance appliance and deploy agents on customer\nnetworks, enabling backups of devices on remote sites.\n\nAn Agent can be deployed as a Virtual or Hardware appliance on the remote network; the Agent provides faster\noperations by locally performing all the tasks that would typically require extensive network interaction.\nConfigurations, logs, etc. are processed locally by the agent, and uploaded to the master Skylar Compliance appliance.\n\n**Please note:** Agents are only available with an Enterprise licence.\n" }, { "name": "Agent/Debug", "description": "Endpoints that can aid in debugging agent problems.\n" }, { "name": "Agent/Remote", "description": "Start and stop remote support access on agents.\n" }, { "name": "Backup", "description": "A device backup can encapsulates one or more device configurations. Depending on the type of device, a device\nbackup might be a simple text file or a multi-gigabyte TGZ.\n" }, { "name": "Command", "description": "Skylar Compliance allows you to send a CLI command to a device or group of devices and capture the output of the\ncommand. This is a very convenient tool to perform a task concurrently on a group of devices, such as changing\nthe administrator password.\n\n### Using variables\n\nCommands can be parameterised for different devices, using the format `$parameter$`, where `$` is the Variable\nDelimiter you've set for your Command. For instance, to change the admin password for a number of ScreenOS\ndevices, select the devices and enter the command:\n\n```\nset admin password $password$\n```\n\nWhen running a parameterised command against devices, you have to pass a replacement value for each device.\n\n**Note:** A parameter can only consist of letters, numbers, and the underscore character `_`. If the replacement\nstring contains escape sequences (such as `\\n`), they must be double-escaped (`\\\\n`).\n\n### Lua Functions Inputs\n\nLua Functions commands support parameterized inputs that are passed to the function. Each input can have:\n- **Source: text** - Hardcoded value when creating the command\n- **Source: prompt** - User is prompted to enter value when running the command\n- **Source: csv** - Values are imported from a CSV file\n\nInputs can be marked as `Secret` to hide values in outputs and transcripts.\n" }, { "name": "Command/Output", "description": "Logs from running [scheduled commands](#tag/CommandSchedule) with `StoreLog` enabled can be retrieved here.\n" }, { "name": "Command/Schedule", "description": "Commands can be scheduled to run automatically at defined intervals or once.\n" }, { "name": "Command/Variables", "description": "Commands can have one or multiple variables. The user can upload a csv file with a list of variables and they will\nbe parsed and used when running the command.\n" }, { "name": "Credential", "description": "Set of username and up to two passwords that can be used across multiple devices.\n" }, { "name": "Credential/Bulk", "description": "Allows creating or updating multiple credentials at once. It will create a scheduled task with the given credentials and create a log\nentry for the beginning and end of the credentials creation/modification.\n" }, { "name": "Credential/Provider/CyberArk", "description": "Allows retrieving credentials from the external vault.\n" }, { "name": "Device", "description": "Devices are Skylar Compliance's representation of physical or virtual network devices.\n" }, { "name": "Device/Backup", "description": "A device backup can encapsulates one or more device configurations. Depending on the type of device, a device\nbackup might be a simple text file or a multi-gigabyte TGZ.\n" }, { "name": "Device/BulkCreate", "description": "Allows creating multiple devices at once. It will create a scheduled task with the given devices and create a log\nentry for each device creation and one when all the devices are created.\n" }, { "name": "Device/BulkEdit", "description": "Allows editing multiple devices at once. This losely follows the structure of the [Device](#tag/Device) model.\n\nSkylar Compliance will aggregate values for individual settings.\n\n**String** values that are not the same across all selected devices will be returned as `[Multiple]`. You can\neither override all values by setting a different value or leave unchanged by passing back `[Multiple]`.\n\n**Boolean** values on the [Device](#tag/Device) model will have their equivalent field as integers, with `-1`\nmeaning multiple values, `0` for `false` and `1` for `true`. Either set a new value for a field or pass back `-1`\nto leave it unchanged.\n\n**Integers** will use `-1` to denote multiple values. Either set a new value for a field or pass back `-1` to\nleave it unchanged.\n\nPlease note that not all fields of the [Device](#tag/Device) model can be edited this way.\n" }, { "name": "Dictionary", "description": "Dictionaries for various auto-complete and search filter settings.\n" }, { "name": "Discovery", "description": "The Skylar Compliance device discovery engine uses a variety of methods to discover hosts on your network that can be\nimported into the main device list. You can also be notified by email of new devices that are installed on your\nnetwork.\n\n**Note:** Device discovery is not guaranteed to discover all the relevant devices on your network; firewalls or\nthe device configuration itself may negatively affect the discovery process. Similarly, the device type may not\nalways be detected correctly; however, when you import a device, you will be able to override the detected type.\n" }, { "name": "Discovery/Device", "description": "New devices as discovered by a manual or scheduled device discovery run will appear here.\n" }, { "name": "Domain", "description": "Domains allow you to organise devices into separate domains, and delegate their management to Domain\nAdministrators.\n\nA typical use is for Service Providers managing multiple customers, or large enterprises with separate teams,\nwhere it is essential to restrict the scope of administrators to a subset of network devices.\n\n**Please note:** Domains are only available with an Enterprise licence.\n" }, { "name": "Download", "description": "An endpoint to download files from.\n" }, { "name": "Export", "description": "Allows you to export device configurations, logs and settings for multiple devices or domains.\n" }, { "name": "Export/Policy", "description": "Automatically export device configurations to a specified file server.\n\nPlease do not mistake this for the [device policy export](#operation/export_device_policies) endpoint.\n" }, { "name": "Fileserver", "description": "A file server represents a remote storage location that can be used for archiving Skylar Compliance, exporting backups\nand automated exports.\n\n## Supported connection methods\n\n* FTP\n* SFTP\n* SCP\n* CIFS\n* [Amazon S3](https://aws.amazon.com/s3/)\n* [Azure Blob Storage](https://azure.microsoft.com/en-gb/services/storage/blobs/)\n\n## CIFS version\n\nSkylar Compliance uses [smbmount](https://linux.die.net/man/8/smbmount) for CIFS. You can specify an optional\n`CifsVersion` parameter to set the version corresponding to the file server you are trying to connect to:\n\n* `3.0` is SMB3 i.e. Windows 8, Windows Server 2012\n* `2.1` is SMB2_10 i.e. Windows 7, Windows Server 2008 R2\n* `2.0` is SMB2_02 i.e. Vista SP1, Windows Server 2008\n* `1.0` is NT1 i.e. Windows 95, NT 4.0\n" }, { "name": "Firmware", "description": "Skylar Compliance can act as a repository for device firmware/software, allowing you to upload files like firmware\nimages and ISO images to the appliance. Software images can also be pushed to supported devices.\n" }, { "name": "Job", "description": "Jobs represent a running task in Skylar Compliance, such as a running device backup, command or creating an archive of\nSkylar Compliance.\n\nNormally, a job transitions from:\n\n`Pending` -> `Running` -> `Done`\n\nOnce a job is done, it will stay visible for an additional 5 seconds.\n" }, { "name": "Label", "description": "Labels are a way of attaching meta information to devices. They allow for arbitrary grouping and selection of\ndevices that can go beyond the use of device specific information fields. They help you organize and tag your\ndevices so you can track and find the devices for a given task or operation.\n\nYou can define an unlimited number of labels and assign as many labels to a device as you like. You can use\ncolours to distinguish labels and use that as a way to differentiate between process, state or some other\nsecondary categorisation.\n\n### Examples\n\nYou could use `Lab`, `Dev`, `PreProd`, `Prod` to denote device deployment state.\n\nYou could define a `TODO` label to mark devices that need manual checking at a later date.\n\nYou could attach a `Primary` and `Secondary` labels to devices in high availibility scenarios\nwhere your organisation might have standby devices.\n" }, { "name": "Log", "description": "Almost every system activity will be logged and can be retrieved\n" }, { "name": "Login", "description": "The login endpoint is used by the UI to authenticate a user. On successful login, it will set a session cookie\nthat will further authenticate API requests coming from the web interface.\n" }, { "name": "Network", "description": "Network utility endpoints.\n" }, { "name": "Permission", "description": "Permissions are the building blocks of what a user's role is entitled to perform. Permissions are read-only.\n" }, { "name": "Plugin", "description": "Plugins have a number of device specific settings that are required for creating a functional device\nconfigurations for backup, restore or running commands.\n" }, { "name": "Policy", "description": "Skylar Compliance enables you to create policies that can be used to verify that your devices comply with corporate or\nregulatory guidelines.\n\nPolicies are groups of one or more rules; a rule is a pattern that is applied to configurations or device\nfirmware version, to test whether they contain a certain phrase or Regular Expressions, or if they match an\nexisting device template. If they fail the tests, a compliance violation occurs and an email alert is sent to\nthe device owner.\n" }, { "name": "Policy/Rule", "description": "Rules are the individual parts of a device policy.\n\n## Regular Expressions\n\nA regular expression specifies a set of strings as a pattern, rather than a list. For example, the pattern\n`C(o|as?)t` matches the strings Cot, Cat, and Cast, but not Coast. Skylar Compliance uses Perl-flavour Regular\nExpressions.\n\nMost characters can be used in a regular expression; however, some characters, called metacharacters, have special\nmeanings:\n\n* `()` denote grouping: `(a|b)b` matches `ab` and `bb`\n* `|` denotes an alternative (see above)\n* `^` matches the beginning of a line\n* `$` matches the end of a line\n* `.` matches any character\n* `+` denotes one or more occurrences of the previous character: `a+b` matches `ab`, `aab`, `abb`, but not `b`\n* `*` denotes zero or more occurrences of the previous character: `a*b` matches `b`, `ab`, `aab`, `aaab`\n* `?` denotes zero or one occurrences of the previous character: `a?b` matches `b` and `ab`, but not `aab` or `aaab`\n\nCharacter classes are matches for sets of possible characters, rather than just a single character. For instance:\n\n* `[bcr]at` matches `bat`, `cat` and `rat`\n* `-` can be used as a range operator in a character class, so `[a-g]` matches any character from `a` to `g`\n\nThere are some useful abbreviations for common character classes, in particular:\n\n* `\\d` matches a digit\n* `\\s` matches whitespace (a space or a tab)\n* `\\w` matches a word character (alphanumeric or a _)\n\nFor instance, `\\d\\d:\\d\\d:\\d\\d` would match a time in a hh:mm:ss format.\n\nFor more information and examples of regular expressions, please see\n[this reference guide](http://www.regularexpressions.info/reference.html).\n\n## Lua Functions\n\nRules can be defined as Lua functions.\n\nAvailable functions for compliance rules are:\n\n* `nextline()` returns the next line of text\n* `getline(n)` returns the given line of text\n* `numlines()` returns the number of lines\n* `addmessage(m)` allows you to replace a series of variables in the remediation text. For instance,\n `addmessage(\"Hello\")` with a remediation text of `$1` \"World!\" would produce the output `Hello World!`. The next\n `addmessage` call would replace `$2`, and so on.\n\n### Example\n\nThis function checks that the number of lines containing \"configure\" matches the lines containing \"port\":\n\n```lua\nnum1 = 0\nnum2 = 0\nline, next = nextline()\nwhile next do\n if line:match(\"configure\") then num1 = num1+1 end\n if line:match(\"port\") then num2 = num2+1 end\n line, next = nextline\nend\nif num1 > num2 then addmessage(\"more\")\nelse if num2 < num1 then addmessage(\"less\") end\nreturn num1 == num2\n```\n\nRemediation Text: `Config contains $1 configures than ports.`\n\n## Remediation\n\nRemediation is an action to be performed when a compliance rule is not met, generally intended to rectify the\nviolation. The following remediation types can be configured:\n\n* `Manual`: in this case, the remediation text will simply be appended to the notification email, signifying that\n the recipient should take the appropriate action.\n* `Command`: this will execute one of the stored Actions on the device (see Controlling a device).\n* `Automatic`: this setting will treat the text specified in the textbox as a command and execute it on the\n device.\n\nIf the rule match type is **Regex**, the remediation can make use of the **Capture** feature, whereby parts of\nthe pattern in brackets can be captured and then referred to in the remediation text (as `$1`, `$2`, etc.).\nFor example, a rule may state that a configuration must not contain the regex:\n\n```\nset telnet (\\d+\\.\\d+\\.\\d+\\.\\d+)\n```\n\nwhere the part in brackets is a match for an IP address. If this rule is violated, the configuration can be\nremedied using the phrase:\n\n```\nunset telnet $1\n```\n\nIn this case, the brackets in the rule will capture the IP address, and fill it in when the command is performed, expanding to\n\n```\nunset telnet 1.2.3.4\n```\n\nif that was the matched IP address.\n" }, { "name": "Policy/Variable", "description": "Policy variables can be used in compliance rules as variable replacements, referenced with the `$replace$` format,\nwhere `replace` is the variable name you have defined. This enables you to use a variable as shorthand\nfor configuration elements, that are likely to be referenced multiple times.\n\nFor instance, if you create a definition of `Gateway`, and assign it a Value of `192.168.0.1`, you can then use\nit in a compliance rule, e.g. a Configuration rule the Must Contain the Regex `ip default-gateway $Gateway$`.\n\nThis rule will be expanded to `ip default-gateway 192.168.0.1`. If later, the gateway address changes, simply\nchange the `Value` of the Gateway variable definition, and all rules that use the `$Gateway$` variable will be\nupdated automatically.\n" }, { "name": "Preference", "description": "Preferences are a set of user specific settings, tied to the UI, that should be persisted on the database\nside and should reflect on the UI by default.\n" }, { "name": "Role", "description": "In addition to the standard built-in roles (`Admin`, `Backup`, and `View Only`), which cannot be edited,\nit is possible to define granular, custom roles, which specify in detail which product elements are accessible to\nthe user.\n\n**Please note:** Custom roles are only available with an Enterprise licence.\n" }, { "name": "Schedule", "description": "Allows a view of the next occurence of all scheduled events including device backups, Skylar Compliance archival,\ndevice discovery as well as reporting.\n" }, { "name": "Settings/Alerts", "description": "Configure system email alert settings.\n" }, { "name": "Settings/Appliance", "description": "Allows you to set general appliance settings as well as triggering global appliance actions.\n" }, { "name": "Settings/Appliance/Actions", "description": "Trigger global appliance actions.\n" }, { "name": "Settings/Appliance/Debug", "description": "Endpoints that can aid in debugging appliance problems.\n" }, { "name": "Settings/Appliance/Logo", "description": "Add, update or reset a custom logo for the appliance UI.\n" }, { "name": "Settings/Appliance/Support", "description": "Start and stop remote support sessions.\n" }, { "name": "Settings/Appliance/Updates", "description": "Check, retrieve and update the appliance.\n" }, { "name": "Settings/Archive", "description": "You can prepare for disaster recovery scenarios by archiving the Skylar Compliance configuration. This allows you to\nback up the Skylar Compliance appliance automatically, to up to two remote servers, including all device configurations\nstored on Skylar Compliance.\n" }, { "name": "Settings/Assetfield", "description": "Configure device asset information fields including location, asset tag, and serial number.\n" }, { "name": "Settings/Assetfield/Notifications", "description": "Configure device asset notify address.\n" }, { "name": "Settings/Authentication", "description": "Allows you to configure additional authentication methods for Skylar Compliance. Supported methods are:\n\n* RADIUS\n* SAML\n* LDAP\n" }, { "name": "Settings/Device", "description": "Allows you to set default device settings that are inherited whenever a new device is added but can be overriden.\n" }, { "name": "Settings/Discovery", "description": "Allows you to set device discovery settings for manual or scheduled device discovery runs.\n" }, { "name": "Settings/HA", "description": "High Availability (HA) provides a way to minimise the effects of hardware failure, by configuring two Skylar Compliance\nappliances in a cluster.\n\nUnder normal operating conditions, the primary cluster member is active and the secondary is in standby mode; the\nactive appliance performs all network operations, and replicates all settings and device configurations to the\nstandby appliance. Skylar Compliance replicates data both incrementally (for instance, just after a backup is retrieved\nfrom a device) and by performing full synchronisations on a regular basis.\n\nShould the primary member become unavailable because of hardware failure, other network problem, or losing power,\nthe secondary member will automatically become Active, and carry on as normal. If the primary recovers, it will\nautomatically take over from the secondary and become active.\n\nHA does not require the appliance to be installed on the same network, as long as the traffic requirements are\nmet (see below).\n\nSoftware updates and upgrades are managed at the cluster level; updating the active appliance will automatically\nupdate the standby appliance.\n\n### Requirements\n\n* High Availability is a separately licensed feature.\n* Only appliances of the same model can be clustered; appliance must be running the same software version.\n* Cluster members must be able to communicate over HTTPS to exchange heartbeat information and data\n synchronisation; TCP/443 traffic should be permitted bidirectionally between the appliances.\n" }, { "name": "Settings/Logs", "description": "Allows you to configure default log rentention and other logging related settings.\n" }, { "name": "Settings/Network", "description": "Allows you to set network settings such as the IP address and static routes.\n\n### Network Address Translation (NAT)\n\nSkylar Compliance may use back-connections (typically TFTP or FTP) to backup certain devices. If Skylar Compliance is\naccessing a device using back connections through a NAT router or firewall, back-connections will fail, because\nthe device will attempt to connect to the original, untranslated IP address. To avoid this problem, proceed as\nfollows:\n\n* On your firewall, create a 1:1 NAT mapping (often referred to as Static NAT or Mapped IP) to translate the IP\n address of Skylar Compliance to a public/routable IP address\n* Set the public IP address for Skylar Compliance in the `NatAddress` field. The system-wide NAT IP address defined\n here can be overridden in the Domain settings, or in each individual device's settings\n* The Back-connection NAT option also needs to be selected in any device which is accessed by Skylar Compliance through\n NAT\n\nSkylar Compliance supports multiple NAT addresses; the NAT IP address defined in this page can be overridden by the\nDomain or Device NAT IP setting.\n\n### Please note\n\nChanging the IP address to a different one will result in aborted connections.\n" }, { "name": "Settings/Passwords", "description": "Password policies allow you to configure various rules for enforcing password strength, for both devices and\nusers. These settings are used in the strength meter displayed in all password fields: the background of the\nfield will change colour, from red for an unacceptable password, to yellow for a weak password, to green for a\ngood password.\n" }, { "name": "Settings/PublicKey", "description": "Returns the default public keys for your appliance that can be used for public key authentication with devices\nthat support it.\n" }, { "name": "Settings/Security", "description": "Configure various global settings to mandate a higher level of network security for the Skylar Compliance appliance.\nSetting some of these options may cause compatibility problems with legacy devices and clients.\n" }, { "name": "Settings/Security/CSR", "description": "Manage TLS CSRs\n" }, { "name": "Settings/Security/SSH", "description": "Manage SSH settings\n" }, { "name": "Settings/Security/TLS", "description": "Configure TLS certificate and key\n" }, { "name": "Settings/SNMP", "description": "If your network has a Network Management System, you can use SNMP to perform some basic monitoring of the\nSkylar Compliance appliance. Skylar Compliance supports SNMP v1, v2c, and v3.\n" }, { "name": "Status", "description": "Retrieve status information for the appliance.\n" }, { "name": "Status/Ping", "description": "Check if appliance is ready to accept requests\n" }, { "name": "Syslog", "description": "These are the messages logged to the Skylar Compliance syslog service, by both the appliance itself and any devices\nconfigured to log to it.\n" }, { "name": "Template", "description": "Templates are specially marked-up configurations that can be pushed to multiple devices, for instance during a\nlarge deployment of similarly configured devices. Each template can contain parameters, which are substituted for\nentered values for each device pushed to. For instance, a section may be marked \"IP Address\", and this will then\nbe prompted for when pushing to devices.\n" }, { "name": "Token", "description": "Personal access tokens are used to authenticate requests to the API. Tokens are tied to the user that created\nthem. All API operations undertaken via a personal access token are linked to the user account that created it\nand will be logged under that account's username.\n\nTokens are passed as a `Authorization` header in each request:\n\n```bash\ncurl --header \"Authorization: Custom \" \"https://skylar-compliance.example.com/api/v2/tokens\"\n```\n" }, { "name": "Transcript", "description": "Device command and backup transcripts can be retrieved here.\n" }, { "name": "User", "description": "Skylar Compliance supports three levels of user access:\n\n- **Admin:** Super User; has full control (can create/modify/delete devices and users, initiate backups/restores\n and change the appliance configuration). Admins also have an encryption password that allows Skylar Compliance to\n transition from the locked state to the normal state.\n- **Backup:** Backup Operator; can perform device backups and restores, but cannot modify devices, users, or\n appliance settings.\n- **View Only:** Monitor Operator; can only view existing backups, access logs, and verify that the system is\n operating normally.\n\n**Please note:** Administrators authenticating using RADIUS, LDAP or SAML cannot decrypt the system after a reboot.\n" }, { "name": "User/LDAP", "description": "For LDAP users to be able to login to Skylar Compliance, they need to be a member of a group and the group has to be\nadded to Skylar Compliance (with domains and roles assigned). LDAP users inherit their groups' domains and roles.\n" } ], "paths": { "/agents": { "get": { "summary": "List agents", "tags": [ "Agent" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevices" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "domain_id": { "description": "List of domain IDs included in the results", "type": "array", "items": { "type": "integer" } }, "connected": { "description": "Connected status included in the results", "type": "boolean" } } }, "filter_op": { "description": "Filter operation to use", "type": "string", "enum": [ "and", "or" ], "example": [ "or" ] }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1agents/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_agents", "description": "Retrieve all agents", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/1" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "in": "query", "name": "connected", "schema": { "type": "boolean" }, "description": "Connected status to include in the results" } ] }, "post": { "summary": "Create an agent", "tags": [ "Agent" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "create_agent", "description": "Create a new agent", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Agent", "type": "object", "description": "Agent model", "properties": { "ID": { "description": "Agent ID", "type": "integer", "example": 123 }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) an agent belongs to (if any)", "default": 0, "example": 123 }, "DomainName": { "type": "string", "readOnly": true, "description": "Name of the [Domain](#tag/Domain) an agent belongs to. Defaults to \"Global\" if no domain is set", "default": "Global" }, "SecondaryToAgentID": { "type": "integer", "description": "ID of an agent this agent is secondary to in a HA setup", "example": 124 }, "Name": { "description": "Agent name", "type": "string", "example": "Agent Fox" }, "Location": { "type": "string", "description": "Location of the agent", "example": "DC 1 Rack 4" }, "StoragePolicy": { "type": "string", "description": "Where to store backups", "default": "Master", "enum": [ "Master", "Agent", "Both" ] }, "Email": { "type": "string", "description": "Email of person responsible for the upkeep of the agent", "example": "afox@skylarcompliance.com" }, "DisconnectAlert": { "type": "boolean", "description": "Send an email alert if the agent goes offline. If the Email field is not filled in, the default notification\naddress is used\n", "default": false }, "ReconnectAlert": { "type": "boolean", "description": "Send an email alert if the agent comes back online. If the Email field is not filled in, the default notification\naddress is used\n", "default": false }, "DisableTFTP": { "type": "boolean", "description": "Expose TFTP service on Agent", "default": false }, "DisableFTP": { "type": "boolean", "description": "Expose FTP service on Agent", "default": false }, "ClientKey": { "type": "string", "description": "Connecting agent needs to set this secret in order to connect. Only returned after creating the agent or when reseting the agent password.", "example": "+e/6Ttki3HD;", "readOnly": true }, "Connected": { "type": "boolean", "description": "Connection status of an agent", "example": true, "readOnly": true }, "Address": { "type": "string", "description": "IP address of an agent", "example": "127.0.0.1" }, "Port": { "type": "integer", "description": "Address' port of an agent", "example": 8443, "readOnly": true }, "Version": { "type": "string", "description": "Current build version of an agent", "example": "20230216143235", "readOnly": true }, "Secondary": { "type": "string", "description": "IP address of the secondary node in a HA setup", "example": "127.0.0.1" }, "LastSeen": { "type": "string", "description": "Timestamp of last successful ping", "example": "2021-01-18T23:59:59.999Z", "readOnly": true }, "ResetKey": { "type": "boolean", "description": "Reset the client key. This will generate a new client key and return it in the response. The old client key will be invalidated.\n", "default": false }, "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs managed by the agent", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 123, 213, 312 ] } }, "required": [ "Name" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1agents/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DomainID": [ "Domain with ID 123 does not exist" ], "Name": [ "Must not be blank" ], "SecondaryToAgentID": [ "Agent with ID 124 does not exist" ], "StoragePolicy": [ "Must be one of 'Master', 'Agent' or 'Both'" ], "ClientKey": [ "Must be set when creating an agent" ] } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "There is already an unregistered agent" } } } } }, "parameters": [] } }, "/agents/{id}": { "get": { "summary": "Retrieve an agent", "tags": [ "Agent" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevices" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1agents/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Agent does not exist", "errors": { "ID": [ "Agent with ID 123 does not exist" ] } } } } } }, "operationId": "get_agent", "description": "Retrieve a single agent" }, "put": { "summary": "Update an agent", "tags": [ "Agent" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_agent", "description": "Update an agent", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1agents/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1agents/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1agents/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1agents~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete an agent", "tags": [ "Agent" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "delete_agent", "description": "Delete an agent", "responses": { "204": { "description": "Agent Deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1agents~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Agent ID", "in": "path", "required": true } ] }, "/agents/{id}/info": { "get": { "summary": "Get agent info", "tags": [ "Agent" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "description": "Get agent system info", "operationId": "get_agent_info", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Release": { "type": "string", "description": "Current operating system release", "example": "centos-release-8.2-2.2004.0.2.el8.x86_64" }, "Build": { "type": "string", "description": "Timestamp of current agent build", "example": "2021-01-18T23:59:59.999Z" }, "Memory": { "type": "object", "description": "Memory statistics in bytes", "properties": { "Total": { "type": "integer", "description": "Total available system memory", "example": 1234567890 }, "Used": { "type": "integer", "description": "Memory used", "example": 123456789 }, "Available": { "type": "integer", "description": "Memory free", "example": 123345678 }, "Swap": { "type": "integer", "description": "Current swap space usage", "example": 1234567 } } }, "Load": { "type": "array", "description": "1, 5, and 15 minute load averages as reported by [uptime](https://linux.die.net/man/1/uptime)", "items": { "type": "number", "format": "float" }, "example": [ 0.005859375, 0.00390625, 0 ] }, "Uptime": { "type": "integer", "description": "Time since the appliance was last started in seconds", "example": 123456 }, "Storage": { "type": "object", "description": "Disk usage (all values in bytes)", "properties": { "Total": { "type": "integer", "description": "Total storage capacity", "example": 1234567890 }, "Used": { "type": "integer", "description": "Storage used", "example": 123456789 } } } } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Agent ID", "in": "path", "required": true } ] }, "/agents/{id}/debug": { "post": { "summary": "Start debug logging", "tags": [ "Agent/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Enables debug logging on agent", "operationId": "start_agent_debug", "responses": { "204": { "description": "Debug enabled" } } }, "put": { "summary": "Stop debug logging", "tags": [ "Agent/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Disables debug logging on agent", "operationId": "stop_agent_debug", "responses": { "204": { "description": "Debug disabled" } } }, "get": { "summary": "Get agent debug state", "tags": [ "Agent/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "description": "Get agent debug state", "operationId": "get_agent_debug_state", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "IsDebug": { "type": "boolean", "description": "True if debug mode is active on agent", "example": true } } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Agent ID", "in": "path", "required": true } ] }, "/agents/{id}/debug/log": { "get": { "summary": "View debug log", "tags": [ "Agent/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "description": "Get agent debug log as a text file", "operationId": "get_agent_debug_log", "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string", "description": "The debug log content as a plain text file" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Agent ID", "in": "path", "required": true } ] }, "/agents/{id}/remote": { "post": { "summary": "Start remote access", "tags": [ "Agent/Remote" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Enables remote access on agent", "operationId": "start_agent_remote", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Port": { "type": "integer", "description": "Port number for remote access", "example": 50000 } } } } } } } }, "put": { "summary": "Stop remote access", "tags": [ "Agent/Remote" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Stop remote access on agent", "operationId": "stop_agent_remote", "responses": { "204": { "description": "Remote access stopped" } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Agent ID", "in": "path", "required": true } ] }, "/backups": { "get": { "summary": "List backups", "tags": [ "Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ListBackups" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "device_id": { "description": "List of device IDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" } }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" } } } }, "created_after": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "created_before": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "firmware": { "description": "List of firmwares used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "IOS 12.1(22)EA4", "IOS 11.4(14)EA4" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "IOS 12.1(22)EA4", "IOS 11.4(14)EA4" ] } } } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/put/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_backups", "description": "List backups of a device", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1logs/get/parameters/5" }, { "$ref": "#/paths/~1logs/get/parameters/6" }, { "$ref": "#/paths/~1logs/get/parameters/7" }, { "$ref": "#/paths/~1logs/get/parameters/8" }, { "$ref": "#/paths/~1devices~1count/parameters/31" }, { "$ref": "#/paths/~1devices~1count/parameters/32" }, { "in": "query", "name": "sort", "schema": { "type": "string", "example": "Created,-Name" }, "description": "Comma-separated fields that should be used to order the items returned. The default ordering method is ascendant, and the prefix \"-\" inverts it to be descendant.\nSortable fields are: `Name`, `Created`, `Size`, `Firmware`, `Initiator`, `Version`, and `MD5`.\n" } ] } }, "/commands": { "get": { "summary": "List commands", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "filter_op": { "description": "Filter operation to use", "type": "string", "enum": [ "and", "or" ], "example": [ "or" ] }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_commands", "description": "Retrieve all commands", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1devices/get/parameters/51" }, { "in": "query", "name": "name[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of device command names to include in the results" }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "$ref": "#/paths/~1devices~1count/parameters/1" } ] }, "post": { "summary": "Create a command", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "create_command", "description": "Create a new command", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Command", "type": "object", "description": "Command model", "properties": { "ID": { "description": "Command ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Command name", "type": "string", "example": "Show version" }, "Description": { "description": "Command description", "type": "string", "example": "Retrieve a version from a Cisco device" }, "Type": { "type": "string", "description": "The type of command to run\n", "example": "command", "default": "command", "enum": [ "command", "lua", "lua-functions" ] }, "Timeout": { "type": "integer", "description": "Timeout in seconds Skylar Compliance waits for a response from the device for each command entered. \nSkylar Compliance will wait for the entire duration, even if the device outputs a response sooner \nthan the configured duration. If multiple commands are entered, the Wait Duration should be\nconfigured to accommodate the command that the device will take the most time to generate output for.\n", "default": 30 }, "KeepInput": { "type": "boolean", "description": "Keep commands sent to the device in the response", "default": false, "example": true, "readOnly": true }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier for the device type that this command is restricted to. If left blank, a\ncommand can be run against _any_ device which can have unintended consequences.\n", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "User friendly name of the plugin this command is restricted to", "example": "Cisco IOS", "readOnly": true }, "Command": { "type": "string", "description": "The command or Lua function to run on one or more devices", "example": "hostname -b $hostname$" }, "VariableDelimiter": { "type": "string", "description": "Delimiter to use for variables in command or lua scripts.\nNot applicable for `lua-functions` type.\n", "example": "$", "default": "$", "enum": [ "$", "#", "_", "*" ] }, "ConcatenateMultiple": { "type": "boolean", "description": "Concatenates multiple device outputs into a single output", "default": false, "example": true }, "DomainIDs": { "type": "array", "items": { "type": "integer" }, "description": "An array of Domain IDs that this command is restricted to. \n", "example": [ 1, 2, 3 ] }, "DeviceIDs": { "type": "array", "items": { "type": "integer" }, "description": "An array of Devices IDs that this command is assigned to. \n", "example": [ 1, 2, 3 ] }, "ScheduleIDs": { "type": "array", "items": { "type": "integer" }, "description": "An array of Schedule IDs that this command is assigned to. \n", "example": [ 1, 2, 3 ] }, "LogTranscript": { "type": "boolean", "description": "Enables device control transcript to be captured and logged also on succesful runs.", "default": false, "example": true }, "CreatedBy": { "type": "integer", "description": "ID of the user who created the command.", "example": 123, "readOnly": true }, "Inputs": { "type": "array", "description": "Array of inputs for `lua-functions` type commands. Each input represents a parameter that will be passed to the Lua function.\nOnly applicable when Type is `lua-functions`.\n", "items": { "title": "Input", "type": "object", "description": "Input parameter for a lua-functions command. Represents a variable that will be passed to the Lua function.\n", "properties": { "Name": { "type": "string", "description": "The name of the input parameter. This is the local variable name used in the Lua function.\nMust contain only letters, digits, and underscores. Cannot start with a digit or underscore.\nCannot be a Lua reserved keyword.\n", "example": "username" }, "Type": { "type": "string", "description": "The type of the input value. Currently only `string` is supported.\n", "example": "string", "default": "string", "enum": [ "string" ] }, "Source": { "type": "string", "description": "How the input value is provided:\n- `text`: User provides a hardcoded text value when creating the command\n- `prompt`: User is prompted to enter a value when the command runs\n- `csv`: User imports values from a CSV file where column names match input names\n", "example": "text", "default": "text", "enum": [ "text", "prompt", "csv" ] }, "DefaultValue": { "type": "string", "description": "The default or hardcoded value for this input.\n- For `text` source: The actual value to use\n- For `prompt` source: Empty string (user provides value at runtime)\n- For `csv` source: Empty string (values come from CSV import at runtime)\n\nEmpty values are passed as empty strings to the Lua function, never as null.\n", "example": "admin", "default": "" }, "IsSecret": { "type": "boolean", "description": "If true, the input value is hidden/masked and redacted from outputs, transcripts, and summaries.\nApplies to all source types.\n", "example": false, "default": false } }, "required": [ "Name", "Type", "Source" ] }, "example": [ { "Name": "username", "Type": "string", "Source": "text", "DefaultValue": "admin", "IsSecret": false }, { "Name": "password", "Type": "string", "Source": "text", "DefaultValue": "", "IsSecret": true } ] }, "LuaFunctionID": { "type": "integer", "description": "ID of the stored Lua function command. Only set for\n`lua-functions` type commands.\n", "example": 42, "readOnly": true } }, "required": [ "Name", "Command", "DomainIDs" ] }, "examples": { "Command": { "value": { "Name": "Show version", "Description": "Retrieve Cisco IOS version", "Type": "command", "PluginKey": "cisco_ios", "Command": "show version" } }, "Lua": { "value": { "Name": "Check reverse patch", "Description": "Checks if reverse patch check is enabled for all interfaces", "Type": "lua", "PluginKey": "cisco_ios", "Command": "clearbuffer()\nsendget(\"show nameif | exclude Security\",\"#\")\nfor int in before():gmatch(\"\\n%S+%s+(%S+)\") do\n sendget(\"show run ip verify rev | inc \"..int,\"#\")\n out = before()\n if out:match(\"verify reverse\") then\n print(int..\": antispoofing is enabled\")\n else\n print(int..\": antispoofing is not enabled\")\n end\nend\n" } }, "LuaFunctions": { "value": { "Name": "Authenticate User", "Description": "Authenticate user with username and password", "Type": "lua-functions", "PluginKey": "cisco_ios", "Command": "result = authenticate(username, password)\nif result then\n print(\"Authentication successful for \" .. username)\n return true\nelse\n print(\"Authentication failed for \" .. username)\n return false\nend\n", "Inputs": [ { "Name": "username", "Type": "string", "Source": "text", "DefaultValue": "admin", "IsSecret": false }, { "Name": "password", "Type": "string", "Source": "text", "DefaultValue": "", "IsSecret": true } ] } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Type": [ "Must be one of 'command' or 'lua'" ], "Timeout": [ "Must be a positive number" ], "PluginKey": [ "Plugin 'foo' does not exist" ], "Command": [ "Must not be blank" ] } } } } } } } }, "/commands/perform": { "post": { "summary": "Perform a command ad-hoc, without saving the command into the database", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "CommandDevice" ] } ], "operationId": "perform_adhoc_command", "description": "Perform a command ad-hoc, without saving the command into the database", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Perform Command Model", "type": "object", "description": "Command model", "properties": { "ID": { "description": "Command ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Command name", "type": "string", "example": "Show version" }, "Description": { "description": "Command description", "type": "string", "example": "Retrieve a version from a Cisco device" }, "Type": { "type": "string", "description": "The type of command to run", "example": "command", "default": "command", "enum": [ "command", "lua", "lua-functions" ] }, "Timeout": { "type": "integer", "description": "Timeout in seconds. A command will automatically be aborted once the timeout is reached", "default": 30 }, "KeepInput": { "type": "boolean", "description": "Keep commands sent to the device in the response", "default": false, "example": true }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier for the device type that this command is restricted to. If left blank, a\ncommand can be run against _any_ device which can have unintended consequences.\n", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "User friendly name of the plugin this command is restricted to", "example": "Cisco IOS", "readOnly": true }, "Command": { "type": "string", "description": "The command or Lua function to run on one or more devices", "example": "hostname -b $hostname$" }, "VariableDelimiter": { "type": "string", "description": "Delimiter to use for variables", "example": "$", "default": "$", "enum": [ "$", "#", "_", "*" ] }, "ConcatenateMultiple": { "type": "boolean", "description": "Concatenates multiple device outputs into a single output", "default": false, "example": true }, "Devices": { "type": "array", "description": "List of devices to perform a command on", "writeOnly": true, "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "ID of a [Device](#tag/Device) to perform this command on", "example": 123 }, "Variables": { "description": "Command variables", "type": "object", "additionalProperties": { "type": "string" }, "example": { "hostname": "host.example.com" } } } } }, "LuaFunctionID": { "type": "integer", "description": "For `lua-functions` commands, the ID of the stored Lua function to run.\n", "example": 42 }, "Inputs": { "type": "array", "description": "Input definitions for `lua-functions` commands. When provided, these take\nprecedence over the stored definition so a command can be run with unsaved\nedits. Only applicable when Type is `lua-functions`.\n", "items": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/schema/properties/Inputs/items" }, "example": [ { "Name": "username", "Type": "string", "Source": "text", "DefaultValue": "admin", "IsSecret": false }, { "Name": "password", "Type": "string", "Source": "text", "DefaultValue": "", "IsSecret": true } ] } }, "required": [ "Name", "Command" ] }, "examples": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/examples" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "List of outputs for the requested command executed on selected devices", "type": "array", "items": { "$ref": "#/paths/~1commands~1outputs~1%7Bid%7D/get/responses/200/content/application~1json/schema" } }, "errors": { "description": "List of errors that occured when trying to execute the requested command on some of the selected devices", "type": "array", "items": { "type": "string" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Type": [ "Must be one of 'command' or 'lua'" ], "Timeout": [ "Must be a positive number" ], "PluginKey": [ "Plugin 'foo' does not exist" ], "Command": [ "Must not be blank" ], "Devices": [ "Can not be empty" ] } } } } } } } }, "/commands/{id}": { "get": { "summary": "Retrieve a command", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "get_command", "description": "Retrieve a single command", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command does not exist", "errors": { "ID": [ "Command with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a command", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "update_command", "description": "Update a command", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command does not exist", "errors": { "ID": [ "Command with ID 123 does not exist" ] } } } } } } }, "delete": { "summary": "Delete a command", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "delete_command", "description": "Delete a command", "responses": { "204": { "description": "Command deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command does not exist", "errors": { "ID": [ "Command with ID 123 does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command ID", "in": "path", "required": true } ] }, "/commands/{id}/perform": { "post": { "summary": "Perform command", "tags": [ "Command" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "CommandDevice" ] } ], "operationId": "perform_command", "description": "Perform command", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Devices": { "type": "array", "description": "List of devices to perform a command on", "writeOnly": true, "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "ID of a [Device](#tag/Device) to perform this command on", "example": 123 }, "Variables": { "description": "Command variables", "type": "object", "additionalProperties": { "type": "string" }, "example": { "hostname": "host.example.com" } } } } } }, "required": [ "Devices" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "List of outputs for the requested command executed on selected devices", "type": "array", "items": { "$ref": "#/paths/~1commands~1outputs~1%7Bid%7D/get/responses/200/content/application~1json/schema" } }, "errors": { "description": "List of errors that occured when trying to execute the requested command on some of the selected devices", "type": "array", "items": { "type": "string" } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Devices": [ "Can not be empty" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command does not exist", "errors": { "ID": [ "Command with ID 123 does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command ID", "in": "path", "required": true } ] }, "/commands/schedules": { "get": { "summary": "List all schedules", "tags": [ "Command/Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "list_command_schedules", "description": "Retrieve all command schedules", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" } ] } }, "/commands/{id}/schedules": { "get": { "summary": "List schedules by command id", "tags": [ "Command/Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "list_command_schedules_by_command_id", "description": "Retrieve all schedules by command id", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "string" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" }, { "$ref": "#/paths/~1devices~1count/parameters/13" } ] }, "post": { "summary": "Create a schedule", "tags": [ "Command/Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "create_command_schedule", "description": "Create a new schedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Schedule", "type": "object", "description": "Command schedule model", "properties": { "ID": { "description": "Command schedule ID", "type": "integer", "example": 123, "readOnly": true }, "CommandName": { "type": "string", "description": "Name of the [Command](#tag/Command) that is scheduled", "example": "The Command", "readOnly": true }, "CommandID": { "type": "integer", "description": "ID of the [Command](#tag/Command) that is scheduled", "example": 123 }, "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs to assign to this scheduled command. **Note:** When retrieving a list of\ncommand schedules, this field will be left blank for performance reasons.\n", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 1, 2, 3 ] }, "DeviceNames": { "type": "string", "description": "A system generated list of device names assigned to this credential set. This is limited to the first 50 devices.\n", "example": "Device A, Device B, Device C, ...", "readOnly": true }, "Type": { "type": "string", "description": "Type of schedule. Commands can be performed as `Scheduled` or `OnceAt` at given time", "default": "Scheduled", "enum": [ "Scheduled", "OnceAt" ] }, "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules) if the type of schedule is set to \"Scheduled\"", "example": "15 * * * *" }, "NextRun": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when to run this command. Type of schedule has\nto be set to \"OnceAt\"\n", "example": "2222-02-22T22:22:22.000Z", "format": "date-time", "readOnly": true }, "KeepLast": { "type": "integer", "description": "How many versions of the last [Command Output](#tag/CommandOutput) to store", "default": 1, "minimum": 1, "example": 3 }, "EmailAddress": { "type": "string", "description": "Email address which will receive this scheduled [Command Output](#tag/CommandOutput)", "example": "afox@skylarcompliance.com" }, "PolicyName": { "type": "string", "description": "Name of [Policy](#tag/Policy) to be applied after the scheduled command has run", "example": "The policy", "readOnly": true }, "PolicyID": { "type": "integer", "description": "ID of [Policy](#tag/Policy) to be applied after the scheduled command has run. 0 means no policy will be applied", "example": 123, "default": 0 }, "ConcatenateMultiple": { "type": "boolean", "description": "Concatenates multiple device outputs into a single output", "default": true, "example": true, "deprecated": true }, "LogTranscript": { "type": "boolean", "description": "Enables device control transcript to be captured and logged also on succesful runs.", "default": false, "example": true }, "Variables": { "type": "array", "description": "Schedule variables when the command has any.", "items": { "title": "CommandScheduleVariable", "type": "object", "description": "Command schedule variable model", "properties": { "Name": { "description": "Command schedule variable name", "type": "string", "example": "var1" }, "Value": { "type": "string", "description": "Command schedule variable value", "example": "ls -la" }, "DeviceID": { "type": "integer", "description": "Device id", "example": 123 } }, "required": [ "Name", "Value", "DeviceID" ] } }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) a command schedule belongs to.", "default": 0, "example": 123 }, "SplitOutputEmails": { "type": "boolean", "description": "Split grouped outputs into separate emails with each their own devices output", "default": false, "example": true }, "CreatedBy": { "type": "integer", "description": "ID of the user who created the command schedule.", "example": 123, "readOnly": true } }, "required": [ "CommandID", "DeviceIDs", "Type" ] }, "examples": { "Schedule": { "value": { "CommandID": 123, "DeviceIDs": [ 123, 124, 125 ], "Type": "Scheduled", "Schedule": "15 * * * *", "KeepLast": 3 } }, "RunOnce": { "value": { "CommandID": 123, "DeviceIDs": [ 123, 124, 125 ], "Type": "OnceAt", "NextRun": "2222-02-22T22:22:22.000Z", "EmailAddress": "afox@skylarcompliance.com" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Can not be empty" ], "Type": [ "Has to be one of 'Scheduled' or 'OnceAt'" ], "Schedule": [ "Has to be set if Type is 'Scheduled'", "Is not a valid Skylar Compliance schedule expression" ], "NextRun": [ "Has to be set if Type is 'OnceAt'", "Has to be in the future" ], "EmailAddress": [ "Is not a valid email address" ], "PolicyID": [ "Policy with ID 123 does not exist" ], "KeepLast": [ "Cannot be less than 1" ] } } } } } }, "parameters": [] }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command ID", "in": "path", "required": true } ] }, "/commands/{id}/schedules/{schedule_id}": { "get": { "summary": "Retrieve a schedule", "tags": [ "Command/Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "get_command_schedule", "description": "Retrieve a single schedule", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command schedule does not exist", "errors": { "ID": [ "Command schedule with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a schedule", "tags": [ "Command/Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "update_command_schedule", "description": "Update a schedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules~1%7Bschedule_id%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a schedule", "tags": [ "Command/Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "delete_command_schedule", "description": "Delete a schedule", "responses": { "204": { "description": "Command schedule deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1%7Bid%7D~1schedules~1%7Bschedule_id%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "schedule_id", "description": "Schedule ID", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "Command ID", "in": "path", "required": true } ] }, "/commands/outputs": { "get": { "summary": "List command outputs", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "created_after": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "created_before": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2023-01-02T15:04:05.999Z" } } }, "deviceid": { "description": "List of deviceIDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" }, "example": [ 123, 456 ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" }, "example": [ 123, 456 ] } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1commands~1outputs~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset", "total" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "list_outputs", "description": "Retrieve all outputs", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1logs/get/parameters/7" }, { "$ref": "#/paths/~1logs/get/parameters/8" }, { "in": "query", "name": "deviceid[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [Device](#tag/Device) IDs to filter command outputs on.\n", "example": [ 123, 2875, 3 ] }, { "in": "query", "name": "command_id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [Command](#tag/Command) IDs to filter command outputs on.\n", "example": [ 123, 2875, 3 ] }, { "in": "query", "name": "commandoutputgroupid[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of grouped output IDs to filter command outputs on.\n", "example": [ 43, 91 ] }, { "in": "query", "name": "id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of command output IDs to filter command outputs on.\n", "example": [ 101, 102 ] } ] } }, "/commands/outputs/{id}": { "get": { "summary": "Retrieve a command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "get_output", "description": "Retrieve a single output", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Output", "type": "object", "description": "Command output model", "properties": { "ID": { "description": "Command output ID", "type": "integer", "example": 123, "readOnly": true }, "DeviceID": { "type": "integer", "description": "ID of the [Device](#tag/Device) this output was recorded for", "example": 123, "readOnly": true }, "DeviceName": { "type": "string", "description": "Name of the [Device](#tag/Device) this output was recorded for", "example": "My Device" }, "CommandID": { "type": "integer", "description": "ID of the [Command](#tag/Command) this output was recorded for", "example": 123 }, "CommandName": { "type": "string", "description": "Name of the [Command](#tag/Command) this output was recorded for", "example": "Show version" }, "CommandScheduleID": { "type": "integer", "description": "ID of the [Command Schedule](#tag/CommandSchedule) that triggered the recording of this output", "example": 123 }, "CommandOutputGroupID": { "type": "integer", "description": "ID of the [Command Output Group](#tag/CommandOutputGroup) this output is a part of", "example": 123, "readOnly": true }, "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when the output was recorded", "example": "2222-02-22T22:22:22.000Z" }, "Started": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when execution started for this device output.", "example": "2222-02-22T22:22:00.000Z", "format": "date-time", "readOnly": true }, "Ended": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when execution ended for this device output.", "example": "2222-02-22T22:22:22.000Z", "format": "date-time", "readOnly": true }, "DurationSeconds": { "type": "number", "format": "double", "description": "Total device execution duration in seconds.", "example": 22.5, "readOnly": true }, "Output": { "type": "string", "description": "The recorded output in plain text", "example": "Cisco Internetwork Operating System Software\nIOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA8, RELEASE SOFTWARE (fc1)\nCopyright (c) 1986-2006 by cisco Systems, Inc.\nCompiled Fri 12-May-06 17:19 by myl\nImage text-base: 0x80010000, data-base: 0x8056A000\n\nROM: Bootstrap program is C2950 boot loader\n\ncisco.example.com uptime is 3 days, 2 hours, 18 minutes\nSystem returned to ROM by power-on\nSystem restarted at 09:12:44 UTC Fri Feb 5 2021\nSystem image file is \"flash:c2950-i6q4l2-mz.121-22.EA8.bin\"\n\ncisco WS-C2950-24 (RC32300) processor (revision R0) with 21004K bytes of memory.\nProcessor board ID XXYYZZXXYYZZ\nLast reset from system-reset\nRunning Standard Image\n24 FastEthernet/IEEE 802.3 interface(s)\n\n32K bytes of flash-simulated non-volatile configuration memory.\nBase ethernet MAC Address: 00:1A:2F:94:6A:00\nMotherboard assembly number: 73-5781-14\nPower supply part number: 34-0965-01\nMotherboard serial number: XXYYZZXXYYZZ\nPower supply serial number: XXYYZZXXYYZZ\nModel revision number: R0\nMotherboard revision number: A0\nModel number: WS-C2950-24\nSystem serial number: XXYYZZXXYYZZ\nConfiguration register is 0xF\n" }, "Status": { "type": "string", "description": "A value indicating whether the device's command output was successful, had warnings, or had errors.", "example": "success", "enum": [ "success", "error", "warning" ] }, "Warnings": { "type": "array", "description": "A list of warnings captured whilst running the command", "items": { "type": "string", "example": "timed out while reading prompt" }, "default": [], "example": [ "timed out while reading prompt", "retry succeeded on second attempt" ] }, "TranscriptID": { "type": "integer", "description": "ID of the transcript associated with the command output", "example": 456 } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1diff/post/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "delete": { "summary": "Delete a command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "delete_output", "description": "Delete a output", "responses": { "204": { "description": "Command output deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1diff/post/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command output ID", "in": "path", "required": true } ] }, "/commands/outputs/{id}/content": { "get": { "summary": "Retrieve paginated content lines for a command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "get_output_content", "description": "Returns a byte-range chunk of the output. Pass next_byte_offset from the previous response to page through the full content.", "parameters": [ { "schema": { "type": "integer", "default": 0 }, "name": "byte_offset", "in": "query", "required": false, "description": "Byte offset to start from. Pass next_byte_offset from the previous response to continue." } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ByteOffset", "NextByteOffset", "HasMore", "Content" ], "properties": { "ByteOffset": { "type": "integer", "description": "Byte offset of the start of this chunk." }, "NextByteOffset": { "type": "integer", "description": "Byte offset to pass on the next request to continue from where this chunk ended." }, "HasMore": { "type": "boolean", "description": "True when there is more content after this chunk." }, "Content": { "type": "string", "description": "Raw output text for this byte range." } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1diff/post/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command output ID", "in": "path", "required": true } ] }, "/commands/outputs/{id}/download": { "post": { "summary": "Download a command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "CommandDevice" ] } ], "operationId": "download_output", "description": "Download a command output as a text file\n", "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string", "description": "The command output as a plain text file\n" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1diff/post/responses/404/content/application~1json/example" } } } } }, "parameters": [] }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command output ID", "in": "path", "required": true } ] }, "/commands/outputs/{id}/export": { "get": { "summary": "Export a command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "export_output", "description": "Export a single command output as a CSV or plain-text file.\n\nUse the `format` query parameter to select the format:\n- `csv` (default) \u2014 returns a CSV file with device metadata and output columns.\n- `text` \u2014 returns a plain-text file in the format:\n ```\n Device: \n Status: \n Output:\n \n ```\n", "parameters": [ { "schema": { "type": "string", "enum": [ "csv", "text" ], "default": "csv" }, "name": "format", "in": "query", "required": false, "description": "Export format" } ], "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string", "description": "Command output exported as a CSV file" } }, "text/plain": { "schema": { "type": "string", "description": "Command output exported as a plain-text file" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1diff/post/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command output ID", "in": "path", "required": true } ] }, "/commands/outputs/diff": { "post": { "summary": "Compare outputs", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "CommandDevice" ] } ], "operationId": "diff_output", "description": "Compare two command outputs\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "CommandOutputID1": { "type": "integer", "description": "ID of the first command output to compare", "example": 123 }, "CommandOutputID2": { "type": "integer", "description": "ID of the second command output to compare", "example": 124 }, "CommandOutputGroupID1": { "type": "integer", "description": "ID of the first grouped command output to compare", "example": 123 }, "CommandOutputGroupID2": { "type": "integer", "description": "ID of the second grouped command output to compare", "example": 124 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Diff": { "type": "string", "description": "The diff as HTML", "example": "32\n
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA8, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by cisco Systems, Inc.
Compiled Fri 12-May-06 17:19 by myl
Image text-base: 0x80010000, data-base: 0x8056A000
 
ROM: Bootstrap program is C2950 boot loader
 
cisco.example.com uptime is 3 days, 2 hours, 18 minutes
System returned to ROM by power-on
System restarted at 09:12:44 UTC Fri Feb 5 2021
System image file is "flash:c2950-i6q4l2-mz.121-22.EA8.bin"
 
cisco WS-C2950-24 (RC32300) processor (revision R0) with 21004K bytes of memory.
Processor board ID XXYYZZXXYYZZ
Last reset from system-reset
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)
 
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:1A:2F:94:6A:00
Motherboard assembly number: 73-5781-14
Power supply part number: 34-0965-01
Motherboard serial number: XXYYZZXXYYZZ
Power supply serial number: XXYYZZXXYYZZ
Model revision number: R0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: XXYYZZXXYYZZ
Configuration register is 0xF
 
 
\n
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA8, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by cisco Systems, Inc.
Compiled Fri 12-May-06 17:19 by myl
Image text-base: 0x80010000, data-base: 0x8056A000
 
ROM: Bootstrap program is C2950 boot loader
 
cisco.example.com uptime is 3 days, 2 hours, 32 minutes
System returned to ROM by power-on
System restarted at 09:12:44 UTC Fri Feb 5 2021
System image file is "flash:c2950-i6q4l2-mz.121-22.EA8.bin"
 
cisco WS-C2950-24 (RC32300) processor (revision R0) with 21004K bytes of memory.
Processor board ID XXYYZZXXYYZZ
Last reset from system-reset
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)
 
32K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:1A:2F:94:6A:00
Motherboard assembly number: 73-5781-14
Power supply part number: 34-0965-01
Motherboard serial number: XXYYZZXXYYZZ
Power supply serial number: XXYYZZXXYYZZ
Model revision number: R0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: XXYYZZXXYYZZ
Configuration register is 0xF
 
 
" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Count": [ "Requires 2 outputs, but 4 are provided" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command output does not exist", "errors": { "ID": [ "Command output with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } } }, "/commands/outputs/settings": { "get": { "summary": "Get command output settings", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewSysAdmin" ] } ], "operationId": "get_command_output_settings", "description": "Get command output and transcript retention settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands~1outputs~1settings/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set command output settings", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysAdmin" ] } ], "operationId": "update_command_output_settings", "description": "Update command output and transcript retention settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "OutputsRetentionDays": { "description": "Number of days to retain command output files before deletion", "type": "integer", "minimum": 0, "example": 90 }, "TranscriptsRetentionDays": { "description": "Number of days to retain command output transcripts before deletion", "type": "integer", "minimum": 0, "example": 90 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1commands~1outputs~1settings/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "OutputsRetentionDays": [ "Must not be negative" ], "TranscriptsRetentionDays": [ "Must not be negative" ] } } } } } }, "parameters": [] } }, "/commands/outputs/groups/{id}": { "delete": { "summary": "Delete a command output group", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDeviceCommand" ] } ], "operationId": "delete_output_group", "description": "Delete a output group", "responses": { "204": { "description": "Command output group deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1grouped~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command output group ID", "in": "path", "required": true } ] }, "/commands/outputs/grouped": { "get": { "summary": "List grouped command outputs", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "created_after": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "created_before": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2023-01-02T15:04:05.999Z" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1commands~1outputs~1grouped~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset", "total" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "list_grouped_outputs", "description": "Retrieve all outputs, grouping the ones from the same group", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1logs/get/parameters/7" }, { "$ref": "#/paths/~1logs/get/parameters/8" }, { "name": "include_output", "in": "query", "required": false, "description": "When `false`, excludes the grouped `Output` field from the response.", "schema": { "type": "boolean", "default": false } }, { "name": "include_details", "in": "query", "required": false, "description": "When `false`, excludes per-device detail arrays (OutputStarted, OutputEnded, OutputDurationSeconds, TranscriptIDs, Warnings) from the response.", "schema": { "type": "boolean", "default": false } } ] } }, "/commands/outputs/grouped/{id}": { "get": { "summary": "Retrieve a grouped command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "get_grouped_output", "description": "Retrieve a single grouped output", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "GroupedCommandOutput", "type": "object", "description": "Grouped command output model", "properties": { "CommandOutputGroupID": { "type": "integer", "description": "ID of the [Command Output Group](#tag/CommandOutputGroup) this output is a part of", "example": 123, "readOnly": true }, "CommandOutputIDs": { "type": "array", "description": "A list of [Command Output](#tag/CommandOutput) IDs that belong to this group", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 123, 213, 312 ] }, "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs this output was recorded for", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 123, 213, 312 ] }, "DeviceNames": { "type": "array", "description": "A comma-separated list of [Device](#tag/Device) names this output was recorded for", "items": { "type": "string", "example": "Device A" }, "default": [], "example": [ "Device A", "Device B", "Device C" ] }, "InitiatedBy": { "type": "string", "description": "Username of the user who initiated this command output group.", "example": "User 1", "readOnly": true }, "Started": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when execution started for this grouped output.", "example": "2222-02-22T22:22:00.000Z", "format": "date-time", "readOnly": true }, "Ended": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when execution ended for this grouped output.", "example": "2222-02-22T22:22:22.000Z", "format": "date-time", "readOnly": true }, "TotalDurationSeconds": { "type": "number", "format": "double", "description": "Total grouped execution duration in seconds.", "example": 82.3, "readOnly": true }, "AverageDurationSeconds": { "type": "number", "format": "double", "description": "Average per-device execution duration in seconds for outputs in this group.", "example": 27.4, "readOnly": true }, "CommandID": { "type": "integer", "description": "ID of the [Command](#tag/Command) this output was recorded for", "example": 123 }, "CommandName": { "type": "string", "description": "Name of the [Command](#tag/Command) this output was recorded for", "example": "Show version" }, "CommandScheduleID": { "type": "integer", "description": "ID of the [Command Schedule](#tag/CommandSchedule) that triggered the recording of this output", "example": 123 }, "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when the output was recorded", "example": "2222-02-22T22:22:22.000Z" }, "Output": { "type": "string", "description": "The recorded output in plain text if not grouped; concatenated with device names for grouped outputs.\nThis field is omitted when `include_output=false` is provided in the request.\n", "example": "Foo device\nfirst line\nsecond line\nthird line\nBar device\nfirst line\nsecond line\nBaz device\nfirst line\n" }, "HashID": { "type": "integer", "description": "HashID of the data response for the [Command Output Groups](#tag/CommandOutputGroup)", "example": 321 }, "Status": { "type": "array", "description": "A list indicating whether each device's command output was successful, had warnings, or had errors.", "items": { "type": "string", "example": "Success" }, "default": [], "example": [ "Success", "Error", "Success" ] }, "OutputStarted": { "type": "array", "description": "Per-device timestamps when each device's execution started. Omitted when `include_details=false`.", "items": { "type": "string", "format": "date-time" } }, "OutputEnded": { "type": "array", "description": "Per-device timestamps when each device's execution ended. Omitted when `include_details=false`.", "items": { "type": "string", "format": "date-time" } }, "OutputDurationSeconds": { "type": "array", "description": "Per-device execution duration in seconds. Omitted when `include_details=false`.", "items": { "type": "number", "format": "double" } }, "Warnings": { "type": "array", "description": "A list of warning lists, where each nested list corresponds to the warnings for a specific device. Omitted when `include_details=false`.", "items": { "type": "array", "items": { "type": "string", "example": "timed out while reading prompt" }, "default": [], "example": [ "timed out while reading prompt", "retry succeeded on second attempt" ] }, "default": [], "example": [ [ "timed out while reading prompt" ], [ "authentication banner mismatch", "retry succeeded on second attempt" ], [] ] }, "TranscriptIDs": { "type": "array", "description": "IDs of the transcripts associated with the command outputs. Omitted when `include_details=false`.", "items": { "type": "integer", "example": 456 }, "default": [], "example": [ 456, 457 ] } }, "required": [ "CommandOutputGroupID", "CommandOutputIDs", "DeviceIDs", "DeviceNames", "CommandID", "CommandName", "CommandScheduleID", "Created" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Command output group does not exist", "errors": { "ID": [ "Command output group with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Command output group ID", "in": "path", "required": true }, { "schema": { "type": "boolean", "default": false }, "name": "include_output", "description": "When `false`, excludes the grouped `Output` field from the response.", "in": "query", "required": false }, { "schema": { "type": "boolean", "default": false }, "name": "include_details", "description": "When `false`, excludes per-device detail arrays (OutputStarted, OutputEnded, OutputDurationSeconds, TranscriptIDs, Warnings) from the response.", "in": "query", "required": false } ] }, "/commands/outputs/grouped/{outputGroupId}/export": { "get": { "summary": "Export a grouped command output", "tags": [ "Command/Output" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceCommand" ] } ], "operationId": "export_grouped_output", "description": "Export all outputs in a command output group as a CSV or plain-text file.\n\nUse the `format` query parameter to select the format:\n- `csv` (default) \u2014 returns a CSV file with one row per device, including device metadata and output columns.\n- `text` \u2014 returns a plain-text file with one block per device, separated by blank lines:\n ```\n Device: \n Status: \n Output:\n \n\n Device: \n Status: \n Output:\n \n ```\n", "parameters": [ { "schema": { "type": "string", "enum": [ "csv", "text" ], "default": "csv" }, "name": "format", "in": "query", "required": false, "description": "Export format" } ], "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string", "description": "Grouped command output exported as a CSV file" } }, "text/plain": { "schema": { "type": "string", "description": "Grouped command output exported as a plain-text file" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1commands~1outputs~1grouped~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "outputGroupId", "description": "Command output group ID", "in": "path", "required": true } ] }, "/commands/variables/csv": { "post": { "summary": "Parses a csv file and returns a list of command variables", "tags": [ "Command/Variables" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "CommandDevice" ] } ], "operationId": "parse_command_variables_from_csv", "description": "Parses the variable name, value and device address from a csv file and returns a list of command variables", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "description": "CSV data", "example": "name,value,deviceaddress\nvar1,my variable 1 value,127.0.0.1\nvar2,random value,rp23\nvar3,random value 3,::1\n" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "properties": { "data": { "type": "array", "items": { "title": "CommandVariable", "type": "object", "description": "Command variable model", "properties": { "Name": { "description": "Command variable name", "type": "string", "example": "var1", "readOnly": true }, "Value": { "type": "string", "description": "Command variable value", "example": "ls -la", "readOnly": true }, "DeviceAddress": { "type": "string", "description": "Device address or hostname", "example": "rp23", "readOnly": true } }, "required": [ "Name", "Value", "DeviceAddress" ] } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } } }, "/credentials": { "get": { "summary": "List credentials", "tags": [ "Credential" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewCredentials" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "domain_id": { "description": "List of domain IDs included in the results", "type": "array", "items": { "type": "integer" } } } }, "filter_op": { "description": "Filter operation to use", "type": "string", "enum": [ "and", "or" ], "example": [ "or" ] }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_credentials", "description": "Retrieve all credentials", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/1" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/13" } ] }, "post": { "summary": "Create credentials", "tags": [ "Credential" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "create_credential", "description": "Create a new credential", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Credential", "type": "object", "description": "Credential model", "properties": { "ID": { "description": "Credential set ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "type": "string", "description": "Name of the credential set", "example": "Sample credentials" }, "Username": { "description": "Credential username", "type": "string", "example": "root" }, "Password": { "description": "Credential password", "type": "string", "example": "Sunbreeze123" }, "Password2": { "description": "Credential secondary password", "type": "string", "example": "Password123" }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) a set of credentials belong to (if any)", "default": 0, "example": 123 }, "DomainName": { "type": "string", "readOnly": true, "description": "Name of the [Domain](#tag/Domain) a set of credentials belong to. Defaults to \"Global\" if no domain is set", "default": "Global" }, "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs to assign to this set of credentials. **Note:** When retrieving a list of\ncredentials, this field will be left blank for performance reasons.\n", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 1, 2, 3 ] }, "DeviceNames": { "type": "string", "description": "A system generated list of device names assigned to this credential set. This is limited to the first 50 devices.\n", "example": "Device A, Device B, Device C, ...", "readOnly": true }, "ProviderID": { "type": "integer", "description": "ID of the external credential provider (e.g. [CyberArk provider](#tag/Credential/Provider/CyberArk)) to retrieve secret values from\nvault and fill the `CustomFields` with them.\n", "default": 0, "example": 123, "readOnly": true }, "ProviderType": { "type": "string", "enum": [ "", "CyberArk" ], "description": "Type of the credential provider identified by `ProviderID`.", "example": "CyberArk", "default": "", "readOnly": true }, "CustomFieldKeys": { "type": "array", "description": "List of custom credential names to be assigned secret values retrieved by a credential provider identified by `ProviderID` and `ProviderType`.\n", "items": { "type": "string", "example": "sql_password" }, "default": [], "example": [ "sql_password", "encryption_password", "root_password" ] } }, "required": [ "Name" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Username": [ "Must be specified" ], "DomainID": [ "Domain with ID 123 does not exist" ] } } } } } }, "parameters": [] } }, "/credentials/bulk": { "post": { "summary": "Create credentials in bulk", "tags": [ "Credential/Bulk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredential" ] } ], "operationId": "bulk_create_credentials", "description": "Bulk creates given credentials asynchronously.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Credentials": { "type": "array", "description": "List of [Credentials](#tag/Credential) objects to create", "items": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } }, "required": [ "Credentials" ] } } } }, "responses": { "202": { "description": "Started async job where all credentials will be created", "content": { "application/json": { "schema": { "type": "object", "properties": { "JobUID": { "type": "integer", "description": "ID of the job that was started" } }, "required": [ "JobUID" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials/post/responses/400/content/application~1json/example" } } } } } }, "put": { "summary": "Update credentials in bulk", "tags": [ "Credential/Bulk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredential" ] } ], "operationId": "bulk_update_credentials", "description": "Bulk update given credentials asynchronously. Must pass the credential ID to update.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Credentials": { "type": "array", "description": "List of [Credentials](#tag/Credential) objects to update", "items": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } }, "required": [ "Credentials" ] } } } }, "responses": { "202": { "description": "Started async job where all credentials will be created", "content": { "application/json": { "schema": { "type": "object", "properties": { "JobUID": { "type": "integer", "description": "ID of the job that was started" } }, "required": [ "JobUID" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials/post/responses/400/content/application~1json/example" } } } } } } }, "/credentials/{id}": { "get": { "summary": "Retrieve credentials", "tags": [ "Credential" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "get_credential", "description": "Retrieve a single credential set", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Credential set does not exist", "errors": { "ID": [ "Credential set with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update credentials", "tags": [ "Credential" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "update_credential", "description": "Update a credential set", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete credentials", "tags": [ "Credential" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "delete_credential", "description": "Delete a credential set", "responses": { "204": { "description": "Credential deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Credential ID", "in": "path", "required": true } ] }, "/credentials/providers/cyberark": { "get": { "summary": "List CyberArk providers", "tags": [ "Credential/Provider/CyberArk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewCredentials" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "name": { "description": "CyberArk provider name", "type": "string" }, "base_url": { "description": "URL of CyberArk vault", "type": "string" }, "application_id": { "description": "CyberArk application ID", "type": "string" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1credentials~1providers~1cyberark/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_cyberark_providers", "description": "Retrieve all CyberArk credential providers", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" } ] }, "post": { "summary": "Create CyberArk provider", "tags": [ "Credential/Provider/CyberArk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "create_cyberark_provider", "description": "Create a new CyberArk credential provider", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "CyberArk credential provider request", "type": "object", "description": "CyberArk credential provider request model", "properties": { "ID": { "description": "CyberArk credential provider ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "type": "string", "description": "Name of the CyberArk credential provider", "example": "Sample credential provider" }, "BaseURL": { "type": "string", "description": "URL of CyberArk vault (service).", "example": "https://example.com/AIMWebService/api/Accounts" }, "ApplicationID": { "type": "string", "description": "Identifies an application to CyberArk vault.", "example": "Sample application ID" }, "ClientCert": { "type": "string", "description": "Contains PEM-encoded x509 client certificate for establishing secure TLS connection with CyberArk vault.", "writeOnly": true }, "ClientCertID": { "type": "string", "description": "Certificate issuer's common name concatenated with certificate's serial number.", "example": "example.com, S/N: 12345\n", "readOnly": true }, "ClientKey": { "type": "string", "description": "Contains PEM-encoded client private key.", "writeOnly": true }, "ClientKeyID": { "type": "string", "description": "RSA private key string", "example": "RSA private key", "readOnly": true }, "RootCACert": { "type": "string", "description": "Contains PEM-encoded x509 root CA certificate for establishing secure TLS connection with CyberArk vault.", "writeOnly": true }, "RootCACertID": { "type": "string", "description": "Certificate issuer's common name concatenated with certificate's serial number.", "example": "example.com, S/N: 12345\n", "readOnly": true }, "RequestTimeout": { "type": "integer", "description": "Timeout in seconds for sending HTTP request to CyberArk vault.", "example": 60 }, "QueryMap": { "type": "array", "description": "List of query map entries, each one mapping a pair of `Credential.ID` and `Credential.CustomField.Key` to a CyberArk Vault Secret (described by a query string).\n", "items": { "type": "object", "description": "Query map entry consisting of a pair of `Credential.ID`, Credential's field key and a corresponding CyberArk vault secret location (described by a query string).\n", "properties": { "CredentialID": { "type": "integer", "description": "ID of credential", "example": 123 }, "CredentialFieldKey": { "type": "string", "description": "Key of credential's field which the retrieved secret value will be assigned to", "example": "encryption_password" }, "Query": { "type": "string", "description": "Query specifying location (ID) of secret inside CyberArk vault", "example": "safe=Test&object=testobject" } }, "required": [ "CredentialID", "CredentialFieldKey", "Query" ] } } }, "required": [ "Name", "BaseURL", "ApplicationID" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials~1providers~1cyberark/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "BaseURL": [ "Must not be blank", "Must be a valid URL" ], "ApplicationID": [ "Must not be blank" ], "ClientCertFile": [ "Must not be blank", "Must be PEM encoded", "Must be a valid x509 certificate" ], "ClientKeyFile": [ "Must not be blank", "Must be PEM encoded", "Must be a valid RSA private key" ], "RootCACertFile": [ "Must not be blank", "Must be PEM encoded", "Must be a valid x509 certificate" ], "RequestTimeout": [ "Must be a valid integer" ], "QueryMap": [ "Must not be blank", "Invalid query map" ] } } } } } }, "parameters": [] } }, "/credentials/providers/cyberark/{id}": { "get": { "summary": "Retrieve CyberArk provider", "tags": [ "Credential/Provider/CyberArk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewCredentials" ] } ], "operationId": "get_cyberark_provider", "description": "Retrieve a single CyberArk credential provider", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials~1providers~1cyberark/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "CyberArk credential provider does not exist", "errors": { "ID": [ "CyberArk provider with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update CyberArk provider", "tags": [ "Credential/Provider/CyberArk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "update_cyberark_provider", "description": "Update a CyberArk credential provider", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials~1providers~1cyberark/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1credentials~1providers~1cyberark/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials~1providers~1cyberark/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials~1providers~1cyberark~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete CyberArk provider", "tags": [ "Credential/Provider/CyberArk" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyCredentials" ] } ], "operationId": "delete_cyberark_provider", "description": "Delete a CyberArk credential provider", "responses": { "204": { "description": "CyberArk provider deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1credentials~1providers~1cyberark~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "CyberArk provider ID", "in": "path", "required": true } ] }, "/devices": { "get": { "summary": "List devices", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevices" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "title": "Device Search Fields", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "manufacturer": { "description": "List of manufacturers used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Cisco", "BigIP" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "Solarwinds" ] } } }, "plugin_key": { "description": "List of plugin keys used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "cisco_ios" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "cisco_asa" ] } } }, "location": { "description": "List of locations used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Comms Rack", "ESX Server 1" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "Home Office" ] } } }, "domain_id": { "description": "List of domain IDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" } }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" } } } }, "backupstatusstring": { "description": "List of backup status used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "OK" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "Failed" ] } } }, "agent_id": { "description": "List of agent IDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" } }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" } } } }, "protocol": { "description": "List of protocols used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "ssh", "ftp" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "telnet" ] } } }, "lastbackupattempt_after": { "description": "Returned items are filtered by minimum lastbackupattempt date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "lastbackupattempt_before": { "description": "Returned items are filtered by minimum lastbackupattempt date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "lastbackup_after": { "description": "Returned items are filtered by minimum lastbackup date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "lastbackup_before": { "description": "Returned items are filtered by minimum lastbackup date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "disabled": { "description": "Disabled status included on returned items", "type": "boolean" }, "compliancestatus": { "description": "List of compliance status used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Passed" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "Failed" ] } } }, "up": { "description": "Up status included on returned items", "type": "boolean" }, "serial": { "description": "List of serial numbers used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "FCZ1047W0F9", "FKD1227W0F9" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "FJJ13427W0D1" ] } } }, "firmware": { "description": "List of firmwares used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "IOS 12.1(22)EA4", "IOS 11.4(14)EA4" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "IOS 10.1(34)EA2" ] } } }, "baseline": { "description": "List of baselines used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ 1 ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ 0 ] } } }, "updated_after": { "description": "Returned items are filtered by minimum updated date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "updated_before": { "description": "Returned items are filtered by minimum updated date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "nextbackup_after": { "description": "Returned items are filtered by minimum nextbackup date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "nextbackup_before": { "description": "Returned items are filtered by minimum nextbackup date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "model": { "description": "List of model used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "WS-C2950-24" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "WS-C2950-24" ] } } }, "state": { "description": "List of states used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Idle" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "Idle" ] } } }, "device_name": { "description": "List of device names used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Router-1", "Switch-2" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "Router-1" ] } } } } }, "filter_op": { "description": "Filter operation to use", "type": "string", "enum": [ "and", "or" ], "example": [ "or" ] }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "scoped_permissions": { "description": "Scoped permissions are used to filter the results by the user's permissions on a given domain.\nIt will only return results in the domain where the user has the specified permissions.\n", "type": "array", "items": { "type": "string" }, "example": [ "ViewDevices", "PushFirmware" ] }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_devices", "description": "Retrieve all devices", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "in": "query", "name": "scoped_permission[]", "schema": { "type": "array", "items": { "type": "string" }, "example": [ "ViewDevices", "PushFirmware" ] }, "description": "INTERNAL ONLY. This parameter might be subjected to change.\nArray of strings that should be used filter the items based on the user permissions on a given domain.\n" }, { "$ref": "#/paths/~1devices~1count/parameters/1" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/4" }, { "$ref": "#/paths/~1devices~1count/parameters/5" }, { "$ref": "#/paths/~1devices~1count/parameters/6" }, { "$ref": "#/paths/~1devices~1count/parameters/7" }, { "$ref": "#/paths/~1devices~1count/parameters/8" }, { "$ref": "#/paths/~1devices~1count/parameters/9" }, { "$ref": "#/paths/~1devices~1count/parameters/10" }, { "$ref": "#/paths/~1devices~1count/parameters/11" }, { "$ref": "#/paths/~1devices~1count/parameters/12" }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "$ref": "#/paths/~1devices~1count/parameters/14" }, { "$ref": "#/paths/~1devices~1count/parameters/15" }, { "$ref": "#/paths/~1devices~1count/parameters/16" }, { "$ref": "#/paths/~1devices~1count/parameters/17" }, { "$ref": "#/paths/~1devices~1count/parameters/18" }, { "$ref": "#/paths/~1devices~1count/parameters/19" }, { "$ref": "#/paths/~1devices~1count/parameters/20" }, { "$ref": "#/paths/~1devices~1count/parameters/21" }, { "$ref": "#/paths/~1devices~1count/parameters/22" }, { "$ref": "#/paths/~1devices~1count/parameters/23" }, { "$ref": "#/paths/~1devices~1count/parameters/24" }, { "$ref": "#/paths/~1devices~1count/parameters/25" }, { "$ref": "#/paths/~1devices~1count/parameters/26" }, { "$ref": "#/paths/~1devices~1count/parameters/27" }, { "$ref": "#/paths/~1devices~1count/parameters/28" }, { "$ref": "#/paths/~1devices~1count/parameters/29" }, { "$ref": "#/paths/~1devices~1count/parameters/30" }, { "$ref": "#/paths/~1devices~1count/parameters/31" }, { "$ref": "#/paths/~1devices~1count/parameters/32" }, { "$ref": "#/paths/~1devices~1count/parameters/33" }, { "$ref": "#/paths/~1devices~1count/parameters/34" }, { "$ref": "#/paths/~1devices~1count/parameters/35" }, { "$ref": "#/paths/~1devices~1count/parameters/36" }, { "$ref": "#/paths/~1devices~1count/parameters/37" }, { "$ref": "#/paths/~1devices~1count/parameters/38" }, { "$ref": "#/paths/~1devices~1count/parameters/39" }, { "$ref": "#/paths/~1devices~1count/parameters/40" }, { "$ref": "#/paths/~1devices~1count/parameters/41" }, { "$ref": "#/paths/~1devices~1count/parameters/42" }, { "in": "query", "name": "base_domain_id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "INTERNAL USE ONLY. List of domain IDs to include in the results. This parameter enforces the domain over the regular filters." }, { "in": "query", "name": "base_plugin_key[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "INTERNAL USE ONLY. List of keys to include in the results. This parameter enforces the plugin over the regular filters." }, { "in": "query", "name": "device_name[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of device names to include in the results", "example": [ "Router-1", "Switch-2" ] }, { "in": "query", "name": "not[device_name][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of device names to exclude from the results", "example": [ "Router-1" ] }, { "in": "query", "name": "id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of IDs to include in the results" } ] }, "post": { "summary": "Create a device", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "AddDevice" ] } ], "operationId": "create_device", "description": "Create a new device", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Device", "type": "object", "description": "Device model", "properties": { "ID": { "description": "Device ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Device name", "type": "string", "example": "Demo device" }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) a device belongs to (if any). Defaults to 0 if no domain is set", "default": 0, "example": 123 }, "DomainName": { "type": "string", "readOnly": true, "description": "Name of the [Domain](#tag/Domain) a device belongs to. Defaults to \"Global\" if no domain is set", "default": "Global" }, "LabelIDs": { "writeOnly": true, "type": "array", "description": "A list of [Label](#tag/Label) IDs attached to this device", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "Labels": { "description": "A list of [Label](#tag/Label) attached to this device", "readOnly": true, "type": "array", "items": { "type": "object", "$ref": "#/paths/~1labels/post/requestBody/content/application~1json/schema" } }, "Disabled": { "type": "boolean", "description": "Disable or enable a device", "default": false, "example": true }, "DisabledUntil": { "type": "string", "description": "Timestamp of when to re-enable a device if it is disabled. Pass an empty string `\"\"` to disable a device forever.\n", "example": "2021-01-18T23:59:59.999Z" }, "DisabledReason": { "type": "string", "description": "Reason for disabling a device" }, "Monitor": { "type": "object", "description": "Define device monitoring settings", "properties": { "Enabled": { "type": "boolean", "description": "Enable or disable device monitoring", "default": false, "example": true }, "AlertFail": { "type": "integer", "description": "Regard as down after this many failures", "example": 2 }, "IsPing": { "type": "boolean", "description": "Perform ICMP ping rather than TCP connect", "example": true, "default": false }, "AlertEmail": { "type": "boolean", "description": "Send alert email to owner after AlertFail failures", "example": false, "default": false }, "AlertEmailUp": { "type": "boolean", "example": true, "description": "Send alert email to owner when device is back up", "default": false } } }, "AssetFields": { "type": "array", "description": "List of [Assetfields](#tag/SettingsAssetField) with device specific data\n", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "Internal [Assetfield](#tag/SettingsAssetField) ID", "example": 123 }, "Name": { "type": "string", "description": "Asset field name", "example": "Location", "readOnly": true }, "Type": { "type": "string", "description": "Asset field type", "example": "text", "readOnly": true }, "Value": { "type": "string", "description": "Asset field value", "example": "Example Location" } }, "required": [ "ID", "Value" ] } }, "AdditionalInformation": { "type": "object", "description": "List of additional information values originating either from device's plugin (e.g. interfaces, static routes, version, location) or info commands.\n", "properties": { "PluginCommands": { "type": "array", "readOnly": true, "description": "List of additional information values originating from device's plugin commands.", "items": { "type": "object", "readOnly": true, "properties": { "Name": { "type": "string", "readOnly": true, "description": "Name of the plugin info type.", "example": "Static Routes" }, "Value": { "type": "string", "readOnly": true, "description": "Value of the plugin info type function output.", "example": "Default gateway: 172.16.21.254" } } } }, "InfoCommands": { "type": "array", "description": "List of additional information values originating from device's info commands. Writable only on update.", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "Info command's ID.", "example": 1 }, "Value": { "type": "string", "readOnly": true, "description": "Value of the info command output.", "example": "uptime is 2 weeks, 1 day, 22 hours, 51 minutes" } } } } } }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier (`key`) that sets the plugin a device uses", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "User friendly name of the plugin this device uses", "example": "Cisco IOS", "readOnly": true }, "PluginFields": { "$ref": "#/paths/~1devices~1test/post/requestBody/content/application~1json/schema/properties/PluginFields" }, "PublicKey": { "type": "string", "description": "Device SSH public key used by a device to communicate with Skylar Compliance when `PluginKey` is `push_device` and `Protocol` is `sftp`", "example": "ssh-rsa AAAAB3N..." }, "NotificationEmails": { "type": "array", "description": "Email addresses for notifications. Defaults to the email address of the user creating a device.", "items": { "type": "string" }, "example": [ "afox@skylarcompliance.com", "asilva@skylarcompliance.com" ] }, "Notifications": { "type": "object", "description": "Triggers for sending notification emails to the device owner", "properties": { "OnConfigChange": { "type": "boolean", "description": "Send notification if a configuration change has been detected (compares current with previous backup)", "example": true, "default": false }, "OnBackupStart": { "type": "boolean", "description": "Notify when a scheduled backup starts", "example": false, "default": false }, "OnBackupEnd": { "type": "boolean", "description": "Notify when a scheduled backup finishes", "example": false, "default": false }, "SyslogTrigger": { "type": "boolean", "description": "Enables real-time change detection if this device supports it. **Please note:** In order to use this feature,\nyou must configure the device to send its logs to Skylar Compliance using syslog.\n", "example": false, "default": false }, "SuppressDuplicatedEmail": { "type": "boolean", "default": false, "description": "In combination with `OnConfigChange` and `SyslogTrigger` being `true`, this setting supresses duplicate emails.\n", "example": false }, "LogTranscript": { "type": "boolean", "default": false, "description": "Select this option to keep a full transcript log for this device for debugging purposes. A transcript log is\nautomatically saved if the backup fails, so this is rarely needed.\n" }, "FullTranscript": { "type": "boolean", "default": false, "description": "When enabled, device transcripts will not be truncated if they surpass the size limit.\n", "example": false } } }, "BackupSchedules": { "description": "Please note: Backup schedules inherit defaults from the [/settings/device](#tag/SettingsDevice) endpoint.\n", "type": "array", "items": { "type": "object", "properties": { "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules)", "example": "15 * * * *" }, "RetainVersions": { "type": "integer", "description": "How many different versions of backups to keep (`0` for unlimited)", "example": 5, "default": 0 }, "RetainDays": { "type": "integer", "description": "How many days to retain backups", "example": 5, "default": 0 }, "DeleteDays": { "type": "integer", "description": "How many days until backups are deleted.", "example": 5, "default": 0 }, "ConfigTypes": { "type": "array", "description": "Config types to backup. This is determined by a device's plugin.", "items": { "type": "string", "default": "_default" }, "example": [ "startup", "running" ] } }, "required": [ "Schedule" ] } }, "ManualConfigTypes": { "type": "array", "default": [ "_default" ], "description": "List of configuration types that will be backed up if a manual backup is triggered.\n", "items": { "type": "string", "default": "_default" }, "example": [ "startup", "running" ] }, "BackupPrefix": { "type": "string", "description": "Prefix for backup filenames" }, "BackupStatus": { "type": "string", "readOnly": true, "description": "Status for the last device backup", "enum": [ "OK", "Failed" ] }, "Address": { "type": "string", "description": "Network address of the device. Supports IPv4, IPv6 and Hostnames", "example": [ "127.0.0.1", "::1", "skylarcompliance.com" ] }, "AgentID": { "type": "integer", "description": "ID of an [Agent](#tag/Agent) this device should communicate through. The default `0` means that Skylar Compliance will\ncommunicate with a device directly\n", "default": 0 }, "AgentName": { "type": "string", "description": "Name of the [Agent](#tag/Agent) that a device uses (if set)", "readOnly": true, "example": "An Agent" }, "Protocol": { "type": "string", "description": "Connection protocol to use. Check device's plugin for supported protocols", "example": "scp" }, "CredentialID": { "type": "integer", "description": "ID of the [Credential](#tag/Credential) assigned to this device. Credentials take precedence over any username or\npassword set for the device\n", "default": 0, "example": 123 }, "FailurePolicy": { "type": "object", "description": "What should Skylar Compliance to when a device encounters an error taking backups.\nPlease note: Inherits defaults from the [Settings/Device](#tag/SettingsDevice) endpoint.\n", "properties": { "Retries": { "type": "integer", "minimum": -1, "maximum": 6, "description": "Sets the retry policy. When `PluginKey` is `push_device`, it holds the interval between each retry, in hours.\nIf not, it holds the number of attempts. Special values are `0` (Always), which only applies when\n`PluginKey` is not `push_device` and `-1` (Never)\n", "example": 0, "default": 0 }, "Action": { "type": "string", "description": "Which action to take once the maximum amount of attempts have failed. This will either `Revert` to schedule,\nset the device to `Manual` backups or `Disable` the device. Only applies to devices which `PluginKey` is not `push_device`\n", "default": "Revert", "enum": [ "Revert", "Manual", "Disable" ], "example": "Disable" }, "Alerts": { "type": "integer", "description": "Number of attempts needed to trigger an alert. `0` means Always, `-1` Never", "example": 0, "default": 0 }, "RetryInterval": { "type": "integer", "description": "Time to wait before attempting a retry in minutes. Only applies to devices which `PluginKey` is not `push_device`", "example": 15, "default": 45 } } }, "UseAutoApply": { "type": "boolean", "writeOnly": true, "description": "If a compliance policy's auto apply rule matches and this flag is set to `true`, then those rules will be\nautomatically applied _only_ on device creation.\n", "default": false, "example": true }, "PolicyIDs": { "type": "array", "description": "A list of [Compliance policies](#tag/Policy) to apply to this device.\n**Please note:** if `UseAutoApply` is set to true on device creation, `PolicyIDs` is set automatically with any\npolicies that match and _any_ provided values are ignored.\n", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 1, 2, 3 ] }, "CurrentPolicyViolations": { "type": "array", "description": "A list of [Compliancy policy](#tag/Policy) violations for the last backup this device has.\n", "readOnly": true, "items": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema/properties/PastPolicyViolations/items" } }, "PastPolicyViolations": { "type": "array", "description": "A list of [Compliancy policy](#tag/Policy) violations for all backups except the last one this device has.\n", "readOnly": true, "items": { "title": "Policy violation", "description": "Policy violation model", "type": "object", "properties": { "Date": { "type": "string", "description": "Timestamp for when the underlying backup file was last seen.", "example": "2021-01-18T23:59:59.999Z" }, "BackupVersion": { "type": "integer", "description": "Version of the device configuration that is in violation.", "example": 123 }, "BackupID": { "type": "integer", "description": "Backup identifier for the configuration that is in violation.", "example": 123 }, "ConfigType": { "type": "string", "description": "Configuration type that is in violation.", "example": "running" }, "CommandName": { "type": "string", "description": "Name of the runtime command associated with the violation.", "example": "Show version" }, "ContextConfigType": { "type": "string", "description": "Parent configuration type for context backup violations.", "example": "running" }, "PolicyName": { "type": "string", "description": "Name of the policy that was violated.", "example": "IOS - Enable Secret Is Set" }, "PolicyID": { "type": "integer", "description": "ID of the policy that was violated.", "example": 321 }, "RuleName": { "type": "string", "description": "Name of the specific rule in the policy that was violated.", "example": "Version" }, "RuleID": { "type": "integer", "description": "ID of the policy rule that was violated.", "example": 456 }, "RuleSeverity": { "type": "string", "description": "Severity level of the policy rule.", "example": "High" }, "RuleTimestamp": { "type": "string", "description": "Timestamp for when the rule test has been performed.", "example": "2021-01-18T23:59:59.999Z" }, "Details": { "type": "string", "description": "Violation details, including a list of files and reasons.", "example": "files: tmp/foo.txt, tmp/bar.txt\nreasons: tmp/foo.txt: 7 | match me, tmp/bar.txt: 3 | don't match me" }, "Remediation": { "type": "string", "description": "Any manual remediation steps that are reqiured to resolve the violation.", "example": "Update device to version >= 6.0" } } } }, "UsePublicKeyAuthentication": { "type": "boolean", "default": false, "description": "Use public key for authenticating device connections over SSH. See [Settings/PublicKey](#tag/SettingsPublicKey)\nhow to retrieve those for your appliance.\n" }, "DisableStrictHostKeyChecking": { "type": "boolean", "default": false, "description": "Disables the ssh host key validation when performing ssh connections. Logs whether or not the key has changed." }, "BackupInterval": { "type": "string", "description": "Human readable string of the current backup interval for a device if a schedule is set. Defaults to `Manual`\nunless it's a Generic Push Device where it will default to `N/A`.\n", "default": "Manual", "readOnly": true, "example": "Every 15th minute past every hour" }, "LastBackupAttempt": { "type": "string", "description": "Timestamp of last attempted backup.\n", "example": "2021-01-18T23:59:59.999Z", "readOnly": true }, "LastSuccessfulBackup": { "type": "string", "description": "Timestamp of last completed backup.\n", "example": "2021-01-16T23:59:59.999Z", "readOnly": true }, "NextBackup": { "type": "string", "description": "Timestamp of next scheduled backup.\n", "example": "2021-01-20T23:59:59.999Z", "readOnly": true }, "Baseline": { "type": "boolean", "description": "Whether the current backup is an approved configuration.", "example": true, "readOnly": true }, "State": { "type": "string", "description": "Current state of the device.", "example": "Processing", "readOnly": true }, "Status": { "type": "string", "description": "Current status indicator.", "example": "InProgress", "readOnly": true, "enum": [ "Error", "Disabled", "InProgress", "OK" ] }, "ComplianceScore": { "type": "integer", "description": "The percentage compliance score of the device. Omitted if no compliance\npolicies have been run against the device.\n", "example": 69, "readOnly": true }, "ComplianceStatus": { "type": "string", "description": "The compliance status of the device based on compliance score. Passed if 100,\nFailed if between 0 and 100 and N/A if -1\npolicies have been run against the device.\n", "example": "Failed", "readOnly": true, "enum": [ "Passed", "Failed", "N/A" ] }, "Up": { "type": "boolean", "description": "Whether or not a device is up. Omitted if no monitors are set for this device.\n", "example": true }, "Uptime": { "type": "number", "description": "Percentage of time the device has been monitored as up. `-1` means Not Monitored.\n", "example": 100, "readOnly": true }, "BackupSize": { "type": "integer", "description": "Size of all backups for this device on disk in bytes.", "example": 123456, "readOnly": true }, "SetupComplete": { "type": "boolean", "description": "Whether or not a device setup is completed. A completed device setup includes enough information to take a backup.", "example": true, "readOnly": true }, "Model": { "type": "string", "description": "Device's model.", "example": "WS-C2950-24", "readOnly": true }, "LastSuccessfulBackupID": { "type": "integer", "description": "ID of the last successful backup", "example": 123456, "readOnly": true } }, "required": [ "Name", "PluginKey", "PluginFields", "Address", "Protocol" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "DomainID": [ "Domain with ID 123 does not exist", "Can only be set on device creation" ], "LabelIDs[0]": [ "Label with ID 123 does not exist" ], "Monitor": [ "Must be set" ], "Monitor.AlertFail": [ "Must be a positive number" ], "AssetFields[0].ID": [ "Must be set", "Assetfield ID 123 does not exist" ], "AssetFields[0].Value": [ "Must be set" ], "PluginKey": [ "Must not be blank", "Plugin 'foo' does not exist" ], "NotificationEmails[0]": [ "Is not a valid email address" ], "BackupSchedules[0].Schedule": [ "Must be set", "Is not a valid Skylar Compliance schedule expression" ], "BackupSchedules[0].ConfigTypes[0]": [ "Must not be blank", "Config type 'bar' is not valid for plugin 'foo'" ], "ManualConfigTypes[0]": [ "Must not be blank", "Config type 'bar' is not valid for plugin 'foo'" ], "Address": [ "Must not be blank (except for Push Devices)", "Must be a valid IP address" ], "AgentID": [ "Agent with ID 123 does not exist" ], "Protocol": [ "Must not be blank (except for Push Devices)" ], "CredentialID": [ "Credential set with ID 123 does not exist" ], "FailurePolicy.Retries": [ "Must be either a positive integer lesser then 168 or -1 since `PluginKey` is `push_device`", "Must be an integer between -1 and 6 since `PluginKey` is not `push_device`" ], "FailurePolicy.Action": [ "Has to be one of 'Revert', 'Manual' or 'Disable'" ], "FailurePolicy.Alerts": [ "Must be an integer between 0 and 3 since `PluginKey` is `push_device`", "Must be either -1, 0, 1 or `FailurePolicy.Retries+1` since `PluginKey` is not `push_device`" ], "FailurePolicy.RetryInterval": [ "Must be a positive number" ], "UseAutoApply": [ "Can only be set on device creation" ], "PolicyIDs[0]": [ "Policy with ID 123 does not exist" ] } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "examples": { "Global": { "value": { "message": "Maximum number of devices reached" } }, "Domain": { "value": { "message": "Maximum number of devices in domain reached" } } } } } } }, "parameters": [] }, "patch": { "summary": "Patch multiple devices", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "patch_devices", "description": "Patches multiple devices at once", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Devices Patch Request Body", "type": "object", "description": "Devices patch request body model", "properties": { "DeviceIDs": { "description": "Device IDs", "type": "array", "items": { "type": "integer", "example": 123 } }, "Disabled": { "description": "Device disabled", "type": "boolean", "example": true }, "AgentID": { "type": "integer", "description": "ID of the [Agent](#tag/Agent) that should manage the given devices.\nThe devices need to be in the agent's domain, otherwise the request will fail.\n", "default": 0, "example": 123 }, "CredentialID": { "type": "integer", "description": "ID of the [Credential](#tag/Credential) that should be applied to the given devices.\nThe devices need to be in the credential's domain, otherwise the request will fail.\n", "example": 123 }, "PolicyIDs": { "type": "array", "items": { "type": "integer", "example": 123 }, "description": "List of [Policy](#tag/Policy) IDs that should be applied to the given devices.\nThe policies need to be in each of the devices' domains, otherwise the request will fail.\n", "example": 123 }, "NotPolicyIDs": { "type": "array", "items": { "type": "integer", "example": 123 }, "description": "List of [Policy](#tag/Policy) IDs that should not be applied to the given devices.\nThe policies need to be in each of the devices' domains, otherwise the request will fail.\n", "example": 123 }, "ReplacePolicies": { "type": "boolean", "description": "If true, replaces all existing policies with the new ones provided in the request.\nIf false, adds the new policies to the existing ones.\n" }, "PluginKey": { "type": "string", "description": "Key of [Plugin](#tag/Plugin) used for all devices\n" }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) where the devices should be located.\n" }, "LabelIDs": { "type": "array", "items": { "type": "integer", "example": 123 }, "description": "List of [Label](#tag/Label) IDs that should be applied to the given devices.\n" }, "ReplaceLabels": { "type": "boolean", "description": "If true, replaces all existing labels with the new ones provided in the request.\nIf false, adds the new labels to the existing ones.\n" }, "DisabledUntil": { "type": "string", "description": "Timestamp of when to re-enable devices if they are disabled. Pass an empty string `\"\"` to disable\na device forever.\n", "example": "2021-01-18T23:59:59.999Z" }, "DisabledReason": { "type": "string", "description": "Reason for disabling devices if they are disabled.\nOnly applicable if `DisabledUntil` is not empty.\n" }, "BackupPrefix": { "type": "string", "description": "Prefix for backup files created by the devices.\n" }, "NotificationEmails": { "type": "array", "items": { "type": "string", "example": "example@example.com" }, "description": "List of email addresses to receive notifications for the devices.\n" }, "ReplaceNotificationEmails": { "type": "boolean", "description": "If true, replaces all existing notification emails with the new ones provided in the request.\n" }, "Notifications": { "type": "object", "properties": { "OnConfigChange": { "type": "boolean", "description": "Send notification if a configuration change has been detected (compares current with previous backup)\n`false` - Off, `true` - On\n" }, "OnBackupStart": { "type": "boolean", "description": "Notify when a scheduled backup starts, `false` - Off, `true` - On" }, "OnBackupEnd": { "type": "boolean", "description": "Notify when a scheduled backup finishes, `false` - Off, `true` - On" } } }, "Monitor": { "type": "object", "properties": { "Enabled": { "type": "boolean", "description": "Denotes if monitoring is enabled/disabled or a mix for the given list of devices. Pass `true` to enable\nmonitoring for all devices and `false` to disable monitoring \n" }, "AlertFail": { "type": "integer", "description": "Regard as down after this many failures. Must be greater than `0` when `Monitor.Enabled` is `true`.\n", "example": 2 }, "IsPing": { "type": "boolean", "description": "Perform ICMP ping rather than TCP connect, `false` - Off, `true` - On" }, "AlertEmail": { "type": "boolean", "description": "Send alert email to owner after AlertFail failures, `false` - Off, `true` - On" }, "AlertEmailUp": { "type": "boolean", "description": "Send alert email to owner when device is back up, `false` - Off, `true` - On" } } }, "Protocol": { "type": "string", "description": "Protocol of devices.\n", "example": "SSH" }, "BackupSchedules": { "type": "array", "items": { "type": "object", "properties": { "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules)", "example": "15 * * * *" }, "RetainVersions": { "type": "integer", "description": "How many different versions of backups to keep", "example": 5 }, "RetainDays": { "type": "integer", "description": "How many days to retain backups", "example": 5 }, "DeleteDays": { "type": "integer", "description": "How many days until backups are deleted.", "example": 5 } } } }, "ReplaceBackupSchedules": { "type": "boolean", "description": "If true, replaces all existing backup schedules with the new ones provided in the request.\nIf false, adds the new backup schedules to the existing ones.\n" }, "FailurePolicy": { "type": "object", "description": "What should Skylar Compliance do when a device encounters an error taking backups.\n", "properties": { "Retries": { "type": "integer", "minimum": -1, "maximum": 6, "description": "Sets the retry policy. When `PluginKey` is `push_device`, it holds the interval between each retry, in hours. \nIf not, it holds the number of attempts. Special values are `0` (Always), which only applies when `PluginKey`\nis not `push_device` and `-2` (Never)\n", "example": 0 }, "Action": { "type": "string", "description": "Which action to take once the maximum amount of attempts have failed. This will either `Revert` to schedule,\nset a device to `Manual` backups or `Disable` a device. Only applies to devices which `PluginKey` is not `push_device`\n", "default": "Revert", "enum": [ "[Multiple]", "Revert", "Manual", "Disable" ], "example": "Disable" }, "Alerts": { "type": "integer", "description": "Number of attempts needed to trigger an alert. `0` means Always and `-2` Never", "example": 0 }, "RetryInterval": { "type": "integer", "description": "Time to wait before attempting a retry in minutes. Only applies to devices which `PluginKey` is not `push_device`", "example": 15 } } }, "AssetFields": { "type": "array", "description": "List of [Assetfields](#tag/SettingsAssetField) with device specific data\n", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "Internal [Assetfield](#tag/SettingsAssetField) ID", "example": 123 }, "Value": { "type": "string", "description": "Asset field value", "example": "Example Location" } } } }, "InfoCommandIDs": { "type": "array", "description": "List of [InfoCommand](#tag/InfoCommand) IDs to execute on the devices\n", "items": { "type": "integer", "example": 123 } }, "ReplaceInfoCommandIDs": { "type": "boolean", "description": "If true, replaces all existing info command IDs with the new ones provided in the request.\nIf false, adds the new info command IDs to the existing ones.\n" }, "ManualConfigTypes": { "type": "array", "description": "List of config types to be backed up by the given devices. \nRequires `PluginKey` to be filled.\n", "items": { "type": "string" }, "example": [ "ssh", "apache" ] }, "PluginFields": { "type": "object", "description": "Plugin-specific fields as key-value pairs. The available fields depend on the selected plugin.\nCommon fields include `username`, `password`, `backup_port`, etc.\nRequires `PluginKey` to be filled.\n", "additionalProperties": { "type": "string" }, "example": { "username": "admin", "password": "secret123", "enable": "enable_pass", "backup_port": "22" } } }, "required": [ "DeviceIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "description": "Patch device response", "properties": { "UpdatedCount": { "description": "Total updated devices", "type": "integer" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Must not be empty" ], "NotPolicyIDs": [ "Must not be empty" ], "DisabledUntil": [ "Must be set if DisabledReason is set" ], "Monitor.AlertFail": [ "Must be a positive number" ], "PluginKey": [ "Must be set if Protocol is set", "Must be set if PluginFields is set", "Must be set if ManualConfigTypes is set", "Plugin 'foo' does not exist" ], "Protocol": [ "Must not be blank (except for Push Devices)" ] } } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "examples": { "NoPatchField": { "value": { "message": "No changes were provided on the request body", "errors": { "PatchDevices": [ "no fields provided for patch" ] } } }, "DomainValidation": { "value": { "message": "Domain validation failed", "errors": { "AgentID": [ "Incompatible agent. You must replace the agent to complete the domain change." ], "LabelIDs": [ "Incompatible labels. You must replace all labels to complete the domain change." ], "CredentialID": [ "Incompatible credentials. You must replace the credentials to complete the domain change." ], "PolicyIDs": [ "Incompatible policies. You must replace all policies to complete the domain change." ], "InfoCommandIDs": [ "Incompatible info commands. You must replace all info commands to complete the domain change." ] } } } } } } } } } }, "/devices/{id}": { "get": { "summary": "Retrieve a device", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevices" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Device does not exist", "errors": { "ID": [ "Device with ID 123 does not exist" ] } } } } } }, "operationId": "get_device", "description": "Retrieve a single device" }, "put": { "summary": "Update a device", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "update_device", "description": "Update a device", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a device", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "DeleteDevice" ] } ], "operationId": "delete_device", "description": "Delete a device", "responses": { "204": { "description": "Device deleted" }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Device not disabled", "errors": { "ID": [ "Device with ID 123 is not disabled" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "device id", "in": "path", "required": true } ] }, "/devices/{id}/monitors": { "get": { "summary": "Retrieve monitor measurements", "tags": [ "Device" ], "operationId": "monitor_device", "description": "Get the a device's most recent monitor responses", "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceauth" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Period": { "type": "integer", "description": "Requested number of seconds between measurements", "example": 5 }, "Measurements": { "description": "List of measurements", "type": "array", "items": { "type": "object", "properties": { "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format", "example": "2222-02-22T22:22:22.000Z" }, "RoundTripTime": { "type": "number", "format": "float", "description": "Network round-trip time for checking on the device in milliseconds", "example": 1.23456789 } } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "device id", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "period", "description": "Number of seconds between measurements. If requested period is narrower then the monitor's period, all measurements will be retrieved", "in": "query", "required": true }, { "in": "query", "name": "limit", "schema": { "type": "integer", "minimum": 1, "maximum": 500, "default": 50 }, "description": "The numbers of items to return" } ] }, "/devices/{id}/knownhosts": { "delete": { "summary": "Clear SSH known hosts", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevices" ] } ], "responses": { "204": { "description": "Known hosts removed" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } }, "operationId": "clear_known_hosts", "description": "Clear known SSH hosts for a device" }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "device id", "in": "path", "required": true } ] }, "/devices/{id}/compliance": { "get": { "summary": "Test device compliance", "tags": [ "Device" ], "operationId": "device_compliance", "description": "Test compliance policies against a device's latest configuration.", "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "responses": { "200": { "description": "Compliance test results", "content": { "application/json": { "schema": { "title": "ComplianceResults", "type": "object", "description": "Compliance test results model", "properties": { "Results": { "description": "A list of compliance rule test results.", "readOnly": true, "type": "array", "items": { "type": "object", "properties": { "Rule": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" }, "PolicyID": { "type": "integer", "description": "The ID of the policy to which the tested rule belongs", "example": 321 }, "Tested": { "type": "boolean", "description": "Whether the policy was actually tested. Some rules might be skipped if no matching backups can be found.\n", "example": true }, "Passed": { "type": "boolean", "description": "Whether the policy passed testing.", "example": true }, "Alert": { "type": "boolean", "description": "Indicates if this policy test would have triggered an alert.", "example": false }, "Score": { "type": "integer", "description": "Score of passing. The value may be determined by the type of test." }, "Details": { "type": "string", "description": "Details including relevant files and reasons.", "example": "\"files: tmp/foo.txt, tmp/bar.txt\\nreasons: tmp/foo.txt: 7 | match me, tmp/bar.txt: 3 | don't match me\"\n" }, "Error": { "type": "string", "description": "Any errors that ocurred whilst testing the rule" } } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "policy_id[0]": [ "Policy with ID 123 does not exist" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "device id", "in": "path", "required": true }, { "schema": { "type": "array", "items": { "type": "integer" } }, "in": "query", "name": "policy_id[]", "required": true, "style": "form", "explode": true, "description": "List of compliance policy IDs to run." } ] }, "/devices/{id}/plugincommand/{command}": { "get": { "summary": "Perform a plugin command on a device", "tags": [ "Device" ], "operationId": "device_plugin_command", "description": "Perform a plugin command on a device primarily to get a device asset value", "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "CommandDevice" ] } ], "responses": { "200": { "description": "Result from performing a plugin command on a device", "content": { "application/json": { "schema": { "title": "Result", "type": "object", "description": "Plugin command result", "properties": { "Result": { "description": "Plugin command result", "readOnly": true, "type": "string", "example": "FGVMEVHSBXXV7Z10" } }, "required": [ "Result" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true }, { "schema": { "type": "string" }, "name": "command", "description": "Plugin command name", "in": "path", "required": true } ] }, "/devices/search": { "post": { "summary": "Global search", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewBackup" ] } ], "operationId": "global_search", "description": "Search across devices and configurations", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Search": { "type": "string", "description": "Search term (case-insensitive)", "example": "interface" }, "SearchType": { "type": "string", "description": "Search type", "enum": [ "string", "regex" ], "example": "regex" }, "LimitAge": { "type": "integer", "description": "Restrict search to configuration not older that this many days. `0` means unlimited", "default": 0, "example": 1 }, "LimitVersions": { "type": "integer", "description": "Limit search to last X. `0` for unlimited. Defaults to last version.", "default": 1, "example": 0 }, "DeviceIDs": { "type": "array", "description": "Include configuration from the given [Device](#tag/Device) IDs", "items": { "type": "integer" }, "example": [ 123, 124, 125 ] }, "NextPagination": { "title": "Search Pagination", "type": "object", "properties": { "LastSeen": { "type": "string", "description": "The timestamp of the backup to be paged into", "example": "2021-01-18T23:59:59.999Z" }, "BID": { "type": "integer", "description": "Backup ID of the backup to be paged into", "example": 124 }, "Filepath": { "type": "string", "description": "The file to be paged into within that backup", "example": "/foo/bar/config.txt" }, "Offset": { "type": "integer", "description": "The byte offset within the file to be paged into", "example": 123 }, "FileLineOffsets": { "type": "object", "additionalProperties": { "type": "integer" }, "description": "Map of file paths to their cumulative line offsets for tracking line numbers across pagination", "example": { "/foo/bar/config.txt": 150, "/foo/bar/logs.txt": 75 } }, "Size": { "type": "integer", "description": "The number of matches per page", "example": 50 } } } }, "required": [ "Search", "SearchType", "DeviceIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "description": "Global search results", "items": { "type": "object", "properties": { "DeviceID": { "type": "integer", "description": "The [Device](#tag/Device) ID", "example": 123 }, "DeviceName": { "type": "string", "description": "Name of the [Device](#tag/Device)", "example": "My First Cisco" }, "DomainID": { "type": "integer", "description": "ID of the device's [Domain](#tag/Domain)", "example": 123 }, "DomainName": { "type": "string", "description": "Name of the device's [Domain](#tag/Domain)", "example": "Production" }, "PluginName": { "type": "string", "description": "Name of device's plugin", "example": "Cisco IOS XE" }, "Results": { "type": "array", "description": "Device search results", "items": { "type": "object", "properties": { "BackupID": { "type": "integer", "description": "ID of the [configuration backup](#tag/DeviceBackup) a match was found", "example": 123 }, "ConfigName": { "type": "string", "description": "Name of the configuration", "default": "_default", "example": "running" }, "Description": { "type": "string", "description": "Description of where a match was found", "example": "Version 68 - ucs var/tmp/tmsh_syntax/14.1.2/auto_schema_data_apm_cli.dat" }, "File": { "type": "string", "description": "Filename of file with match", "example": "config/.diffVersions/config/BigDB.dat/BigDB.dat" }, "InName": { "type": "boolean", "description": "Set to `true` if a match was found in the filename. This can only be true if SearchType is `string`", "example": true }, "SearchResultsCount": { "type": "integer", "description": "Number of search results that are present in the file" }, "MatchedLines": { "type": "array", "description": "Lines that matched the search term. It's only returned if SearchType is `regex`", "items": { "type": "object", "properties": { "Content": { "type": "string", "description": "The line of the match", "example": "interface Ethernet1/1" }, "Number": { "type": "integer", "description": "The line number of the match", "example": 1234 }, "Match": { "type": "string", "description": "The part of the line that matched the search term", "example": "interface" } }, "required": [ "Content", "Number", "Match" ] } } }, "required": [ "BackupID", "ConfigName", "Description", "File", "InName", "SearchResultsCount" ] } } }, "required": [ "DeviceID", "DeviceName", "DomainID", "DomainName", "PluginName", "Results" ] } }, "next_pagination": { "$ref": "#/paths/~1devices~1search/post/requestBody/content/application~1json/schema/properties/NextPagination" }, "truncated": { "type": "boolean", "description": "Set to `true` if the search timed out and only partial results are returned. Use `next_pagination` to continue the search." } } } } } } }, "parameters": [] } }, "/devices/import": { "post": { "summary": "Import devices", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "import_devices", "description": "Import devices from a CSV files", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "overwrite": { "type": "boolean", "description": "Overwrite existing devices", "default": false, "example": true }, "file": { "type": "string", "description": "CSV data (see [Export](#operation/export_devices) for format)", "example": "name,plugin,ip_address,protocol,owner,backup_interval,ccinform,keep_backup,notes,serial_no,asset_id,location,domain_name,snmp_version,use_dsa,monitor_ping,monitor_port,monitor_email,monitor_email_up,monitor_freq,monitor_fail,syslog_trigger,no_syslog_email,backup_config_types,email_backup_start,email_backup_end,backup_prefix,max_retries,Firmware_assetkey_text,Manufacturer_assetkey_text,Model_assetkey_text\nexample1,Cisco ASA,127.0.0.1,ssh,afox@skylarcompliance.com,,N,5,,,,Example Rack,Global,,N,N,,N,N,,,N,N,startup#running#full,N,N,id#name#,2,7.2(3),Cisco,ASA/FWSM\nexample2,Cisco ASA,127.0.0.1,ssh,afox@skylarcompliance.com,,N,5,,,,,Global,,N,N,22,Y,N,5,1,N,N,startup#running,N,N,id##,2,9.9(2)18,Cisco,ASAv\n" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "NumberImported": { "type": "integer", "description": "Number of devices that have been imported", "example": 123 }, "DevicesNotImported": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Map of device's IP address to the corresponding error message(s) that occurred during import of the device", "example": { "10.0.0.1": [ "device already exists" ], "10.0.0.2": [ "unknown plugin: xxyyzz" ] } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "file": [ "Invalid CSV format" ] } } } } } } } }, "/devices/export": { "post": { "summary": "Export devices", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ExportDevices" ] } ], "operationId": "export_devices", "description": "Export a selection of devices as CSV", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs to export\n", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 1, 2, 3 ] }, "Filename": { "type": "string", "description": "Filename of the resulting CSV file", "default": "RPDevices" }, "RedactCredentials": { "type": "boolean", "description": "Omit columns containing sensitive information", "default": false, "example": true }, "ExportCredentialsSet": { "type": "boolean", "description": "Exports credential set ID", "default": false, "example": true }, "IncludeAssets": { "type": "boolean", "description": "Wether to include asset information fields in the export", "default": true, "example": false }, "OmitEmptyColumns": { "type": "boolean", "description": "Omit empty columns from the resulting CSV", "default": false, "example": true } }, "required": [ "DeviceIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string" }, "example": "name,plugin,ip_address,protocol,owner,backup_interval,ccinform,keep_backup,notes,serial_no,asset_id,location,domain_name,snmp_version,use_dsa,monitor_ping,monitor_port,monitor_email,monitor_email_up,monitor_freq,monitor_fail,syslog_trigger,no_syslog_email,backup_config_types,email_backup_start,email_backup_end,backup_prefix,max_retries,Firmware_assetkey_text,Manufacturer_assetkey_text,Model_assetkey_text\nexample1,Cisco ASA,127.0.0.1,ssh,afox@skylarcompliance.com,,N,5,,,,Example Rack,Global,,N,N,,N,N,,,N,N,startup#running#full,N,N,id#name#,2,7.2(3),Cisco,ASA/FWSM\nexample2,Cisco ASA,127.0.0.1,ssh,afox@skylarcompliance.com,,N,5,,,,,Global,,N,N,22,Y,N,5,1,N,N,startup#running,N,N,id##,2,9.9(2)18,Cisco,ASAv\n" } }, "headers": { "Content-Disposition": { "schema": { "type": "string", "example": "attachment; filename=\"SkylarComplianceDevices.csv\"" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Must not be blank" ], "Filename": [ "Must not be blank" ] } } } } } } } }, "/devices/test": { "post": { "summary": "Test device login", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "AddDevice" ] } ], "operationId": "test_device", "description": "Test device connection and login details", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "TestDeviceRequest", "type": "object", "description": "Test device login parameters", "properties": { "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) a device belongs to (if any). Only allowed to be set during device creation.", "default": 0, "example": 123 }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier (`key`) that sets the plugin a device uses", "example": "cisco_ios" }, "PluginFields": { "type": "array", "description": "List of additional fields for a device, determined by the device plugin. Common field names are `username`,\n`password`, `password2`, `backup_port`, `nat_bc`.\n", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Name of plugin field", "example": "username" }, "Value": { "type": "string", "description": "Value of plugin field", "example": "afox" } }, "required": [ "Name" ] } }, "Address": { "type": "string", "description": "Network address of the device", "example": "127.0.0.1" }, "AgentID": { "type": "integer", "description": "ID of an [Agent](#tag/Agent) this device should communicate through. The default `0` means that Skylar Compliance will\ncommunicate with a device directly\n", "default": 0 }, "Protocol": { "type": "string", "description": "Connection protocol to use. Check device's plugin for supported protocols", "example": "scp" }, "CredentialID": { "type": "integer", "description": "ID of the [Credential](#tag/Credential) assigned to this device. Credentials take precedence over any username or\npassword set for the device\n", "default": 0, "example": 123 }, "UsePublicKeyAuthentication": { "type": "boolean", "default": false, "description": "Use public key for authenticating device connections over SSH. See [Settings/PublicKey](#tag/SettingsPublicKey)\nhow to retrieve those for your appliance.\n" } }, "required": [ "PluginKey", "PluginFields", "Address", "Protocol" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Device": { "type": "string", "description": "Name of the device", "example": "New Device" }, "Result": { "type": "string", "description": "Result of the connection attempt", "example": "Timeout" }, "IsError": { "type": "boolean", "description": "If the connection attempt was successful", "example": true }, "Log": { "type": "string", "description": "A log of the connection attempt", "example": "Progress: 1/46 (2%)\tTime:0.00s\tStatus: Startup Device: Control linux_server ssh (v25519)\nProgress: 2/46 (4%)\tTime:0.00s\tStatus: /usr/bin/ssh -p 22 127.0.0.1\nProgress: 3/46 (6%)\tTime:0.08s\tStatus: Running Custom Login sequence\nProgress: 4/46 (8%)\tTime:0.14s\tStatus: Running ssh Login sequence\nProgress: 13/46 (28%)\tTime:0.18s\tStatus: Wait Cmd (90s): No route to host,IDENTIFICATION HAS CHANGED,onnection refused,onnection timed out,co...l major versions differ: 2 vs. 1,no matching host key,ermission denied,User,assword,passwd:,PASSCODE\nProgress: 14/46 (30%)\tTime:0.18s\tStatus: Got Cmd: assword\nProgress: 15/46 (32%)\tTime:2.18s\tStatus: Send Cmd: \\n\nProgress: 21/46 (45%)\tTime:2.28s\tStatus: Wait Cmd (60s): >,#,$,option:,Main menu,TERM\nProgress: 22/46 (47%)\tTime:62.29s\tStatus: Error - Timeout\nProgress: 23/46 (50%)\tTime:62.29s\tStatus: Finished ssh Login sequence\nProgress: 24/46 (52%)\tTime:62.29s\tStatus: Closing ssh\nProgress: 25/46 (54%)\tTime:63.29s\tStatus: Closed ssh\nProgress: 26/46 (56%)\tTime:63.29s\tStatus: Stopping Connection: ssh\nProgress: 27/46 (58%)\tTime:63.29s\tStatus: Closing ssh\nProgress: 28/46 (60%)\tTime:64.29s\tStatus: Closed ssh\nProgress: 29/46 (63%)\tTime:64.29s\tStatus: Stop Device: ssh\nProgress: 30/46 (65%)\tTime:64.29s\tStatus: Finished Control\n\nTranscript for RP00000006: linux_server (v25519) Control using ssh.\n\nRECV: 0.04s: Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.\\r\\n\\rroot@127.0.0.1's password: \nSEND: 2.28s: \\n\nRECV: 2.28s: \\nPermission denied, please try again.\\r\\n\\rroot@127.0.0.1's password: \\n" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DomainID": [ "Domain with ID 123 does not exist", "Can only be set on device creation" ], "PluginKey": [ "Must not be blank", "Plugin 'foo' does not exist" ], "Address": [ "Must not be blank (except for Push Devices)", "Must be a valid IP address" ], "AgentID": [ "Agent with ID 123 does not exist" ], "Protocol": [ "Must not be blank (except for Push Devices)" ], "CredentialID": [ "Credential set with ID 123 does not exist" ] } } } } } }, "parameters": [] } }, "/devices/count": { "get": { "summary": "Get total number of devices grouped by some device field", "tags": [ "Device" ], "operationId": "get_device_counters", "description": "Get total number of devices grouped by some device field", "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDeviceauth" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Counters": { "type": "array", "items": { "type": "object", "properties": { "Group": { "description": "Group value for request group", "type": "string", "example": "cisco_asa" }, "Total": { "description": "Total number of devices per group value", "type": "integer", "example": 4 } } } } } } } } } } }, "parameters": [ { "schema": { "type": "string", "example": "agent_id" }, "name": "group", "description": "a device search parameter that should be used to group device counter", "in": "query", "required": true }, { "in": "query", "name": "filter_op", "description": "Filter operation to use, either \"and\" or \"or\"", "schema": { "type": "string", "enum": [ "and", "or" ] } }, { "in": "query", "name": "fulltext", "schema": { "type": "string" }, "description": "Only return records matching the search term. Must have at least 3 characters" }, { "in": "query", "name": "updated_after", "schema": { "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results after the updated date." }, { "in": "query", "name": "updated_before", "schema": { "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results before the updated date." }, { "in": "query", "name": "label_id[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of labels IDs to include in the results" }, { "in": "query", "name": "not[label_id][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of label IDs to exclude from the results" }, { "in": "query", "name": "manufacturer[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of manufacturers to include in the results", "example": [ "Cisco", "BigIP" ] }, { "in": "query", "name": "not[manufacturer][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of manufacturers to exclude from the results", "example": [ "Solarwinds" ] }, { "in": "query", "name": "plugin_key[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of plugin keys to include in the results", "example": [ "cisco_ios" ] }, { "in": "query", "name": "not[plugin_key][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of plugin keys to exclude from the results", "example": [ "cisco_asa" ] }, { "in": "query", "name": "location[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of locations to include in the results", "example": [ "Comms Rack", "ESX Server 1" ] }, { "in": "query", "name": "not[location][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of locations to exclude from the results", "example": [ "Home Office" ] }, { "in": "query", "name": "domain_id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of domain IDs to include in the results" }, { "in": "query", "name": "not[domain_id][]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of domain IDs to exclude from the results" }, { "in": "query", "name": "backupstatusstring[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of backup status to include in the results", "example": [ "OK" ] }, { "in": "query", "name": "not[backupstatusstring][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of backup status to exclude from the results", "example": [ "Failed" ] }, { "in": "query", "name": "agent_id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of agent IDs to include in the results" }, { "in": "query", "name": "not[agent_id][]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of agent IDs to exclude from the results" }, { "in": "query", "name": "protocol[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of protocols to include in the results", "example": [ "ssh", "ftp" ] }, { "in": "query", "name": "not[protocol][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of protocols to exclude from the results", "example": [ "telnet/tftp" ] }, { "in": "query", "name": "compliancestatus[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of compliance status to include in the results" }, { "in": "query", "name": "not[compliancestatus][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of compliance status to exclude from the results" }, { "in": "query", "name": "lastbackupattempt_before", "schema": { "type": "string" }, "description": "Timestamp to include results before the last backup attempt date." }, { "in": "query", "name": "lastbackupattempt_after", "schema": { "type": "string" }, "description": "Timestamp to include results after the last backup attempt date." }, { "in": "query", "name": "lastbackup_before", "schema": { "type": "string" }, "description": "Timestamp to include results before the last backup." }, { "in": "query", "name": "lastbackup_after", "schema": { "type": "string" }, "description": "Timestamp to include results after the last backup date." }, { "in": "query", "name": "disabled", "schema": { "type": "boolean" }, "description": "Disabled status to include in the results" }, { "in": "query", "name": "up", "schema": { "type": "boolean" }, "description": "Device monitored up status to include in the results" }, { "in": "query", "name": "serial[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of serial numbers to include in the results", "example": [ "FCZ1047W0F9", "FKD1227W0F9" ] }, { "in": "query", "name": "not[serial][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of serial numbers to exclude from the results", "example": [ "FJJ13427W0D1" ] }, { "in": "query", "name": "firmware[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of firmwares to include in the results", "example": [ "IOS 12.1(22)EA4", "IOS 11.4(14)EA4" ] }, { "in": "query", "name": "not[firmware][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of firmwares to exclude from the results", "example": [ "IOS 10.1(34)EA2" ] }, { "in": "query", "name": "assetid[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of assetids to include in the results", "example": [ "10101010ID", "ThisAssetiD" ] }, { "in": "query", "name": "not[assetid][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of assetids to exclude from the results", "example": [ "10101010Id" ] }, { "in": "query", "name": "baseline[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "Baseline status to include in the results", "example": [ 1 ] }, { "in": "query", "name": "not[baseline][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "Baseline status to exclude in the results", "example": [ 0 ] }, { "in": "query", "name": "nextbackup_before", "schema": { "type": "string" }, "description": "Timestamp to include results before the next backup attempt date." }, { "in": "query", "name": "nextbackup_after", "schema": { "type": "string" }, "description": "Timestamp to include results after the next backup attempt date." }, { "in": "query", "name": "model[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of models to include in the results", "example": [ "WS-C2950-24" ] }, { "in": "query", "name": "not[model][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of models to exclude in the results", "example": [ "WS-C2950-24" ] }, { "in": "query", "name": "state[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of states to include in the results", "example": [ "Idle" ] }, { "in": "query", "name": "not[state][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of states to exclude in the results", "example": [ "Idle" ] } ] }, "/devices/{id}/assetfields/{assetfield_id}/upload": { "post": { "summary": "Upload a file for an assetfield", "tags": [ "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "upload_assetfield_file", "description": "Upload a file as a device's [assetfield](#tag/SettingsAssetField) value. The asset field has to be of type `file`.\n", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "description": "The actual file", "format": "binary" } }, "required": [ "file" ] } } } }, "responses": { "204": { "description": "File uploaded" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "AssetfieldID": [ "Is not a file upload type field" ], "File": [ "Must not be blank" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } }, "parameters": [] }, "parameters": [ { "schema": { "type": "integer" }, "name": "assetfield_id", "description": "Assetfield ID", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/backups/diff": { "post": { "summary": "Compare backups", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewBackup" ] } ], "operationId": "diff_backup", "description": "Compare two backups\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Backups": { "type": "array", "description": "The two device backups to compare", "items": { "type": "object", "description": "Describes the backup and configuration to compare", "properties": { "DeviceID": { "type": "integer", "description": "ID of a device" }, "BackupID": { "type": "integer", "description": "ID of a backup. If not provided, the most recent backup will be used" }, "ConfigType": { "type": "string", "description": "The configuration type to compare. Defaults to the default configuration for a device", "example": "startup" } }, "required": [ "DeviceID" ] }, "minItems": 2, "maxItems": 2, "example": [ { "DeviceID": 123, "ConfigType": "startup" }, { "DeviceID": 124, "BackupID": 1234, "ConfigType": "running" } ] }, "OnlyDifferences": { "type": "boolean", "description": "Only return differences", "default": false }, "HideIgnored": { "type": "boolean", "description": "Hide ignored differences with respect to plugin configuration", "default": false }, "Context": { "type": "integer", "description": "How many lines to return for context around differences if `OnlyDifferences` is set\n", "default": 0, "example": 3 }, "Offset": { "type": "integer", "description": "At what line to start a diff", "default": 0 }, "Limit": { "type": "integer", "description": "How many lines to return", "default": 200 }, "HTML": { "type": "boolean", "description": "Return diff in HTML format", "default": false } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Diff": { "type": "string", "description": "The diff as a HTML or plain text string", "example": "startup: radius-server host 172.16.0.1 auth-port 1812 acct-port 1813 key Cis$ko\nradius-server retransmit 4\n138c138\n< banner login \u0003welcome to Skylar Compliance\u0003\n---\n> banner login \u0003 test login banner \u0003\n!\nline con 0\n\n" }, "Total": { "type": "integer", "description": "The maximum number of lines of the longest file", "example": 320 } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Backups": [ "Must contain two backups to compare", "Devices must be of the same type" ], "Backups[0]": [ "No backups found for device" ], "Backups[0].DeviceID": [ "Must not be blank", "Device with ID 123 does not exist" ], "Backups[0].ConfigType": [ "Config type 'foo' was not part of the backup", "Plugin doesn't support comparing backups with different configuration types" ], "Backups[1].DeviceID": [ "Must not be blank", "Device with ID 124 does not exist" ], "Backups[1].BackupID": [ "Backup with ID 1234 does not exist" ], "Backups[1].ConfigType": [ "Config type 'foo' was not part of the backup", "Plugin doesn't support comparing backups with different configuration types" ], "Context": [ "Must be a positive number" ], "Offset": [ "Must be a positive number" ], "Limit": [ "Must be a positive number" ] } } } } } } } }, "/devices/{id}/backups": { "get": { "summary": "List backups for a device", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ListBackups" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/put/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_device_backups", "description": "List backups of a device", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "in": "query", "name": "has_file_type", "schema": { "type": "boolean", "default": false }, "description": "If set to true, then file types are returned for associated config types of a devices backup, otherwise we don't return file types" }, { "in": "query", "name": "sort", "schema": { "type": "string", "example": "Created,-Name" }, "description": "Comma-separated fields that should be used to order the items returned. The default ordering method is ascendant, and the prefix \"-\" inverts it to be descendant.\nSortable fields are: `Name`, `Created`, `Size`, `Firmware`, `Initiator`, `Version`, and `MD5`.\n" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Trigger a manual backup", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "BackupDevice" ] } ], "operationId": "create_backup", "responses": { "204": { "description": "Backup requested" } }, "description": "Trigger a manual backup for this device. Please note that this will queue a backup request in the internal\nscheduler. The response will be a redirect to the resulting [Job](#tag/Job).\n", "parameters": [] }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/{id}/backups/import": { "post": { "summary": "Import a backup", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyBackup" ] } ], "operationId": "import_backup", "description": "Import a configuration for a device\n", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "type": { "type": "string", "description": "Configuration type to be imported. See a device's [Plugin](#tag/Plugin) for allowed types", "example": "startup", "default": "default" }, "file": { "type": "string", "description": "Uploaded file", "format": "binary" } }, "required": [ "type", "file" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "type": [ "Configuration type 'foo' does not exist for plugin 'bar'" ], "file": [ "Unable to read file contents", "Must not be blank" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/{id}/backups/export": { "post": { "summary": "Export a backup", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ExportBackup" ] } ], "operationId": "export_backup", "description": "Export one or more device backups.\n\nWhen `Method` is `download`, use each returned `DownloadFiles[].DownloadID`\nwith `GET /downloads/{id}` to retrieve the exported file.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "BackupIDs": { "type": "array", "description": "List of Backup IDs to export", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "ConfigurationTypes": { "type": "array", "description": "Optional list of configuration types to export for each backup.\n\nBehavior when omitted:\n- `local` method exports all configuration types in each backup.\n- `download`, `email`, and `server` methods use `_default`.\n", "items": { "type": "string" }, "example": [ "running", "startup" ] }, "Method": { "type": "string", "description": "Delivery method of how to transfer the backup to the requestor.\n", "enum": [ "download", "email", "local", "server" ], "default": "email" }, "EmailAddress": { "type": "string", "description": "Email address that an exported backup will be sent to. Requires `Method` to be set to \"email\"", "example": "afox@skylarcompliance.com" }, "FileServerID": { "type": "integer", "description": "ID of a [Fileserver](#tag/Fileserver) to use for the export", "example": 123 }, "Locations": { "type": "array", "description": "If not empty and backup is multi-file, every location will act as the Filepath to filter backup files", "items": { "type": "string" }, "example": [ "foo/bar.baz", "bar/foo.baz" ] } }, "required": [ "BackupIDs" ] }, "examples": { "Download": { "value": { "BackupIDs": [ 1 ], "ConfigurationTypes": [ "running" ], "Method": "download" } }, "Email": { "value": { "BackupIDs": [ 2 ], "ConfigurationTypes": [ "running" ], "Method": "email", "EmailAddress": "afox@skylarcompliance.com" } }, "Local": { "value": { "BackupIDs": [ 2 ], "Method": "local" } }, "Fileserver": { "value": { "BackupIDs": [ 3 ], "ConfigurationTypes": [ "startup" ], "Method": "server", "FileServerID": 123 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "BackupExport", "type": "object", "properties": { "BackupIDs": { "type": "array", "description": "List of exported Backup IDs", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "ConfigurationTypes": { "type": "array", "description": "List of Configuration Types to export for each Backup.", "items": { "type": "string" }, "example": [ "running", "startup" ] }, "DownloadFiles": { "type": "array", "description": "Details for backup files to download.\nWhen `Method` is `download`, call `GET /downloads/{id}` for each `DownloadID`.\n", "items": { "type": "object", "description": "Details for backup file to download", "properties": { "BackupID": { "type": "integer", "example": 1, "description": "ID of the backup" }, "BackupName": { "type": "string", "example": "1-20200722143330", "description": "Name of the backup" }, "BackupFileID": { "type": "integer", "example": 1, "description": "ID of the backup file" }, "ConfigType": { "type": "string", "example": "startup", "description": "Backup file config type" }, "Location": { "type": "string", "description": "Backup location" }, "Filename": { "type": "string", "example": "backup.bin", "description": "Filename of the backup file" }, "DownloadID": { "type": "string", "example": "90404db7-a6a4-4601-b1fa-9e7df327b984", "description": "ID used with `GET /downloads/{id}` to download this exported file" } }, "required": [ "BackupID", "BackupName", "BackupFileID", "ConfigType", "Location", "Filename", "DownloadID" ] } }, "EmailAddress": { "type": "string", "description": "Email address that an exported backup was sent to if `Method` was set to \"email\"", "example": "afox@skylarcompliance.com" }, "DownloadDetails": { "type": "object", "description": "Local SFTP/FTP/TFTP details when `local` was selected as the export method.\nFiles and account will be deleted after 1 hour.\n", "properties": { "Filenames": { "type": "array", "description": "Filename of the locally exported backup", "items": { "type": "string" }, "example": [ "139-20201109165407.radius.tgz.radius.tgz", "139-20201209113247.radius.tgz.radius.tgz" ] }, "Username": { "type": "string", "description": "Temporary username", "example": "expGPCJv" }, "Password": { "type": "string", "description": "Temporary username", "example": "A190TovW" } } }, "FileServerID": { "type": "integer", "description": "ID of a [Fileserver](#tag/Fileserver) that was used for exporting", "example": 123 } } } } }, "headers": { "Content-Disposition": { "schema": { "type": "string", "example": "attachment; filename=\"some_config.txt\"" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "BackupIDs": [ "Must not be blank" ], "Method": [ "Must be one of 'download', 'email', 'local' or 'server'" ], "EmailAddress": [ "Can not be empty if Method is 'email'", "Is not a valid email address" ], "FileServerID": [ "Can not be empty if Method is 'server'", "Fileserver with ID 123 does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/{id}/backups/{backup_id}": { "get": { "summary": "Retrieve backup details", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewBackup" ] } ], "operationId": "get_backup", "description": "Retrieve backup meta data", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/put/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Backup does not exist", "errors": { "ID": [ "Backup with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update backup details", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyBackup" ] } ], "operationId": "update_backup", "description": "Set flags and comments on a backup (its underlying version)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Backup", "type": "object", "description": "Backup model", "properties": { "ID": { "description": "Device backup ID", "type": "integer", "example": 123, "readOnly": true }, "DeviceID": { "type": "integer", "example": 123, "description": "ID of the [Device](#tag/Device) a backup belongs to", "readOnly": true }, "Name": { "type": "string", "description": "Name of this backup, defaults to its filename", "example": "1-20210128151648" }, "BackupFileID": { "type": "integer", "example": 123, "description": "ID of the backup file a backup belongs to", "readOnly": true }, "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when backup was created", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "Size": { "type": "integer", "description": "Size of a backup in bytes", "example": 1024, "readOnly": true }, "Firmware": { "type": "string", "description": "Firmware version of the device at the time of backup", "example": "IOS 12.1(22)EA8", "readOnly": true }, "Initiator": { "type": "string", "description": "Username of the user triggering a backup or \"Auto\" for backups triggered by a schedule", "readOnly": true }, "Version": { "type": "integer", "description": "Unique version number of the backup", "default": 1, "example": 12, "readOnly": true }, "IsBaseline": { "type": "boolean", "description": "Allows to set a configuration version as a baseline version. Restoring a non-baseline configuration version to a\ndevice with a baseline configuration version will cause a compliance alert.\n", "default": false, "example": true }, "IsMilestone": { "type": "boolean", "description": "A configuration version can be retained indefinitely if it is set as a milestone configuration. This overrules any\nretention policy settings for this backup version.\n", "default": false }, "Comment": { "type": "string", "description": "Add a comment for this backup" }, "ConfigurationTypes": { "type": "array", "description": "List of configuration types that are part of this backup version", "items": { "type": "string" }, "example": [ "startup", "running", "vtp" ], "readOnly": true }, "ScheduleName": { "type": "string", "description": "Human readable schedule expression or \"Manual\" for manually triggered backups", "example": "Every 15th minute past every hour", "readOnly": true }, "MD5s": { "type": "array", "description": "List of MD5 sum for each configuration", "items": { "type": "object", "properties": { "MD5": { "type": "string", "description": "MD5 sum", "example": "a3efc2ad5436717b24b2899eec557d16" }, "ConfigurationType": { "type": "string", "description": "When multiple configurations, this will reference the applicable configuration type", "example": "running" } }, "required": [ "MD5" ] }, "readOnly": true }, "SHA256Sums": { "type": "array", "description": "List of SHA256 checksum for each of the backup's configuration types", "items": { "type": "object", "properties": { "ConfigType": { "type": "string", "description": "Backup's configuration type for which this checksum applies to", "example": "default" }, "SHA256Sum": { "type": "string", "description": "SHA256 sum", "example": "ec321de56af3b66fb49e89cfe346562388af387db689165d6f662a3950286a57" } }, "required": [ "ConfigType", "SHA256Sum" ] }, "readOnly": true }, "FileTypes": { "type": "array", "description": "List of file types for each configuration which are returned only if `has_file_type` param is set to true, otherwise returns an empty array", "items": { "type": "object", "properties": { "ConfigType": { "type": "string", "description": "This will reference the different config types belonging to the specified backup", "example": "ssh" }, "FileType": { "type": "string", "description": "This will reference the related filetype for the matching config type", "example": "txt" } }, "required": [ "ConfigType", "FileType" ] }, "readOnly": true } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a backup", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyBackup" ] } ], "operationId": "delete_backup", "description": "Delete a backup", "parameters": [ { "in": "query", "name": "reason", "schema": { "type": "string" }, "description": "Reason for deleting the required backup" } ], "responses": { "204": { "description": "Device backup deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "backup_id", "description": "Backup ID", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/{id}/backups/{backup_id}/config": { "post": { "summary": "Configuration details", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewBackup" ] } ], "operationId": "config_details", "description": "Retrieve details for a backup config\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "ConfigRequest", "type": "object", "properties": { "ConfigType": { "type": "string", "description": "Configuration type to retrieve", "example": "startup" }, "Location": { "type": "string", "description": "Filepath to retrieve for a multi-file backup. Passing an empty `Location` will return a list of files\nfor a multi-file backup\n", "example": "foo/bar.baz" }, "Search": { "type": "string", "description": "Search configuration for a specific phrase", "example": "eth0" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "IsList": { "type": "boolean", "description": "Whether or not the response is a list of files or configuration data", "default": false, "example": true }, "List": { "type": "array", "description": "Directory entries for a multi-file backup. Entries are flattened and returned with their full path.\n", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Path and name of a multi-file backup entry", "example": "foo/bar.baz" }, "Description": { "type": "string", "description": "Description of the multi-file backup entry", "example": "108B ASCII XML document" } } } }, "Lines": { "type": "array", "description": "HTML encoded configuration data, every line becoming an entry in the array", "items": { "type": "string" }, "example": [ "Foo", "Bar", "Baz" ] }, "SearchIndex": { "type": "array", "description": "Indices of lines matching `Search`", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "Offset": { "type": "integer", "description": "Requested offset", "example": 123 }, "Limit": { "type": "integer", "description": "Requested limit", "example": 900 }, "NumLines": { "type": "integer", "description": "Number of lines returned", "maximum": 500, "example": 123 }, "TotalLines": { "type": "integer", "description": "Total number of lines returned", "example": 1234 } }, "required": [ "IsList", "List", "Lines", "SearchIndex", "Offset", "Limit", "NumLines", "TotalLines" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "ConfigType": [ "ConfigType 'foo' is not a valid config type" ] } } } } } } }, "parameters": [ { "in": "query", "name": "offset", "schema": { "type": "integer", "minimum": 0, "default": 0 }, "description": "The number of items to skip before starting to collect the result set. Offset starts at `0`" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "schema": { "type": "integer" }, "name": "backup_id", "description": "Backup ID", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/{id}/backups/{backup_id}/restore": { "post": { "summary": "Restore a backup", "tags": [ "Device/Backup" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "RestoreDevice" ] } ], "operationId": "restore_backup", "description": "Restore a device configuration from a backup or clone a backup to a different device\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Backup", "type": "object", "properties": { "TargetDeviceID": { "type": "integer", "description": "A different device (of the same type) to restore this backup to", "example": 124 }, "SourceConfigType": { "type": "string", "description": "Which configuration to restore (if there are multiple)", "example": "running" }, "TargetConfigType": { "type": "string", "description": "Which configuration type to restore into (if there are multiple)", "example": "startup" }, "ResetAfter": { "type": "boolean", "description": "Reboot the device after successful restore", "default": false, "example": true } } }, "examples": { "Restore": { "value": { "SourceConfigType": "running", "TargetConfigType": "startup", "ResetAfter": false } }, "Clone": { "value": { "TargetDeviceID": 124, "SourceConfigType": "running", "TargetConfigType": "startup", "ResetAfter": true } } } } } }, "responses": { "204": { "description": "Restore requested" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "TargetDeviceID": [ "Device with ID 123 does not exist" ], "SourceConfigType": [ "Must not be blank", "Configuration type 'foo' does not exist for plugin 'bar'" ], "TargetConfigType": [ "Must not be blank", "Configuration type 'foo' does not exist for plugin 'bar'" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "backup_id", "description": "Backup ID", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "Device ID", "in": "path", "required": true } ] }, "/devices/bulk": { "post": { "summary": "Retrieve multiple devices for editing", "tags": [ "Device/BulkEdit" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevices" ] } ], "operationId": "retrieve_bulk_device", "description": "Retrieve aggregated devices for editing by passing two or more device IDs", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "DeviceIDs": { "type": "array", "description": "List of [Device](#tag/Device) IDs to edit in bulk", "minItems": 2, "items": { "type": "integer" }, "example": [ 123, 124, 125 ] } }, "required": [ "DeviceIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices~1bulk/patch/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs[0]": [ "Device with ID 123 does not exist" ] } } } } } } }, "patch": { "summary": "Update multiple devices", "tags": [ "Device/BulkEdit" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "save_bulk_device", "description": "Update multiple devices at once", "parameters": [ { "in": "query", "name": "async", "description": "Update the devices asynchronously. \nResponds with an empty 202 if update task is queued.\n", "schema": { "type": "boolean", "default": false } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "BulkDevice", "type": "object", "description": "Bulk device model", "properties": { "DeviceIDs": { "type": "array", "description": "List of [Device](#tag/Device) IDs to edit in bulk", "items": { "type": "integer" }, "example": [ 123, 124, 125 ] }, "DeviceNames": { "type": "string", "description": "Aggregated list of device names for display purposes", "example": "Foo, Bar, Baz and 123 others.", "readOnly": true }, "PluginKey": { "type": "string", "description": "Key of [Plugin](#tag/Plugin) used for all devices or `[Multiple]`", "example": "cisco_ios" }, "PushDevices": { "type": "boolean", "description": "Set to true if any selected device uses a \"push\" type plugin", "example": false, "readOnly": true }, "DomainID": { "type": "integer", "description": "ID of [Domain](#tag/Domain). `-1` will be returned for multiple, `0` for `Global`", "example": 0 }, "LabelIDs": { "type": "array", "description": "A list of [Labels](#tag/Label) that are shared across all selected devices.", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "AgentID": { "type": "integer", "description": "ID of [Agent](#tag/Agent). `-1` will be returned for multiple, `0` when no agent was used", "example": 0 }, "Disabled": { "type": "integer", "description": "Device disabled status, `-1` - Multiple, `0` - Off, `1` - On", "example": 0 }, "DisabledUntil": { "type": "string", "description": "Timestamp of when to re-enable devices if they are disabled or `[Multiple]`. Pass an empty string `\"\"` to disable\na device forever.\n", "example": "2021-01-18T23:59:59.999Z" }, "DisabledReason": { "type": "string", "description": "Reason for disabling devices" }, "BackupPrefix": { "type": "string", "description": "Prefix for backup filenames, `[Multiple]` for multiple values" }, "NotificationEmails": { "type": "array", "description": "Notification email addresses, that are shared across all selected devices.", "items": { "type": "string", "example": [ "afox@skylarcompliance.com", "asilva@skylarcompliance.com" ] } }, "Notifications": { "type": "object", "description": "Notification settings", "properties": { "OnConfigChange": { "type": "integer", "description": "Send notification if a configuration change has been detected (compares current with previous backup)\n`-1` - Multiple, `0` - Off, `1` - On\n", "example": -1 }, "OnBackupStart": { "type": "integer", "description": "Notify when a scheduled backup starts, `-1` - Multiple, `0` - Off, `1` - On", "example": 0 }, "OnBackupEnd": { "type": "integer", "description": "Notify when a scheduled backup finishes, `-1` - Multiple, `0` - Off, `1` - On", "example": 1 } } }, "Monitor": { "type": "object", "description": "A Monitor represents a single monitor schedule and detail", "properties": { "Enabled": { "type": "integer", "description": "Denotes if monitoring is enabled/disabled or a mix for the given list of devices. Pass `1` to enable\nmonitoring for all devices, `0` to disable monitoring and `-1` to leave unchanged\n", "example": -1 }, "AlertFail": { "type": "integer", "description": "Regard as down after this many failures. Must be a positive integer or `-1` to leave unchanged", "example": 2 }, "IsPing": { "type": "integer", "description": "Perform ICMP ping rather than TCP connect, `-1` - Multiple, `0` - Off, `1` - On", "example": 0 }, "AlertEmail": { "type": "integer", "description": "Send alert email to owner after AlertFail failures, , `-1` - Multiple, `0` - Off, `1` - On", "example": 1 }, "AlertEmailUp": { "type": "integer", "example": -1, "description": "Send alert email to owner when device is back up, `-1` - Multiple, `0` - Off, `1` - On" } }, "required": [ "Enabled", "AlertFail", "IsPing", "AlertEmail", "AlertEmailUp" ] }, "Protocol": { "type": "string", "description": "Connection protocol to use. This has to be one of the returned `Protocols` or `[Multiple]` to leave unchanged\n", "example": "[Multiple]" }, "Protocols": { "type": "array", "description": "List of supported protocols for the selected devices. Will be an empty list `[]` if there's no possible delta\n", "items": { "type": "string" }, "readOnly": true, "example": [ "ssh", "scp" ] }, "Data": { "type": "object", "description": "Map of data fields common to all devices. Values will be either whatever is common across all devices or `[Multiple]`\n", "additionalProperties": { "type": "string" }, "example": { "username": "foo", "password": "[Multiple]" } }, "CredentialID": { "type": "integer", "description": "[Credentials](#tag/Credential) to use across selected devices. `0` for none, `-1` for multiple\n", "example": -1 }, "BackupScheduleName": { "type": "string", "description": "Return a human-readable description of a schedule across all devices or `[Multiple]`", "example": "Every hour, on the hour", "readOnly": true }, "UpdatedCount": { "type": "integer", "description": "Returns the amount of devices the user has permission to update", "example": 135, "readOnly": true }, "BackupScheduleMode": { "type": "string", "description": "Replace or add backup schedules to devices. Pass `replace` and an empty array for `BackupSchedules` to delete\nall existing schedules.\n", "default": "add", "writeOnly": true, "enum": [ "replace", "add" ] }, "BackupSchedules": { "description": "Allows you to set one or more schedules for all devices", "writeOnly": true, "type": "array", "items": { "type": "object", "properties": { "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules)", "example": "15 * * * *" }, "RetainVersions": { "type": "integer", "description": "How many different versions of backups to keep", "example": 5 }, "RetainDays": { "type": "integer", "description": "How many days to retain backups", "example": 5 }, "DeleteDays": { "type": "integer", "description": "How many days until backups are deleted.", "example": 5 } } } }, "FailurePolicy": { "type": "object", "description": "What should Skylar Compliance to when a device encounters an error taking backups.\n", "properties": { "Retries": { "type": "integer", "minimum": -1, "maximum": 6, "description": "Sets the retry policy. When `PluginKey` is `push_device`, it holds the interval between each retry, in hours. \nIf not, it holds the number of attempts. Special values are `0` (Always), which only applies when `PluginKey`\nis not `push_device`, `-1` (Multiple) and `-2` (Never)\n", "example": 0 }, "Action": { "type": "string", "description": "Which action to take once the maximum amount of attempts have failed. This will either `Revert` to schedule,\nset a device to `Manual` backups or `Disable` a device. `[Multiple]` to leave unchanged. Only applies to devices which `PluginKey` is not `push_device`\n", "default": "Revert", "enum": [ "[Multiple]", "Revert", "Manual", "Disable" ], "example": "Disable" }, "Alerts": { "type": "integer", "description": "Number of attempts needed to trigger an alert. `0` means Always, `-2` Never and `-1` multiple", "example": 0 }, "RetryInterval": { "type": "integer", "description": "Time to wait before attempting a retry in minutes. `-1` means multiple. Only applies to devices which `PluginKey` is not `push_device`", "example": 15 } }, "required": [ "Retries", "Alerts" ] }, "AssetFields": { "type": "array", "description": "List of [Assetfields](#tag/SettingsAssetField) with device specific data (or `[Multiple]` for multiple values)\n", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "Internal [Assetfield](#tag/SettingsAssetField) ID", "example": 123 }, "Name": { "type": "string", "description": "Asset field name", "example": "Location", "readOnly": true }, "Type": { "type": "string", "description": "Asset field type", "example": "text", "readOnly": true }, "Value": { "type": "string", "description": "Asset field value or `[Multiple]` if multiple values are defined for the same field", "example": "Example Location" } }, "required": [ "ID", "Value" ] } }, "PolicyIDs": { "type": "array", "description": "A list of [Compliance policies'](#tag/Policy) IDs that are shared across all selected devices.\n", "items": { "type": "integer", "example": 123 }, "example": [ 1, 2, 3 ] }, "AdditionalInformation": { "type": "object", "description": "Additional information common to devices.\n", "properties": { "InfoCommands": { "type": "array", "description": "List of info commands common to devices. Writable only on update.", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "Info command's ID.", "example": 1 } } } } } } }, "required": [ "DeviceIDs", "DeviceNames", "DomainID", "LabelIDs", "AgentID", "Disabled", "DisabledUntil", "DisabledReason", "BackupPrefix", "NotificationEmails", "Notifications", "Monitor", "Protocol", "Data", "CredentialID", "FailurePolicy", "PolicyIDs", "AdditionalInformation" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1devices~1bulk/patch/requestBody/content/application~1json/schema" } } } }, "202": { "description": "Asynchronous multi-device update request accepted." }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Must not be empty" ], "DeviceIDs[0]": [ "Device with ID 123 does not exist" ], "PluginKey": [ "Plugin 'foo' does not exist" ], "DomainID": [ "Domain with ID 123 does not exist" ], "LabelIDs[0]": [ "Label with ID 123 does not exist" ], "AgentID": [ "Agent with ID 123 does not exist" ], "Disabled": [ "Must be one of -1, 0 or 1" ], "DisabledUntil": [ "Must be set" ], "NotificationEmails[0]": [ "Is not a valid email address" ], "Notifications.OnConfigChange": [ "Must be one of -1, 0 or 1" ], "Notifications.OnBackupStart": [ "Must be one of -1, 0 or 1" ], "Notifications.OnBackupEnd": [ "Must be one of -1, 0 or 1" ], "Monitor": [ "Must be set" ], "Monitor.Enabled": [ "Must be one of -1, 0 or 1" ], "Monitor.AlertFail": [ "Must be a positive integer or -1" ], "Monitor.IsPing": [ "Must be one of -1, 0 or 1" ], "Monitor.AlertEmail": [ "Must be one of -1, 0 or 1" ], "Monitor.AlertEmailUp": [ "Must be one of -1, 0 or 1" ], "Protocol": [ "Protocol 'foo' does not apply to the selected devices" ], "CredentialID": [ "Credential set with ID 123 does not exist" ], "BackupScheduleMode": [ "Must be one of 'replace' or 'add'" ], "BackupSchedules[0].Schedule": [ "Must not be empty", "Is not a valid Skylar Compliance schedule expression" ], "BackupSchedules[0].RetainVersions": [ "Must be a positive integer or -1" ], "BackupSchedules[0].RetainDays": [ "Must be a positive integer or -1" ], "BackupSchedules[0].DeleteDays": [ "Must be a positive integer or -1" ], "BackupSchedules[0].ConfigTypes[0]": [ "Must not be empty", "Config type 'bar' is not valid for plugin 'foo'" ], "FailurePolicy.Retries": [ "Must be either a positive integer lesser then 168, -1 or -2 since `PluginKey` is `push_device`", "Must be an integer between -2 and 6 since `PluginKey` is not `push_device`" ], "FailurePolicy.Action": [ "Must be one of '[Multiple]', 'Revert', 'Manual', or 'Disable'" ], "FailurePolicy.Alerts": [ "Must be an integer between -1 and 3 since `PluginKey` is `push_device`", "Must be either -2, -1, 0, 1 or `FailurePolicy.Retries+1` since `PluginKey` is not `push_device`", "Must be -1 because `FailurePolicy.Retries` is also -1" ], "FailurePolicy.RetryInterval": [ "Must either -1 or a positive number" ], "AssetFields[0].ID": [ "Assetfield with ID 123 does not exist" ], "AdditionalInformation[0].ID": [ "Command with ID 123 does not exist" ], "PolicyIDs[0]": [ "Policy with ID 123 does not exist" ], "InfoCommandIDs[0]": [ "Command with ID 123 does not exist" ] } } } } } } } }, "/devices/bulk/create": { "post": { "summary": "Create devices in bulk", "tags": [ "Device/BulkCreate" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "AddDevice" ] } ], "operationId": "bulk_create_devices", "description": "Bulk creates given devices asynchronously.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Devices": { "type": "array", "description": "List of [Device](#tag/Device) objects to create", "items": { "$ref": "#/paths/~1devices/post/requestBody/content/application~1json/schema" } } }, "required": [ "Devices" ] } } } }, "responses": { "202": { "description": "Started async job where all devices will be created", "content": { "application/json": { "schema": { "type": "object", "properties": { "JobUID": { "type": "integer", "description": "ID of the job that was started" } }, "required": [ "JobUID" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1devices/post/responses/400/content/application~1json/example" } } } } } } }, "/devices/bulk/schedule": { "post": { "summary": "Spread device schedules", "tags": [ "Device/BulkEdit" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "schedule_devices", "description": "Allows spreading the schedule of two or more devices evenly over a given time period. This will replace all\nexisting schedules for selected devices.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "DeviceIDs": { "type": "array", "description": "List of [Device](#tag/Device) IDs to set the schedule for", "items": { "type": "integer" }, "example": [ 123, 124, 125 ] }, "SpreadAcross": { "type": "string", "description": "Time period to spread the selected device's schedules across.", "enum": [ "Day", "Week", "Month" ], "example": "Day" }, "RetainVersions": { "type": "integer", "description": "How many different versions of backups to keep for the created schedule (`0` for unlimited)", "example": 5, "default": 10 }, "StartHour": { "type": "integer", "description": "Hour of the day to start the schedule from", "default": 0, "example": 6, "minimum": 0, "maximum": 23 }, "EndHour": { "type": "integer", "description": "Hour of the day to run the schedule to (up until the last minute of that hour)", "default": 23, "example": 12, "minimum": 0, "maximum": 23 }, "StartDayOfWeek": { "type": "string", "description": "Day of the week to start schedule from (when `SpreadAcross` is set to `Week`)", "enum": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], "default": "Sunday" }, "EndDayOfWeek": { "type": "string", "description": "Day of the week to run schedule to including (when `SpreadAcross` is set to `Week`)", "enum": [ "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], "default": "Saturday" }, "StartDayOfMonth": { "type": "integer", "description": "Day of the month to start schedule from (when `SpreadAcross` is set to `Month`)", "default": 1, "example": 5, "minimum": 1, "maximum": 28 }, "EndDayOfMonth": { "type": "integer", "description": "Day of the month to run schedule to including (when `SpreadAcross` is set to `Month`)", "default": 28, "example": 15, "minimum": 1, "maximum": 28 } }, "required": [ "DeviceIDs", "SpreadAcross" ] } } } }, "responses": { "200": { "description": "Device schedule created", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdatedCount": { "type": "integer", "example": "Number of updated devices" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Must contain at least two device IDs" ], "DeviceIDs[0]": [ "Device with ID 123 does not exist" ], "SpreadAcross": [ "Must be one of 'Day', 'Week' or 'Month'" ], "RetainVersions": [ "Must be a positive number" ], "StartHour": [ "Must be an integer between 0 and 23", "Must be less than EndHour" ], "EndHour": [ "Must be an integer between 0 and 23", "Must be bigger than StartHour" ], "StartDayOfWeek": [ "Must be one of 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' or 'Sunday'", "Must be before EndDayOfWeek" ], "EndDayOfWeek": [ "Must be one of 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' or 'Sunday'", "Must be after StartDayOfWeek" ], "StartDayOfMonth": [ "Must be an integer between 1 and 28", "Must be less than EndDayOfMonth" ], "EndDayOfMonth": [ "Must be an integer between 1 and 28", "Must be bigger than StartDayOfMonth" ] } } } } } } } }, "/dictionaries/{type}": { "get": { "summary": "Retrieve a dictionary", "tags": [ "Dictionary" ], "operationId": "list_dictionary", "description": "Retrieve a dictionary for a given type", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" } }, "examples": { "device-protocols": { "value": { "telnet": "Telnet", "ssh": "SSH", "scp": "SCP", "ftp": "FTP", "sftp": "SFTP", "tftp": "TFTP", "http": "HTTP", "https": "HTTPS", "ibap": "IBAP" } }, "device-locations": { "value": { "123": "Data Centre 1", "124": "Data Centre 2", "125": "Data Centre 3" } }, "device-manufacturers": { "value": { "A10 Networks": "A10 Networks", "Bluecoat": "Bluecoat", "Cisco": "Cisco" } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Dictionary does not exist", "errors": { "Type": [ "Dictionary 'foo' does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "string", "enum": [ "device-locations", "device-manufacturers", "device-protocols", "device-serials", "device-firmwares", "device-models", "device-states", "device-owners", "domain-contacts", "domain-emails", "log-objecttypes", "log-actions", "backup-firmwareversions", "device-assetids" ] }, "name": "type", "description": "Dictionary identifier", "in": "path", "required": true } ] }, "/discovery": { "post": { "summary": "Run device discovery", "description": "Triggers a manual device discovery run, based on the current [Discovery Settings](#tag/SettingsDiscovery).\n", "tags": [ "Discovery" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "operationId": "run_discovery", "responses": { "204": { "description": "Device discovery started" } } } }, "/discovery/devices": { "get": { "summary": "List discovered devices", "tags": [ "Discovery/Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "ignored": { "description": "If set to true, only ignored discovered devices are fetched", "type": "boolean", "example": true } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "title": "Discovered Device", "type": "object", "description": "Discovered device model", "properties": { "ID": { "description": "Discovered device ID", "type": "integer", "example": 123, "readOnly": true }, "Hostname": { "type": "string", "description": "Hostname of the device", "example": "device.example.com" }, "Address": { "type": "string", "description": "Network address of the device", "example": "192.0.2.123" }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier as detected by a device discovery run. This might not be the correct plugin.\n", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "A [Plugin](#tag/Plugin) name as detected by a device discovery run. This might not be the correct plugin.\n", "example": "Cisco IOS" }, "Ignored": { "type": "boolean", "description": "Denotes if a device has been ignored. Ignored devices are not re-scanned in subsequent discovery runs." } } } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_discovered_devices", "description": "Retrieve all discovered devices. By default, ignored devices are excluded from result", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "in": "query", "name": "ignored", "schema": { "type": "boolean" }, "description": "If set to true, only ignored discovered devices are fetched" }, { "$ref": "#/paths/~1devices~1count/parameters/2" } ] }, "patch": { "summary": "Change discovered device settings", "tags": [ "Discovery/Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "operationId": "update_discovered_devices", "description": "Change one or more discovered device's `Ignore` value\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "description": "List of discovered device IDs and their `Ignored` status", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "ID of a discovered device you want to change" }, "Ignored": { "type": "boolean", "description": "Wether a discovered device should be ignored or not" }, "PluginKey": { "type": "string", "description": "[Plugin](#tag/Plugin) identifier for this device. You can pass a different PluginKey from the one\nthat was discovered\n" } }, "required": [ "ID" ] }, "example": [ { "ID": 123, "Ignored": true }, { "ID": 124, "Ignored": false, "PluginKey": "cisco_ios" } ] } }, "required": [ "data" ] } } } }, "responses": { "204": { "description": "Devices updated" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "data[0].ID": [ "Must be set", "Discovered device with ID 123 not found" ], "data[0].Ignored": [ "Must be set" ] } } } } } } } }, "/discovery/import": { "post": { "summary": "Import discovered devices", "tags": [ "Discovery" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "operationId": "import_discovery", "description": "Import previously [discovered devices](#tag/DiscoveryDevice)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "description": "List of discovered device IDs and optional plugin overrides", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "ID of a previously [discovered device](#tag/DiscoveryDevice)", "example": 123 }, "PluginKey": { "type": "string", "description": "[Plugin](#tag/Plugin) identifier for this device. You can pass a different PluginKey from the one\nthat was discovered\n", "example": "cisco_asa" } }, "required": [ "ID" ] } } }, "required": [ "data" ] } } } }, "responses": { "204": { "description": "Import started" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "data[0].ID": [ "Must be set", "Discovered device with ID 123 not found" ], "data[0].PluginKey": [ "Plugin 'foo' does not exist" ] } } } } } } } }, "/discovery/rescan": { "post": { "summary": "Rescan discovered devices", "tags": [ "Discovery" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "operationId": "rescan_discovery", "description": "Run discovery on already [discovered devices](#tag/DiscoveryDevice)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "List of IDs of [discovered devices](#tag/DiscoveryDevice) to re-scan", "properties": { "IDs": { "type": "array", "description": "IDs of already [discovered devices](#tag/DiscoveryDevice) to be re-scanned.", "items": { "type": "integer" }, "example": [ 123, 124, 125 ] } } } } } }, "responses": { "204": { "description": "Device discovery started" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "IDs[0]": [ "Discovered device with ID 123 not found" ] } } } } } } } }, "/domains": { "get": { "summary": "List domains", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDomain", "ViewSysadmin" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "contact": { "description": "List of contacts used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "John Doe" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "John Doe" ] } } }, "email": { "description": "List of emails used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "test@skylarcompliance.com" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "test@skylarcompliance.com" ] } } }, "licence_expiry": { "description": "Date used to filter items by their license expiry date", "type": "object", "properties": { "before": { "description": "Before the provided date", "type": "string", "example": "2021-01-18T23:59:59.999Z" }, "after": { "description": "After the provided date", "type": "string", "example": "2021-01-18T23:59:59.999Z" } } }, "domain_id": { "description": "List of domain IDs included in the results", "type": "array", "items": { "type": "integer" } } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1domains/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_domains", "description": "Retrieve all domains", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "in": "query", "name": "contact[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of contacts to include in the results" }, { "in": "query", "name": "not[contact][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of contacts to exclude from the results" }, { "in": "query", "name": "email[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of emails to include in the results" }, { "in": "query", "name": "not[email][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of emails to exclude from the results" }, { "in": "query", "name": "licence_expiry_before", "schema": { "type": "string" }, "description": "Timestamp to include results before the license expiry date." }, { "in": "query", "name": "licence_expiry_after", "schema": { "type": "string" }, "description": "Timestamp to include results after the license expiry date." }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "$ref": "#/paths/~1devices~1count/parameters/14" } ] }, "post": { "summary": "Create a domain", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDomain", "ViewSysadmin" ] } ], "operationId": "create_domain", "description": "Create a new domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Domain", "type": "object", "description": "Domain model", "properties": { "ID": { "description": "Domain ID", "type": "integer", "example": 123, "readOnly": true }, "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs to assign to this domain. **Note:** When retrieving a list of domains, this\nfield will be left blank for performance reasons.\n", "items": { "type": "integer", "example": 123 }, "example": [ 1, 2, 3 ], "readOnly": true }, "DeviceCount": { "type": "integer", "description": "Number of devices in a domain", "readOnly": true, "example": 123, "default": 0 }, "Name": { "description": "Domain name", "type": "string", "example": "Example domain" }, "Networks": { "type": "array", "description": "One or more IP address ranges that are allowed for this domain (CIDR notation)", "items": { "type": "string", "description": "IP address range in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)" }, "example": [ "172.16.0.0/12", "172.17.0.0/12" ], "default": [] }, "NatAddress": { "type": "string", "description": "A domain-wide NAT IP address, which overrides the system-wide [setting](#tag/Settings). This setting can in turn\nbe overridden by the device-specific setting.\n", "example": "172.16.0.1" }, "Contact": { "type": "string", "description": "Name of the main contact for this domain", "example": "Anna Fox" }, "Phone": { "type": "string", "description": "Contact telephone number", "example": "+44 844 571 8120" }, "Email": { "type": "string", "description": "Contact email", "example": "afox@skylarcompliance.com" }, "Address": { "type": "string", "description": "Customer or Business Unit address", "example": "4 Tannery Ln, Send, Woking GU23 7EF" }, "Notes": { "type": "string", "description": "Additional information", "example": "Just an example" }, "MaxDevices": { "type": "integer", "description": "Maximum permitted number of devices that can be added to this domain. `0` means no limit.", "default": 0, "example": 100 }, "Logo": { "type": "string", "description": "Domain specific branding as a [Base64](https://www.base64-image.de) encoded string. For optimal results, the logo\nshould be exactly 100 pixels wide and up to 100 pixels tall, and no more than 40KB in size.\n", "example": "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" }, "RemoveLicence": { "type": "boolean", "description": "Hide the expiration date for users in this domain", "example": true, "default": false }, "RemoveSerial": { "type": "boolean", "description": "Hide the appliance serial for users in this domain", "example": true, "default": false }, "RemoveHelp": { "type": "boolean", "description": "Disallow access to the help for users in this domain", "example": true, "default": false }, "UseLicence": { "type": "boolean", "description": "Enfoce license will expire a domain at a given date, see `LicenceExpiry` field", "example": true, "default": false }, "LicenceExpiry": { "type": "string", "description": "License expiration timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format", "example": "2021-05-20T00:00:00Z" }, "DisableDevices": { "type": "boolean", "description": "Stop all scheduled jobs for this domain when `LicenceExpiry` date and time is reached", "example": true, "default": false }, "PreventLogin": { "type": "boolean", "description": "Disallow users of this domain from accessing the appliance when `LicenceExpiry` date and time is reached", "example": true, "default": false } }, "required": [ "Name" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1domains/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Networks[0]": [ "Must not be blank", "Range '255.255.255.255/255' is not a valid network range in CIDR notatation" ], "NatAddress": [ "Address '256.256.256.256' is not a valid IP address" ], "Email": [ "Is not a valid email address" ], "MaxDevices": [ "Must be a positive number" ], "LicenseExpiry": [ "When 'UseLicense' is true, 'LicenseExpiry' has to be set", "Has to be in the future" ] } } } } } }, "parameters": [] } }, "/domains/{id}": { "get": { "summary": "Retrieve a domain", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDomain", "ViewSysadmin" ] } ], "operationId": "get_domain", "description": "Retrieve a single domain", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1domains/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Domain does not exist", "errors": { "ID": [ "Domain with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a domain", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDomain", "ViewSysadmin" ] } ], "operationId": "update_domain", "description": "Update a domain", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1domains/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1domains/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1domains/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1domains~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a domain", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDomain", "ViewSysadmin" ] } ], "operationId": "delete_domain", "description": "Delete a domain", "responses": { "204": { "description": "Domain deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1domains~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Domain ID", "in": "path", "required": true } ] }, "/domains/{id}/relationships": { "get": { "summary": "Export domain's relationships", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDomain" ] } ], "operationId": "export_domain_relationships", "description": "Export single domain's relationships", "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string" }, "example": "Type,Name,ID\ndevice,TestDevice,123\nlabel,TestLabel,456\n" } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1domains~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Domain ID", "in": "path", "required": true } ] }, "/domains/public": { "get": { "summary": "List domains (public)", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDomain" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "contact": { "description": "List of contacts used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "John Doe" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "John Doe" ] } } }, "email": { "description": "List of emails used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "test@skylarcompliance.com" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "test@skylarcompliance.com" ] } } }, "licence_expiry": { "description": "Date used to filter items by their license expiry date", "type": "object", "properties": { "before": { "description": "Before the provided date", "type": "string", "example": "2021-01-18T23:59:59.999Z" }, "after": { "description": "After the provided date", "type": "string", "example": "2021-01-18T23:59:59.999Z" } } }, "domain_id": { "description": "List of domain IDs included in the results", "type": "array", "items": { "type": "integer" } } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1domains~1public~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_domains_public", "description": "Retrieve all domains (public)", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1domains/get/parameters/5" }, { "$ref": "#/paths/~1domains/get/parameters/6" }, { "$ref": "#/paths/~1domains/get/parameters/7" }, { "$ref": "#/paths/~1domains/get/parameters/8" }, { "$ref": "#/paths/~1domains/get/parameters/9" }, { "$ref": "#/paths/~1domains/get/parameters/10" }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "$ref": "#/paths/~1devices~1count/parameters/14" } ] } }, "/domains/public/{id}": { "get": { "summary": "Retrieve a domain (public)", "tags": [ "Domain" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDomain" ] } ], "operationId": "get_domain_public", "description": "Retrieve a single domain (public)", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "PublicDomain", "type": "object", "description": "Domain model for public consumption", "properties": { "ID": { "description": "Domain ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Domain name", "type": "string", "example": "Example domain" } }, "required": [ "ID", "Name" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Domain does not exist", "errors": { "ID": [ "Domain with ID 123 does not exist" ] } } } } } } } }, "/downloads/{id}": { "get": { "summary": "Download a file", "tags": [ "Download" ], "operationId": "download", "description": "Download a file for a given identifier", "responses": { "200": { "description": "OK", "content": { "application/octet-stream": { "schema": { "type": "string", "description": "File contents.", "format": "binary" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Download does not exist", "errors": { "Type": [ "Download '542e5156-5fc0-4d6e-a16f-173a4b27e22c' does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "string", "description": "A download identified in [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format", "example": "542e5156-5fc0-4d6e-a16f-173a4b27e22c" }, "name": "id", "description": "Download ID", "in": "path", "required": true } ] }, "/export": { "post": { "summary": "Create an export", "tags": [ "Export" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ExportDevices" ] } ], "operationId": "create_export", "description": "Create an new export.\n\nWhen `Method` is `download`, use the returned `DownloadURL`\nto retrieve the exported file (`GET /downloads/{id}`).\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Export", "type": "object", "description": "Export model", "properties": { "DeviceIDs": { "type": "array", "description": "List of [Device](#tag/Device) IDs to export. Either `DeviceIDs` or `DomainIDs` can be passed, but not both\n", "items": { "type": "integer" } }, "DomainIDs": { "type": "array", "description": "List of [Domain](#tag/Domain) IDs to export. Either `DeviceIDs` or `DomainIDs` can be passed, but not both\n", "items": { "type": "integer" } }, "Configurations": { "type": "string", "description": "Which device configurations to export", "example": "None", "enum": [ "None", "MostRecent", "All" ] }, "IncludeLogs": { "type": "boolean", "description": "Include device logs in the export", "default": false, "example": true }, "IncludeData": { "type": "boolean", "description": "Include device data in the export", "default": false, "example": true }, "Format": { "type": "string", "description": "File format for the export. `IndividualFiles` directly exports the individual config files.", "default": "TGZ", "enum": [ "TGZ", "ZIP", "IndividualFiles" ] }, "Method": { "type": "string", "description": "Delivery method of how to transfer the export to the requestor.\nIf set to `download`, the response includes `DownloadURL`, which should be called\nto retrieve the file (`GET /downloads/{id}`).\n", "enum": [ "download", "server" ], "default": "download" }, "ChunkSize": { "type": "integer", "description": "Chunk size for exported data in bytes", "example": 1024 }, "FileServerID": { "type": "integer", "description": "ID of a [Fileserver](#tag/Fileserver) to use for the export", "example": 123 } }, "required": [ "Configurations", "ChunkSize" ] }, "examples": { "Download": { "value": { "DeviceIDs": [ 1 ], "Configurations": "All", "Format": "TGZ", "Method": "download", "ChunkSize": 256000000 } }, "Fileserver": { "value": { "DomainIDs": [ 3 ], "Configurations": "All", "IncludeLogs": true, "IncludeData": true, "Format": "TGZ", "Method": "server", "FileServerID": 123, "ChunkSize": 512000000 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "DeviceExport", "type": "object", "properties": { "DeviceIDs": { "type": "array", "description": "List of exported [Device](#tag/Device) IDs", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "DomainIDs": { "type": "array", "description": "List of exported [Domain](#tag/Domain) IDs", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "FileServerID": { "type": "integer", "description": "ID of a [Fileserver](#tag/Fileserver) that was used for exporting", "example": 123 }, "DownloadURL": { "type": "string", "description": "URL used to download the exported file when `Method` is `download` (`GET /downloads/{id}`)", "example": "/downloads/90404db7-a6a4-4601-b1fa-9e7df327b984" } } } } }, "headers": { "Content-Disposition": { "schema": { "type": "string", "example": "attachment; filename=\"data.zip\"" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Either 'DeviceIDs' or 'DomainIDs' has to be set", "Both 'DeviceIDs' and 'DomainIDs' can not be set at the same time" ], "DomainIDs": [ "Either 'DeviceIDs' or 'DomainIDs' has to be set", "Both 'DeviceIDs' and 'DomainIDs' can not be set at the same time" ], "Configurations": [ "Must be one of 'None', 'MostRecent' or 'All'" ], "Format": [ "Must be one of 'TGZ', 'ZIP' or 'IndividualFiles'" ], "Method": [ "Must be one of 'download' or 'server'" ], "FileServerID": [ "Can not be empty if Method is 'server'", "Fileserver with ID 123 does not exist" ] } } } } } }, "parameters": [] } }, "/export/policies": { "get": { "summary": "List policies", "tags": [ "Export/Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "string" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1export~1policies/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_export_policies", "description": "Retrieve all policies", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Create a policy", "tags": [ "Export/Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "create_export_policy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1export~1policies/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "FileServerID": [ "Must be set", "Fileserver with ID 123 does not exist" ], "Mode": [ "Must be one of 'AllDevices', 'Devices', 'Domains'" ], "DeviceIDs": [ "Must be set if Mode is 'Devices'" ], "DomainIDs": [ "Must be set if Mode is 'Domains'" ], "Policy": [ "Must be one of 'Always', 'NewVersions' or 'BeforeDeletion'" ] } } } } } }, "description": "Create a new policy", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Policy", "type": "object", "description": "Export policy model", "properties": { "ID": { "description": "Export policy ID", "type": "integer", "example": 123, "readOnly": true }, "FileserverID": { "type": "integer", "description": "ID of the [Fileserver](#tag/Fileserver) to use for exports", "example": 123 }, "FileserverName": { "type": "string", "description": "Name of the [Fileserver](#tag/Fileserver) to use for exports", "example": "NAS123", "readOnly": true }, "DeviceIDs": { "type": "array", "description": "List of [Device](#tag/Device) IDs to export. Either `DeviceIDs` or `DomainIDs` can be passed, but not both\n", "items": { "type": "integer" }, "example": [ 123, 124, 125 ] }, "DomainIDs": { "type": "array", "description": "List of [Domain](#tag/Domain) IDs to export. Either `DeviceIDs` or `DomainIDs` can be passed, but not both\n", "items": { "type": "integer" }, "example": [] }, "Summary": { "type": "string", "description": "A summary of what a policy contains for display purposes, either \"All devices\", a list of device names or domain\nnames\n", "readOnly": true, "example": "All devices" }, "Mode": { "type": "string", "description": "What to export. Can be `AllDevices` for all configurations for all devices, `Devices` for a given list of devices\nas defined in `DeviceIDs` or `Domains` for a list of domains as set via `DomainIDs`\n", "default": "AllDevices", "enum": [ "AllDevices", "Devices", "Domains" ] }, "Policy": { "type": "string", "description": "Select when to automatically export configurations to your external server. `Always` will export when a backup\nis completed, `NewVersions` will export when a backup is completed and the version number of the backup has\nchanged, and `BeforeDeletion` will export only the backups that are due for removal from the Skylar Compliance\nappliance.\n", "default": "Always", "enum": [ "Always", "NewVersions", "BeforeDeletion" ] }, "GPGPassphrase": { "type": "string", "description": "Passphrase that will be used to encrypt exported backups with\n[GPG](https://en.wikipedia.org/wiki/GNU_Privacy_Guard). If not passed, encryption will be disabled.\n", "example": "Sunnybreeze123" }, "UseRetentionPolicy": { "type": "boolean", "description": "If true, exported backups will be deleted if retention policy is expired", "default": false }, "IncludeDeviceName": { "type": "boolean", "description": "The filename / path on the remote server will include a [Device's](#tag/Device) name", "default": false }, "IncludeDomainName": { "type": "boolean", "description": "The filename / path on the remote server will include a device's [Domain](#tag/Domain) name", "default": false }, "Disabled": { "type": "boolean", "description": "Disables an export policy", "default": false } }, "required": [ "FileserverID", "Mode" ] } } } }, "parameters": [] } }, "/export/policies/{id}": { "get": { "summary": "Retrieve a policy", "tags": [ "Export/Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "get_export_policy", "description": "Retrieve a single policy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1export~1policies/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Policy does not exist", "errors": { "ID": [ "Policy with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a policy", "tags": [ "Export/Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_export_policy", "description": "Update a policy", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1export~1policies/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1export~1policies/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1export~1policies/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1export~1policies~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a policy", "tags": [ "Export/Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "delete_export_policy", "description": "Delete a policy", "responses": { "204": { "description": "Export policy deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1export~1policies~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Policy ID", "in": "path", "required": true } ] }, "/fileservers": { "get": { "summary": "List fileservers", "tags": [ "Fileserver" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_fileservers", "description": "Retrieve all fileservers", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Create a fileserver", "tags": [ "Fileserver" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "create_fileserver", "description": "Create a new fileserver", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Fileserver", "type": "object", "description": "Filserver model", "properties": { "ID": { "description": "Fileserver ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Fileserver name", "type": "string", "example": "NAS123" }, "Method": { "type": "string", "description": "Connection method", "example": "SFTP", "enum": [ "FTP", "SFTP", "SCP", "CIFS", "S3", "Azure" ] }, "Location": { "type": "string", "description": "Server's hostname or address. For S3 type connections, pass the AWS region.", "example": "example.com" }, "Path": { "type": "string", "description": "Path on remote server", "example": "/foo/bar" }, "Username": { "type": "string", "description": "Name of user for FTP/SFTP/SCP type connection. Doubles as access key ID for AWS and storage account name for\nAzure Blob Storage\n", "example": "user123" }, "Password": { "type": "string", "description": "Password of remote server user. Doubles as secret access key for AWS\n", "example": "Sunbreeze123" }, "UsePublicKeyAuthentication": { "type": "boolean", "default": false, "description": "Use public key for authenticating connections over SFTP/SCP. See [Settings/PublicKey](#tag/SettingsPublicKey)\nhow to retrieve those for your appliance.\n" }, "PublicKeyAuthenticationType": { "type": "string", "description": "Which public key to use to authenticate, defaults to trying both RSA/DSA", "default": "RSA/DSA", "enum": [ "RSA/DSA", "RSA", "DSA" ] }, "CifsVersion": { "type": "string", "description": "Which version of CIFS to use when attempting to mount a CIFS share.\nSee explanation on [CIFS version](http://127.0.0.1:8080/#section/CIFS-version)\n", "example": "3.0" }, "Bucket": { "type": "string", "description": "For Amazon S3 this corresponds to the Bucket. For Azure it is the Container.\n", "example": "my-bucket.s3.us-west-2.amazonaws.com" } }, "required": [ "Name", "Method" ] }, "examples": { "FTP": { "value": { "Name": "ftp example", "Method": "FTP", "Location": "ftp.example.com", "Username": "transfer", "Password": "Sunbreeze123", "Path": "/var/ftp/foo/bar" } }, "SFTP": { "value": { "Name": "sftp example", "Method": "SFTP", "Location": "sftp.example.com", "Username": "transfer", "Password": "Sunbreeze123", "Path": "/foo/bar" } }, "SCP": { "value": { "Name": "scp example", "Method": "SCP", "Location": "scp.example.com", "Username": "transfer", "Path": "/foo/bar", "UsePublicKeyAuthentication": true } }, "CIFS": { "value": { "Name": "cifs example", "Method": "CIFS", "Location": "winserver", "Username": "Administrator", "Password": "Sunbreeze123", "Path": "\\share\foo\bar", "CifsVersion": "2.1" } }, "S3": { "value": { "Name": "s3 example", "Method": "S3", "Location": "eu-west-2", "Username": "REDACTED_AWS_ACCESS_KEY_ID", "Password": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "Path": "/foo/bar", "Bucket": "my-bucket.s3.us-west-2.amazonaws.com" } }, "Azure": { "value": { "Name": "azure example", "Method": "Azure", "Username": "davidballmer", "Password": "Loremipsumdolorsitamet,consecteturadipiscingelit.Donecquisvenenatismi", "Path": "/foo/bar", "Bucket": "gates" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Method": [ "Must not be blank", "Must be one of allowed methods" ], "Location": [ "Must not be blank" ], "PublicKeyAuthenticationType": [ "Must be one of 'RSA/DSA', 'RSA' or 'DSA'" ], "Bucket": [ "Must not be blank if Methos is 'S3'" ] } } } } } }, "parameters": [] } }, "/fileservers/{id}": { "get": { "summary": "Retrieve a fileserver", "tags": [ "Fileserver" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Fileserver does not exist", "errors": { "ID": [ "Fileserver with ID 123 does not exist" ] } } } } } }, "operationId": "get_fileserver", "description": "Retrieve a single fileserver" }, "put": { "summary": "Update a fileserver", "tags": [ "Fileserver" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_fileserver", "description": "Update a fileserver", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1fileservers/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1fileservers~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a fileserver", "tags": [ "Fileserver" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "delete_fileserver", "description": "Delete a fileserver", "responses": { "204": { "description": "Fileserver deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1fileservers~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Fileserver ID", "in": "path", "required": true } ] }, "/fileservers/test": { "post": { "summary": "Test a fileserver", "tags": [ "Fileserver" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "test_fileserver", "description": "Test a fileserver for connectivity and ability to push files.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/schema" }, "examples": { "$ref": "#/paths/~1fileservers/post/requestBody/content/application~1json/examples" } } } }, "responses": { "204": { "description": "Fileserver connected successfully" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1fileservers/post/responses/400/content/application~1json/example" } } } } }, "parameters": [] } }, "/firmware": { "get": { "summary": "List all firmware", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewFirmware" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "uploaded_after": { "description": "Returned items are filtered by minimum uploaded date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "uploaded_before": { "description": "Returned items are filtered by minimum uploaded date", "type": "string", "example": "2023-01-02T15:04:05.999Z" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1firmware~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_firmwares", "description": "Retrieve all firmware metadata", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "in": "query", "name": "uploaded_after", "schema": { "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results after the uploaded date." }, { "in": "query", "name": "uploaded_before", "schema": { "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results before the uploaded date." } ] }, "post": { "summary": "Upload firmware", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyFirmware" ] } ], "operationId": "upload_firmware", "description": "Upload a firmware image", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "PluginKey": { "type": "string", "description": "Key of the [Plugin](#tag/Plugin) that corresponds to the device type of the firmware being uploaded\n", "example": "cisco_ios" }, "Description": { "type": "string", "description": "A description of or notes aboue the firmware being uploaded" }, "File": { "type": "string", "description": "The actual file", "format": "binary" } }, "required": [ "File" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1firmware~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "PluginKey": [ "Plugin 'foo' does not exist" ], "Filename": [ "Must not be blank" ] } } } } } }, "parameters": [] } }, "/firmware/{id}": { "get": { "summary": "Get firmware metadata", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewFirmware" ] } ], "operationId": "get_firmware", "description": "Get metadata for a firmware image", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1firmware~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Firmware does not exist", "errors": { "ID": [ "Firmware with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update firmware metadata", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyFirmware" ] } ], "operationId": "update_firmware", "description": "Update metadata for a firmware image", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Firmware", "type": "object", "description": "Firmware model", "properties": { "ID": { "description": "Firmware ID", "type": "integer", "example": 123, "readOnly": true }, "Description": { "type": "string", "description": "A description of or notes aboue the firmware being uploaded", "example": "Catalyst 6500 Series / 7600 Series ASA Services Module" }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier for the device type that this firmware is restricted to. If left blank, an\nimage can be appliad to _any_ device which can have unintended side effects\n", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "User friendly name of the plugin this firmware image is restricted to", "example": "Cisco IOS", "readOnly": true }, "Filename": { "type": "string", "description": "Filename of the uploaded file", "example": "fwsm_migration_mac-1.0.18.zip" }, "Size": { "type": "integer", "description": "Size of the firmware in bytes", "example": 1024, "readOnly": true }, "Uploaded": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when the firmware was uploaded", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "MD5": { "type": "string", "description": "MD5 hash of the uploaded file", "example": "9cad0367c675eb1473fa492f05c0b718", "readOnly": true } }, "required": [ "Filename" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1firmware~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1firmware/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1firmware~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a firmware", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyFirmware" ] } ], "operationId": "delete_firmware", "description": "Delete a firmware", "responses": { "204": { "description": "Firmware deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1firmware~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Firmware ID", "in": "path", "required": true } ] }, "/firmware/{id}/push": { "post": { "summary": "Push firmware to devices", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "PushFirmware" ] } ], "operationId": "push_firmware", "description": "Push firmware to one or more devices. A [device plugin](#tag/Plugin) needs to expose an `upgrade` function\nto support pushing firmware updates.\n\n**Note:** Skylar Compliance allows you to push firmware that is not restricted to a plugin/device type to ALL devices.\nThis can have unintended consequences.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "DeviceIDs": { "type": "array", "description": "A list of [Device](#tag/Device) IDs to push this firmware to.\n", "items": { "type": "integer", "example": 123 }, "example": [ 1, 2, 3 ] } }, "required": [ "DeviceIDs" ] } } } }, "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceIDs": [ "Must not be blank" ], "DeviceIDs[0]": [ "Device with ID 123 does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Firmware ID", "in": "path", "required": true } ] }, "/firmware/export": { "post": { "summary": "Export firmware", "tags": [ "Firmware" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "PushFirmware" ] } ], "operationId": "export_firmware", "description": "Export one or more firmware images.\n\nWhen `Method` is `download`, use each returned `DownloadFiles[].DownloadID`\nwith `GET /downloads/{id}` to retrieve the exported file.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "FirmwareIDs": { "type": "array", "description": "List of Firmware IDs to export", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "Method": { "type": "string", "description": "Delivery method of how to transfer the firmware to the requestor.\n", "enum": [ "download", "email", "server" ], "default": "download" }, "EmailAddress": { "type": "string", "description": "Email address that an exported firmware will be sent to. Requires `Method` to be set to \"email\"", "example": "afox@skylarcompliance.com" }, "FileServerID": { "type": "integer", "description": "ID of a [Fileserver](#tag/Fileserver) to use for the export", "example": 123 } }, "required": [ "FirmwareIDs" ] }, "examples": { "Download": { "value": { "FirmwareIDs": [ 1 ], "Method": "download" } }, "Email": { "value": { "FirmwareIDs": [ 2 ], "Method": "email", "EmailAddress": "afox@skylarcompliance.com" } }, "Fileserver": { "value": { "FirmwareIDs": [ 3 ], "Method": "server", "FileServerID": 123 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "FirmwareExport", "type": "object", "properties": { "FirmwareIDs": { "type": "array", "description": "List of exported Firmware IDs", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "DownloadFiles": { "type": "array", "description": "Details for firmware files to download.\nWhen `Method` is `download`, call `GET /downloads/{id}` for each `DownloadID`.\n", "items": { "type": "object", "description": "Details for firmware file to download", "properties": { "FirmwareID": { "type": "integer", "example": 1, "description": "ID of the firwmare" }, "Filename": { "type": "string", "example": "firmware.bin", "description": "Filename of the firmware file" }, "DownloadID": { "type": "string", "example": "90404db7-a6a4-4601-b1fa-9e7df327b984", "description": "ID used with `GET /downloads/{id}` to download this exported file" } }, "required": [ "FirmwareID", "Filename", "DownloadID" ] } }, "EmailAddress": { "type": "string", "description": "Email address that an exported firmware was sent to if `Method` was set to \"email\"", "example": "afox@skylarcompliance.com" }, "FileServerID": { "type": "integer", "description": "ID of a [Fileserver](#tag/Fileserver) that was used for exporting", "example": 123 } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "errors": { "FirmwareIDs": [ "Must not be blank" ], "FirmwareIDs[0]": [ "Firmware with ID 123 does not exist" ], "Method": [ "Must be one of 'download', 'email' or 'server'" ], "EmailAddress": [ "Can not be empty if Method is 'email'", "Is not a valid email address" ], "FileServerID": [ "Can not be empty if Method is 'server'", "Fileserver with ID 123 does not exist" ] } } } } } } } }, "/jobs": { "get": { "summary": "List jobs", "tags": [ "Job" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "string" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1jobs~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "title": "Error", "type": "object", "description": "Error model", "properties": { "EncryptionStatus": { "type": "string", "description": "Current decryption status of the system. An appliance that has just been restarted and a valid\n`EncryptionPassword` when logging in will return a status of `503 Service Unavailable` until it's\neither fully decrypted or decryption has failed.\n", "enum": [ "Encrypted", "Decrypted", "Decrypting", "Failure" ], "example": "Decrypting" }, "Status": { "type": "string", "description": "Appliance status that led to being unavailable", "example": "Updating" }, "message": { "type": "string", "description": "An error message describing the problem that occured" }, "errors": { "type": "object", "description": "(Optional) additional errors that add details to the error message", "additionalProperties": { "type": "array", "items": { "type": "string" } } } } } } } }, "402": { "description": "Payment Required", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "504": { "description": "Gateway Timeout", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "list_jobs", "description": "Retrieve all currently running jobs", "parameters": [ { "in": "query", "name": "fields", "schema": { "type": "string", "example": "key,name" }, "description": "Comma separated list of fields to return in the list operation. Those will then be the only fields returned." }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "in": "query", "name": "sort", "schema": { "type": "string", "example": "Date,-Name" }, "description": "Comma-separated fields that should be used to order the items returned. The default ordering method is ascendant, and the prefix \"-\" inverts it to be descendant" }, { "in": "query", "name": "search", "schema": { "type": "string" }, "description": "TODO" } ] }, "delete": { "summary": "Abort all", "tags": [ "Job" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Aborts all running jobs", "operationId": "cancel_all_jobs", "responses": { "204": { "description": "Abort requested" } } } }, "/jobs/{id}": { "get": { "summary": "Retrieve a job", "tags": [ "Job" ], "operationId": "get_job", "description": "Retrieve details for a single job", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Job", "type": "object", "description": "Job model", "properties": { "ID": { "description": "Job ID", "type": "integer", "example": 123, "readOnly": true }, "Type": { "type": "string", "description": "The type of the running job", "example": "Backup" }, "Description": { "type": "string", "description": "A short summary what the job is about", "example": "Backup CiscoFW1" }, "DeviceID": { "type": "integer", "description": "ID of a [Device](#tag/Device) this job relates to (if at all)", "default": 0, "example": 123 }, "DeviceName": { "type": "string", "description": "Name of the device a job relates to (if at all)", "example": "CiscoFW1" }, "DomainIDs": { "type": "array", "items": { "type": "integer" }, "description": "IDs of [Domain](#tag/Domain) this job relates to (if at all)", "example": [ 1, 2, 3 ] }, "Progress": { "type": "integer", "description": "Completion percentage of the job", "minimum": 0, "maximum": 100, "example": 75 }, "User": { "type": "string", "description": "User that initiated a job. Scheduled jobs will appear as initiated by `system`.", "default": "system" }, "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when job was created", "example": "2222-02-22T22:22:22.000Z" }, "Updated": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when job was last updated", "example": "2222-02-22T22:22:22.000Z" }, "Duration": { "type": "integer", "description": "The time elapsed since the job was created, in nanoseconds.", "example": 5577006791 }, "Status": { "type": "string", "description": "A job's status", "example": "Paused", "enum": [ "Pending", "Running", "Paused", "Error", "Stopped", "Done" ] }, "Messages": { "type": "array", "items": { "type": "string" }, "description": "The messages generated whilst job has been running. Messages appear in the\norder in which they occur during the job run.\n", "example": [ "Connecting to device...", "SSH Login", "Prompt: #", "cat /etc/os-release" ] } }, "required": [ "ID", "Progress" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Job does not exist", "errors": { "ID": [ "Job with ID 123 does not exist" ] } } } } } } }, "delete": { "summary": "Cancel a job", "tags": [ "Job" ], "operationId": "cancel_job", "description": "Cancel a job", "responses": { "204": { "description": "Job deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1jobs~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Job ID", "in": "path", "required": true } ] }, "/jobs/historic": { "get": { "summary": "List historic jobs", "tags": [ "Job" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "string" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1jobs~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "402": { "description": "Payment Required", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "504": { "description": "Gateway Timeout", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "list_historic_jobs", "description": "Retrieve all completed jobs from the database. Supports searching by type, description, device name, username, and status.", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] } }, "/jobs/historic/{id}": { "delete": { "summary": "Delete a historic job", "tags": [ "Job" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "delete_historic_job", "description": "Delete a historic job", "responses": { "204": { "description": "Historic job deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1jobs~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Job ID", "in": "path", "required": true } ] }, "/labels": { "get": { "summary": "List labels", "tags": [ "Label" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "domain_id": { "description": "List of domain IDs included in the results", "type": "array", "items": { "type": "integer" } } } }, "filter_op": { "description": "Filter operation to use", "type": "string", "enum": [ "and", "or" ], "example": [ "or" ] }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1labels/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "list_labels", "description": "Retrieve all labels", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/1" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/13" } ] }, "post": { "summary": "Create a label", "tags": [ "Label" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyLabels" ] } ], "operationId": "create_label", "description": "Create a new label", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Label", "type": "object", "description": "Label model", "properties": { "ID": { "description": "Label ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "type": "string", "description": "The name of the label. This has to be unique across all labels (case-insensitive).", "example": "TODO" }, "Description": { "type": "string", "description": "The description of the label", "example": "Device that needs checking" }, "Colour": { "type": "string", "description": "The color of the label given in 6-digit hex notation with leading `#` sign", "example": "#FFAABB" }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) a label belongs to (if any). Can _only_ be set on label creation.", "default": 0, "example": 123 }, "DomainName": { "type": "string", "description": "Name of the [Domain](#tag/Domain) a label belongs to (if any).", "default": 0, "example": 123, "readOnly": true } }, "required": [ "Name", "Colour" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1labels/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Colour": [ "Must be a valid hexadecimal HTML/CSS colour value starting with '#'" ], "DomainID": [ "Domain with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/labels/{id}": { "get": { "summary": "Retrieve a label", "tags": [ "Label" ], "operationId": "get_label", "description": "Retrieve a single label", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1labels/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Label does not exist", "errors": { "ID": [ "Label with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a label", "tags": [ "Label" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyLabels" ] } ], "operationId": "update_label", "description": "Update a label", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1labels/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1labels/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Colour": [ "Must be a valid hexadecimal HTML/CSS colour value starting with '#'" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1labels~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "delete": { "summary": "Delete a label", "tags": [ "Label" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyLabels" ] } ], "operationId": "delete_label", "description": "Delete a label", "responses": { "204": { "description": "Label deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1labels~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Label ID", "in": "path", "required": true } ] }, "/login": { "get": { "summary": "Retrieve current login status", "tags": [ "Login" ], "security": [ { "Cookie": [] } ], "operationId": "check_login", "description": "Check if the current session is still valid. If Skylar Compliance's data partition is currently encrypted, a response\nof `503 Unavailable` with `EncryptionStatus` set to `Encrypted` will be returned.\n", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "User": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" }, "Capabilities": { "title": "Capabilities", "type": "object", "description": "Flags for various system capabilities enabled in the current Skylar Compliance instance", "properties": { "Agents": { "type": "boolean", "description": "Agents enabled/disabled", "example": true }, "Domains": { "type": "boolean", "description": "Domains enabled/disabled", "example": true }, "Roles": { "type": "boolean", "description": "Roles enabled/disabled", "example": true }, "HighAvailability": { "type": "boolean", "description": "High availability enabled/disabled", "example": true }, "AdvancedSettings": { "type": "boolean", "description": "Advanced settings enabled/disabled", "example": false } }, "required": [ "Agents", "Domains", "Roles", "HighAvailability", "AdvancedSettings" ] }, "EncryptionStatus": { "type": "string", "description": "Current decryption status of the system.", "enum": [ "Encrypted", "Decrypted", "Decrypting", "Failure" ], "example": "Decrypted" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "EncryptionStatus": { "type": "string", "description": "Current decryption status of the system. An appliance that has just been restarted without decrypting\nits data partition will return `401 Unauthorized` with `EncryptionStatus` set to `Encrypted`\n", "enum": [ "Encrypted", "Decrypted", "Decrypting", "Failure" ], "example": "Encrypted" }, "SAML": { "type": "boolean", "description": "Indicates whether SAML SSO is configured for this appliance." } } } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "need to set recovery question/answer" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "type": "object", "properties": { "EncryptionStatus": { "type": "string", "description": "Current decryption status of the system. An appliance that has just been restarted and a valid\n`EncryptionPassword` when logging in will return a status of `503 Service Unavailable` until it's\neither fully decrypted or decryption has failed.\n", "enum": [ "Encrypted", "Decrypted", "Decrypting", "Failure" ], "example": "Decrypting" } } } } } } } }, "post": { "summary": "Authenticate a user", "description": "Perform login. Returned token has to be sent via *Authorization* header.", "tags": [ "Login" ], "security": [], "operationId": "authenticate", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Login", "type": "object", "description": "Login model", "properties": { "Username": { "description": "Username to login", "type": "string", "example": "afox" }, "Password": { "description": "Password to login", "type": "string", "example": "Sunbreeze123", "writeOnly": true }, "EncryptionPassword": { "type": "string", "description": "Required when Skylar Compliance hasn't been decrypted yet.", "example": "Sunbreeze456", "writeOnly": true }, "RecoveryToken": { "type": "string", "description": "The correct recovery token in combination with the correct security answer will allow the user to login without\nknowing their password. The password can then be changed via updating a [User](#operation/update_user).\n", "example": "FooBarBaz" }, "SecurityAnswer": { "type": "string", "description": "When doing password recovery, the correct answer to the SecurityQuestion", "example": "Blenheim" } }, "required": [ "Username", "Password" ] } } } }, "responses": { "200": { "description": "Successfully authenticated.\nThe session ID is returned in a cookie named `session`. You need to include this cookie in subsequent requests.\n", "headers": { "Set-Cookie": { "schema": { "type": "string", "example": "session=abcde12345; Path=/; HttpOnly" } } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "User": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" }, "Capabilities": { "$ref": "#/paths/~1login/get/responses/200/content/application~1json/schema/properties/Capabilities" }, "EncryptionStatus": { "type": "string", "description": "Current decryption status of the system.", "enum": [ "Encrypted", "Decrypted", "Decrypting", "Failure" ], "example": "Decrypted" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "SecurityQuestion": { "type": "string", "description": "Security question required for password reset", "example": "What model was your mother's third car?" } } } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "type": "object", "properties": { "EncryptionStatus": { "type": "string", "description": "Sending the correct `EncryptionPassword` will trigger decryption. While decryption is running,\nthe [login status](#operation/check_login) endpoint should be polled periodically until a `200 OK` is\nreturned.\n", "enum": [ "Encrypted", "Decrypted", "Decrypting", "Failure" ], "example": "Decrypting" } } } } } } }, "parameters": [] }, "delete": { "summary": "Logout", "tags": [ "Login" ], "security": [ { "Cookie": [] } ], "operationId": "logout", "responses": { "204": { "description": "No Data", "headers": { "Set-Cookie": { "description": "Empty cookie that should delete the session cookie client side", "schema": { "type": "string", "example": "session=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly" } } } } }, "description": "Perform logout" }, "put": { "summary": "Update login", "tags": [ "Login" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "update_login", "description": "Update the currently authenticated user's account details", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Login details", "type": "object", "description": "Login model", "properties": { "FullName": { "type": "string", "description": "Full name of the user", "example": "Anna Fox" }, "Email": { "type": "string", "description": "Email address of this user", "example": "afox@skylarcompliance.com" }, "Password": { "type": "string", "description": "A user's new password. The system [password policy](#tag/SettingsPasswordPolicy) affects the values that will be accepted.\n", "example": "Sunbreeze123", "writeOnly": true }, "EncryptionPassword": { "type": "string", "description": "A user's new encryption password. Required for admin users when changing this value.\n", "example": "Sunbreeze456", "writeOnly": true }, "Recovery": { "type": "object", "description": "Set a Recovery Question / Answer to allow password recovery for admin users", "writeOnly": true, "properties": { "Question": { "type": "string", "description": "Set a recovery question to allow password recovery for admin users", "example": "Do you prefer cats or dogs?" }, "Answer": { "type": "string", "description": "Set a recovery answer to allow password recovery for admin users", "example": "cats" } } }, "CurrentPassword": { "type": "string", "description": "User's current password. Required when updating email, password, encryption password, or recovery details.\n", "example": "Sunshine123", "writeOnly": true } }, "required": [ "FullName", "Email" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "FullName": [ "Must not be blank" ], "Email": [ "Must not be blank", "Is not a valid email address" ], "Recovery.Answer": [ "Must not be blank (if Recovery.Question is set)" ], "Password": [ "Does not conform with the current password policy" ], "EncryptionPassword": [ "Does not conform with the current password policy", "Must be set if user has admin role", "Must be set different from user password" ], "CurrentPassword": [ "Must not be blank", "Does not match user password" ] } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "User is locked. Please contact your administrator to unlock your account or wait a few minutes and try again." } } } } }, "parameters": [] } }, "/login/saml": { "get": { "summary": "Retrieve SAML Login URL", "tags": [ "Login" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Redirect": { "description": "SAML login URL", "type": "string" } } } } } } }, "operationId": "saml_redirect", "description": "Retrieve SAML IdP URL" } }, "/login/activation": { "post": { "summary": "Complete account activation", "tags": [ "Login" ], "security": [], "operationId": "complete_activation", "description": "Complete account activation from an email activation link by setting the user's initial credentials.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Activation setup details", "type": "object", "description": "Details required to complete user activation from an email activation link.", "properties": { "Token": { "type": "string", "description": "Activation login token from the activation link.", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxLCJpc19hZG1pbiI6dHJ1ZX0.signature" }, "Password": { "type": "string", "description": "User password to set for the activated account.", "example": "Sunbreeze123", "writeOnly": true }, "EncryptionPassword": { "type": "string", "description": "Encryption password to set for admin accounts.", "example": "Sunbreeze456", "writeOnly": true }, "RecoveryQuestion": { "type": "string", "description": "Recovery question to set for admin accounts.", "example": "What was your first pet called?" }, "RecoveryAnswer": { "type": "string", "description": "Recovery answer to set for admin accounts.", "example": "Blenheim", "writeOnly": true } }, "required": [ "Token", "Password" ] } } } }, "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Password": [ "Must not be blank" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unauthorized" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "User is locked. Please contact your administrator to unlock your account or wait a few minutes and try again." } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "activation credentials already set" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to complete activation" } } } } } } }, "/login/recovery": { "put": { "summary": "Set recovery question and answer", "tags": [ "Login" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "set_recovery_details", "description": "Set the recovery question and answer for the currently authenticated user and send a new password recovery token.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Recovery setup details", "type": "object", "description": "Recovery question and answer used to generate a password recovery token for the current user.", "properties": { "RecoveryQuestion": { "type": "string", "description": "Recovery question used for password recovery.", "example": "What was your first pet's name?" }, "RecoveryAnswer": { "type": "string", "description": "Recovery answer used for password recovery.", "example": "Baxter" } }, "required": [ "RecoveryQuestion", "RecoveryAnswer" ] } } } }, "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "RecoveryQuestion": [ "Must not be blank" ], "RecoveryAnswer": [ "Must not be blank" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unauthorized" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "recovery question/answer is only available to admin users" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to set recovery details" } } } } } } }, "/logs": { "get": { "summary": "List logs", "tags": [ "Log" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "device_id": { "type": "integer", "description": "The [Device](#tag/Device) ID log entries were filtered for", "example": 123 }, "shorten_transcript": { "type": "boolean", "description": "Flag indicating if transcript message should be shortened or not.", "example": true }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "device_id": { "description": "List of device IDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" }, "example": [ 123, 2875, 3 ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" }, "example": [ 67 ] } } }, "level": { "description": "List of levels used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" }, "example": [ 6 ] } } }, "object_type": { "description": "List of object types used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Device" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "User" ] } } }, "user_id": { "description": "List of user IDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" }, "example": [ 123, 2875, 3 ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" }, "example": [ 67 ] } } }, "created_after": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "created_before": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "action": { "description": "List of log actions used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" }, "example": [ "Backup", "Delete" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" }, "example": [ "Delete" ] } } }, "domain_id": { "description": "List of domain IDs used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" }, "example": [ 4, 75 ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" }, "example": [ 67 ] } } } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1logs~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_logs", "description": "Retrieve all logs. If no sort param is passed, logs will be ordered by 'Created', in a descending method", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "in": "query", "name": "device_id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [Device](#tag/Device) IDs to limit the log output to.\n", "example": [ 123, 2875, 3 ] }, { "in": "query", "name": "not[device_id][]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [Device](#tag/Device) IDs to exclude from the returned log\nentries.\n", "example": [ 67 ] }, { "in": "query", "name": "created_after", "schema": { "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results after the updated date." }, { "in": "query", "name": "created_before", "schema": { "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results before the created date." }, { "in": "query", "name": "level[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [syslog like severity levels](https://en.wikipedia.org/wiki/Syslog#Severity_level) to include in the returned\nlog entries\n", "example": [ 1, 2, 3 ] }, { "in": "query", "name": "not[level][]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [syslog like severity levels](https://en.wikipedia.org/wiki/Syslog#Severity_level) to exclude from the\nreturned log entries\n", "example": [ 6 ] }, { "in": "query", "name": "object_type[]", "schema": { "type": "array", "items": { "title": "ObjectType", "type": "string", "description": "The category of system entity to which the log event pertains.\n\nEach entity type in restorepoint (devices, users, agents, etc.) implements the\n`Logger` interface via a `LogDetails()` method that declares its `ObjectType`.\nWhen an event is logged against one of these entities, the returned `ObjectType`\nvalue is recorded on the log entry. Entries not tied to a specific entity use\n`System`.\n", "example": "Device", "enum": [ "System", "Role", "RuleGroup", "VariableDefinition", "Domain", "Agent", "User", "Fileserver", "Backup", "Device", "CommandOutput" ] } }, "description": "List of Object types to limit the log output to.\n", "example": [ "Device" ] }, { "in": "query", "name": "not[object_type][]", "schema": { "type": "array", "items": { "$ref": "#/paths/~1logs/get/parameters/11/schema/items" } }, "description": "List of Object types to exclude from the returned log\nentries.\n", "example": [ "User" ] }, { "in": "query", "name": "user_id[]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [User](#tag/User) IDs to limit the log output to.\n", "example": [ 123, 2875, 3 ] }, { "in": "query", "name": "not[user_id][]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of [User](#tag/User) IDs to exclude from the returned log\nentries.\n", "example": [ 67 ] }, { "in": "query", "name": "action[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of Log Actions to include in the results.\n", "example": [ "Backup", "Delete" ] }, { "in": "query", "name": "not[action][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of Log Actions to exclude from the results.\n", "example": [ "Backup", "Delete" ] }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "$ref": "#/paths/~1devices~1count/parameters/14" }, { "in": "query", "name": "shorten_transcript", "schema": { "type": "boolean", "default": false }, "description": "If true, then return the shortened transcript message in retrieved logs" } ] } }, "/logs/{id}": { "get": { "summary": "Retrieve a log", "tags": [ "Log" ], "operationId": "get_log", "description": "Retrieve a single log", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Log", "type": "object", "description": "Log model", "properties": { "ID": { "description": "Log ID", "type": "integer", "example": 123 }, "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format", "example": "2222-02-22T22:22:22.000Z" }, "Action": { "type": "string", "description": "Event type", "example": "Backup" }, "ObjectType": { "$ref": "#/paths/~1logs/get/parameters/11/schema/items" }, "ObjectID": { "type": "integer", "description": "ID of a [device](#tag/Device), [backup](#tag/DeviceBackup), ...", "example": 123 }, "ObjectName": { "type": "string", "description": "The [Device](#tag/Device), [User](#tag/User), or [Server](#tag/Fileserver) that had the action performed", "example": "Cisco Switch" }, "Message": { "type": "string", "description": "The status, return, or error message associated with the event", "example": "Version 7" }, "UserID": { "type": "integer", "description": "ID of the [User](#tag/User) for this log entry (`0` for system initiated actions)", "example": 123 }, "UserName": { "type": "string", "description": "Name of the user running an action. System initiated jobs will have \"Auto\".", "example": "afox" }, "UserIPAddress": { "type": "string", "description": "IP Address of the user that performed the action, or `127.0.0.1` for system initiated actions.", "example": "127.0.0.1" }, "Level": { "type": "string", "description": "The syslog severity level of the message", "example": "info", "enum": [ "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug" ] }, "DomainID": { "type": "integer", "description": "ID of the log action's domain", "example": 3 }, "Transcript": { "type": "boolean", "description": "Flag indicating if log message is a transcript or not", "example": false }, "TranscriptID": { "type": "integer", "description": "ID of the logs associated transcript if applicable", "example": 42 }, "Fields": { "type": "object", "description": "Additional key-value fields associated with the log entry", "additionalProperties": true, "example": { "PolicyID": 7, "RuleName": "no-telnet" } } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Log does not exist", "errors": { "ID": [ "Log with ID 123 does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Label ID", "in": "path", "required": true } ] }, "/logs/export": { "get": { "summary": "Export logs", "tags": [ "Log" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "operationId": "export_logs", "description": "Export all log entries as a CSV file\n", "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string" }, "example": "timestamp,action,object,objectname,message,user,level\n2021-02-03 15:24:57,Monitor,Device,example,Device Back Up,Auto,err\n2021-02-03 15:20:22,Monitor,Device,example,Device Down,Auto,emerg\n" } }, "headers": { "Content-Disposition": { "schema": { "type": "string", "example": "attachment; filename=\"logs.csv\"" } } } } } } }, "/network/fingerprint": { "post": { "summary": "Fingerprint network address", "tags": [ "Network" ], "description": "Scans a given network address and returns its MAC address and various protocol banners", "operationId": "fingerprint", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Address": { "type": "string", "description": "IP address of the device to fingerprint", "example": "127.0.0.1" }, "AgentID": { "type": "integer", "description": "ID of an [Agent](#tag/Agent) to communicate through. The default `0` means that Skylar Compliance will\ncommunicate with a device directly\n", "default": 0 } }, "required": [ "Address" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "Fingerprint data results", "type": "array", "items": { "type": "object", "properties": { "Test": { "type": "string", "description": "Test that was performed", "enum": [ "mac", "httpbanner", "httpsbanner", "ftpbanner", "sshbanner", "telnetbanner", "telnetfp" ], "example": "mac" }, "Title": { "type": "string", "description": "Human readable title of the test that was being performed", "example": "MAC Address" }, "Result": { "type": "string", "description": "Result of the test", "example": "de:20:38:db:1f:81" }, "Error": { "type": "string", "description": "Any error messages", "example": "No response" } } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Address": [ "Is not a valid IP address" ], "AgentID": [ "Agent with ID 123 does not exist" ] } } } } } } } }, "/network/ping": { "post": { "summary": "Ping a network address", "tags": [ "Network" ], "description": "Pings a given network address (via optional agent)", "operationId": "ping", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Address": { "type": "string", "description": "IP address of the device to ping", "example": "127.0.0.1" }, "AgentID": { "type": "integer", "description": "ID of an [Agent](#tag/Agent) to communicate through. The default `0` means that Skylar Compliance will\ncommunicate with a device directly\n", "default": 0 } }, "required": [ "Address" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Result": { "type": "string", "description": "Result of pinging an address" }, "Message": { "type": "string", "description": "Success or error message for pinging the address in question" } }, "required": [ "Result", "Message" ] }, "examples": { "Success": { "value": { "Result": "Success", "Message": "Ping 1: 89.522\u00b5s\nPing 2: 35.352\u00b5s\nPing 3: 33.367\u00b5s\nPing 4: 32.171\u00b5s" } }, "Error": { "value": { "Result": "Error", "Message": "No response" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Address": [ "Is not a valid IP address" ], "AgentID": [ "Agent with ID 123 does not exist" ] } } } } } } } }, "/network/resolve": { "post": { "summary": "Resolve a hostname", "tags": [ "Network" ], "description": "Attempts to resolve a given hostname and returns it's IP address", "operationId": "resolve", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Hostname": { "type": "string", "description": "Hostname of a network device", "example": "device1" }, "AgentID": { "type": "integer", "description": "ID of an [Agent](#tag/Agent) to resolve the name with. The default `0` means that Skylar Compliance will\nattempt the name resolution directly.\n", "default": 0 } }, "required": [ "Hostname" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Result": { "type": "string", "description": "Result of resolving the given name" }, "Message": { "type": "string", "description": "IP address or error message when attempting to resolve the given hostname" } } }, "examples": { "Success": { "value": { "Result": "Success", "Message": "127.0.0.1" } }, "Error": { "value": { "Result": "Error", "Message": "lookup device1 on 127.0.0.1:53: no such host" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Hostname": [ "Is not a valid hostname" ], "AgentID": [ "Agent with ID 123 does not exist" ] } } } } } } } }, "/network/testproxy": { "post": { "summary": "Tests HTTP connectivity through a proxy", "tags": [ "Network" ], "description": "Uses proxy config and test HTTP connectivity", "operationId": "test_proxy", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Address": { "type": "string", "description": "Proxy hostname or IP address", "example": "1.1.1.1" }, "Port": { "type": "integer", "description": "Proxy port number", "example": 8080, "default": 80 }, "Username": { "type": "string", "description": "Proxy username", "example": "admin" }, "Password": { "type": "string", "description": "Proxy user password", "example": "admin" } }, "required": [ "Address" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Success": { "type": "boolean", "description": "If test was successful" }, "Message": { "type": "string", "description": "Test result" } }, "required": [ "Success" ] }, "examples": { "Success": { "value": { "Success": true } }, "Error": { "value": { "Success": false, "Message": "No response" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Address": [ "Must not be blank" ] } } } } } } } }, "/permissions": { "get": { "summary": "List permissions", "tags": [ "Permission" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewRoles" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "data": { "description": "List of permissions", "type": "array", "items": { "title": "Permission", "type": "object", "description": "Permission model", "properties": { "ID": { "description": "Permission ID", "type": "integer", "example": 1 }, "Permission": { "type": "string", "description": "Human-readable identifier of a permission", "example": "ModifyDevice" } } }, "example": [ { "ID": 1, "Permission": "ModifyDevice" }, { "ID": 2, "Permission": "BackupDevice" }, { "ID": 3, "Permission": "RestoreDevice" }, { "ID": 4, "Permission": "CommandDevice" }, { "ID": 5, "Permission": "ViewDeviceauth" }, { "ID": 6, "Permission": "ViewDevices" }, { "ID": 7, "Permission": "ListBackups" }, { "ID": 8, "Permission": "ViewBackup" }, { "ID": 9, "Permission": "ExportBackup" }, { "ID": 10, "Permission": "ModifyBackup" }, { "ID": 11, "Permission": "ViewLogs" }, { "ID": 12, "Permission": "ViewSyslogs" }, { "ID": 13, "Permission": "ViewSysadmin" }, { "ID": 14, "Permission": "UpdateSysadmin" }, { "ID": 15, "Permission": "ModifyUser" }, { "ID": 16, "Permission": "ViewUsers" }, { "ID": 17, "Permission": "ViewUserauth" }, { "ID": 18, "Permission": "ViewRoles" }, { "ID": 19, "Permission": "EditRoles" }, { "ID": 20, "Permission": "ModifyDiscovery" }, { "ID": 21, "Permission": "ListTemplates" }, { "ID": 22, "Permission": "ViewTemplate" }, { "ID": 23, "Permission": "ModifyTemplate" }, { "ID": 24, "Permission": "PushTemplate" }, { "ID": 25, "Permission": "ViewFirmware" }, { "ID": 26, "Permission": "ModifyFirmware" }, { "ID": 27, "Permission": "PushFirmware" }, { "ID": 28, "Permission": "ViewCredentials" }, { "ID": 29, "Permission": "ModifyCredentials" }, { "ID": 30, "Permission": "ModifyAssets" }, { "ID": 31, "Permission": "ViewAssets" }, { "ID": 32, "Permission": "ViewDomain" }, { "ID": 33, "Permission": "ModifyDomain" }, { "ID": 34, "Permission": "ViewDevicePolicy" }, { "ID": 35, "Permission": "ModifyDevicePolicy" }, { "ID": 36, "Permission": "ApplyDevicePolicy" }, { "ID": 37, "Permission": "ViewPassrules" }, { "ID": 38, "Permission": "ModifyPassrules" }, { "ID": 39, "Permission": "ViewRadius" }, { "ID": 40, "Permission": "ModifyRadius" }, { "ID": 41, "Permission": "ViewReports" }, { "ID": 42, "Permission": "ModifyReports" }, { "ID": 43, "Permission": "ArchivePlatform" }, { "ID": 44, "Permission": "ViewBackupSchedule" }, { "ID": 45, "Permission": "ModifyBackupSchedule" }, { "ID": 46, "Permission": "ViewLegacyReportAssets" }, { "ID": 47, "Permission": "ViewLegacyReportCompliance" }, { "ID": 48, "Permission": "ViewLegacyReportAdmin" }, { "ID": 49, "Permission": "ViewLegacyReportConfig" }, { "ID": 50, "Permission": "ViewLegacyReportBackups" }, { "ID": 51, "Permission": "ViewLegacyReportDashboard" }, { "ID": 52, "Permission": "ViewLegacyReportMonitor" }, { "ID": 53, "Permission": "AddDevice" }, { "ID": 54, "Permission": "DeleteDevice" }, { "ID": 55, "Permission": "ExportDevices" }, { "ID": 56, "Permission": "ExportUsers" }, { "ID": 57, "Permission": "ModifyLabels" }, { "ID": 58, "Permission": "ModifyOwnTokens" }, { "ID": 59, "Permission": "OpenTerminal" }, { "ID": 60, "Permission": "ModifyAllTokens" }, { "ID": 61, "Permission": "ViewAllSchedules" }, { "ID": 62, "Permission": "ModifyAllSchedules" }, { "ID": 63, "Permission": "ViewDeviceCommand" }, { "ID": 64, "Permission": "ModifyDeviceCommand" } ] } } } } } } }, "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" } ], "operationId": "list_permissions", "description": "Retrieve all permissions" } }, "/permissions/validate-request": { "post": { "summary": "Validate a request", "tags": [ "Permissions/ValidateRequest" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "validate_request", "description": "Validates a request to check if the user has the required permissions to perform the action", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Validate Request", "type": "object", "description": "Validates a request to check if the user has the required permissions to perform the action", "properties": { "DisallowGlobalView": { "description": "Prevents global entities to be seen by any non-global users", "type": "boolean", "example": true }, "DomainIDs": { "type": "array", "description": "List of [Domain IDs](#tag/Domain) of the required entity", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "Permission": { "type": "string", "description": "Required permission to perform the action", "example": "ViewDevices" }, "IsWriteRequest": { "type": "boolean", "description": "Indicates if the request is a write request (Create / Update / Delete)", "example": false } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Valid": { "type": "boolean", "description": "Indicates if the user has the required permissions to perform the action", "example": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/plugins": { "get": { "summary": "List plugins", "tags": [ "Plugin" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "data": { "description": "List of plugins", "type": "array", "items": { "$ref": "#/paths/~1plugins~1%7Bname%7D/get/responses/200/content/application~1json/schema" } } } } } } } }, "operationId": "list_plugins", "description": "Retrieve all plugins", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" } ] } }, "/plugins/{name}": { "get": { "summary": "Retrieve a plugin", "tags": [ "Plugin" ], "operationId": "get_plugin", "description": "Retrieve a single plugin", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Plugin", "type": "object", "description": "Plugin model", "properties": { "Key": { "type": "string", "description": "Plugin identifier", "example": "cisco_ios" }, "Name": { "description": "Plugin name", "type": "string", "example": "Cisco IOS" }, "Manufacturer": { "description": "Manufacturer the plugin applies to", "type": "string", "example": "Cisco" }, "Model": { "description": "Device model the plugin applies to", "type": "string", "example": "IOS/IOS-XE Switches/Routers" }, "DefaultConfigs": { "type": "array", "description": "Default config types supported by device", "items": { "type": "string" }, "example": [ "running", "startup" ] }, "Documentation": { "type": "string", "description": "A plugin's documentation in HTML format", "example": "

Cisco IOS/IOS-XE

  • Foo
  • Bar
  • Baz
" }, "Protocols": { "type": "array", "description": "List of supported connection protocols", "items": { "type": "string" }, "example": [ "scp", "telnet/tftp" ] }, "FullProtocols": { "type": "array", "description": "List of supported full connection protocols. Contains both the direct connection and the back-connection protocol.\n", "items": { "type": "string" }, "example": [ "ssh/tftp", "ssh/scp" ] }, "Fields": { "type": "array", "description": "List of additional fields required by a plugin. These have to be passed via a device's [PluginFields](#tag/Device) array.\n", "items": { "type": "string" }, "example": [ "username", "password", "password2", "nat_bc", "vlan.dat_file" ] }, "Options": { "type": "object", "description": "A list of additional properties a plugin might require. Internal use only.", "additionalProperties": { "type": "object", "properties": { "Section": { "type": "string", "example": "configurations" }, "Name": { "type": "string", "example": "Backup type" }, "Type": { "type": "string", "example": "radio", "enum": [ "text", "password", "textarea", "checkbox", "radio", "number", "select" ] }, "Values": { "type": "array", "items": { "type": "string" }, "example": [ "Config Only", "Full" ] }, "Min": { "type": "integer" }, "Max": { "type": "integer" } } }, "example": { "extra_files": { "Name": "Additional Files", "Type": "textarea", "Section": "configurations" }, "type": { "Name": "Backup Type", "Type": "radio", "Values": [ "Config Only", "Full" ], "Section": "configurations" } } }, "DefaultData": { "type": "object", "description": "A list of additional default values a plugin might require.", "additionalProperties": { "type": "string" }, "example": { "retention": "10" } }, "ConfigTypes": { "type": "array", "description": "Configuration types supported by a device", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Configuration identifier.", "example": "startup" }, "Nicename": { "type": "string", "description": "Name of configuration that is displayed to the user.", "example": "Startup Config" }, "Type": { "type": "string", "description": "Type of backup for this config, e.g. `txt` for a text file, `bin` for a binary file.", "example": "txt" }, "Extension": { "type": "string", "description": "File extension of a configuration backup.", "example": "startup-config" }, "CanRestore": { "type": "array", "description": "List of configuration types that _this_ configuration type can be restored to.", "items": { "type": "string" }, "example": [ "startup", "vtp" ] } } }, "example": [ { "Name": "startup", "Type": "txt", "CanRestore": [ "startup" ], "Nicename": "Startup Config", "Extension": "startup-config" }, { "Name": "running", "Type": "txt", "CanRestore": [ "startup" ], "Nicename": "Running Config", "Extension": "running-config" }, { "Name": "vtp", "Type": "bin", "CanRestore": [ "vtp" ], "Nicename": "VTP Database", "Extension": "vtp-config" } ] }, "InfoTypes": { "type": "array", "description": "Additional device information functions. See [AdditionalInformation](#tag/Device) field on a device.", "items": { "type": "object", "properties": { "Function": { "type": "string", "description": "Internal function to get info from devices.", "example": "interfaces" }, "Name": { "type": "string", "description": "Name of additional information field.", "example": "Interfaces" } } }, "example": [ { "Function": "interfaces", "Name": "Interfaces" }, { "Function": "routes", "Name": "Static Routes" }, { "Function": "version", "Name": "Show Version" } ] }, "Functions": { "type": "array", "description": "List of available functions (backup, restore, serial, etc.)", "items": { "type": "string" }, "example": [ "backup", "restore", "reset", "login", "firmware", "location", "model", "serial", "upgrade", "interfaces", "routes", "version" ] }, "Port": { "type": "integer", "description": "Default backup port", "example": 22 }, "TransferProtocol": { "type": "string", "description": "Default transfer protocol", "example": "ssh" }, "CanRestore": { "type": "boolean", "description": "Denotes if this type of device can be restored", "default": false, "example": false }, "IsPush": { "type": "boolean", "description": "If a device is push only, meaning it has to be manually configured to send its backup to Skylar Compliance", "default": false, "example": false }, "NoMultiDiff": { "type": "boolean", "description": "Internal use", "default": false, "example": false }, "SyslogTriggers": { "type": "boolean", "description": "This is set for devices that support real-time change detection. **Please note:** In order to use this feature,\nyou must configure a device to send its logs to Skylar Compliance using syslog.\n" }, "Revision": { "type": "string", "description": "Internal plugin version", "example": "1234" }, "RedactRulesCount": { "type": "integer", "description": "Number of redact rules defined for this plugin.", "example": 3 } } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin does not exist", "errors": { "ID": [ "Plugin 'foo' does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "name", "description": "Plugin name", "in": "path", "required": true } ] }, "/plugins/{name}/defaults": { "parameters": [ { "schema": { "type": "string" }, "name": "name", "description": "Name of the plugin", "in": "path", "required": true } ], "get": { "summary": "Get plugin default values", "tags": [ "Plugin", "Plugin default values" ], "operationId": "get_plugin_default_values", "description": "Get plugin default values", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Persisted plugin default options", "description": "Schema of a persisted plugin default options", "type": "object", "properties": { "Key": { "type": "string", "description": "Plugin identifier", "example": "cisco_ios" }, "Protocol": { "type": "string", "description": "Connection protocol to use by default. Check device's plugin for supported protocols", "example": "scp" }, "ConfigTypes": { "type": "array", "description": "Config types that will be applied by default", "items": { "type": "string", "default": "_default" }, "example": [ "startup", "running" ] }, "PluginFields": { "$ref": "#/paths/~1devices~1test/post/requestBody/content/application~1json/schema/properties/PluginFields" } }, "required": [ "Key" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin does not exist", "errors": { "ID": [ "Plugin 'foo' does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "put": { "summary": "Update plugin's default values. Fields not present in the request won't get persisted.", "tags": [ "Plugin", "Plugin default values" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "update_plugin_default_values", "description": "Update plugin's default values", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Update plugin default values request body", "description": "Schema of a request body for updating plugin's default values", "type": "object", "properties": { "Protocol": { "type": "string", "description": "Connection protocol to use by default. Check device's plugin for supported protocols", "example": "scp" }, "ConfigTypes": { "type": "array", "description": "Config types that will be applied by default", "items": { "type": "string", "default": "_default" }, "example": [ "startup", "running" ] }, "PluginFields": { "$ref": "#/paths/~1devices~1test/post/requestBody/content/application~1json/schema/properties/PluginFields" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1plugins~1%7Bname%7D~1defaults/get/responses/200/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Regex": [ "Must not be blank", "Must be a valid regex" ], "ConfigTypes": [ "Must not be empty" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } } }, "/plugins/{name}/redactrules": { "get": { "summary": "Get plugin redact rules", "tags": [ "Plugin", "Plugin redact rule" ], "operationId": "get_plugin_redact_rules", "description": "Get plugin redact rules", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "total": { "description": "Total number of plugin redact rules", "type": "integer" }, "data": { "description": "Plugin's redact rules", "type": "array", "items": { "$ref": "#/paths/~1plugins~1%7Bname%7D~1redactrules/post/responses/201/content/application~1json/schema" } } }, "required": [ "total", "data" ] } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "post": { "summary": "Create a plugin redact rule", "tags": [ "Plugin", "Plugin redact rule" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "create_plugin_redact_rule", "description": "Create plugin redact rule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Create plugin redact rule request body", "description": "Schema of a request body for creating a plugin redact rule", "type": "object", "properties": { "Name": { "description": "Name of the redact rule", "type": "string", "example": "password" }, "Regex": { "description": "Regex defining the redact rule", "type": "string", "example": "password" }, "ConfigTypes": { "description": "Config types the redact rule should be applied to", "type": "array", "items": { "type": "string", "example": "startup" } }, "Enabled": { "description": "Flag defining whether the redact rule is enabled", "type": "boolean", "example": true } }, "required": [ "Name", "Regex", "ConfigTypes", "Enabled" ] } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "title": "Persisted plugin redact rule", "description": "Schema of a persisted plugin redact rule", "type": "object", "properties": { "ID": { "description": "ID of the redact rule", "type": "integer", "example": 123 }, "Name": { "description": "Name of the redact rule", "type": "string", "example": "password" }, "PluginName": { "description": "Name of the plugin the redact rule is for", "type": "string", "example": "cisco_ios" }, "Regex": { "description": "Regex defining the redact rule", "type": "string", "example": "password" }, "ConfigTypes": { "description": "Config types the redact rule should be applied to", "type": "array", "items": { "type": "string", "example": "startup" } }, "Enabled": { "description": "Flag defining whether the redact rule is enabled", "type": "boolean", "example": true } }, "required": [ "ID", "Name", "PluginName", "Regex", "ConfigTypes", "Enabled" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Regex": [ "Must not be blank", "Must be a valid regex" ], "ConfigTypes": [ "Must not be empty" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "name", "description": "Name of the plugin", "in": "path", "required": true } ] }, "/plugins/{name}/redactrules/{id}": { "put": { "summary": "Update a plugin redact rule", "tags": [ "Plugin", "Plugin redact rule" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "update_plugin_redact_rule", "description": "Update a plugin redact rule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Update plugin redact rule request body", "description": "Schema of a request body for updating a plugin redact rule", "type": "object", "properties": { "Name": { "description": "Name of the redact rule", "type": "string", "example": "password" }, "Regex": { "description": "Regex defining the redact rule", "type": "string", "example": "password" }, "ConfigTypes": { "description": "Config types the redact rule should be applied to", "type": "array", "items": { "type": "string", "example": "startup" } }, "Enabled": { "description": "Flag defining whether the redact rule is enabled", "type": "boolean", "example": true } }, "required": [ "Name", "Regex", "ConfigTypes", "Enabled" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1plugins~1%7Bname%7D~1redactrules/post/responses/201/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Regex": [ "Must not be blank", "Must be a valid regex" ], "ConfigTypes": [ "Must not be empty" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin redact rule not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] }, "delete": { "summary": "Delete a plugin redact rule", "tags": [ "Plugin", "Plugin redact rule" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "delete_plugin_redact_rule", "description": "Delete a plugin redact rule", "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Plugin redact rule not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "string" }, "name": "name", "description": "Name of the plugin", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "ID of the plugin redact rule", "in": "path", "required": true } ] }, "/policies": { "get": { "summary": "List policies", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "lastupdate_after": { "description": "Returned items are filtered by minimum lastupdate date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "lastupdate_before": { "description": "Returned items are filtered by minimum lastupdate date", "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "id": { "description": "List of ids used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "integer" } }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "integer" } } } }, "domain_id": { "description": "List of domain IDs included in the results", "type": "array", "items": { "type": "integer" } } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1policies/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_policies", "description": "Retrieve all policies", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/1" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices/get/parameters/51" }, { "in": "query", "name": "not[id][]", "schema": { "type": "array", "items": { "type": "integer" } }, "description": "List of IDs to exclude from the results" }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "in": "query", "name": "lastupdate_after", "schema": { "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results after the lastupdate date." }, { "in": "query", "name": "lastupdate_before", "schema": { "type": "string", "example": "2023-01-02T15:04:05.999Z" }, "description": "Timestamp (UTC) to include results before the lastupdate date." } ] }, "post": { "summary": "Create a policy", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "create_policy", "description": "Create a new policy", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Policy", "type": "object", "description": "Policy model", "properties": { "ID": { "description": "Policy ID", "type": "integer", "example": 123, "readOnly": true }, "DomainID": { "description": "Domain ID", "type": "integer", "example": 123 }, "Name": { "description": "Policy name", "type": "string", "example": "IOS - Enable Secret Is Set" }, "Comment": { "description": "Comment attached to policy", "type": "string", "example": "HIPPA compliance" }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier (`Key`) that this policy applies to. If this is not set, then this policy can\nbe applied to any device\n", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "User friendly name of the plugin this device uses", "example": "Cisco IOS", "readOnly": true }, "LogTranscript": { "type": "boolean", "description": "Whether to log the transcript of the policy. If `true`, the policy will log the transcript of all the executed rules\n" }, "AlertThresholds": { "type": "object", "default": { "Low": 1, "Medium": 1, "High": 1 }, "description": "Set alert threshholds for low, medium and high severity alerts. `0` meaning **Never**, `1` **Always** and\n`2` to `4`: alert after that many violations\n", "properties": { "Low": { "type": "integer", "description": "Alert thresholds for low severity alerts", "default": 1, "example": 0, "enum": [ 0, 1, 2, 3, 4 ] }, "Medium": { "type": "integer", "description": "Alert thresholds for medium severity alerts", "default": 1, "example": 2, "enum": [ 0, 1, 2, 3, 4 ] }, "High": { "type": "integer", "description": "Alert thresholds for high severity alerts", "default": 1, "example": 4, "enum": [ 0, 1, 2, 3, 4 ] }, "Critical": { "type": "integer", "description": "Alert thresholds for critical severity alerts", "default": 0, "example": 0, "enum": [ 0, 1, 2, 3, 4 ] } } }, "AutoApply": { "type": "array", "description": "Inner group of items have to match *all* (`AND`) while outer group will have to match *any* inner group (`OR`).\nSee example which would match any device with a hostname matching `foo` AND their location set to `bar` OR\nCisco devices AND their address in `10.0.0.0/8`.\n", "items": { "type": "array", "items": { "type": "object", "properties": { "Type": { "type": "string", "description": "Automatically apply this rule to devices matching a given device name pattern, hostname pattern ([Regular Expressions](#section/Regular-Expressions)),\naddress range ([CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)), [plugin key](#tag/Plugin),\n[domain ID](#tag/Domain), [label ID](#tag/Label), [agent ID](#tag/Agent), location [asset field](#tag/SettingsAssetField) (by name),\nor [user asset fields](#tag/SettingsAssetField).\n", "enum": [ "DeviceNamePattern", "HostnamePattern", "AddressRange", "PluginKey", "DomainID", "LabelID", "AgentID", "Location", "AssetField" ], "example": "HostnamePattern" }, "AssetFieldID": { "type": "integer", "description": "Asset Field ID", "example": 123 }, "Value": { "type": "string", "description": "Value, regular expression or ID that has to match" } }, "required": [ "Type", "Value" ] } }, "example": [ [ { "Type": "HostnamePattern", "Value": "foo" }, { "Type": "Location", "Value": "bar" } ], [ { "Type": "PluginKey", "Value": "cisco_ios" }, { "Type": "AddressRange", "Value": "10.0.0.0/8" } ] ] }, "Version": { "type": "integer", "description": "Internal version number", "readOnly": true, "example": 2 }, "LastUpdateTime": { "type": "string", "description": "Date and time this compliance policy was last updated", "example": "2019-03-20T11:06:20Z", "readOnly": true }, "LastUpdatedBy": { "type": "string", "description": "Name of user that last updated this compliance policy", "example": "Anna Fox", "readOnly": true }, "DeviceIDs": { "type": "array", "items": { "type": "integer" }, "description": "List of [Device](#tag/Device) IDs which the policy is assigned to", "example": [ 1, 2, 3 ] } }, "required": [ "DomainID", "Name" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "PluginKey": [ "Plugin 'foo' does not exist" ], "AlertThresholds.Low": [ "Must be one of '0', '1', '2', '3' or '4'" ], "AlertThresholds.Medium": [ "Must be one of '0', '1', '2', '3' or '4'" ], "AlertThresholds.High": [ "Must be one of '0', '1', '2', '3' or '4'" ], "AlertThresholds.Critical": [ "Must be one of '0', '1', '2', '3' or '4'" ], "AutoApply[0][0].Type": [ "Must be one of 'DeviceNamePattern', 'HostnamePattern', 'AddressRange', 'PluginKey', 'DomainID', 'LabelID', 'AgentID', 'Location', or 'AssetField'" ], "AutoApply[0][0].AssetFieldID": [ "Asset field with ID 123 does not exist" ], "AutoApply[0][0].Value": [ "Must be valid regular expression (for 'DeviceNamePattern' or 'HostnamePattern' type)", "Range '255.255.255.255/255' is not a valid network range in CIDR notatation (for 'AddressRange' type)", "Plugin 'foo' does not exist", "Domain with ID 123 does not exist", "Label with ID 123 does not exist", "Agent with ID 123 does not exist", "Must not be blank" ] } } } } } }, "parameters": [] } }, "/policies/rules/test": { "post": { "summary": "Test rule", "tags": [ "Policy/Rule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ApplyDevicePolicy" ] } ], "operationId": "test_rule", "description": "Test a rule against a backup. This will not update the device's compliance score,\nit will only test that a rule runs correctly against the selected backup.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Rule to test and backup file ID to be run against and optionally specific configuration\ntypes to test, or testing a runtime rule against an output or a given test text\n", "properties": { "DeviceID": { "type": "integer", "description": "ID of the device to be tested", "example": 1 }, "BackupFileID": { "type": "integer", "description": "Config backup ID to test on", "example": 2 }, "ConfigurationTypes": { "type": "array", "description": "Configuration types to test on. If empty, all configurations of the backup will be tested", "items": { "type": "string", "example": "Regex" } }, "OutputID": { "type": "integer", "description": "Output to test runtime rule against", "example": 3 }, "TestText": { "type": "string", "description": "Test text to test runtime rule against", "example": "foo bar" }, "Rule": { "type": "object", "description": "Rule to test", "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } }, "required": [ "Rule" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Policy rule test response", "type": "object", "description": "Policy rule test response model", "properties": { "Rule": { "description": "Tested rule", "readOnly": true, "type": "object", "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" }, "Results": { "description": "Test result", "type": "array", "items": { "type": "object", "$ref": "#/paths/~1policies~1%7Bid%7D~1test/post/responses/200/content/application~1json/schema/properties/Results/items/properties/Result" } } }, "required": [ "Rule", "Results" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeviceID": [ "Must be present if testing Runtime rule and OutputID and TestText are not given" ], "OutputID": [ "Must be present if testing Runtime rule and DeviceID and TestText are not given" ], "TestText": [ "Must be present if testing Runtime rule and DeviceID and OutputID are not given" ], "BackupFileID": [ "Must be present if testing non-Runtime rule" ], "ConfigurationTypes[0]": [ "Must be one of 'Phrase', 'Regex', 'Lua' or 'Device'" ], "Rules[0].Name": [ "Must not be blank" ], "Rules[0].Type": [ "Must be one of 'Configuration', 'FirmwareVersion', 'RuntimeCommand' or 'ScheduledActionOutput'" ], "Rules[0].ConfigurationTypes": [ "Must be set (if Type is set to 'Configuration')" ], "Rules[0].CommandID": [ "Must be set (if Type is set to 'RuntimeCommand')", "Command with ID 123 does not exist" ], "Rules[0].Requirement": [ "Must be one of 'MustMatch', 'MustNotMatch' or 'MustMatchTemplate'" ], "Rules[0].TemplateID": [ "Must be set (if Requirement is set to 'MustMatchTemplate')", "Template with ID 123 does not exist" ], "Rules[0].MatchType": [ "Must be one of 'Phrase', 'Regex', 'LuaFunction' or 'Device'" ], "Rules[0].Value": [ "Must be set (if MatchType is 'Phrase')", "Must be valid regular expression (if MatchType is 'Regex')", "Must be valid Lua function (if MatchType is 'LuaFunction')" ], "Rules[0].DeviceID": [ "Must be set (if MatchType is 'Device')", "Device with ID 123 does not exist" ], "Rules[0].Severity": [ "Must be one of 'None', 'Low', 'Medium' or 'High'" ], "Rules[0].Remediation.Type": [ "Must be one of 'None', 'Manual', 'Automatic' or 'Command'" ], "Rules[0].Remediation.Value": [ "Must be set (if Type is 'Manual' or 'Automatic')" ], "Rules[0].Remediation.CommandID": [ "Must be set (if Type is set to 'Command')", "Command with ID 123 does not exist" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Backup does not exist" } } } } } } }, "/policies/{id}": { "get": { "summary": "Retrieve a policy", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "operationId": "get_policy", "description": "Retrieve a single policy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Policy does not exist", "errors": { "ID": [ "Policy with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a policy", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "update_policy", "description": "Update a policy", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a policy", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "delete_policy", "description": "Delete a policy", "responses": { "204": { "description": "Policy deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Policy ID", "in": "path", "required": true } ] }, "/policies/{id}/rules": { "get": { "summary": "List rules", "tags": [ "Policy/Rule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_rules", "description": "Retrieve all rules of a policy", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Create a rule", "tags": [ "Policy/Rule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "create_rule", "description": "Create a new rule (note that policy's devices' compliance scores won't be updated)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Rule", "type": "object", "description": "Policy rule model", "properties": { "ID": { "description": "Policy rule ID", "type": "integer", "example": 123, "readOnly": true }, "PolicyID": { "type": "integer", "description": "ID of [Policy](#tag/Policy) this rule belongs to", "example": 123, "readOnly": true }, "Name": { "type": "string", "description": "Used to identify a rule in a report or email", "example": "Version" }, "Description": { "type": "string", "description": "Human-readable rule description" }, "Type": { "type": "string", "description": "Whether the rule applies to a configuration, software version, runtime command or the output of a scheduled action\n", "enum": [ "Configuration", "FirmwareVersion", "RuntimeCommand", "ScheduledActionOutput" ] }, "ConfigurationTypes": { "type": "array", "description": "List of configuration types to use _if_ this rule's `Type` is set to \"Configuration\"", "items": { "type": "string" }, "example": [ "startup", "running", "vtp" ] }, "Files": { "type": "array", "description": "List of applicable files for multi-file configurations, e.g. TGZ archives _if_ this rule's `Type` is set to\n\"Configuration\"\n", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Name of the file", "example": "/etc/foo/bar" }, "Ignore": { "type": "array", "description": "If `MatchType` is set to \"Device\", these strings will be ignored when running the rule against the selected file", "items": { "type": "string" }, "example": [ "To be ingored", "Also to be ignored" ] } } } }, "CommandID": { "type": "integer", "description": "ID of a Device Control command to run for rules of `Type` \"RuntimeCommand\". The output of the command in question\ncan then be used for matching.\n", "example": 123 }, "Requirement": { "type": "string", "description": "When will this rule be applied", "enum": [ "MustMatch", "MustNotMatch", "MustMatchTemplate" ] }, "TemplateID": { "type": "integer", "description": "If `MustMatchTemplate` is selected as a requirement, then the given [Device Template](#tag/DeviceTemplate) is\nbeing used.\n", "example": 123 }, "MatchType": { "type": "string", "description": "The `Phrase` match type matches any (case sensitive) number of characters, including multi-line. The `Regex` match\ntype (see [Regular Expressions](#section/Regular-Expressions)) takes a Perl-flavoured regular expression, and\napplies it to the whole configuration, or firmware string. You can also use a\n[Lua function](#section/Lua-Functions) or compare against a known good [Device](#tag/Device)\n", "default": "Phrase", "enum": [ "Phrase", "Regex", "LuaFunction", "Device" ] }, "Value": { "type": "string", "description": "Either a phrase, regular expression or Lua function that is being used depending on the `MatchType`", "example": "Foo" }, "CaseInsensitive": { "type": "boolean", "description": "Whether to match a \"Phrase\" or \"Regex\" ignoring upper and lower case", "default": false }, "DeviceID": { "type": "integer", "description": "If `MatchType` is set to \"Device\" a device ID has to passed" }, "Severity": { "type": "string", "description": "Severity is used by the related policy's `AlertThreshold`", "default": "Low", "enum": [ "None", "Low", "Medium", "High", "Critical" ] }, "Remediation": { "type": "object", "description": "[Remediation](#section/Remediation) is an action to be performed when a compliance rule is not met, generally\nintended to rectify the violation\n", "default": { "Type": "None" }, "properties": { "Type": { "description": "Defines how remediation should be applied", "type": "string", "default": "None", "enum": [ "None", "Manual", "Automatic", "Command" ] }, "Value": { "type": "string", "description": "For \"Manual\" remediation, append this text to the notification email and reports. For \"Automatic\" remediation,\nthis will be run as a command on the device\n", "example": "set telnet (\\d+\\.\\d+\\.\\d+\\.\\d+)" }, "CommandID": { "type": "integer", "description": "Run the stored [Command](#tag/Command) on the device", "default": 0 } }, "required": [ "Type" ] }, "IgnoreLines": { "type": "array", "description": "If `MatchType` is set to \"Device\", these strings will be ignored when running the rule against a device configuration", "items": { "type": "string" }, "example": [ "To be ingored", "Also to be ignored" ] } }, "required": [ "Type", "Requirement" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "Type": [ "Must be one of 'Configuration', 'FirmwareVersion', 'RuntimeCommand' or 'ScheduledActionOutput'" ], "ConfigurationTypes": [ "Must be set (if Type is set to 'Configuration')" ], "CommandID": [ "Must be set (if Type is set to 'RuntimeCommand')", "Command with ID 123 does not exist" ], "Requirement": [ "Must be one of 'MustMatch', 'MustNotMatch' or 'MustMatchTemplate'" ], "TemplateID": [ "Must be set (if Requirement is set to 'MustMatchTemplate')", "Template with ID 123 does not exist" ], "MatchType": [ "Must be one of 'Phrase', 'Regex', 'LuaFunction' or 'Device'" ], "Value": [ "Must be set (if MatchType is 'Phrase')", "Must be valid regular expression (if MatchType is 'Regex')", "Must be valid Lua function (if MatchType is 'LuaFunction')" ], "DeviceID": [ "Must be set (if MatchType is 'Device')", "Device with ID 123 does not exist" ], "Severity": [ "Must be one of 'None', 'Low', 'Medium', 'High' or 'Critical'" ], "Remediation.Type": [ "Must be one of 'None', 'Manual', 'Automatic' or 'Command'" ], "Remediation.Value": [ "Must be set (if Type is 'Manual' or 'Automatic')" ], "Remediation.CommandID": [ "Must be set (if Type is set to 'Command')", "Command with ID 123 does not exist" ] } } } } } }, "parameters": [] }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Policy ID", "in": "path", "required": true } ] }, "/policies/{id}/test": { "post": { "summary": "Test a policy", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ApplyDevicePolicy" ] } ], "operationId": "test_policy", "description": "Test a policy against a backup", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Backup file ID to be run against and optionally specific configuration types to test", "properties": { "BackupFileID": { "type": "integer", "description": "Config backup ID to test on. (If it's a runtime command, this field is ignored)", "example": 2 }, "ConfigurationTypes": { "type": "array", "description": "Configuration types to test on. If empty, all configurations of the backup will be tested (If it's a runtime command, this field is ignored)", "items": { "type": "string", "example": "Regex" } }, "DeviceID": { "type": "integer", "description": "ID of the device to be tested. Only needed if testing a runtime command", "example": 1 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Policy test result", "type": "object", "description": "Results of testing a policy against a configuration", "properties": { "Results": { "description": "Policy test results containing results for each policy rule that has been tested", "type": "array", "items": { "description": "Results of testing a rule against a configuration", "type": "object", "properties": { "RuleID": { "description": "ID of the tested policy rule", "type": "integer", "example": 101 }, "Result": { "title": "Policy rule test result", "type": "object", "description": "Results of testing a rule against a configuration", "properties": { "ConfigType": { "type": "string", "description": "Type of the configuration", "example": "startup" }, "Tested": { "type": "boolean", "description": "Whether the rule was actually tested. Some rules might be skipped if no matching backups can be found.", "example": true }, "Passed": { "type": "boolean", "description": "Whether the rule passed testing.", "example": true }, "Details": { "type": "string", "description": "Details including relevant files and reasons.", "example": "files: tmp/foo.txt, tmp/bar.txt\nreasons: tmp/foo.txt: 7 | match me, tmp/bar.txt: 3 | don't match me" }, "Transcript": { "description": "Transcript of test execution", "type": "string" }, "Error": { "type": "string", "description": "Any errors that ocurred whilst testing the rule." } }, "required": [ "Transcript" ] } }, "required": [ "RuleID", "Result" ] } }, "ScorePercentage": { "description": "Percentage of total passed tests based on their score (1, 2 or 4 for Low, Medium and High Severity)", "type": "integer", "example": 50 }, "LowSeverityFail": { "description": "Amount of low severity rules that failed the tests", "type": "integer", "example": 1 }, "MediumSeverityFail": { "description": "Amount of medium severity rules that failed the tests", "type": "integer", "example": 2 }, "HighSeverityFail": { "description": "Amount of high severity rules that failed the tests", "type": "integer", "example": 3 }, "CriticalSeverityFail": { "description": "Amount of critical severity rules that failed the tests", "type": "integer", "example": 0 }, "Alert": { "description": "Whether the tests would have raised an alert based on the number of failed rules, their severity and the specified thresholds for the policy", "type": "boolean", "example": false } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "BackupFileID": [ "Must be a non-negative integer" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Policy does not exist" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Policy ID", "in": "path", "required": true } ] }, "/policies/{id}/scores": { "put": { "summary": "Update policy's devices' compliance scores", "tags": [ "Policy", "Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevice" ] } ], "operationId": "update_policy_devices_scores", "description": "Update policy's devices' compliance scores", "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object" } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to handle update policy's devices' compliance scores" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Policy ID", "in": "path", "required": true } ] }, "/policies/{id}/rules/{rule_id}": { "get": { "summary": "Retrieve a rule", "tags": [ "Policy/Rule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "operationId": "get_rule", "description": "Retrieve a single rule", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Rule does not exist", "errors": { "ID": [ "Rule with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a rule", "tags": [ "Policy/Rule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "update_rule", "description": "Update a rule (note that policy's devices' compliance scores won't be updated)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules~1%7Brule_id%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a rule", "tags": [ "Policy/Rule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "delete_rule", "description": "Delete a rule (note that policy's devices' compliance scores won't be updated)", "responses": { "204": { "description": "Policy rule deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules~1%7Brule_id%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "rule_id", "description": "Rule ID", "in": "path", "required": true }, { "schema": { "type": "integer" }, "name": "id", "description": "Policy ID", "in": "path", "required": true } ] }, "/policies/import": { "post": { "summary": "Import policies", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "operationId": "import_device_policies", "description": "Import one or more device policies", "parameters": [ { "in": "query", "name": "use_device_ids", "schema": { "type": "boolean", "default": true }, "description": "Use JSON data's DeviceIDs to import policies' devices." }, { "in": "query", "name": "use_domain_ids", "schema": { "type": "boolean", "default": true }, "description": "Use JSON data's DomainIDs to import policies' domains." } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "description": "JSON data (see [Export](#operation/export_device_policies) for format)" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "NumberImported": { "type": "integer", "description": "Number of policies that have been imported", "example": 123 } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Policies": [ "Must not be blank" ] } } } } } } } }, "/policies/export": { "get": { "summary": "Export policies", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "operationId": "export_device_policies", "description": "Export one or more device policies in a JSON file. Please do not mistake this for the\n[automatic device configuration export](#tag/ExportPolicy).\n", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "List of exported policies", "type": "array", "items": { "title": "Policy", "type": "object", "description": "Exported policy model", "properties": { "ID": { "description": "Policy ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Policy name", "type": "string", "example": "IOS - Enable Secret Is Set" }, "Comment": { "description": "Comment attached to policy", "type": "string", "example": "HIPPA compliance" }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier (`Key`) that this policy applies to. If this is not set, then this policy can\nbe applied to any device\n", "example": "cisco_ios" }, "PluginName": { "type": "string", "description": "User friendly name of the plugin this device uses", "example": "Cisco IOS", "readOnly": true }, "AlertThresholds": { "type": "object", "default": { "Low": 1, "Medium": 1, "High": 1 }, "description": "Set alert threshholds for low, medium and high severity alerts. `0` meaning **Never**, `1` **Always** and\n`2` to `4`: alert after that many violations\n", "properties": { "Low": { "type": "integer", "description": "Alert thresholds for low severity alerts", "default": 1, "example": 0, "enum": [ 0, 1, 2, 3, 4 ] }, "Medium": { "type": "integer", "description": "Alert thresholds for medium severity alerts", "default": 1, "example": 2, "enum": [ 0, 1, 2, 3, 4 ] }, "High": { "type": "integer", "description": "Alert thresholds for high severity alerts", "default": 1, "example": 4, "enum": [ 0, 1, 2, 3, 4 ] }, "Critical": { "type": "integer", "description": "Alert thresholds for critical severity alerts", "default": 0, "example": 0, "enum": [ 0, 1, 2, 3, 4 ] } } }, "AutoApply": { "type": "array", "description": "Inner group of items have to match *all* (`AND`) while outer group will have to match *any* inner group (`OR`).\nSee example which would match any device with a hostname matching `foo` AND their location set to `bar` OR\nCisco devices AND their address in `10.0.0.0/8`.\n", "items": { "type": "array", "items": { "type": "object", "properties": { "Type": { "type": "string", "description": "Automatically apply this rule to devices matching a given hostname pattern ([Regular Expressions](#section/Regular-Expressions)),\n[plugin key](#tag/Plugin), address range ([CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)),\n[domain ID](#tag/Domain) or location [asset field](#tag/SettingsAssetField) (by name)\n", "enum": [ "HostnamePattern", "PluginKey", "AddressRange", "DomainID", "Location" ], "example": "HostnamePattern" }, "Value": { "type": "string", "description": "Value, regular expression or ID that has to match" } } } }, "example": [ [ { "Type": "HostnamePattern", "Value": "foo" }, { "Type": "Location", "Value": "bar" } ], [ { "Type": "PluginKey", "Value": "cisco_ios" }, { "Type": "AddressRange", "Value": "10.0.0.0/8" } ] ] }, "Version": { "type": "integer", "description": "Internal version number", "readOnly": true, "example": 2 }, "LastUpdateTime": { "type": "string", "description": "Date and time this compliance policy was last updated", "example": "2019-03-20T11:06:20Z", "readOnly": true }, "LastUpdatedBy": { "type": "string", "description": "Name of user that last updated this compliance policy", "example": "Anna Fox", "readOnly": true }, "Rules": { "description": "List of policy rules", "type": "array", "items": { "$ref": "#/paths/~1policies~1%7Bid%7D~1rules/post/requestBody/content/application~1json/schema" } } }, "required": [ "Name" ] } } } } } }, "headers": { "Content-Disposition": { "schema": { "type": "string", "example": "attachment; filename=\"SkylarComplianceConfigPolicies.json\"" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "PolicyIDs": [ "Must not be blank" ], "PolicyIDs[0]": [ "Policy with ID 123 does not exist" ] } } } } } } }, "parameters": [ { "schema": { "type": "array", "items": { "type": "integer" } }, "name": "PolicyIDs", "description": "List of [Policy](#tag/Policy) IDs to export", "in": "query", "style": "form", "explode": false, "example": [ 1, 2, 3 ], "required": true } ] }, "/policies/settings": { "get": { "summary": "Get policy settings", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewSysadmin" ] } ], "operationId": "get_policy_settings", "description": "Get policy settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1settings/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set policy settings", "tags": [ "Policy" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_policy_settings", "description": "Update policy settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Policy settings", "type": "object", "description": "Policy settings model", "properties": { "RetentionPolicy": { "type": "integer", "description": "Sets the number of days to retain policy transcripts", "example": 120 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1settings/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "RetentionPolicy": [ "Must be a positive number" ] } } } } } }, "parameters": [] } }, "/policies/variables": { "get": { "summary": "List variables", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1policies~1variables/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_variables", "description": "Retrieve all variables", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" } ] }, "post": { "summary": "Create a variable", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "create_variable", "description": "Create a new variable", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Variable", "type": "object", "description": "Policy variable model", "properties": { "ID": { "description": "Policy variable ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "type": "string", "description": "The name of the variable. A variable name can only consist of letters, numbers, and the underscore character `_`.\n", "example": "Foo" }, "Value": { "type": "string", "description": "The value that replaces this variables `$Name$`. If the value contains escape sequences (such as `\\n`), they\nmust be double-escaped (`\\\\n`).\n", "example": "Bar" } }, "required": [ "Name", "Value" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1variables/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank", "Must only consist of letters, numbers and underscore characters" ], "Value": [ "Must not be blank" ] } } } } } }, "parameters": [] } }, "/policies/variables/{id}": { "get": { "summary": "Retrieve a variable", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "operationId": "get_variable", "description": "Retrieve a single variable", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1variables/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Variable does not exist", "errors": { "ID": [ "Variable with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a variable", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "update_variable", "description": "Update a variable", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1variables/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1policies~1variables/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1variables/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1variables~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a variable", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "delete_variable", "description": "Delete a variable", "responses": { "204": { "description": "Policy variable deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1policies~1variables~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Variable ID", "in": "path", "required": true } ] }, "/policies/variables/import": { "post": { "summary": "Import policy variables", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDevicePolicy" ] } ], "operationId": "import_policy_variables", "description": "Import one or more policy variables", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "overwrite": { "type": "boolean", "description": "Overwrite existing variables", "default": false, "example": true }, "file": { "type": "string", "description": "CSV data (see [Export](#operation/export_policy_variables) for format)", "example": "name,value\nfoo,bar\nbar,foo\n" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "NumberImported": { "type": "integer", "description": "Number of variables that have been imported", "example": 123 } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "file": [ "Invalid CSV format" ] } } } } } } } }, "/policies/variables/export": { "get": { "summary": "Export variables", "tags": [ "Policy/Variable" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevicePolicy" ] } ], "operationId": "export_policy_variables", "description": "Export one or more policy variables in a CSV file\n", "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string" }, "example": "name,replacement\nwiggle,wiggle\nfoo,bar\n" } }, "headers": { "Content-Disposition": { "schema": { "type": "string", "example": "attachment; filename=\"SkylarComplianceComplianceDefinitions.csv\"" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "array", "items": { "type": "integer" } }, "name": "VariableIDs", "description": "List of [Variable](#tag/Policy/Variable) IDs to export", "in": "query", "style": "form", "explode": false, "example": [ 1, 2, 3 ], "required": true } ] }, "/recovery/password-reset": { "post": { "summary": "Reset password using recovery token and answer", "tags": [ "Recovery" ], "operationId": "recovery_password_reset", "description": "Recovery password reset", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Recovery password reset details", "properties": { "Username": { "type": "string", "description": "User's username", "example": "admin" }, "RecoveryToken": { "type": "string", "description": "User's recovery token", "example": "28j12jd21f138hf3802hfhf23hf23fv2433v34" }, "RecoveryAnswer": { "type": "string", "description": "User's answer to their recovery question", "example": "Tarrega" }, "NewPassword": { "type": "string", "description": "User's new password", "example": "nd281hf280r12u80ca0duasf" }, "NewEncryptionPassword": { "type": "string", "description": "User's new encryption password", "example": "dj12f13280gh2g230gj2330g" } }, "required": [ "Username", "RecoveryToken", "RecoveryAnswer", "NewPassword", "NewEncryptionPassword" ] } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to decode request body" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "User not found" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to handle recovery password reset" } } } } } } }, "/recovery/question": { "get": { "summary": "Get recovery question", "tags": [ "Recovery" ], "operationId": "get_recovery_question", "description": "Get recovery question", "parameters": [ { "in": "query", "name": "username", "required": true, "description": "Username of the user whose question is requested", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Question": { "type": "string", "description": "User's recovery question", "example": "Favourite musician?" } }, "required": [ "Question" ] } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Recovery question not set" } } } } } } }, "/reports": { "get": { "summary": "List reports", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewReports" ] } ], "operationId": "list_reports", "description": "List reports", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of reports skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The number of reports returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of reports returned", "type": "integer" }, "search": { "description": "The search parameters used to filter reports", "type": "object", "properties": { "fulltext": { "description": "Returned reports that match the search term", "type": "string", "example": "devices" } } }, "sort": { "description": "The sorting parameters used to sort reports", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort reports", "type": "string" }, "order": { "description": "Sorting order used to sort reports", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned reports", "type": "array", "items": { "$ref": "#/paths/~1reports/post/requestBody/content/application~1json/schema" } } }, "required": [ "fields", "offset", "limit", "total", "data" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Title": [ "Must not be blank" ], "DataType": [ "Must not be blank", "Must be a valid data type" ], "SecondaryDataType": [ "Must be a valid data type" ], "Fields": [ "Must not be empty" ], "Filters[0].Parameter": [ "Must not be blank" ], "Filters[0].Values": [ "Must not be empty" ], "Filters[0].Operator": [ "Must be one of: =, !=, >, >=, <, <=" ], "TimePeriod": [ "Must not be blank", "Must be one of: alltime, last24hours, thisweek, thismonth, thisyear, since, fromto" ], "TimeSinceValue": [ "Must be a positive integer" ], "TimeSinceUnit": [ "Must be one of: hours, days, weeks, months, years" ], "TimeFrom": [ "Must be set if period is from/to" ], "TimeTo": [ "Must be set if period is from/to" ], "SortOrder": [ "Must be either asc or desc" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "post": { "summary": "Create a report", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "create_report", "description": "Create a report", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Reports", "type": "object", "description": "Report model", "properties": { "ID": { "description": "Report ID", "type": "integer", "example": 123 }, "Title": { "type": "string", "description": "Report title", "example": "Devices report" }, "DataType": { "description": "Report data type", "type": "string", "enum": [ "devices", "backups", "agents", "domains", "credentials", "commands", "commandschedules", "devicepolicies", "policyvariables", "exportpolicies", "fileservers", "users", "roles", "logs", "syslogs", "assets", "configurationcompliance", "passwordcompliance", "configurationchanges" ] }, "SecondaryDataType": { "description": "Report secondary data type", "type": "string", "enum": [ "configurationcompliancefull", "configurationcompliancelatest", "configurationcompliancesummary", "configurationbaselines", "currentconfigurationbaselines", "complianceviolations", "compliancedevicepasswords", "complianceuserpasswords" ] }, "Fields": { "description": "Deprecated. Use `FieldsWithLabel` instead.\nData type fields to include in the report.\n", "deprecated": true, "type": "array", "items": { "type": "string", "example": "Name" } }, "FieldsWithLabel": { "description": "Data type fields to include in the report.\n", "type": "array", "items": { "type": "object", "properties": { "Name": { "description": "Canonical field name, used in the report generation process", "type": "string", "example": "cd" }, "Label": { "description": "Display label shown in the UI", "type": "string", "example": "cd (Linux Server)" } }, "required": [ "Name", "Label" ] } }, "Filters": { "description": "Data type filters used to filter the report data", "type": "array", "items": { "type": "object", "description": "Report filter", "properties": { "ID": { "type": "integer", "description": "Filter ID", "example": 123 }, "Parameter": { "type": "string", "description": "Filter query parameter key", "example": "label_id[]" }, "Operator": { "type": "string", "enum": [ "=", "!=", ">", ">=", "<", "<=" ], "description": "Operator to use when applying the filter" }, "Values": { "type": "array", "items": { "type": "string" }, "description": "Values to filter by" } }, "required": [ "Parameter", "Operator", "Values" ] } }, "TimePeriod": { "description": "Time period determining which data to include in the report", "type": "string", "enum": [ "", "alltime", "last24hours", "thisweek", "thismonth", "thisyear", "since", "fromto" ] }, "TimeSinceValue": { "description": "Value for the \"since\" time period", "type": "integer", "example": 1 }, "TimeSinceUnit": { "description": "Unit for the \"since\" time period", "type": "string", "enum": [ "", "hours", "days", "weeks", "months", "years" ] }, "TimeFrom": { "description": "Start timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) for the \"fromto\" time period", "type": "string", "example": "2222-02-22T22:22:22.000Z" }, "TimeTo": { "description": "End timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) for the \"fromto\" time period", "type": "string", "example": "2222-06-22T22:22:22.000Z" }, "SortFieldName": { "description": "Field name to sort by", "type": "string", "example": "Name" }, "SortOrder": { "description": "Order to sort by", "type": "string", "enum": [ "", "asc", "desc" ] }, "DomainIDs": { "type": "array", "items": { "type": "integer" }, "description": "An array of [Domain](#tag/Domain) IDs that this report is restricted to. \n", "example": [ 1, 2, 3 ] }, "ScheduleIDs": { "type": "array", "items": { "type": "integer" }, "description": "An array of Schedule IDs that this report is assigned to. \n", "example": [ 1, 2, 3 ] } }, "required": [ "Title", "DataType", "DomainIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports/get/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/reports/assettypes": { "get": { "summary": "Get report asset types", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewReports" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "description": "Response containing a list of asset types", "properties": { "AssetTypes": { "description": "Deprecated. Use `AssetTypesWithLabel` instead.\nList of asset types\n", "deprecated": true, "type": "array", "items": { "type": "string", "example": "Maintenance Expiry" } }, "AssetTypesWithLabel": { "description": "List of asset types\n", "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string", "example": "cd", "description": "Canonical asset type name, used in the report generation process" }, "Label": { "type": "string", "example": "cd (Linux Server)", "description": "Display label shown in the UI" } }, "required": [ "Name", "Label" ] } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "get_report_assettypes", "description": "Get asset types for a report" } }, "/reports/adhoc": { "post": { "summary": "Generate an ad-hoc report", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "generate_adhoc_report", "description": "Generate an ad-hoc report", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Ad-hoc report request body", "properties": { "Report": { "$ref": "#/paths/~1reports/post/requestBody/content/application~1json/schema" }, "Format": { "description": "Format to generate the report in", "type": "string", "enum": [ "csv", "pdf" ] }, "Encoding": { "description": "Character encoding for report output. Defaults to UTF-8.", "type": "string", "enum": [ "utf-8", "windows-1252" ] } }, "required": [ "Report", "Format" ] } } } }, "responses": { "200": { "description": "OK", "content": { "text/csv": { "schema": { "type": "string" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Title": [ "Must not be blank" ], "DataType": [ "Must not be blank", "Must be a valid data type" ], "SecondaryDataType": [ "Must be a valid data type" ], "Fields": [ "Must not be empty" ], "Filters[0].Parameter": [ "Must not be blank" ], "Filters[0].Values": [ "Must not be empty" ], "Filters[0].Operator": [ "Must be one of: =, !=, >, >=, <, <=" ], "TimePeriod": [ "Must not be blank", "Must be one of: alltime, last24hours, thisweek, thismonth, thisyear, since, fromto" ], "TimeSinceValue": [ "Must be a positive integer" ], "TimeSinceUnit": [ "Must be one of: hours, days, weeks, months, years" ], "TimeFrom": [ "Must be set if period is from/to" ], "TimeTo": [ "Must be set if period is from/to" ], "SortOrder": [ "Must be either asc or desc" ], "Format": [ "Must not be blank", "Must be either csv or pdf" ], "Encoding": [ "Must be either utf-8 or windows-1252" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/reports/{id}": { "get": { "summary": "Get a report", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewReports" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports/get/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Report does not exist", "errors": { "ID": [ "Report with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "get_report", "description": "Get a report" }, "put": { "summary": "Update a report", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "update_report", "description": "Update a report", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports/get/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] }, "delete": { "summary": "Delete a report", "tags": [ "Report" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "delete_report", "description": "Delete a report", "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports/get/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Report ID", "in": "path", "required": true } ] }, "/reports/schedules": { "get": { "summary": "List report schedules", "tags": [ "Report schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewReports" ] } ], "operationId": "list_report_schedules", "description": "List report schedules", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/13" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of report schedules skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The number of report schedules returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of report schedules returned", "type": "integer" }, "search": { "description": "The search parameters used to filter report schedules", "type": "object", "properties": { "fulltext": { "description": "Returned report schedules that match the search term", "type": "string", "example": "devices" } } }, "sort": { "description": "The sorting parameters used to sort report schedules", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort report schedules", "type": "string" }, "order": { "description": "Sorting order used to sort report schedules", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned report schedules", "type": "array", "items": { "$ref": "#/paths/~1reports~1schedules/post/requestBody/content/application~1json/schema" } } }, "required": [ "fields", "offset", "limit", "total", "data" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Cron": [ "Must not be blank", "Is not a valid Skylar Compliance schedule expression" ], "FileserverID": [ "Either a fileserver or emails need to be set" ], "Emails": [ "Either a fileserver or emails need to be set" ], "EmailText": [ "Must not be blank if Emails is not empty" ], "ReportsFormat": [ "Must not be blank", "Must be either csv or pdf" ], "Encoding": [ "Must be either utf-8 or windows-1252" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "post": { "summary": "Create a report schedule", "tags": [ "Report schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "create_report_schedule", "description": "Create a report schedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Report schedules", "type": "object", "description": "Report schedule model", "properties": { "ID": { "description": "Report schedule ID", "type": "integer", "example": 123 }, "Cron": { "type": "string", "description": "A [cron-like expression](#section/Schedules) describing the report schedule", "example": "15 * * * *" }, "FileserverID": { "description": "ID of a fileserver to send the report to", "type": "integer", "example": 123 }, "Emails": { "description": "Email addresses to send the report to", "type": "array", "items": { "type": "string", "example": "john@example.com" } }, "EmailText": { "description": "Text to include in the email containing the report", "type": "string", "example": "Find the scheduled Skylar Compliance devices report attached" }, "ReportsFormat": { "description": "Format to use when sending the reports", "type": "string", "enum": [ "csv", "pdf" ] }, "Encoding": { "description": "Character encoding for report output. Defaults to UTF-8.", "type": "string", "enum": [ "utf-8", "windows-1252" ] }, "ReportsIDs": { "description": "IDs of the reports the schedule applies to", "type": "array", "items": { "type": "integer", "example": 123 } }, "LastRun": { "type": "string", "description": "Date time of last schedule run.", "example": "2021-01-20T23:59:59.999Z", "readOnly": true }, "Created": { "type": "string", "description": "Date time of when the schedule was created.", "example": "2021-01-20T23:59:59.999Z", "readOnly": true }, "CreatedByUsername": { "type": "string", "description": "Username of the user who created the schedule.", "example": "admin", "readOnly": true }, "NextDue": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format of the next scheduled run", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "DomainID": { "type": "integer", "description": "ID of the [Domain](#tag/Domain) the schedule belongs to", "example": 123, "readOnly": true } }, "required": [ "Cron", "Emails", "ReportsFormat", "ReportsIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports~1schedules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1schedules/get/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/reports/schedules/{id}": { "get": { "summary": "Get a report schedule", "tags": [ "Report schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewReports" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports~1schedules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1schedules/get/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Report schedule does not exist", "errors": { "ID": [ "Report schedule with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "get_report_schedule", "description": "Get a report schedule" }, "put": { "summary": "Update a report schedule", "tags": [ "Report schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "update_report_schedule", "description": "Update a report schedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports~1schedules/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1reports~1schedules/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1schedules/get/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1schedules~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] }, "delete": { "summary": "Delete a report schedule", "tags": [ "Report schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyReports" ] } ], "operationId": "delete_report_schedule", "description": "Delete a report schedule", "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1schedules/get/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1reports~1schedules~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Report schedule ID", "in": "path", "required": true } ] }, "/roles": { "get": { "summary": "List roles", "tags": [ "Role" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1roles/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_roles", "description": "Retrieve all roles", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Create a role", "tags": [ "Role" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "EditRoles" ] } ], "operationId": "create_role", "description": "Create a new role", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Role", "type": "object", "description": "Role model", "properties": { "ID": { "description": "Role ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Role name", "type": "string", "example": "View Only" }, "PermissionIDs": { "type": "array", "description": "List of [Permission](#tag/Permission) IDs for this role", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "UserIDs": { "type": "array", "description": "A list of [User](#tag/User) IDs assigned to this role", "items": { "type": "integer", "example": 123 }, "default": [], "example": [ 1, 2, 3 ], "readOnly": true } }, "required": [ "Name", "PermissionIDs" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1roles/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "PermissionIDs": [ "Must be set" ], "PermissionIDs[0]": [ "Permission with ID 123 does not exist" ], "UserIDs[0]": [ "User with ID 123 does not exist" ] } } } } } }, "parameters": [] } }, "/roles/{id}": { "get": { "summary": "Retrieve a role", "tags": [ "Role" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewRoles" ] } ], "operationId": "get_role", "description": "Retrieve a single role", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1roles/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Role does not exist", "errors": { "ID": [ "Role with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a role", "tags": [ "Role" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "EditRoles" ] } ], "operationId": "update_role", "description": "Update a role", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1roles/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1roles/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1roles/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1roles~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a role", "tags": [ "Role" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "EditRoles" ] } ], "operationId": "delete_role", "description": "Delete a role", "responses": { "204": { "description": "Role deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1roles~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Role ID", "in": "path", "required": true } ] }, "/saml/groups": { "get": { "summary": "List SAML groups", "tags": [ "SAML" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewUsers" ] } ], "operationId": "list_saml_groups", "description": "Retrieve all SAML groups", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1saml~1groups/post/responses/200/content/application~1json/schema" } } }, "required": [ "offset", "limit", "total", "search", "sort", "data" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" } ] }, "post": { "summary": "Create a SAML group", "tags": [ "SAML" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "create_saml_group", "description": "Create a SAML group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Create SAML group request body", "description": "Schema of a request body for creating a SAML group", "type": "object", "properties": { "Name": { "type": "string", "description": "The name of the group", "example": "Engineering" }, "ObjectID": { "type": "string", "description": "The group id retrieved from the provider that uniquely identifies a group", "example": "47c26627-eae5-4a0e-9d23-7c9de1b32e57" }, "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable to them.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 } }, "required": [ "DomainID", "RoleID" ] } } }, "required": [ "Name", "ObjectID", "DomainRoles" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Persisted SAML group", "description": "Schema of a persisted SAML group", "type": "object", "properties": { "ID": { "type": "integer", "description": "ID of a persisted SAML group", "example": 1 }, "ObjectID": { "type": "string", "description": "The group id retrieved from the provider that uniquely identifies a group", "example": "47c26627-eae5-4a0e-9d23-7c9de1b32e57" }, "Name": { "type": "string", "description": "Name of a group", "example": "Skylar Compliance Engineering" }, "RestorepointMembers": { "type": "array", "description": "List of Skylar Compliance users' usernames who are SAML group members", "items": { "type": "string", "description": "Skylar Compliance user's username", "example": "admin" } }, "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable to them.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 }, "External": { "type": "boolean", "description": "Whether the role is from an external provider", "example": false } }, "required": [ "DomainID", "RoleID" ] } } }, "required": [ "ID", "ObjectID", "Name", "RestorepointMembers", "DomainRoles" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "ObjectID": [ "Must not be blank" ], "DomainRoles": [ "Must not be empty" ], "DomainID": [ "Domain with ID 123 does not exist" ], "RoleID": [ "Role with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/saml/groups/{id}": { "put": { "summary": "Update a SAML group", "tags": [ "SAML" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "update_saml_group", "description": "Update a SAML group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Update SAML group request body", "description": "Schema of a request body for updating an SAML group", "type": "object", "properties": { "ObjectID": { "type": "string", "description": "The group id retrieved from the provider that uniquely identifies a group", "example": "47c26627-eae5-4a0e-9d23-7c9de1b32e57" }, "Name": { "type": "string", "description": "Name of a group", "example": "Skylar Compliance Engineering" }, "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable to them.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 } }, "required": [ "DomainID", "RoleID" ] } } }, "required": [ "ObjectID", "Name", "DomainRoles" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1saml~1groups/post/responses/200/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1saml~1groups/post/responses/400/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "delete": { "summary": "Delete a SAML group", "tags": [ "SAML" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "delete_saml_group", "description": "Delete a SAML group", "responses": { "204": { "description": "OK" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "SAML group ID", "in": "path", "required": true } ] }, "/schedules": { "get": { "summary": "List all schedules", "tags": [ "Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewAllSchedules" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "deviceid": { "description": "Returned items matching the device id", "type": "integer", "example": 123 } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "data": { "description": "List of schedules", "type": "array", "items": { "title": "Schedule", "type": "object", "description": "Schedule model", "properties": { "Due": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when this schedule will run", "example": "2222-02-22T22:22:22.000Z" }, "Event": { "type": "string", "description": "Which action will be performed", "example": "Backup device" }, "Description": { "type": "string", "description": "The object description an action relates to", "example": "device" }, "Object": { "type": "string", "description": "The object type an action relates to", "example": "device", "enum": [ "device", "discovery", "report", "command", "archive" ] }, "ObjectID": { "type": "integer", "description": "The internal ID of the object or `0` if not applicable", "example": 123 }, "UniqueKey": { "type": "string", "description": "The unique key that identifies the schedule (concatination of Object and ObjectID).", "example": "device_123" }, "Plugin": { "type": "string", "description": "The plugin name (if applicable)", "example": "linux_server" } } } } }, "required": [ "offset", "limit", "data", "search", "sort" ] } } } } }, "operationId": "list_all_schedules", "description": "Retrieve all schedules", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "in": "query", "name": "deviceid", "schema": { "type": "integer", "example": [ 123, 2875, 3 ] }, "description": "Device id to limit the log output to.\n" } ] } }, "/schedules/nextdue": { "post": { "summary": "Next due", "tags": [ "Schedule" ], "description": "Calculates the next time a schedule would run for a given [cron-like expression](#section/Schedules)", "operationId": "next_due", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules) to calculte the next due time for", "example": "0 0 */6 * * * *" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "NextDue": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format of the cron expression", "example": "2222-02-22T22:22:22.000Z" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Schedule": [ "Must not be blank", "Is not a valid Skylar Compliance schedule expression" ] } } } } } } } }, "/schedules/status": { "get": { "summary": "Schedule status", "description": "Get overall schedule status", "tags": [ "Schedule" ], "operationId": "check_schedule_status", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Status": { "type": "string", "description": "A string representing Skylar Compliance's schedule status", "enum": [ "active", "paused" ] } } } } } } } } }, "/schedules/pause": { "post": { "summary": "Pause schedule", "tags": [ "Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAllSchedules" ] } ], "description": "Suspends all schedules", "operationId": "pause_schedule", "responses": { "204": { "description": "Schedule paused" } } } }, "/schedules/resume": { "post": { "summary": "Resume schedule", "tags": [ "Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAllSchedules" ] } ], "description": "Resumes all schedules", "operationId": "resume_schedule", "responses": { "204": { "description": "Schedule resumed" } } } }, "/schedules/postpone": { "post": { "summary": "Postpone schedules", "tags": [ "Schedule" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAllSchedules" ] } ], "description": "Postpone a list of schedules", "operationId": "postpone_schedule", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Schedules": { "description": "List of schedules to postpone", "type": "array", "items": { "type": "object", "properties": { "ObjectID": { "type": "integer", "description": "The internal ID of the object or `0` if not applicable", "example": 123 }, "Object": { "type": "string", "description": "The object type an action relates to", "example": "device", "enum": [ "device", "discovery", "report", "command", "archive" ] } } } } } } } } }, "responses": { "204": { "description": "Schedules postponed" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Schedules[0]": [ "User is not permitted to postpone discovery schedule" ] } } } } } } } }, "/settings/advanced": { "get": { "summary": "Get advanced settings", "tags": [ "Settings/Advanced" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewSysAdmin" ] } ], "operationId": "get_advanced_settings", "description": "Get advanced settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1advanced/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set advanced settings", "tags": [ "Settings/Advanced" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysAdmin" ] } ], "operationId": "update_advanced_settings", "description": "Update advanced settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Advanced settings", "type": "object", "description": "Advanced settings model", "properties": { "ClipProgress": { "type": "number", "description": "Number of characters to clip from the start and end of a progress message.", "default": 200, "example": 200 }, "LDAPNestedGroups": { "type": "boolean", "description": "Enable/Disable use of nested LDAP groups.", "default": false, "example": false }, "MaxConcurrentMonitors": { "type": "number", "description": "Maximum number of rpmonitors that can be enabled.", "default": 300, "example": 300 }, "MaxReplicationBuffer": { "type": "number", "description": "Maximum buffer size for jobs a replication worker can have.", "default": 20000, "example": 20000 }, "MaxJobs": { "type": "number", "description": "Maximum number of concurrent jobs that can be run.", "default": 50, "example": 50 }, "NoRedact": { "type": "boolean", "description": "Enable/Disable not redacting sensitive information such as passwords from log messages.", "default": false, "example": false }, "GZBlockSize": { "type": "number", "description": "Size of each compression block in bytes.", "default": 250000, "example": 1000000 }, "GZBlockThreads": { "type": "number", "description": "Number of blocks to compress concurrently.", "default": 2, "example": 16 }, "RegexGlobalSearchBufferSize": { "type": "number", "description": "Memory buffer size used by regex global search in bytes.", "default": 33554432, "example": 1024 }, "SSHDMaxStartupsStart": { "type": "number", "description": "The number of unauthenticated SSH connections at which sshd begins probabilistically dropping new connections (the \"start\" value in the MaxStartups start:rate:full triplet). Set to 0 to restore the sshd built-in default (10). Increase this value to allow more simultaneous unauthenticated connections before any are dropped.\n", "default": 10, "example": 10 }, "SSHDMaxStartupsFull": { "type": "number", "description": "The maximum number of unauthenticated SSH connections sshd will accept before refusing all new ones (the \"full\" value in the MaxStartups start:rate:full triplet). Set to 0 to restore the sshd built-in default (100). Increase this value if the appliance is dropping incoming SSH connections under high concurrency.\n", "default": 100, "example": 100 } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1advanced/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "ClipProgress": [ "Is not a valid number between 0 and 500 inclusive" ], "MaxConcurrentMonitors": [ "Is not a valid number between 50 and 300 inclusive" ], "MaxReplicationBuffer": [ "Is not a valid number between 15000 and 25000 inclusive" ], "MaxJobs": [ "Is not a valid number between 50 and 150 inclusive" ] } } } } } }, "parameters": [] } }, "/settings/alerts": { "get": { "summary": "Get alert settings", "tags": [ "Settings/Alerts" ], "operationId": "get_alert_settings", "description": "Get alert settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1alerts/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set alert settings", "tags": [ "Settings/Alerts" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_alert_settings", "description": "Update alert settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Alert settings", "type": "object", "description": "Alert settings model", "properties": { "Enabled": { "type": "boolean", "description": "Enable email alerts", "default": false, "example": true }, "From": { "type": "string", "description": "The domain for an email address to use in the `From` field for notifications. Must be set to a valid domain if enabled", "example": "skylarcompliance@example.com" }, "To": { "type": "string", "description": "Default notification address to send email alerts to. Must be set to a valid email address if enabled", "example": "admin@example.com" }, "Hostname": { "type": "string", "description": "Hostname to be used in email alerts. Defaults to the appliance's hostname", "example": "skylar-compliance.example.com" }, "PlainText": { "type": "boolean", "description": "Send emails as text/plain instead of HTML formatted", "default": false }, "SMTP": { "type": "object", "description": "Outgoing SMTP server settings. Your mail server must be configured to allow Skylar Compliance to relay to internal\nand external recipients. Must be set if enabled\n", "properties": { "Host": { "type": "string", "description": "Address or hostname of the outgoing SMTP server", "example": "smtp.example.com" }, "Port": { "type": "integer", "description": "SMTP server port", "default": 25 }, "Username": { "type": "string", "description": "Optional SMTP username", "example": "afox" }, "Password": { "type": "string", "description": "Optional SMTP password", "example": "Sunbreeze123" } }, "required": [ "Host" ] } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1alerts/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "From": [ "Must not be blank", "Is not a valid email address" ], "To": [ "Must not be blank", "Is not a valid email address" ], "SMTP": [ "Must be set" ], "SMTP.Host": [ "Must not be blank", "Is not a valid IP address or hostname" ], "SMTP.Username": [ "Must be set if SMTP Password is set", "Must not be blank" ], "SMTP.Password": [ "Must be set if SMTP Username is set", "Must not be blank" ] } } } } } }, "parameters": [] } }, "/settings/alerts/test": { "get": { "summary": "Tests alert settings by sending a dummy email", "tags": [ "Settings/Alerts" ], "description": "Tests alert settings by sending a dummy email", "operationId": "test_alert_settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Success": { "type": "boolean", "description": "If test was successful" }, "Message": { "type": "string", "description": "Test result" } }, "required": [ "Success" ] }, "examples": { "Success": { "value": { "Success": true } }, "Error": { "value": { "Success": false, "Message": "No response" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Address": [ "Must not be blank" ] } } } } } } } }, "/settings/appliance": { "get": { "summary": "Get appliance settings", "tags": [ "Settings/Appliance" ], "operationId": "get_appliance_settings", "description": "Get appliance settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1appliance/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set appliance settings", "tags": [ "Settings/Appliance" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_appliance_settings", "description": "Update appliance settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Appliance settings", "type": "object", "description": "Appliance model", "properties": { "RebootPolicy": { "type": "string", "description": "Which action to take after restarting Skylar Compliance, rebooting or powering on this appliance. You can\n`RunDueBackups` and treat any missed backups as overdue, or `RecalculateSchedules` and just return to the normal\nbackup schedule\n", "default": "RunDueSchedule", "example": "RecalculateSchedules", "enum": [ "RunDueSchedule", "RecalculateSchedules" ] }, "Offline": { "type": "boolean", "description": "Will disable any automatic checks to the Skylar Compliance update server and will require manual updates", "default": false, "example": true }, "AutomaticVersionUpgrades": { "type": "boolean", "description": "By default Skylar Compliance will update automatically, even for major version updates (`5.x`) unless this is set to\n`false`\n", "default": true }, "AutomaticMinorUpdate": { "type": "boolean", "description": "By default Skylar Compliance will update automatically for minor version updates (`5.x.y`) unless this is set to\n`false`\n", "default": true }, "DateTime": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format to set the appliance date and time", "example": "2222-02-22T22:22:22.000Z" }, "Timezone": { "type": "string", "description": "TZ [database](https://en.wikipedia.org/wiki/Tz_database) timezone name", "example": "Europe/London" }, "UseNTP": { "type": "boolean", "description": "Use a [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol) server to set appliance time automatically", "default": false, "example": true }, "NTPHost1": { "type": "string", "description": "Hostname of the primary NTP server to use for automatic date/time settings", "example": "0.uk.pool.ntp.org" }, "NTPHost2": { "type": "string", "description": "Hostname of a secondary, fallback NTP server to use for automatic date/time settings", "example": "1.uk.pool.ntp.org" }, "LogLevel": { "type": "string", "description": "Current internal log level", "example": "debug", "readOnly": true, "enum": [ "info", "debug", "trace" ] }, "UpgradeServerURL": { "type": "string", "description": "Server URL of the upgrade server set for this appliance", "readOnly": true }, "UpgradePageURL": { "type": "string", "description": "Webpage URL of the offline appliance upgrade page", "readOnly": true }, "RegisterServerURL": { "type": "string", "description": "Server URL of the registration server for offline appliance install", "readOnly": true }, "RegisterPageURL": { "type": "string", "description": "Webpage URL of the appliance offline register page", "readOnly": true } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1appliance/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "RebootPolicy": [ "Must be one of 'RunDueSchedule' or 'RecalculateSchedules'" ], "Timezone": [ "Timezone 'foo; is not a valid time zone identifier" ], "NTPHost1": [ "Must be set (if UseNTP is true)" ] } } } } } }, "parameters": [] } }, "/settings/appliance/restart": { "post": { "summary": "Restart Skylar Compliance", "tags": [ "Settings/Appliance/Actions" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Restarts the Skylar Compliance daemon", "operationId": "restart_restorepoint", "responses": { "204": { "description": "Restart requested" } } } }, "/settings/appliance/reboot": { "post": { "summary": "Reboot appliance", "tags": [ "Settings/Appliance/Actions" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Reboots the appliance", "operationId": "reboot_appliance", "responses": { "204": { "description": "Reboot requested" } } } }, "/settings/appliance/shutdown": { "post": { "summary": "Appliance shutdown", "tags": [ "Settings/Appliance/Actions" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Shuts down the appliance", "operationId": "shutdown_appliance", "responses": { "204": { "description": "Shutdown requested" } } } }, "/settings/appliance/support": { "post": { "summary": "Start remote support", "tags": [ "Settings/Appliance/Support" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Starts remote support", "operationId": "start_remote_support", "responses": { "204": { "description": "Remote support starting" } } }, "delete": { "summary": "Stop remote support", "tags": [ "Settings/Appliance/Support" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Stops remote support", "operationId": "stop_remote_support", "responses": { "204": { "description": "Remote support stopping" } } }, "get": { "summary": "Check if remote support is active", "tags": [ "Settings/Appliance/Support" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Check if remote support is active", "operationId": "get_remote_support", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "RemoteSupportActive": { "description": "True if remote support is active", "type": "boolean", "example": true } } } } } } } } }, "/settings/appliance/debug": { "post": { "summary": "Start debug logging", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Enables debug logging", "operationId": "start_debug", "responses": { "204": { "description": "Debug enabled" } } }, "put": { "summary": "Stop debug logging", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Disables debug logging", "operationId": "stop_debug", "responses": { "204": { "description": "Debug disabled" } } }, "get": { "summary": "Check if debug logging is active", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Check if debug logging is active", "operationId": "get_debug", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "DebugLogActive": { "description": "True if debug logging is active", "type": "boolean", "example": true } } } } } } } } }, "/settings/appliance/debug/log": { "get": { "summary": "Download debug log", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "description": "Download appliance debug log", "operationId": "download_debug_log", "responses": { "200": { "description": "OK", "content": { "application/zip": { "schema": { "type": "string", "format": "binary", "description": "Zip file containing log files" } } } } } }, "delete": { "summary": "Delete debug log", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Deletes the debug log from the appliance", "operationId": "delete_debug_log", "responses": { "204": { "description": "Debug log deleted" } } } }, "/settings/appliance/debug/details": { "get": { "summary": "Download debug details", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "description": "Download appliance debug details", "operationId": "download_debug_details", "responses": { "200": { "description": "OK", "content": { "application/zip": { "schema": { "type": "string", "format": "binary", "description": "Zip file containing debug details files" } } } } } } }, "/settings/appliance/trace": { "get": { "summary": "Get stack trace", "tags": [ "Settings/Appliance/Debug" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Download a stack trace", "operationId": "stack_trace", "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string", "description": "Stack trace of the current system state\n" } } } } } } }, "/settings/appliance/cache": { "delete": { "summary": "Clear cache", "tags": [ "Settings/Appliance" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Clears the appliance cache from storage", "operationId": "clear_cache", "responses": { "204": { "description": "Caches cleared" } } } }, "/settings/appliance/update": { "get": { "summary": "Check update status", "tags": [ "Settings/Appliance/Updates" ], "description": "Checks existing update status", "operationId": "check_update", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Version": { "type": "string", "description": "Currently installed version", "example": "5.4:20220222222222" }, "AvailableVersion": { "type": "string", "description": "Version of currently available update (if available)", "example": "5.4:20230323232323" }, "Changelog": { "type": "string", "deprecated": true, "description": "Deprecated: always empty. Release notes are published at https://docs.sciencelogic.com/skylar_compliance/latest/Content/home_release_notes.htm\n" }, "UpdateKey": { "type": "string", "description": "Encrypted key for manual updates", "example": "RPV5..." } } } } } } } }, "put": { "summary": "Update now", "tags": [ "Settings/Appliance/Updates" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Update the appliance", "operationId": "run_update", "responses": { "204": { "description": "Update requested" } } }, "delete": { "summary": "Force update check", "tags": [ "Settings/Appliance/Updates" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Forces an online update check. If automatic updates are enabled, an available update will be applied", "operationId": "force_check_update", "responses": { "204": { "description": "Checking for updates" } } }, "post": { "summary": "Upload manual update", "tags": [ "Settings/Appliance/Updates" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Upload a manual update file", "operationId": "upload_update", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "description": "Manual update file (`.bin`)", "format": "binary" } }, "required": [ "file" ] } } } }, "responses": { "204": { "description": "Applying update" }, "500": { "description": "Unable to update", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to update" } } } } } } }, "/settings/appliance/logo": { "post": { "summary": "Upload a new logo", "tags": [ "Settings/Appliance/Logo" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Upload a new appliance logo", "operationId": "upload_logo", "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "description": "A logo in PNG format", "format": "binary" } }, "required": [ "file" ] } } } }, "responses": { "204": { "description": "Logo appliead" }, "500": { "description": "Unable to apply new logo", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to apply new logo" } } } } } }, "delete": { "summary": "Reset logo", "tags": [ "Settings/Appliance/Logo" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Resets the appliance logo to the default Skylar Compliance logo", "operationId": "reset_logo", "responses": { "204": { "description": "Logo was reset" } } } }, "/settings/appliance/install": { "post": { "summary": "Install appliance", "tags": [ "Settings/Appliance" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "description": "Install the appliance. If appliance is offline, return an appliance key to register offline appliance", "operationId": "install_appliance", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Install request details", "properties": { "Company": { "type": "string", "description": "Company name", "example": "Foo inc" }, "Contact": { "type": "string", "description": "Contact name", "example": "John Doe" }, "Email": { "type": "string", "description": "Contact email", "example": "afox@skylarcompliance.com" }, "Phone": { "type": "string", "description": "Contact phone number", "example": "+44 844 571 8120" }, "Address": { "type": "string", "description": "Customer or Business Unit address", "example": "4 Tannery Ln, Send, Woking GU23 7EF" }, "Reseller": { "type": "string", "description": "Reseller name", "example": "Foo inc" }, "ActivationCode": { "type": "string", "description": "Only applies to appliances with no serial number, usually virtual machines", "example": "some888_eval" }, "Offline": { "type": "boolean", "description": "True if the box should be installed offline", "default": false, "example": true } }, "required": [ "Company", "Contact", "Email", "Phone", "Address", "Reseller" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "ApplianceKey": { "type": "string", "description": "Appliance key that should be user to register an offline appliance", "example": "RPV5U2F5hags6" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Company": [ "Must not be blank" ], "Contact": [ "Must not be blank" ], "Email": [ "Must not be blank", "Is not a valid email address" ], "Phone": [ "Must not be blank" ], "Address": [ "Must not be blank" ] } } } } } } } }, "/settings/appliance/install/status": { "get": { "summary": "Check installation status", "tags": [ "Settings/Appliance" ], "description": "Checks existing installation status", "operationId": "check_install_status", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "IsInstalled": { "type": "boolean", "description": "Whether or not the appliance is already installed", "example": false }, "Errors": { "type": "array", "description": "All the errors that occurred during installation", "items": { "type": "string", "example": "Appliance update failed: Something happened" } } }, "required": [ "IsInstalled", "Errors" ] } } } } } } }, "/settings/assetfields": { "get": { "summary": "List all asset fields", "tags": [ "Settings/Assetfield" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewAssets" ] } ], "operationId": "list_assetfields", "description": "Retrieve all assetfields", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "data": { "description": "List of asset fields", "type": "array", "items": { "$ref": "#/paths/~1settings~1assetfields/post/requestBody/content/application~1json/schema" } } } } } } } }, "parameters": [ { "in": "query", "name": "all", "schema": { "type": "integer", "example": 1, "default": 0 }, "description": "Return all asset fields, including built-in, non-editable ones." }, { "$ref": "#/paths/~1jobs/get/parameters/0" } ] }, "post": { "summary": "Create an asset field", "tags": [ "Settings/Assetfield" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAssets" ] } ], "operationId": "create_assetfield", "description": "Create a new assetfield", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Assetfield", "type": "object", "description": "Asset field model", "properties": { "ID": { "description": "Asset field ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Asset field name", "type": "string", "example": "Service Tag" }, "Type": { "description": "The type of the asset field. The following types are supported:\n* `text` for a single line input\n* `textarea` for a multi-line line input\n* `date` generic date field\n* `daten` notify device owner on set date\n* `daten30` notify device owner 30 days before set date\n* `daten60` notify device owner 60 days before set date\n* `file` for file uploads\n* `filen` file upload with notify device owner\n", "type": "string", "example": "date", "enum": [ "text", "textarea", "date", "daten", "daten30", "daten60", "file", "filen" ] }, "BuiltIn": { "description": "Factory default asset fields are not editable and have this flag set to `true`.", "type": "boolean", "example": true, "readOnly": true } }, "required": [ "Name", "Type" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1assetfields/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank", "Must be unique" ], "Type": [ "Must be one of 'text', 'textarea', 'date', 'daten', 'daten30', 'daten60', 'file' or 'filen'" ] } } } } } }, "parameters": [] } }, "/settings/assetfields/{id}": { "get": { "summary": "Retrieve an asset field", "tags": [ "Settings/Assetfield" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewAssets" ] } ], "operationId": "get_assetfield", "description": "Retrieve a single assetfield", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1assetfields/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Asset field does not exist", "errors": { "ID": [ "Asset field with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update an asset field", "tags": [ "Settings/Assetfield" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAssets" ] } ], "operationId": "update_assetfield", "description": "Update an asset field", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1assetfields/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1assetfields/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1settings~1assetfields/post/responses/400/content/application~1json/example" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to change built-in asset field" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1settings~1assetfields~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete an asset field", "tags": [ "Settings/Assetfield" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAssets" ] } ], "operationId": "delete_assetfield", "description": "Delete an asset field", "responses": { "204": { "description": "Asset field deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1settings~1assetfields~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Asset field ID", "in": "path", "required": true } ] }, "/settings/assetfields/notifications": { "get": { "summary": "Get asset notification settings", "tags": [ "Settings/Assetfield/Notifications" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewAssets" ] } ], "operationId": "get_asset_notification_settings", "description": "Retrieve asset notification settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1assetfields~1notifications/put/requestBody/content/application~1json/schema" } } } }, "500": { "description": "Unable to retrieve asset notification settings", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to retrieve asset notification settings" } } } } } }, "put": { "summary": "Update asset notification settings", "tags": [ "Settings/Assetfield/Notifications" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAssets" ] } ], "operationId": "update_asset_notification_settings", "description": "Update asset notification settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Assetfield", "type": "object", "description": "Asset field model", "properties": { "NotifyDeviceOwner": { "description": "If true will notify the device owner of changes on assets, taking precedence over NotifyAddress", "type": "boolean", "default": false, "example": true }, "NotifyAddress": { "description": "Asset notify address, only has effect if NotifyDeviceOwner is disabled. Must be empty or a valid email address", "type": "string", "default": "", "example": "admin@skylarcompliance.com" } } } } } }, "responses": { "204": { "description": "Asset notification settings" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "NotifyAddress": [ "Must be a valid email address or empty" ] } } } } }, "500": { "description": "Unable to update asset notification settings", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to update asset notification settings" } } } } } }, "delete": { "summary": "Disable asset notifications", "tags": [ "Settings/Assetfield/Notifications" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyAssets" ] } ], "operationId": "disable_asset_notifications", "description": "Disable asset notifications", "responses": { "204": { "description": "Asset notifications disabled" }, "500": { "description": "Unable to disable asset notifications", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to disable asset notifications" } } } } } } }, "/settings/archive": { "get": { "summary": "Get archive settings", "tags": [ "Settings/Archive" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ArchivePlatform" ] } ], "operationId": "get_archive_settings", "description": "Get archive settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1archive/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set archive settings", "tags": [ "Settings/Archive" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ArchivePlatform" ] } ], "operationId": "update_archive_settings", "description": "Update archive settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Archive settings", "type": "object", "description": "Archive model", "properties": { "ArchiveCerts": { "type": "boolean", "description": "True if archive should contain certs and keys", "example": true, "default": false }, "WriteMaxRetries": { "type": "integer", "description": "Maximum number of retries for failed archive write operations.", "minimum": 0, "maximum": 100, "default": 0 }, "WriteRetryInterval": { "type": "integer", "description": "Retry interval for failed archive write operations, in seconds.", "minimum": 0, "maximum": 1000, "default": 0 }, "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules) to schedule appliance backup intervals.\nAn empty value `\"\"` stands for Manual appliance backups\n", "default": "", "example": "15 * * * *" }, "LastArchived": { "type": "string", "readOnly": true, "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when an archive was last taken\n", "example": "2222-02-22T22:22:22.000Z", "format": "date-time" }, "NextDue": { "type": "string", "readOnly": true, "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when an archive will be taken next\n", "example": "2222-02-22T22:22:22.000Z", "format": "date-time" }, "FailoverMode": { "type": "boolean", "description": "If true, failover to secondary archive server if primary fails. Set to false to always use both servers", "default": false, "example": true }, "RetryAfter": { "type": "integer", "description": "Retry interval in hours. '0' means no retry. '-1' means to revert to manual archive.", "default": 0 }, "Primary": { "description": "Primary archive settings", "type": "object", "properties": { "FileserverID": { "type": "integer", "description": "ID of the [Fileserver](#tag/Fileserver) to use", "default": 0, "example": 123 }, "Retain": { "type": "integer", "description": "Maximum number of archives to retain on the server", "default": 10, "example": 5 }, "MaxBackups": { "type": "integer", "description": "Max number of device backups to be stored on fileserver. '-1' means that only the appliance database will be backed up. '0' means no limit.", "default": 0, "example": 3 } } }, "Secondary": { "description": "Secondary archive settings", "type": "object", "properties": { "FileserverID": { "type": "integer", "description": "ID of the [Fileserver](#tag/Fileserver) to use", "default": 0, "example": 124 }, "Retain": { "type": "integer", "description": "Maximum number of archives to retain on the server", "default": 10, "example": 5 }, "MaxBackups": { "type": "integer", "description": "Max number of device backups to be stored on fileserver. '-1' means that only the appliance database will be backed up. '0' means no limit.", "default": 0, "example": 3 } } } }, "required": [ "Primary" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1archive/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "WriteMaxRetries": [ "Must be between 0 and 100 inclusive" ], "WriteRetryInterval": [ "Must be between 0 and 1000 inclusive" ], "Schedule": [ "Is not a valid Skylar Compliance schedule expression" ], "Primary": [ "Must be set" ], "Primary.FileserverID": [ "Fileserver with ID 123 does not exist" ], "Secondary.FileserverID": [ "Fileserver with ID 123 does not exist" ] } } } } } }, "parameters": [] } }, "/settings/archive/backup": { "post": { "summary": "Backup appliance", "tags": [ "Settings/Archive" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ArchivePlatform" ] } ], "description": "Starts a manual appliance backup using the current [appliance archive](#operation/get_archive_settings) settings\n", "operationId": "backup_restorepoint", "responses": { "204": { "description": "Appliance archive requested" } } } }, "/settings/archive/restore": { "get": { "summary": "List appliance backups", "tags": [ "Settings/Archive" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ArchivePlatform" ] } ], "description": "Returns a list of appliance backups from [primary and secondary servers](#operation/get_archive_settings)\n", "operationId": "list_restorepoint_backups", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "description": "List of appliance backups", "type": "array", "items": { "type": "object", "properties": { "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when archive was created", "example": "2222-02-22T22:22:22.000Z" }, "ClusterNodeID": { "type": "integer", "description": "ID of the Cluster node an archive should be restored from (1 - Primary, 2 - Secondary)", "example": 123, "default": 1 }, "FileserverID": { "type": "integer", "description": "ID of the [Fileserver](#tag/Fileserver) an archive can be restored from", "example": 123 }, "Secondary": { "type": "boolean", "description": "True if archive is stored on a secondary fileserver", "example": true }, "Key": { "type": "string", "description": "Identifier of the backup to be used for restoring an archive", "example": "skylarcompliance_archive_RP00000123_20220222222222" }, "Serial": { "type": "string", "description": "Skylar Compliance serial number of an archive", "example": "RP00000123" } } } } } } } } } } }, "post": { "summary": "Restore appliance", "tags": [ "Settings/Archive" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ArchivePlatform" ] } ], "description": "Restores Skylar Compliance from a given archive\n", "operationId": "restore_restorepoint", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "ClusterNodeID": { "type": "integer", "description": "ID of the Cluster node an archive should be restored from (1 - Primary, 2 - Secondary)", "example": 123, "default": 1 }, "FileserverID": { "type": "integer", "description": "ID of the [Fileserver](#tag/Fileserver) an archive should be restored from", "example": 123, "default": 0 }, "Key": { "type": "string", "description": "Identifier of the backup to be used for restoring an archive", "example": "skylarcompliance_archive_RP00000123_20220222222222", "default": "" }, "Password": { "type": "string", "description": "Backup's admin user password", "example": "password123", "default": "" }, "EncryptionPassword": { "type": "string", "description": "Backup's admin encryption password", "example": "password456", "default": "" } }, "required": [ "FileserverID", "Key", "Password", "EncryptionPassword" ] } } } }, "responses": { "204": { "description": "Appliance restore requested" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "FileserverID": [ "Fileserver with ID 123 does not exist" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Appliance backup not found", "errors": { "Key": [ "Backup 'skylarcompliance_archive_RP00000123_20220222222222' was not found on the Fileserver" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to restore appliance" } } } } } } }, "/settings/authentication": { "get": { "summary": "Get authentication settings", "tags": [ "Settings/Authentication" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewRadius" ] } ], "operationId": "get_authentication_settings", "description": "Get authentication settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1authentication/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set authentication settings", "tags": [ "Settings/Authentication" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyRadius" ] } ], "operationId": "update_authentication_settings", "description": "Update authentication settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Authentication settings", "type": "object", "description": "Authentication settings model", "properties": { "RADIUS": { "type": "object", "description": "Use RADIUS authentication", "properties": { "NASIdentifier": { "type": "string", "description": "This attribute identifies the NAS that is used to construct the Access-Request packet. Required if Primary host is set", "example": "foo" }, "CaseInsensitive": { "type": "boolean", "description": "Whether case insensitivity should be applied", "example": false }, "Primary": { "type": "object", "description": "Primary RADIUS server details", "properties": { "Host": { "type": "string", "description": "Primary RADIUS server name or IP address", "example": "radius1.example.com" }, "Port": { "type": "integer", "description": "RADIUS server port", "default": 1812 }, "Secret": { "type": "string", "description": "The shared secret. Required if host is set", "example": "Sunbreeze123" } } }, "Secondary": { "type": "object", "description": "Fallback RADIUS server details", "properties": { "Host": { "type": "string", "description": "Secondary RADIUS server name or IP address", "example": "radius2.example.com" }, "Port": { "type": "integer", "description": "RADIUS server port", "default": 1812 }, "Secret": { "type": "string", "description": "The shared secret. Required if host is set", "example": "Sunbreeze123" } } } } }, "SAML": { "type": "object", "description": "SAML authentication settings", "properties": { "AssertionConsumerServiceURL": { "type": "string", "description": "URL Skylar Compliance is accepting SAML auth requests on. System generated", "example": "https://skylar-compliance.example.com/saml/auth" }, "EntityID": { "type": "string", "description": "SAML auth entity id. System generated", "example": "https://skylar-compliance.example.com/saml/identity" }, "Metadata": { "type": "string", "writeOnly": true, "description": "[SAML metadata](https://en.wikipedia.org/wiki/SAML_metadata) to enable SAML authentication\n", "example": "\n\n \n \n \n \n \n \n \n encoded_certificate\n \n \n \n urn:oasis:names:tc:SAML:2.0:nameid-format:entity\n \n\n" }, "GroupsClaim": { "type": "string", "description": "SAML groups property given by the IdP xml response", "example": "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups" }, "EmailClaim": { "type": "string", "description": "SAML email property given by the IdP xml response", "example": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" }, "GivenNameClaim": { "type": "string", "description": "SAML given name property given by the IdP xml response", "example": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" }, "SurnameClaim": { "type": "string", "description": "SAML surname property given by the IdP xml response", "example": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" } } }, "LDAP": { "type": "object", "description": "LDAP (Active Directory) authentication settings", "properties": { "CaseInsensitive": { "type": "boolean", "description": "Whether case insensitivity should be applied", "example": false }, "Base": { "type": "string", "description": "The top-level LDAP DN. This is usually (but not always) the DNS domain name", "example": "dc=ldap,dc=example,dc=com" }, "UserSearch": { "type": "object", "description": "Settings to search for LDAP users", "properties": { "Base": { "type": "string", "description": "User search DN. Required if LDAP Base is set.", "example": "cn=users,dc=company,dc=local" }, "UsernameField": { "type": "string", "description": "Which LDAP field to use as the username (`uid`, `sAMAccountName`, `userprincipalname`). Required if UserSearch Base is set.", "example": "uid" } } }, "GroupSearch": { "type": "object", "description": "Settings to search for LDAP groups", "properties": { "Base": { "type": "string", "description": "Group search DN. Required if LDAP Base is set.", "example": "cn=security groups,dc=company,dc=local" }, "Search": { "type": "string", "description": "The group search filter, for instance `objectClass=Group` or `objectClass=posixGroup`, depending on the\ndirectory type. Required if GroupSearch Base is set.\n", "example": "objectClass=Group" }, "GroupMembersAttr": { "type": "string", "description": "The group search attribute to use to get the list of group members.", "default": "uniquemember", "example": "memberuid" } } }, "Primary": { "type": "object", "description": "Primary LDAP (Active Directory) server", "properties": { "Host": { "type": "string", "description": "Primary LDAP server name or IP address. Required if LDAP Base is set.", "example": "ad1.example.com" }, "Port": { "type": "integer", "description": "UDP port used by the LDAP server (usually `389`). LDAP over SSL may use `636`. Use `3268` to query the\nActive Directory Global Catalogue (useful for multi-domain forests).\n", "default": 389, "example": 636 }, "BindDN": { "type": "string", "description": "DN to bind the LDAP with. Required if Primary Host is set.", "example": "cn=Administrator,cn=Users,dc=company,dc=local" }, "BindPassword": { "type": "string", "description": "LDAP Bind password. Required if Primary Host is set.", "example": "Sunbreeze123" }, "UseTLS": { "type": "string", "description": "Whether to require encrypted connections to the LDAP Server", "example": "TLS", "default": "None", "enum": [ "None", "TLS", "STARTTLS" ] } } }, "Secondary": { "type": "object", "description": "Fallback LDAP (Active Directory) server", "properties": { "Host": { "type": "string", "description": "Secondary LDAP server name or IP address", "example": "ad2.example.com" }, "Port": { "type": "integer", "description": "UDP port used by the LDAP server (usually `389`). LDAP over SSL may use `636`. Use `3268` to query the\nActive Directory Global Catalogue (useful for multi-domain forests).\n", "default": 389, "example": 636 }, "BindDN": { "type": "string", "description": "DN to bind the LDAP with. Required if Secondary Host is set.", "example": "cn=Administrator,cn=Users,dc=company,dc=local" }, "BindPassword": { "type": "string", "description": "LDAP Bind password. Required if Secondary Host is set.", "example": "Sunbreeze123" }, "UseTLS": { "type": "string", "description": "Whether to require encrypted connections to the LDAP Server", "example": "TLS", "default": "None", "enum": [ "None", "TLS", "STARTTLS" ] } } } } } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1authentication/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "RADIUS.NASIdentifier": [ "Must be set (if Primary or Secondary RADIUS server are set)" ], "RADIUS.Primary.Secret": [ "Must be set (if Host is set)" ], "RADIUS.Secondary.Secret": [ "Must be set (if Host is set)" ], "SAML.Metadata": [ "Not a valid XML document" ], "SAML.GroupsClaim": [ "Must not be blank (if SAML.Metadata is set)" ], "LDAP.UserSearch.Base": [ "Must be set (if LDAP.Base is set)" ], "LDAP.UserSearch.UsernameField": [ "Must be set (if LDAP.Base is set)" ], "LDAP.GroupSearch.Base": [ "Must be set (if LDAP.Base is set)" ], "LDAP.GroupSearch.Search": [ "Must be set (if LDAP.Base is set)" ], "LDAP.Primary.Host": [ "Must be set (if LDAP.Base is set)" ], "LDAP.Primary.BindDN": [ "Must be set (if LDAP.Base is set)" ], "LDAP.Primary.BindPassword": [ "Must be set (if LDAP.Base is set)" ], "LDAP.Primary.UseTLS": [ "Must be one of 'None', 'TLS' or 'STARTTLS'" ], "LDAP.Secondary.BindDN": [ "Must be set (if LDAP.Secondary.Host is set)" ], "LDAP.Secondary.BindPassword": [ "Must be set (if LDAP.Secondary.Host is set)" ], "LDAP.Secondary.UseTLS": [ "Must be one of 'None', 'TLS' or 'STARTTLS'" ] } } } } } }, "parameters": [] } }, "/settings/authentication/testldap": { "post": { "summary": "Tests LDAP server", "tags": [ "Settings/Authentication" ], "description": "Tests LDAP (Active Directory) server by running a search", "operationId": "test_ldap", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Type": { "type": "string", "description": "Type of test", "default": "User", "enum": [ "Group", "Manual" ], "example": "Manual" }, "Host": { "type": "string", "description": "Primary LDAP server name or IP address", "example": "ad1.example.com" }, "Port": { "type": "integer", "description": "UDP port used by the LDAP server (usually `389`). LDAP over SSL may use `636`. Use `3268` to query the\nActive Directory Global Catalogue (useful for multi-domain forests).\n", "default": 389, "example": 636 }, "Base": { "type": "string", "description": "The top-level LDAP DN. This is usually (but not always) the DNS domain name", "example": "dc=ldap,dc=example,dc=com" }, "UserSearch": { "type": "object", "description": "Settings to search for LDAP users", "properties": { "Base": { "type": "string", "description": "User search DN", "example": "cn=users,dc=company,dc=local" }, "UsernameField": { "type": "string", "description": "Which LDAP field to use as the username (`uid`, `sAMAccountName`, `userprincipalname`)", "example": "uid" } }, "required": [ "Base", "UsernameField" ] }, "GroupSearch": { "type": "object", "description": "Settings to search for LDAP groups", "properties": { "Base": { "type": "string", "description": "Group search DN", "example": "cn=security groups,dc=company,dc=local" }, "Search": { "type": "string", "description": "The group search filter, for instance `objectClass=Group` or `objectClass=posixGroup`, depending on the\ndirectory type\n", "example": "objectClass=Group" } }, "required": [ "Base" ] }, "ManualSearch": { "type": "string", "description": "Manual search filter. Required if Type is 'Manual'", "example": "(objectclass=*)" }, "BindDN": { "type": "string", "description": "DN to bind the LDAP with", "example": "cn=Administrator,cn=Users,dc=company,dc=local" }, "BindPassword": { "type": "string", "description": "LDAP Bind password", "example": "Sunbreeze123" }, "UseTLS": { "type": "string", "description": "Whether to require encrypted connections to the LDAP Server", "example": "TLS", "default": "None", "enum": [ "None", "TLS", "STARTTLS" ] } }, "required": [ "Host", "Base", "UserSearch", "GroupSearch", "BindDN", "BindPassword" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "Results": { "type": "array", "description": "LDAP search results", "items": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Host": [ "Must be set" ], "Base": [ "Must be set" ], "UserSearch.Base": [ "Must be set" ], "UserSearch.UsernameField": [ "Must be set" ], "GroupSearch.Base": [ "Must be set" ], "GroupSearch.Search": [ "Must be set" ], "BindDN": [ "Must be set" ], "BindPassword": [ "Must be set" ], "ManualSearch": [ "Must be set (if Type is 'Manual')" ] } } } } } } } }, "/settings/device": { "get": { "summary": "Get default device settings", "tags": [ "Settings/Device" ], "operationId": "get_device_settings", "description": "Retrieve default device settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1device/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set default device settings", "tags": [ "Settings/Device" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_device_settings", "description": "Update default device settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Default device settings", "type": "object", "description": "Default device settings model", "properties": { "RetentionPolicy": { "type": "object", "description": "Default retention policy for all new devices", "properties": { "RetainVersions": { "type": "integer", "description": "Default value for schedule backup's RetainVersions", "example": 10 }, "RetainDays": { "type": "integer", "description": "Default value for schedule backup's RetainDays", "example": 7 }, "DeleteDays": { "type": "integer", "description": "Default value for schedule backup's DeleteDays", "example": 30 }, "ConfigTypes": { "type": "array", "description": "Default config types to backup or when triggering a backup manually. This is determined by a device's plugin.\nThis can be overriden in a schedule.\n", "items": { "type": "string", "example": "_default" } } }, "required": [ "RetainVersions", "RetainDays", "DeleteDays", "ConfigTypes" ] }, "ConfigFilename": { "type": "object", "description": "Defaults for configuration filenames", "properties": { "Prefix": { "type": "string", "description": "Default configuration filename prefix", "example": "foo" }, "IncludeID": { "type": "boolean", "description": "Include device ID in configuration filename", "default": false, "example": true }, "IncludeName": { "type": "boolean", "description": "Include device name in configuration filename", "default": false, "example": true } }, "required": [ "Prefix" ] }, "FailurePolicy": { "type": "object", "description": "Default failure policy for all new devices", "properties": { "Retries": { "type": "integer", "minimum": -1, "maximum": 6, "description": "Number of times device communication will be attempted before failing. `0` means Always, `-1` Never", "example": 0 }, "Action": { "type": "string", "description": "Which action to take once the maximum amount of attempts have failed. This will either `Revert` to schedule,\nset the device to `Manual` backups or `Disable` the device.\n", "enum": [ "Revert", "Manual", "Disable" ], "example": "Revert" }, "Alerts": { "type": "integer", "description": "Number of attempts needed to trigger an alert. `0` means Always, `-1` Never", "example": 0 }, "RetryInterval": { "type": "integer", "description": "Time to wait before attempting a retry in minutes", "example": 15 } }, "required": [ "Retries", "Action", "Alerts", "RetryInterval" ] }, "Monitoring": { "type": "object", "description": "Default settings for device monitoring", "properties": { "Enabled": { "type": "boolean", "description": "Enable or disable device monitoring", "default": false, "example": true }, "AlertFail": { "type": "integer", "description": "Regard as down after this many failures", "example": 2 }, "IsPing": { "type": "boolean", "description": "Perform ICMP ping rather than TCP connect", "example": true }, "AlertEmail": { "type": "boolean", "description": "Send alert email to owner after AlertFail failures", "example": false }, "AlertEmailUp": { "type": "boolean", "example": true, "description": "Send alert email to owner when device is back up" } }, "required": [ "AlertFail", "IsPing", "AlertEmail", "AlertEmailUp" ] }, "Notifications": { "type": "object", "description": "Default notification settings for email alerts", "properties": { "OnConfigChange": { "type": "boolean", "description": "Send notification if a configuration change has been detected (compares current with previous backup)", "example": true }, "OnBackupStart": { "type": "boolean", "description": "Notify when a scheduled backup starts", "example": false }, "OnBackupEnd": { "type": "boolean", "description": "Notify when a scheduled backup finishes", "example": false } }, "required": [ "OnConfigChange", "OnBackupStart", "OnBackupEnd" ] }, "GlobalDeviceSettings": { "type": "object", "description": "Default settings for global device settings", "properties": { "BackupSizeAlert": { "type": "integer", "description": "Specifies the backup size threshold (in megabytes) that, when exceeded by a backup, sends an email to the appliance owner.", "example": 1024 } } } }, "required": [ "RetentionPolicy", "ConfigFilename", "FailurePolicy", "Monitoring", "Notifications", "GlobalDeviceSettings" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1device/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "RetentionPolicy": [ "Must be set" ], "RetentionPolicy.RetainVersions": [ "Must be a positive number" ], "RetentionPolicy.RetainDays": [ "Must be a positive number" ], "RetentionPolicy.DeleteDays": [ "Must be a positive number" ], "ConfigFilename": [ "Must be set" ], "FailurePolicy": [ "Must be set" ], "FailurePolicy.Retries": [ "Must be a number between -1 and 6" ], "FailurePolicy.Action": [ "Must be one of 'Revert', 'Manual' or 'Disable'" ], "FailurePolicy.Alerts": [ "Must be either -1, 0, 1 or `FailurePolicy.Retries + 1`" ], "FailurePolicy.RetryInterval": [ "Must be a positive number" ], "Monitoring": [ "Must be set" ], "Monitoring.AlertFail": [ "Must be a positive number" ], "Notifications": [ "Must be set" ] } } } } } }, "parameters": [] } }, "/settings/discovery": { "get": { "summary": "Get discovery settings", "tags": [ "Settings/Discovery" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "operationId": "get_discovery_settings", "description": "Get device discovery settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1discovery/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set discovery settings", "tags": [ "Settings/Discovery" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyDiscovery" ] } ], "operationId": "update_discovery_settings", "description": "Update discovery settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Device discovery settings", "type": "object", "description": "Device discovery settings model", "properties": { "Schedule": { "type": "string", "description": "A [cron-like expression](#section/Schedules) for running device discovery periodically. Leave blank to disable\n", "default": "", "example": "15 * * * *" }, "LastRun": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when discovery last ran", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "Notify": { "type": "boolean", "description": "Send a notification every time new devices are discovered", "default": false, "example": true }, "SearchRanges": { "type": "array", "description": "Network ranges to include in scan, either directly or via agent. Ranges can also be defined as to be ignored\n", "items": { "type": "object", "properties": { "Range": { "type": "string", "description": "Network address range in [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)\nnotation to include in device discovery. **Note:** Networks beyond `/8` are ignored/\n", "example": "192.0.2.0/24" }, "AgentID": { "type": "integer", "description": "Optional ID of an [Agent](#tag/Agent) to use for device discovery or `0` for direct access", "default": 0, "example": 123 }, "Ignored": { "type": "boolean", "description": "If set to `true`, the given range is excluded from other ranges", "default": false } }, "required": [ "Range" ] }, "example": [ { "Range": "192.0.2.0/24", "AgentID": 0 }, { "Range": "192.0.2.0/24", "AgentID": 123 }, { "Range": "192.0.2.123", "Ignored": true } ] }, "SNMPCommunities": { "type": "array", "description": "List of SNMP communities to use for SNMP fingerprinting", "items": { "type": "object", "properties": { "ID": { "type": "integer", "description": "SNMP community entry ID. When updating SNMP Communities, entries without an ID field are considered new\nand are created, while the ones with an ID field are updated (password fields are only updated if they\nare not empty). Entries that are found in DB, but are not present in the update request are deleted.\n", "example": 123 }, "Version": { "type": "string", "description": "SNMP version", "enum": [ "1", "2c", "3" ], "example": "1" }, "Community": { "type": "string", "description": "SNMP community string or username for SNMPv3", "example": "public" }, "SecurityLevel": { "type": "string", "description": "When using SNMPv3, you can set the security level. `noAuthNoPriv` authenticates with a username without\nencryption. `authNoPriv` uses HMAC MD5 or SHA algorithms for authentication, `authPriv` uses HMAC MD5 or\nSHA algorithms for authentication and DES 56-bit encryption in addition to authentication based on the\nCBC-DES (DES-56) standard\n", "enum": [ "noAuthNoPriv", "authNoPriv", "authPriv" ], "example": "authPriv" }, "AuthenticationUsername": { "type": "string", "description": "Username to send for SNMPv3 with SecurityLevel set to `authNoPriv` or `authPriv`", "example": "admin" }, "AuthenticationProtocol": { "type": "string", "description": "Authentication protocol for SNMPv3 with SecurityLevel set to `authNoPriv` or `authPriv`", "enum": [ "MD5", "SHA1" ] }, "AuthenticationPassword": { "type": "string", "description": "Password to send for SNMPv3 with SecurityLevel set to `authNoPriv` or `authPriv`", "example": "Sunbreeze123" }, "PrivProtocol": { "type": "string", "description": "Priv protocol to use for SNMPv3 and SecurityLevel set to `authPriv`", "enum": [ "AES", "DES" ], "example": "AES" }, "PrivPassword": { "type": "string", "description": "Priv password to use for SNMPv3 and SecurityLevel set to `authPriv`", "example": "Sunbreeze123" } }, "required": [ "Version", "Community" ] }, "example": [ { "Version": "1", "Community": "public" }, { "Version": "1", "Community": "publicv1" }, { "Version": "2c", "Community": "publicv1" } ] }, "PluginRules": { "type": "array", "description": "List of rules to override detected [plugins](#tag/Plugin) based on hostname patters", "items": { "type": "object", "properties": { "Pattern": { "type": "string", "description": "Match discovered device hostnames against this pattern", "example": "^foo" }, "PluginKey": { "type": "string", "description": "A [Plugin](#tag/Plugin) identifier (`Key`) that will be set on a discovered device matching this pattern\n", "example": "cisco_ios" } }, "required": [ "Pattern", "PluginKey" ] }, "example": [ { "Pattern": "ASA", "PluginKey": "cisco_asa" }, { "Pattern": "CSC", "PluginKey": "cisco_ios" } ] }, "AutoAssignDomain": { "type": "boolean", "description": "If set, use [Domain's](#tag/Domain) `Networks` to automatically assign a device on import", "default": true }, "UseAutoImport": { "type": "boolean", "description": "If set, newly [discovered devices](#tag/DiscoveryDevice) will automatically imported", "default": false, "example": true }, "AutoImportRules": { "type": "array", "description": "Automatically assign credentials and simple backup schedule to imported devices based on patterns", "items": { "type": "object", "properties": { "Type": { "type": "string", "description": "Match device type, network address, hostname pattern, domain or location to apply this rule", "example": "DeviceType", "enum": [ "DeviceType", "AddressRange", "HostnamePattern", "Domain", "Location" ] }, "Value": { "type": "string", "description": "Value for the `Type` of match. Could be a [regular expression](#section/Regular-Expressions), network range,\n[Domain](#tag/Domain) ID, [Plugin](#tag/Plugin) identifier or a location name returned by the SNMP server\n" }, "CredentialID": { "type": "integer", "description": "ID of a [Credential set](#tag/Credential) to assign to the imported device or `0` for none", "default": 0 }, "ScheduleName": { "type": "string", "description": "Simple backup schedule to assign to an imported device", "default": "Manual", "enum": [ "Manual", "Hourly", "Daily", "Weekly", "Monthly" ] } }, "required": [ "Type", "Value" ] }, "example": [ { "Type": "DeviceType", "Value": "cisco_ios", "CredentialID": 123, "ScheduleName": "Daily" }, { "Type": "AddressRange", "Value": "192.0.2.0/24", "CredentialID": 0, "ScheduleName": "Hourly" }, { "Type": "HostnamePattern", "Value": "^[A-F][A-F][A-F][0-9]+$", "CredentialID": 124, "ScheduleName": "Monthly" }, { "Type": "Domain", "Value": "123", "CredentialID": 125, "ScheduleName": "Manual" }, { "Type": "Location", "Value": "home", "CredentialID": 0, "ScheduleName": "Weekly" } ] } }, "required": [ "Schedule", "SearchRanges", "SNMPCommunities", "PluginRules", "AutoImportRules" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1discovery/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Schedule": [ "Is not a valid Skylar Compliance schedule expression" ], "SearchRanges": [ "Must be set" ], "SearchRanges[0].Range": [ "Must not be blank", "Range '255.255.255.255/255' is not a valid network range in CIDR notatation" ], "SearchRanges[0].AgentID": [ "Agent with ID 123 not found" ], "SNMPCommunities": [ "Must be set" ], "SNMPCommunities[0].Version": [ "Must be one of '1', '2c' or '3'" ], "SNMPCommunities[0].Community": [ "Must not be blank" ], "SNMPCommunities[0].SecurityLevel": [ "Must be set (if Version is 3)", "Must be one of 'noAuthNoPriv', 'authNoPriv' or 'authPriv'" ], "SNMPCommunities[0].AuthenticationUsername": [ "Must be set (if Version is 3 and SecurityLevel is 'authPriv' or 'authNoPriv')" ], "SNMPCommunities[0].AuthenticationProtocol": [ "Must be set (if Version is 3 and SecurityLevel is 'authPriv' or 'authNoPriv')", "Must be one of 'MD5' or 'SHA1'" ], "SNMPCommunities[0].AuthenticationPassword": [ "Must be set (if Version is 3 and SecurityLevel is 'authPriv' or 'authNoPriv')" ], "SNMPCommunities[0].PrivProtocol": [ "Must be set (if Version is 3 and SecurityLevel is 'authPriv')", "Must be one of 'AES' or 'DES'" ], "SNMPCommunities[0].PrivPassword": [ "Must be set (if Version is 3 and SecurityLevel is 'authPriv')" ], "PluginRules[0].Pattern": [ "Must be set", "Is not a valid regular expression" ], "PluginRules[0].PluginKey": [ "Must be set", "Plugin 'foo' does not exist" ], "AutoImportRules[0].Type": [ "Must be set", "Must be one of 'DeviceType', 'AddressRange', 'HostnamePattern', 'Domain' or 'Location'" ], "AutoImportRules[0].Value": [ "Must not be blank", "Plugin 'foo' does not exist (if Type is DeviceType)", "Range '255.255.255.255/255' is not a valid network range in CIDR notatation (if Type is AddressRange)", "Is not a valid regular expression (if Type is HostnamePattern)", "Domain with ID 123 does not exist (if Type is Domain)" ], "AutoImportRules[0].CredentialID": [ "Credential set with ID 123 does not exist" ], "AutoImportRules[0].ScheduleName": [ "Must be one of 'Manual', 'Hourly', 'Daily', 'Weekly' or 'Monthly'" ] } } } } } }, "parameters": [] } }, "/settings/ha": { "get": { "summary": "Get HA settings", "tags": [ "Settings/HA" ], "operationId": "get_ha_settings", "description": "Get high availability settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1ha/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set HA settings", "tags": [ "Settings/HA" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_ha_settings", "description": "Update high availability settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "High availability settings", "type": "object", "description": "High availability settings model", "properties": { "IsActive": { "type": "boolean", "description": "Enable or disable clustering (if enabled for the appliance)", "example": true, "default": false }, "IsPrimary": { "type": "boolean", "description": "Denotes if this appliance is the Primary or not", "example": true, "default": false }, "PrimaryAddress": { "type": "string", "description": "Primary's IP address", "example": "198.51.100.1" }, "SecondaryAddress": { "type": "string", "description": "Secondary's IP address (if one has joined)", "example": "198.51.100.2", "readOnly": true }, "Secret": { "type": "string", "description": "Cluster secret", "example": "Sunbreeze123" } }, "required": [ "Secret" ] }, "examples": { "CreateClusterPrimary": { "value": { "IsActive": true, "IsPrimary": true, "Secret": "Sunbreeze123" } }, "JoinClusterSecondary": { "value": { "IsActive": true, "IsPrimary": false, "PrimaryAddress": "198.51.100.1", "Secret": "Sunbreeze123" } }, "LeaveClusterSecondary": { "value": { "IsActive": false, "Secret": "Sunbreeze123" } }, "BreakClusterPrimary": { "value": { "IsActive": false, "Secret": "Sunbreeze123" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1ha/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "PrimaryAddress": [ "Must be set (if IsPrimary is false)", "IP '256.256.256.256' is not a valid IP address" ], "Secret": [ "Must be set (if IsActive is true)" ] } } } } } }, "parameters": [] } }, "/settings/ha/status": { "get": { "summary": "Cluster status", "tags": [ "Settings/HA" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "title": "HAStatus", "properties": { "Active": { "type": "boolean", "description": "Set to `true` if the current node is active or `false` for standby", "example": true }, "ClusterStatus": { "type": "string", "description": "A description of a high availability cluster status", "example": "Last sync: 2s ago" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "402": { "description": "Payment Required", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "504": { "description": "Gateway Timeout", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "operationId": "get_high_availability_status", "description": "Get high availability cluster status" } }, "/settings/ha/active": { "get": { "summary": "Active node health check", "tags": [ "Settings/HA" ], "security": [], "operationId": "get_high_availability_active", "description": "Reports whether this node is the active node in a high availability pair. It is intended to back an external\nload balancer health check (for example an AWS NLB target group), so the result is carried entirely by the HTTP\nstatus code and the response has no body. The endpoint is unauthenticated so that a load balancer can poll it.\n", "responses": { "200": { "description": "This node is the active node." }, "404": { "description": "High availability is not configured on this appliance." }, "421": { "description": "This node is on standby; requests should be directed to the active node instead." } } } }, "/settings/logs": { "get": { "summary": "Get log settings", "tags": [ "Settings/Logs" ], "operationId": "get_log_settings", "description": "Get log settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1logs/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set log settings", "tags": [ "Settings/Logs" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_log_settings", "description": "Update log settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Log settings", "type": "object", "description": "Log settings model", "properties": { "DeleteAfter": { "type": "string", "description": "Number of days or months to keep logs for. Log entries older than this value will be removed automatically\nevery 12 hours\n", "default": "1 month", "enum": [ "15 days", "1 month", "2 months", "3 months", "6 months", "12 months", "Never" ] }, "DeviceControlRetention": { "description": "Device control retention settings", "type": "object", "properties": { "OutputsRetentionDays": { "type": "integer", "nullable": true, "description": "Number of days to keep adhoc command outputs. Outputs older than this value will be deleted automatically.\nThis applies to adhoc outputs only, not scheduled outputs. Defaults to retaining outputs indefinitely.\n", "default": null, "example": 30 }, "TranscriptsRetentionDays": { "type": "integer", "nullable": true, "description": "Number of days to keep transcripts. Transcripts older than this value will be deleted automatically.\nDefaults to retaining transcripts indefinitely.\n", "default": null, "example": 30 } } }, "Syslog": { "description": "Syslog settings", "type": "object", "properties": { "Enabled": { "type": "boolean", "description": "Flag to enable log messages to be forwarded to an external syslog server", "default": false, "example": true }, "SyslogVersion": { "type": "string", "description": "RFC version of syslog that will be used for the format of the syslog messages\n", "default": "RFC3164", "enum": [ "RFC3164", "RFC5424" ] }, "SyslogSourceHostname": { "type": "string", "description": "Hostname to be used as the source of the syslog messages. Defaults to RFC 5424 hostname logic (IP first and Hostname if IP is not set)\n", "example": "skylar-compliance.example.com" }, "Protocol": { "type": "string", "description": "Transport protocol used for syslog", "default": "udp", "enum": [ "udp", "tcp" ] }, "Primary": { "description": "Primary syslog settings", "type": "object", "properties": { "Host": { "type": "string", "description": "Primary syslog server name or IP address", "example": "syslog1.example.com" }, "Port": { "type": "integer", "description": "Syslog server port", "default": 514 } }, "required": [ "Host" ] }, "Secondary": { "description": "Secondary syslog settings", "type": "object", "properties": { "Host": { "type": "string", "description": "Secondary syslog server name or IP address", "example": "syslog2.example.com" }, "Port": { "type": "integer", "description": "Syslog server port", "default": 514 } }, "required": [ "Host" ] }, "Facility": { "type": "string", "description": "Forward Skylar Compliance log entries with this facility. Forwarded operating system events will carry their\noriginaly facility\n", "default": "local0", "enum": [ "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7" ] } }, "required": [ "Primary" ] }, "SNMP": { "description": "SNMP settings", "type": "object", "properties": { "Enabled": { "type": "boolean", "description": "Forward all log messages as SNMP traps to a Network Management Server", "default": false, "example": true }, "Host": { "type": "string", "description": "SNMP server address or hostname", "example": "snmp.example.com" }, "Version": { "type": "string", "description": "SNMP server version", "default": "1", "enum": [ "1", "2c" ] }, "Community": { "type": "string", "description": "SNMP community", "example": "public" } }, "required": [ "Community" ] } }, "required": [ "Syslog", "SNMP" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1logs/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DeleteAfter": [ "Must be one of '15 days', '1 month', '2 months', '3 months', '6 months', '12 months' or 'Never'" ], "Syslog": [ "Must be set" ], "Syslog.Protocol": [ "Must be either 'udp' or 'tcp'" ], "Syslog.Primary": [ "Must be set (if Syslog.Enabled is true)" ], "Syslog.Primary.Host": [ "Must be set (if Syslog.Enabled is true)", "Must not be blank (if Syslog.Enabled is true)" ], "Syslog.Secondary.Host": [ "Must not be blank (if Syslog.Enabled is true)" ], "Syslog.Facility": [ "Must be one of 'local0', 'local1', 'local2', 'local3', 'local4', 'local5', 'local6' or 'local7'" ], "SNMP": [ "Must be set" ], "SNMP.Host": [ "Must not be blank (if SNMP.Enabled is true)" ], "SNMP.Version": [ "Must be one of '1' or '2c'" ], "SNMP.Community": [ "Must not be blank (if SNMP.Enabled is true)" ] } } } } } }, "parameters": [] } }, "/settings/network": { "get": { "summary": "Get network settings", "tags": [ "Settings/Network" ], "operationId": "get_network_settings", "description": "Get network settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1network/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set network settings", "tags": [ "Settings/Network" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_network_settings", "description": "Update network settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Network settings", "type": "object", "description": "Network settings model", "properties": { "Interfaces": { "description": "List of interface settings", "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "System name of the interface, used to identify the interface when updating settings", "example": "eth0" }, "UseDHCP": { "type": "boolean", "description": "Whether to use DHCP for configuring this interface", "default": false, "example": true }, "Address": { "type": "string", "description": "IP address for the interface or address set via DHCP", "default": "192.168.1.1" }, "Mask": { "type": "string", "description": "Subnet mask for this interface", "default": "255.255.255.0" }, "SpeedDuplex": { "type": "object", "description": "Network speed and duplex mode of the interface. Required if Autonegotiation is disabled", "properties": { "Speed": { "type": "string", "description": "Network interface speed", "example": "1000Mb/s" }, "Duplex": { "type": "string", "description": "Network interface duplex mode", "example": "Full Duplex" } }, "required": [ "Speed", "Duplex" ] }, "AutoNegotiation": { "type": "boolean", "description": "If enabled speed and duplex mode of the network interface will be auto-negotiated and SpeedDuplex field ignored", "default": false, "example": true }, "SupportedSpeeds": { "type": "array", "description": "List of supported network speeds and duplex modes", "readOnly": true, "items": { "type": "object", "properties": { "Speed": { "type": "string", "description": "Network interface speed", "example": "1000Mb/s" }, "Duplex": { "type": "string", "description": "Network interface duplex mode", "example": "Full Duplex" } } } }, "IPV6Init": { "type": "boolean", "description": "If enabled, the network will support IPv6", "default": false, "example": true }, "IPV6Autoconf": { "type": "boolean", "description": "If enabled, when saving the network settings, the IPv6 configuration will be automatically resolved", "default": false, "example": true }, "DHCPV6": { "type": "boolean", "description": "Whether to use DHCPv6 for configuring this interface", "default": false, "example": true }, "IPV6Address": { "type": "string", "description": "IPv6 address for the interface", "example": "2001:db8::250:56ff:febd:a472/64" }, "IPV6DefaultGateway": { "type": "string", "description": "IPv6 default gateway for the interface", "example": "2001:db8::250:56ff:febd:a472" } }, "required": [ "Name", "Address", "Mask" ] } }, "Gateway": { "type": "string", "description": "Gateway address", "example": "192.168.1.254" }, "DNS1": { "type": "string", "description": "Address of the primary DNS server", "example": "192.168.1.252" }, "DNS2": { "type": "string", "description": "Address of the secondary DNS server", "example": "192.168.1.253" }, "DNS3": { "type": "string", "description": "Address of the IPv6 DNS server", "example": "2001:db8::250:56ff:febd:a472" }, "DomainName": { "type": "string", "description": "Domain name to use for name resolution", "example": "corp.example.com" }, "Proxy": { "type": "object", "description": "Skylar Compliance needs Internet access (HTTP/HTTPS) in order to retrieve software and plugin updates", "properties": { "Enabled": { "type": "boolean", "description": "Set to `true` to connect via proxy", "default": false }, "Address": { "type": "string", "description": "IP address of the proxy server", "example": "192.168.1.251" }, "Port": { "type": "integer", "description": "Port number of the proxy server", "default": 8080 }, "Username": { "type": "string", "description": "Optional username for authenticating proxy requests", "example": "afox" }, "Password": { "type": "string", "description": "Optional password for authenticating proxy requests", "example": "Sunbreeze123" } } }, "NatAddress": { "type": "string", "description": "The system-wide NAT IP address defined here can be overridden in the [Domain](#tag/Domain) settings, or in each\nindividual [Device's](#tag/Device) settings\n", "example": "198.51.100.123" }, "ScpThrottle": { "type": "integer", "description": "Limit the network bandwidth for SCP/SFTP to this field's value in kbps (`0` meaning no throttling)", "default": 0 } }, "required": [ "Interfaces", "Gateway", "DNS1", "DomainName", "Proxy" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1network/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Interfaces": [ "Must not be blank" ], "Interfaces[0].Name": [ "Must not be blank" ], "Interfaces[0].UseDHCP": [ "Must bet set" ], "Interfaces[0].Address": [ "IP '256.256.256.256' is not a valid IP address" ], "Interfaces[0].Mask": [ "Mask '256.256.256.256' is not a valid network mask" ], "Interfaces[0].SpeedDuplex.Speed": [ "Must not be blank" ], "Interfaces[0].SpeedDuplex.Duplex": [ "Must not be blank" ], "Gateway": [ "Must not be blank", "IP '256.256.256.256' is not a valid IP address" ], "DNS1": [ "Must not be blank" ], "DomainName": [ "Must not be blank" ], "Proxy": [ "Must be set" ], "Proxy.Enabled": [ "Must be set" ], "Proxy.Address": [ "Must not be blank (if Enabled is true)" ], "NatAddress": [ "IP '256.256.256.256' is not a valid IP address" ], "ScpThrottle": [ "Must be a positive number" ] } } } } } }, "parameters": [] } }, "/settings/network/routes": { "get": { "summary": "List routes", "tags": [ "Settings/Network" ], "operationId": "get_routes", "description": "Get additional static routes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "description": "List of additional static routes", "items": { "type": "object", "properties": { "Network": { "type": "string", "description": "Network address/netmask in\n[CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)\n", "example": "10.0.0.0/8" }, "Gateway": { "type": "string", "description": "Gateway address", "example": "127.0.0.2" } }, "required": [ "Network", "Gateway" ] } } } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "post": { "summary": "Add route", "tags": [ "Settings/Network" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "add_route", "description": "Add a static route", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Network": { "type": "string", "description": "Network address/netmask in\n[CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)\n", "example": "10.0.0.0/8" }, "Gateway": { "type": "string", "description": "Gateway address", "example": "127.0.0.2" } }, "required": [ "Network", "Gateway" ] } } } }, "responses": { "204": { "description": "Route added" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Network": [ "Must not be blank", "Range '255.255.255.255/255' is not a valid network range in CIDR notatation" ], "Gateway": [ "Must not be blank", "IP '256.256.256.256' is not a valid IP address" ] } } } } } }, "parameters": [] }, "delete": { "summary": "Delete route", "tags": [ "Settings/Network" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "delete_route", "description": "Delete a static route", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Network": { "type": "string", "description": "Network address/netmask in\n[CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)\n", "example": "10.0.0.0/8" } }, "required": [ "Network" ] } } } }, "responses": { "204": { "description": "Route deleted" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Network": [ "Must not be blank", "Range '255.255.255.255/255' is not a valid network range in CIDR notatation", "Network '1.1.1.1/1' does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to remove route '1.1.1.1/1'" } } } } }, "parameters": [] } }, "/settings/passwords": { "get": { "summary": "Get password settings", "tags": [ "Settings/Passwords" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewPassrules" ] } ], "operationId": "get_password_settings", "description": "Get password settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1passwords/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set password settings", "tags": [ "Settings/Passwords" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyPassrules" ] } ], "operationId": "update_password_settings", "description": "Update password settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Password settings", "type": "object", "description": "Password settings model", "properties": { "DevicePasswords": { "description": "Device password settings", "type": "object", "properties": { "MinimumLength": { "type": "integer", "description": "Minimum number of characters for a password to be accepted", "default": 8, "example": 8 }, "GoodLength": { "type": "integer", "description": "Recommended number of characters to be considered _good_", "default": 14, "example": 14 }, "RejectCommonPasswords": { "type": "boolean", "description": "Password cannot be simple to guess, such as `1234` or `password`", "default": true }, "RejectDictionaryWords": { "type": "boolean", "description": "Password cannot be a dictionary word, such as `backup` or `admin`", "default": true }, "MustMixCase": { "type": "boolean", "description": "Passwords must contain a mixture of lower and upper case letters", "default": true }, "MustIncludeNumbers": { "type": "boolean", "description": "Passwords must contain numbers as well as letters", "default": true }, "MustIncludeSymbols": { "type": "boolean", "description": "Passwords must contain non-alphanumeric symbols, such as `$` or `^`", "default": true } }, "required": [ "MinimumLength", "GoodLength", "RejectCommonPasswords", "RejectDictionaryWords", "MustMixCase", "MustIncludeNumbers", "MustIncludeSymbols" ] }, "UserPasswords": { "description": "User password settings", "type": "object", "properties": { "MinimumLength": { "type": "integer", "description": "Minimum number of characters for a password to be accepted", "default": 8, "example": 8 }, "GoodLength": { "type": "integer", "description": "Recommended number of characters to be considered _good_", "default": 14, "example": 14 }, "RejectCommonPasswords": { "type": "boolean", "description": "Password cannot be simple to guess, such as `1234` or `password`", "default": true }, "RejectDictionaryWords": { "type": "boolean", "description": "Password cannot be a dictionary word, such as `backup` or `admin`", "default": true }, "MustMixCase": { "type": "boolean", "description": "Passwords must contain a mixture of lower and upper case letters", "default": true }, "MustIncludeNumbers": { "type": "boolean", "description": "Passwords must contain numbers as well as letters", "default": true }, "MustIncludeSymbols": { "type": "boolean", "description": "Passwords must contain non-alphanumeric symbols, such as `$` or `^`", "default": true }, "Expiration": { "type": "integer", "description": "Number of days after which user passwords expire, `-1` for never", "default": 183 } }, "required": [ "MinimumLength", "GoodLength", "RejectCommonPasswords", "RejectDictionaryWords", "MustMixCase", "MustIncludeNumbers", "MustIncludeSymbols", "Expiration" ] } }, "required": [ "DevicePasswords", "UserPasswords" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1passwords/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DevicePasswords": [ "Must be set" ], "DevicePasswords.MinimumLength": [ "Must be a positive number" ], "DevicePasswords.GoodLength": [ "Must be a positive number" ], "UserPasswords": [ "Must be set" ], "UserPasswords.MinimumLength": [ "Must be a positive number" ], "UserPasswords.GoodLength": [ "Must be a positive number" ] } } } } } }, "parameters": [] } }, "/settings/publickeys": { "get": { "summary": "List public keys", "tags": [ "Settings/PublicKey" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewDevices" ] } ], "operationId": "list_publickeys", "description": "Retrieve all public keys", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "PublicKey", "type": "object", "description": "Public key model", "properties": { "RSA": { "description": "RSA publick key", "type": "string", "example": "ssh-rsa AAAA ... O+4w== root@rp" }, "DSA": { "description": "DSA publick key", "type": "string", "deprecated": true, "example": "ssh-dss AAAA ... 5O4= root@rp" } } } } } } } } }, "/settings/security": { "get": { "summary": "Get security settings", "tags": [ "Settings/Security" ], "operationId": "get_security_settings", "description": "Get security settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1security/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set security settings", "tags": [ "Settings/Security" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_security_settings", "description": "Update security settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Security settings", "type": "object", "description": "Security settings model", "properties": { "TLS": { "description": "TLS security settings", "type": "object", "properties": { "ClientVersion": { "type": "integer", "description": "Minimum TLS version for client connections. `769` - TLS 1.0, `770` - TLS 1.1, `771` - TLS 1.2, `772` - TLS 1.3\n", "default": 769, "minimum": 769, "maximum": 772 }, "RestorepointVersion": { "type": "integer", "description": "Minimum TLS version for Skylar Compliance itself for both the UI and API. `769` - TLS 1.0, `770` - TLS 1.1,\n`771` - TLS 1.2, `772` - TLS 1.3\n", "default": 769, "minimum": 769, "maximum": 772 }, "EnableRSA": { "type": "boolean", "description": "Enable Non-ECC Ciphers", "default": false }, "EnableCBC": { "type": "boolean", "description": "Enable CBC Ciphers", "default": false }, "EnableRC4": { "type": "boolean", "description": "Enable ARCFOUR Ciphers", "default": false }, "Enable3DES": { "type": "boolean", "description": "Enable 3DES Ciphers", "default": false } }, "required": [ "ClientVersion", "RestorepointVersion", "EnableRSA", "EnableCBC", "EnableRC4", "Enable3DES" ] }, "Timeouts": { "description": "Timeout settings", "type": "object", "properties": { "UserInterface": { "type": "integer", "description": "Session timeout for the Skylar Compliance UI in minutes", "default": 10 }, "Console": { "type": "integer", "description": "Timeout for the Skylar Compliance console in minutes", "default": 15 } }, "required": [ "UserInterface", "Console" ] }, "Services": { "description": "Service security settings", "type": "object", "properties": { "EnableHTTP": { "type": "boolean", "description": "Allow inbound HTTP requests", "default": true }, "EnableFTP": { "type": "boolean", "description": "Allow inbound FTP requests", "default": true }, "EnableTFTP": { "type": "boolean", "description": "Allow inbound TFTP requests", "default": true } }, "required": [ "EnableHTTP", "EnableFTP", "EnableTFTP" ] }, "AllowedNetworks": { "type": "array", "description": "List of network masks admin users are allowed to connect from", "default": [], "items": { "type": "string" }, "example": [ "192.168.1.0/24", "192.168.2.0/24", "192.168.3.0/24" ] }, "MaxLoginAttemptsPerMinute": { "type": "integer", "description": "Limit on the amount of login attempts that can be made from the same IP address. 0 means no limit will be applied", "default": 0 }, "SSH": { "type": "object", "description": "SSH ciphers, MACs and key exchange algorithms for clients and servers, as well as additional SSH port", "properties": { "Available": { "type": "object", "description": "Lists of available SSH ciphers, MACs and key exchange algorithms. This is generated by the system\n", "readOnly": true, "properties": { "Ciphers": { "type": "array", "description": "List of available SSH ciphers", "items": { "type": "string" }, "example": [ "3des-cbc", "aes128-cbc", "aes192-cbc", "aes256-cbc", "rijndael-cbc@lysator.liu.se", "aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "aes256-gcm@openssh.com", "chacha20-poly1305@openssh.com" ] }, "MACs": { "type": "array", "description": "List of available SSH message authentication code algorithms", "items": { "type": "string" }, "example": [ "hmac-sha1", "hmac-sha1-96", "hmac-sha2-256", "hmac-sha2-512", "hmac-md5", "hmac-md5-96", "umac-64@openssh.com", "umac-128@openssh.com", "hmac-sha1-etm@openssh.com", "hmac-sha1-96-etm@openssh.com", "hmac-sha2-256-etm@openssh.com", "hmac-sha2-512-etm@openssh.com", "hmac-md5-etm@openssh.com", "hmac-md5-96-etm@openssh.com", "umac-64-etm@openssh.com", "umac-128-etm@openssh.com" ] }, "KexAlgorithms": { "type": "array", "description": "List of available SSH key exchange algorithms", "items": { "type": "string" }, "example": [ "diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group14-sha256", "diffie-hellman-group16-sha512", "diffie-hellman-group18-sha512", "diffie-hellman-group-exchange-sha1", "diffie-hellman-group-exchange-sha256", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "curve25519-sha256", "curve25519-sha256@libssh.org", "sntrup4591761x25519-sha512@tinyssh.org" ] } } }, "Client": { "type": "object", "description": "SSH client ciphers, MACs and key exchange algorithms", "properties": { "Ciphers": { "type": "array", "description": "List of SSH client ciphers to enable", "items": { "type": "string" }, "example": [ "3des-cbc", "aes128-cbc", "aes192-cbc", "aes256-cbc", "rijndael-cbc@lysator.liu.se", "aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "aes256-gcm@openssh.com", "chacha20-poly1305@openssh.com" ] }, "MACs": { "type": "array", "description": "List of SSH client message authentication code algorithms to enable", "items": { "type": "string" }, "example": [ "hmac-sha1", "hmac-sha1-96", "hmac-sha2-256", "hmac-sha2-512", "hmac-md5", "hmac-md5-96", "umac-64@openssh.com", "umac-128@openssh.com", "hmac-sha1-etm@openssh.com", "hmac-sha1-96-etm@openssh.com", "hmac-sha2-256-etm@openssh.com", "hmac-sha2-512-etm@openssh.com", "hmac-md5-etm@openssh.com", "hmac-md5-96-etm@openssh.com", "umac-64-etm@openssh.com", "umac-128-etm@openssh.com" ] }, "KexAlgorithms": { "type": "array", "description": "List of SSH client key exchange algorithms to enable", "items": { "type": "string" }, "example": [ "diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group14-sha256", "diffie-hellman-group16-sha512", "diffie-hellman-group18-sha512", "diffie-hellman-group-exchange-sha1", "diffie-hellman-group-exchange-sha256", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "curve25519-sha256", "curve25519-sha256@libssh.org", "sntrup4591761x25519-sha512@tinyssh.org" ] }, "DisableStrictHostKeyChecking": { "type": "boolean", "description": "Disables the ssh host key check and logs if the key changed", "example": [ true ] } }, "required": [ "Ciphers", "MACs", "KexAlgorithms" ] }, "Server": { "type": "object", "description": "SSH server ciphers, MACs and key exchange algorithms", "properties": { "Ciphers": { "type": "array", "description": "List of SSH server ciphers to enable", "items": { "type": "string" }, "example": [ "chacha20-poly1305@openssh.com", "aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", "aes256-gcm@openssh.com" ] }, "MACs": { "type": "array", "description": "List of SSH server message authentication code algorithms to enable", "items": { "type": "string" }, "example": [ "umac-64-etm@openssh.com", "umac-128-etm@openssh.com", "hmac-sha2-256-etm@openssh.com", "hmac-sha2-512-etm@openssh.com", "hmac-sha1-etm@openssh.com", "umac-64@openssh.com", "umac-128@openssh.com", "hmac-sha2-256", "hmac-sha2-512", "hmac-sha1" ] }, "KexAlgorithms": { "type": "array", "description": "List of SSH server key exchange algorithms to enable", "items": { "type": "string" }, "example": [ "curve25519-sha256", "curve25519-sha256@libssh.org", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "diffie-hellman-group-exchange-sha256", "diffie-hellman-group16-sha512", "diffie-hellman-group18-sha512", "diffie-hellman-group14-sha256", "diffie-hellman-group14-sha1" ] }, "AdditionalPort": { "type": "integer", "description": "Additional SSH server port", "minimum": 1024, "maximum": 65535, "example": 2022 } }, "required": [ "Ciphers", "MACs", "KexAlgorithms" ] }, "Keys": { "type": "object", "description": "SSH keys to upload", "properties": { "RSA": { "type": "object", "description": "RSA key", "properties": { "Public": { "type": "string", "description": "RSA public key", "example": "ssh-rsa AAAAfoo...bar" }, "Private": { "type": "string", "description": "RSA private key" } }, "required": [ "Public", "Private" ] }, "DSA": { "type": "object", "description": "DSA key", "properties": { "Public": { "type": "string", "description": "DSA public key", "example": "ssh-dss AAAAfoo...bar" }, "Private": { "type": "string", "description": "DSA private key" } }, "required": [ "Public", "Private" ] } } } }, "required": [ "Client", "Server" ] }, "Request": { "description": "Files security settings", "type": "object", "properties": { "MaxBodySize": { "type": "integer", "description": "Maximum allowed body size for requests (in MB)", "default": 5 }, "MaxFileSize": { "type": "integer", "description": "Maximum allowed file size for requests (in MB)", "default": 100 } } } }, "required": [ "TLS", "Timeouts", "Services", "SSH" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1security/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "TLS": [ "Must be set" ], "TLS.ClientVersion": [ "Must be one of 769, 770, 771 or 772" ], "TLS.RestorepointVersion": [ "Must be one of 769, 770, 771 or 772" ], "Timeouts": [ "Must be set" ], "Timeouts.UserInterface": [ "Must be a positive number" ], "Timeouts.Console": [ "Must be a positive number" ], "AllowedNetworks[0]": [ "Range '255.255.255.255/255' is not a valid network range in CIDR notatation" ], "SSH": [ "Must be set" ], "SSH.Client": [ "Must be set" ], "SSH.Client.Ciphers": [ "Must not be blank" ], "SSH.Client.Ciphers[0]": [ "Value 'foo' is not an available cipher" ], "SSH.Client.MACs": [ "Must not be blank" ], "SSH.Client.MACs[0]": [ "Value 'bar' is not an available message authentication code algorithm" ], "SSH.Client.KexAlgorithms": [ "Must not be blank" ], "SSH.Client.KexAlgorithms[0]": [ "Value 'baz' is not an available key exchange algorithm" ], "SSH.Server": [ "Must be set" ], "SSH.Server.Ciphers": [ "Must not be blank" ], "SSH.Server.Ciphers[0]": [ "Value 'foo' is not an available cipher" ], "SSH.Server.MACs": [ "Must not be blank" ], "SSH.Server.MACs[0]": [ "Value 'bar' is not an available message authentication code algorithm" ], "SSH.Server.KexAlgorithms": [ "Must not be blank" ], "SSH.Server.KexAlgorithms[0]": [ "Value 'baz' is not an available key exchange algorithm" ], "SSH.Server.AdditionalPort": [ "Value '42' is not an allowed port value, must be outside of system ports range (bigger than 1023)" ] } } } } } }, "parameters": [] } }, "/settings/security/csr": { "get": { "summary": "Get TLS CSR", "tags": [ "Settings/Security/CSR" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewSysAdmin" ] } ], "operationId": "get_tls_csr", "description": "Get TLS CSR", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Security TSL CSR", "type": "object", "description": "TSL Certificate Signing Request", "properties": { "Content": { "description": "Encoded raw content of the certificate request", "type": "string", "example": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC9zCCAd..." } }, "required": [ "Content" ] } } } }, "500": { "description": "Unable to retrieve TLS CSR", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to retrieve TLS CSR" } } } } }, "parameters": [] }, "post": { "summary": "Generate a TLS CSR", "tags": [ "Settings/Security/CSR" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "post_tls_csr", "description": "Generate a TLS CSR (Certificate Signing Request)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Security TLS certificates settings", "type": "object", "description": "Security TLS certificate settings model", "properties": { "Country": { "description": "Country code of the issuer (C)", "type": "string", "example": "GB" }, "CommonName": { "description": "Common name of the issuer (CN)", "type": "string", "example": "Skylar Compliance Ltd" }, "Organization": { "description": "Organization name of the issuer (O)", "type": "string", "example": "Skylar Compliance Ltd" }, "OrganizationalUnit": { "description": "Organizational unit of the issuer (OU)", "type": "string", "example": "Engineering" }, "State": { "description": "State of the issuer (ST)", "type": "string", "example": "Surrey" }, "Locality": { "description": "Locality of the issuer (L)", "type": "string", "example": "Woking" }, "EmailAddress": { "description": "Email address of the issuer", "type": "string", "example": "support@skylarcompliance.com" }, "EmailAddresses": { "description": "List of subject email addresses", "type": "array", "items": { "type": "string" }, "example": [ "support@skylarcompliance.com" ] }, "IPAddresses": { "description": "List of subject IP addresses", "type": "array", "items": { "type": "string" }, "example": [ "192.168.1.1" ] }, "DNSNames": { "description": "List of subject DNS names", "type": "array", "items": { "type": "string" }, "example": [ "skylarcompliance.com" ] }, "Certificate": { "description": "Current certificate in use or generated CSR", "type": "string", "readOnly": true }, "KeyLength": { "description": "RSA key length", "type": "integer", "minimum": 2048, "default": 2048, "writeOnly": true } }, "required": [ "Country", "CommonName", "Organization", "OrganizationalUnit", "State", "Locality", "EmailAddress" ] } } } }, "responses": { "201": { "description": "TLS CSR generated", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1security~1csr/get/responses/200/content/application~1json/schema" } } } }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Country": [ "Must not be blank" ], "CommonName": [ "Must not be blank" ], "Organization": [ "Must not be blank" ], "OrganizationalUnit": [ "Must not be blank" ], "State": [ "Must not be blank" ], "Locality": [ "Must not be blank" ], "EmailAddress": [ "Must not be blank", "Value 'foo' is not a valid email address" ], "EmailAddresses[0]": [ "Value 'foo' is not a valid email address" ], "IPAddresses[0]": [ "Value 'foo' is not a valid IP address" ], "KeyLength": [ "Must be equal or higher than 2048" ] } } } } }, "500": { "description": "Unable to create new CSR", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to create new CSR" } } } } } } }, "/settings/security/reset-ssh-keys": { "post": { "summary": "Reset SSH Keys", "tags": [ "Settings/Security" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "reset_ssh_keys", "description": "Reset SSH Keys", "responses": { "204": { "description": "SSH keys regenerated" }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/settings/security/ssh/knownhosts": { "delete": { "summary": "Clear Appliance SSH known hosts file", "tags": [ "Settings/Security/SSH" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "description": "Clears the appliance SSH known hosts file.", "operationId": "clear_appliance_ssh_known_hosts", "responses": { "204": { "description": "Appliance SSH known hosts file cleared successfully" } } } }, "/settings/security/tls": { "get": { "summary": "Get TLS certificate details", "tags": [ "Settings/Security/TLS" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewSysAdmin" ] } ], "operationId": "get_tls_certificate", "description": "Get TLS certificate", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1security~1csr/post/requestBody/content/application~1json/schema" } } } }, "500": { "description": "Unable to retrieve TLS certificate details", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to retrieve TLS certificate details" } } } } }, "parameters": [] }, "post": { "summary": "Generate a key and create a self-signed certificate", "tags": [ "Settings/Security/TLS" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "post_tls_certificate", "description": "Create a self-signed certificate", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1security~1csr/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "TLS Certificate and key generated", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1security~1csr/post/requestBody/content/application~1json/schema" } } } }, "204": { "description": "Self-signed TLS certificate created and new key generated, application will restart" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Country": [ "Must not be blank" ], "CommonName": [ "Must not be blank" ], "Organization": [ "Must not be blank" ], "OrganizationalUnit": [ "Must not be blank" ], "State": [ "Must not be blank" ], "Locality": [ "Must not be blank" ], "EmailAddress": [ "Must not be blank", "Value 'foo' is not a valid email address" ], "EmailAddresses[0]": [ "Value 'foo' is not a valid email address" ], "IPAddresses[0]": [ "Value 'foo' is not a valid IP address" ], "KeyLength": [ "Must be equal or higher than 2048" ] } } } } }, "500": { "description": "Unable to create new certificate", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to create new certificate" } } } } } }, "put": { "summary": "Replace certificate and key", "tags": [ "Settings/Security/TLS" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "put_tls_certificate", "description": "Replace TLS certificate and key", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "TLS certificate and key", "type": "object", "description": "Security TLS certificate and key model", "properties": { "Certificate": { "description": "TLS Certificate", "type": "string" }, "Key": { "description": "RSA Key", "type": "string" } }, "required": [ "Certificate", "Key" ] } } } }, "responses": { "204": { "description": "TLS certificate and key replaced, application will restart" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Certificate": [ "Must not be blank" ], "Key": [ "Must not be blank" ] } } } } }, "500": { "description": "Unable to replace certificate and key", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to replace certificate and key" } } } } } } }, "/settings/security/tls/certificate": { "put": { "summary": "Replace certificate", "tags": [ "Settings/Security/TLS" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "put_tls_standalone_certificate", "description": "Replace TLS certificate", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "TLS certificate", "type": "object", "description": "Security TLS certificate", "properties": { "Certificate": { "description": "TLS Certificate", "type": "string" } }, "required": [ "Certificate" ] } } } }, "responses": { "204": { "description": "TLS certificate replaced, application will restart" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Certificate": [ "Must not be blank" ] } } } } }, "500": { "description": "Unable to replace certificate", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to replace certificate" } } } } } } }, "/settings/security/tls/newkey": { "post": { "summary": "Generate new RSA key", "tags": [ "Settings/Security/TLS" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "post_tls_new_key", "description": "Generate new RSA key", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "TLS key", "type": "object", "description": "Security TLS key", "properties": { "KeyLength": { "description": "TLS key lenght", "type": "integer" } }, "required": [ "KeyLength" ] } } } }, "responses": { "204": { "description": "TLS key generated" }, "400": { "description": "Bad request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "KeyLength": [ "Must be equal or higher than 2048" ] } } } } }, "500": { "description": "Unable to generate key", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Unable to generate key" } } } } } } }, "/settings/snmp": { "get": { "summary": "Get SNMP settings", "tags": [ "Settings/SNMP" ], "operationId": "get_snmp_settings", "description": "Get SNMP settings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1snmp/put/requestBody/content/application~1json/schema" } } } } } }, "put": { "summary": "Set SNMP settings", "tags": [ "Settings/SNMP" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "UpdateSysadmin" ] } ], "operationId": "update_snmp_settings", "description": "Update SNMP settings", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "SNMP settings", "type": "object", "description": "SNMP settings model", "properties": { "SNMPv1": { "type": "boolean", "description": "Enable SNMP v1", "default": true }, "SNMPv2c": { "type": "boolean", "description": "Enable SNMP v2c", "default": true }, "SNMPv3": { "type": "boolean", "description": "Enable SNMP v3", "default": false }, "Contact": { "type": "string", "description": "SNMP [System contact](https://docstore.mik.ua/orelly/networking_2ndEd/snmp/ch07_01.htm) `system.sysContact.0`\n", "example": "Skylar Compliance " }, "Name": { "type": "string", "description": "SNMP [System name](https://docstore.mik.ua/orelly/networking_2ndEd/snmp/ch07_01.htm) `system.sysName.0`\n", "example": "Skylar Compliance Appliance" }, "Location": { "type": "string", "description": "SNMP [System location](https://docstore.mik.ua/orelly/networking_2ndEd/snmp/ch07_01.htm) `system.sysLocation.0`\n", "example": "vsphere.example.com" }, "Community": { "type": "string", "description": "If SNMP v1 or v2c are enabled a community string must be set", "default": "public" }, "Username": { "type": "string", "description": "If SNMP v3 is enabled, you have to set a username string", "example": "afox" }, "SecurityLevel": { "type": "string", "description": "When using SNMPv3, you can set the security level. `noAuthNoPriv` authenticates with a username without\nencryption. `authNoPriv` uses HMAC MD5 or SHA algorithms for authentication, `authPriv` uses HMAC MD5 or\nSHA algorithms for authentication and DES 56-bit encryption in addition to authentication based on the\nCBC-DES (DES-56) standard\n", "enum": [ "noAuthNoPriv", "authNoPriv", "authPriv" ], "example": "authPriv" }, "AuthenticationProtocol": { "type": "string", "description": "Authentication protocol for SNMPv3 with SecurityLevel set to `authNoPriv` or `authPriv`", "enum": [ "MD5", "SHA1" ] }, "AuthenticationPassword": { "type": "string", "description": "Password to send for SNMPv3 with SecurityLevel set to `authNoPriv` or `authPriv`", "example": "Sunbreeze123" }, "PrivProtocol": { "type": "string", "description": "Priv protocol to use for SNMPv3 and SecurityLevel set to `authPriv`", "enum": [ "AES", "DES" ], "example": "AES" }, "PrivPassword": { "type": "string", "description": "Priv password to use for SNMPv3 and SecurityLevel set to `authPriv`", "example": "Sunbreeze123" } }, "required": [ "Contact", "Name", "Location" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1settings~1snmp/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "SNMPv1": [ "Must be set" ], "SNMPv2c": [ "Must be set" ], "SNMPv3": [ "Must be set" ], "Contact": [ "Must not be blank" ], "Name": [ "Must not be blank" ], "Location": [ "Must not be blank" ], "Community": [ "Must not be blank (if SNMPv1 or SNMPv2c are true)" ], "Username": [ "Must not be blank (if SNMPv3 is true)" ], "SecurityLevel": [ "Must be set (if SNMPv3 is true)", "Must be one of 'noAuthNoPriv', 'authNoPriv' or 'authPriv'" ], "AuthenticationProtocol": [ "Must be set (if SNMPv3 is true and SecurityLevel is 'authPriv' or 'authNoPriv')", "Must be one of 'MD5' or 'SHA1'" ], "AuthenticationPassword": [ "Must be set (if SNMPv3 is true and SecurityLevel is 'authPriv' or 'authNoPriv')" ], "PrivProtocol": [ "Must be set (if SNMPv3 is true and SecurityLevel is 'authPriv')", "Must be one of 'AES' or 'DES'" ], "PrivPassword": [ "Must be set (if SNMPv3 is true and SecurityLevel is 'authPriv')" ] } } } } } }, "parameters": [] } }, "/status": { "get": { "summary": "System status", "tags": [ "Status" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Status", "type": "object", "description": "Status model", "properties": { "Appliance": { "type": "object", "description": "Appliance related information", "properties": { "Expiration": { "type": "string", "description": "Date when Skylar Compliance's license will expire", "example": "Feb 22 2022" }, "Version": { "type": "string", "description": "Current version of Skylar Compliance", "example": "5.4" }, "Build": { "type": "string", "description": "Current build number of the Skylar Compliance version", "example": "20220222" }, "Serial": { "type": "string", "description": "Serial number", "example": "RP12345678" }, "MaxDevices": { "type": "integer", "description": "Maximum number of devices that may exist, given the user's domain and license restrictions", "example": 500 } } }, "Storage": { "type": "object", "description": "Disk usage (all values in bytes)", "properties": { "Total": { "type": "integer", "description": "Total storage capacity", "example": 1234567890 }, "Used": { "type": "integer", "description": "Storage used", "example": 123456789 }, "Available": { "type": "integer", "description": "Storage available", "example": 1111111101 }, "Backup": { "type": "integer", "description": "Size of all backups", "example": 12345678 }, "Index": { "type": "integer", "description": "Size of Skylar Compliance's indices", "example": 123456 }, "Cache": { "type": "integer", "description": "Size of Skylar Compliance's cache", "example": 1234567 }, "Debug": { "type": "integer", "description": "Size of the debug log (if it exists)", "example": 123456 }, "Other": { "type": "integer", "description": "Size of all the other files apart from backups, indices, cache and debug log", "example": 123456 }, "CalculatingBackups": { "type": "boolean", "description": "Flag indicating if the backup data size calculation is in progress", "example": true } } }, "System": { "type": "object", "description": "Operating system meta data", "properties": { "Release": { "type": "string", "description": "Current operating system release", "example": "centos-release-8.2-2.2004.0.2.el8.x86_64" }, "Uptime": { "type": "integer", "description": "Time since the appliance was last started in seconds", "example": 123456 }, "Load": { "type": "array", "description": "1, 5, and 15 minute load averages as reported by [uptime](https://linux.die.net/man/1/uptime)", "items": { "type": "number", "format": "float" }, "example": [ 0.005859375, 0.00390625, 0 ] }, "FilesOpen": { "type": "integer", "description": "Number of currently open files as reported by [lsof](https://linux.die.net/man/8/lsof)", "example": 123 }, "Processes": { "type": "integer", "description": "Number of currently running processes", "example": 123 }, "LocalIP": { "type": "string", "description": "Current IP address", "example": "198.51.100.1" }, "Memory": { "type": "object", "description": "Memory statistics in bytes", "properties": { "Total": { "type": "integer", "description": "Total available system memory", "example": 1234567890 }, "Used": { "type": "integer", "description": "Memory used", "example": 123456789 }, "Available": { "type": "integer", "description": "Memory free", "example": 123345678 }, "Swap": { "type": "integer", "description": "Current swap space usage", "example": 1234567 } } } } } } } } } } }, "operationId": "system_status", "description": "Retrieve system status information" } }, "/status/ping": { "get": { "summary": "Check if the backend is ready to accept requests", "tags": [ "Status/Ping" ], "security": [ { "Cookie": [] } ], "operationId": "system_status_ping", "description": "Check the current status of the server\n", "responses": { "204": { "description": "OK" }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "402": { "description": "Payment Required", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "503": { "description": "Service Unavailable", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } } }, "/syslogs": { "get": { "summary": "List syslog entries. If no sort param is passed, syslogs will be ordered by 'Created', in a descending method", "tags": [ "Syslog" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewSyslogs" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "source": { "description": "List of syslog sources used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "1.1.1.1" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "2.2.2.2" ] } } }, "created_after": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "created_before": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2023-01-02T15:04:05.999Z" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "title": "Syslog", "type": "object", "description": "Syslog model", "properties": { "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format", "example": "2222-02-22T22:22:22.000Z" }, "Process": { "type": "string", "description": "Process name and process ID", "example": "run-parts(/etc/cron.hourly)[10678]" }, "Message": { "type": "string", "description": "Status or error message associated with the event", "example": "starting 0anacron" }, "Level": { "type": "string", "description": "Syslog level corresponding to [severity levels](https://en.wikipedia.org/wiki/Syslog#Severity_level) 1 - 6\n", "example": "Info", "enum": [ "Alert", "Critical", "Error", "Warning", "Notice", "Info" ] }, "Facility": { "type": "integer", "description": "Numerical [Syslog Facility](https://en.wikipedia.org/wiki/Syslog#Facility)", "example": 1 }, "Source": { "type": "string", "description": "IP Address associated with the event, or `localhost`.", "example": "localhost" } } } } }, "required": [ "limit", "offset" ] } } } } }, "operationId": "list_syslogs", "description": "Retrieve all syslogs", "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1logs/get/parameters/7" }, { "$ref": "#/paths/~1logs/get/parameters/8" }, { "in": "query", "name": "source[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of sources to limit the log output to.", "example": [ "1.1.1.1" ] }, { "in": "query", "name": "not[source][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of sources to exclude from the returned log\nentries.\n", "example": [ "2.2.2.2" ] } ] } }, "/tableviews": { "get": { "summary": "List table views", "tags": [ "Table view" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "list_table_views", "description": "List table views", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "in": "query", "name": "table_name", "schema": { "type": "string" }, "description": "Name of the table for which the table views are requested" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "List table views response body", "description": "Schema of a response body for listing table views", "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "total": { "description": "The total number of table views returned", "type": "integer" }, "data": { "description": "The returned table views", "type": "array", "items": { "$ref": "#/paths/~1tableviews/post/responses/201/content/application~1json/schema" } } }, "required": [ "fields", "total", "data" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "post": { "summary": "Create a table view", "tags": [ "Table view" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "create_table_view", "description": "Create a table view", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Create table view request body", "description": "Schema of a request body for creating a table view", "type": "object", "properties": { "TableName": { "description": "Name of the table the table view refers to", "type": "string", "example": "devices" }, "ViewName": { "description": "Name of the table view", "type": "string", "example": "My view" }, "Columns": { "description": "Columns to show in specific order", "type": "array", "items": { "type": "string", "example": "Name" } }, "SortColumn": { "description": "Name of the column to sort by", "type": "string", "example": "Name" }, "SortOrder": { "description": "Sort order, ascending or descending", "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "Filter": { "description": "Filter params", "type": "object" } }, "required": [ "TableName", "ViewName" ] } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "title": "Persisted table view", "description": "Schema of a persisted table view", "type": "object", "properties": { "ID": { "description": "ID of the table view", "type": "integer", "example": 123 }, "UserID": { "type": "integer", "description": "ID of the [user](#tag/User) the table view belongs to", "example": 123 }, "TableName": { "description": "Name of the table the table view refers to", "type": "string", "example": "devices" }, "ViewName": { "description": "Name of the table view", "type": "string", "example": "My view" }, "Columns": { "description": "Columns to show in specific order", "type": "array", "items": { "type": "string", "example": "Name" } }, "SortColumn": { "description": "Name of the column to sort by", "type": "string", "example": "Name" }, "SortOrder": { "description": "Sort order, ascending or descending", "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "Filter": { "description": "Filter params", "type": "object" }, "Selected": { "description": "Flag defining whether the table view is the selected one", "type": "boolean", "example": true } }, "required": [ "ID", "UserID", "TableName", "ViewName", "Columns", "SortColumn", "SortOrder", "Filter", "Selected" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "TableName": [ "Must not be blank" ], "ViewName": [ "Must not be blank" ], "SortOrder": [ "Must be either 'asc' or 'desc'" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/tableviews/{id}": { "get": { "summary": "Get a table view", "tags": [ "Table view" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "get_table_view", "description": "Get a table view", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1tableviews/post/responses/201/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Table view does not exist", "errors": { "ID": [ "Table view with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "put": { "summary": "Update table view", "tags": [ "Table view" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "update_table_view", "description": "Update table view", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Update table view request body", "description": "Schema of a request body for updating a table view", "type": "object", "properties": { "Columns": { "description": "Columns to show in specific order", "type": "array", "items": { "type": "string", "example": "Name" } }, "SortColumn": { "description": "Name of the column to sort by", "type": "string", "example": "Name" }, "SortOrder": { "description": "Sort order, ascending or descending", "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "Filter": { "description": "Filter params", "type": "object" }, "Selected": { "description": "Flag defining whether the table view is the selected one", "type": "boolean", "example": true } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1tableviews/post/responses/201/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "SortOrder": [ "Must be either 'asc' or 'desc'" ] } } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1tableviews~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] }, "delete": { "summary": "Delete a table view", "tags": [ "Table view" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "delete_table_view", "description": "Delete a table view", "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1tableviews~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "ID of the table view", "in": "path", "required": true } ] }, "/templates": { "get": { "summary": "List templates", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ListTemplates" ] } ], "operationId": "list_templates", "description": "Retrieve all templates", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "string" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1templates~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Create a template", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyTemplate" ] } ], "operationId": "create_template", "description": "Create a new template", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Template", "properties": { "Name": { "description": "Template name", "type": "string", "example": "Cisco IOS baseline" }, "Comment": { "description": "Comment attached to template", "type": "string", "example": "Base configuration for all Cisco IOS devices" }, "BackupID": { "type": "integer", "description": "ID of a [Device Backup](#tag/DeviceBackup) to use as template", "example": 123 }, "ConfigurationType": { "type": "string", "description": "Identifier of a configuration type as part of a backup (if a device supports it)", "example": "startup" }, "Variables": { "type": "array", "description": "List of variable markers that will be replaced when applying a template", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Name of variable marker", "example": "DNS" }, "Start": { "type": "integer", "description": "Start position for variable marker (in bytes from start of reference backup)", "example": 744 }, "Finish": { "type": "integer", "description": "End position for variable marker (in bytes from start of reference backup)", "example": 757 } }, "required": [ "Name", "Start", "Finish" ] } } }, "required": [ "Name", "BackupID" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1templates~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Name": [ "Must not be blank" ], "BackupID": [ "Must be set" ], "Variables[0].Name": [ "Must not be blank", "Must be unique" ], "Variables[0].Start": [ "Must be a positive number" ], "Variables[0].Finish": [ "Must be greater than Start value" ] } } } } } }, "parameters": [] } }, "/templates/{id}": { "get": { "summary": "Retrieve a template", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewTemplate" ] } ], "operationId": "get_template", "description": "Retrieve a single template", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1templates~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Template does not exist", "errors": { "ID": [ "Template with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a template", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyTemplate" ] } ], "operationId": "update_template", "description": "Update a template", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Template", "type": "object", "description": "Template model", "properties": { "ID": { "description": "Template ID", "type": "integer", "example": 123, "readOnly": true }, "Name": { "description": "Template name", "type": "string", "example": "Cisco IOS baseline" }, "Comment": { "description": "Comment attached to template", "type": "string", "example": "Base configuration for all Cisco IOS devices" }, "DeviceName": { "type": "string", "description": "Name of a [Device](#tag/Device) used to select a backup as template", "example": "Demo device", "readOnly": true }, "PluginName": { "type": "string", "description": "Name of [Plugin](#tag/Plugin) used to select a backup as template", "example": "Cisco IOS", "readOnly": true }, "ConfigurationType": { "type": "string", "description": "Identifier of a configuration type as part of a backup (if a device supports it)", "example": "startup" }, "Variables": { "type": "array", "description": "List of variable markers that will be replaced when applying a template", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Name of variable marker", "example": "DNS" }, "Start": { "type": "integer", "description": "Start position for variable marker (in bytes from start of reference backup)", "example": 744 }, "Finish": { "type": "integer", "description": "End position for variable marker (in bytes from start of reference backup)", "example": 757 } }, "required": [ "Name", "Start", "Finish" ] } } }, "required": [ "Name" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1templates~1%7Bid%7D/put/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1templates/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1templates~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a template", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyTemplate" ] } ], "operationId": "delete_template", "description": "Delete a template", "responses": { "204": { "description": "Template deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1templates~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Template ID", "in": "path", "required": true } ] }, "/templates/{id}/download": { "post": { "summary": "Download a template", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewTemplate" ] } ], "operationId": "download_template", "description": "Download a template by providing values for variable replacements. If a replacement value for a defined variable\nmarker is not provided, it will be replaced with an empty string.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Variables": { "description": "List of variables", "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Variable marker's name that is to be replaced", "example": "DNS" }, "Value": { "type": "string", "description": "Value to replace marker with", "example": "127.0.0.1" } }, "required": [ "Name", "Value" ] } } } } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "string", "description": "A text file of the base backup (configuration) with all variable markers replaced by provided values\n" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Variables[0].Name": [ "Must be set" ], "Variables[0].Value": [ "Must be set" ] } } } } } }, "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" } ] }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Template ID", "in": "path", "required": true } ] }, "/templates/{id}/push": { "post": { "summary": "Push a template", "tags": [ "Template" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "PushTemplate" ] } ], "operationId": "push_template", "description": "Push a template to one or more devices by providing values for variable replacements. If a replacement value for a\ndefined variable marker is not provided, it will be replaced with an empty string.\n", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "Devices": { "type": "array", "description": "List of [Device](#tag/Device) and corresponding variable values to push a template to", "items": { "type": "object", "properties": { "DeviceID": { "type": "integer", "description": "ID of [Device](#tag/Device) to push a template to", "example": 123 }, "Variables": { "description": "List of variables", "type": "array", "items": { "type": "object", "properties": { "Name": { "type": "string", "description": "Variable marker's name that is to be replaced", "example": "DNS" }, "Value": { "type": "string", "description": "Value to replace marker with", "example": "127.0.0.1" } }, "required": [ "Name", "Value" ] } } }, "required": [ "DeviceID" ] } }, "Replace": { "type": "boolean", "description": "If true, backup will be restored on targeted devices", "default": false, "example": true } } } } } }, "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Devices[0].DeviceID": [ "Device with ID 123 does not exist" ], "Devices[0].Variables[0].Name": [ "Must be set" ], "Devices[0].Variables[0].Value": [ "Must be set" ] } } } } } }, "parameters": [] }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Template ID", "in": "path", "required": true } ] }, "/tokens": { "get": { "summary": "List tokens", "tags": [ "Token" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyOwnTokens", "ModifyAllTokens" ] } ], "operationId": "list_tokens", "description": "Retrieve all tokens", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1tokens/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1jobs/get/parameters/4" } ] }, "post": { "summary": "Create a token", "tags": [ "Token" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyOwnTokens", "ModifyAllTokens" ] } ], "operationId": "create_token", "description": "Create a new token", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Token", "type": "object", "description": "Token model", "properties": { "ID": { "description": "Token ID", "type": "integer", "example": 123, "readOnly": true }, "Description": { "type": "string", "description": "A short description of the token", "example": "An example token" }, "Token": { "type": "string", "description": "The token itself. This is generated by the system itself", "example": "foobarbaz", "readOnly": true }, "User": { "type": "object", "readOnly": true, "description": "Owner of the token", "allOf": [ { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } ] } }, "required": [ "Description" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1tokens/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "Description": [ "Must not be blank" ] } } } } } }, "parameters": [] } }, "/tokens/{id}": { "get": { "summary": "Retrieve a token", "tags": [ "Token" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyOwnTokens", "ModifyAllTokens" ] } ], "operationId": "get_token", "description": "Retrieve a single token", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1tokens/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Token does not exist", "errors": { "ID": [ "Token with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a token", "tags": [ "Token" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyOwnTokens", "ModifyAllTokens" ] } ], "operationId": "update_token", "description": "Update a token", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1tokens/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1tokens/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1tokens/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1tokens~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a token", "tags": [ "Token" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyOwnTokens", "ModifyAllTokens" ] } ], "operationId": "delete_token", "description": "Delete a token", "responses": { "204": { "description": "Token deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1tokens~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "token id", "in": "path", "required": true } ] }, "/transcripts": { "get": { "summary": "List transcripts", "tags": [ "Transcript" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "operationId": "list_transcripts", "description": "Retrieve all transcripts. If no sort param is passed, transcripts will be ordered by `ID` in descending order.", "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1logs/get/parameters/5" }, { "$ref": "#/paths/~1logs/get/parameters/6" }, { "$ref": "#/paths/~1devices~1count/parameters/13" }, { "$ref": "#/paths/~1devices~1count/parameters/14" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The number of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object" }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1transcripts~1%7Bid%7D/get/responses/200/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } } }, "/transcripts/{id}": { "get": { "summary": "Retrieve a transcript", "tags": [ "Transcript" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewLogs" ] } ], "operationId": "get_transcript", "description": "Retrieve a single transcript", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Transcript", "type": "object", "description": "Transcript model", "properties": { "ID": { "description": "Transcript ID", "type": "integer", "example": 42 }, "DeviceID": { "description": "ID of the associated [Device](#tag/Device)", "type": "integer", "example": 123 }, "Type": { "description": "Transcript type", "type": "string", "example": "commands" }, "EntityID": { "description": "ID of the related entity (for example command output ID)", "type": "integer", "example": 777 }, "ParentID": { "description": "ID of the parent transcript if present", "type": "integer", "nullable": true, "example": 41 }, "State": { "description": "Whether the transcript-producing operation succeeded", "type": "boolean", "example": true }, "FailedError": { "description": "Error details when transcript-producing operation fails", "type": "string", "nullable": true, "example": "timeout while waiting for command output" }, "Content": { "description": "Transcript content", "type": "string", "example": "show version\nCisco IOS XE Software..." }, "CreatedAt": { "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format", "type": "string", "format": "date-time", "example": "2222-02-22T22:22:22.000Z" }, "DeletedAt": { "description": "Timestamp when the transcript was deleted, in [RFC3339](https://tools.ietf.org/html/rfc3339) format", "type": "string", "format": "date-time", "nullable": true, "example": "2222-02-23T22:22:22.000Z" } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Transcript does not exist", "errors": { "ID": [ "Transcript with ID 42 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "Transcript ID", "in": "path", "required": true } ] }, "/users": { "get": { "summary": "List users", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewUsers" ] } ], "operationId": "list_users", "description": "Retrieve all users", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "fields": { "description": "The filtered fields", "type": "array", "items": { "type": "string" } }, "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" }, "active": { "description": "Active status included on returned items", "type": "boolean" }, "type": { "description": "List of user types used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "Local", "RADIUS" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "LDAP" ] } } }, "logintoken": { "description": "List of login tokens used to filter returned items", "type": "object", "properties": { "include": { "description": "Included on returned items", "type": "array", "items": { "type": "string" }, "example": [ "ABCD1234" ] }, "exclude": { "description": "Excluded from returned items", "type": "array", "items": { "type": "string" }, "example": [ "ABCD1234" ] } } }, "created_after": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2020-01-02T15:04:05.999Z" }, "created_before": { "description": "Returned items are filtered by minimum created date", "type": "string", "example": "2023-01-02T15:04:05.999Z" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } } }, "required": [ "limit", "offset" ] } } } } }, "parameters": [ { "$ref": "#/paths/~1jobs/get/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" }, { "$ref": "#/paths/~1logs/get/parameters/7" }, { "$ref": "#/paths/~1logs/get/parameters/8" }, { "in": "query", "name": "active", "schema": { "type": "boolean" }, "description": "Active status to include in the results" }, { "in": "query", "name": "logintoken[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of login tokens to include in the results", "example": [ "ABCD1234" ] }, { "in": "query", "name": "not[logintoken][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of login tokens to exclude from the results", "example": [ "ABCD1234" ] }, { "in": "query", "name": "type[]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of user types to include in the results", "example": [ "RADIUS" ] }, { "in": "query", "name": "not[type][]", "schema": { "type": "array", "items": { "type": "string" } }, "description": "List of user types to exclude from the results", "example": [ "LDAP" ] } ] }, "post": { "summary": "Create a user", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "create_user", "description": "Create a new user", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "User", "type": "object", "description": "User model", "properties": { "ID": { "description": "User ID", "type": "integer", "example": 123, "readOnly": true }, "FullName": { "type": "string", "description": "Full name of the user", "example": "Anna Fox" }, "Username": { "type": "string", "description": "Username for logging in. It is recommended to user only lower-case characters and numbers", "example": "afox" }, "EmailActivationLink": { "type": "boolean", "description": "Email activation link to user upon creation or update", "default": false, "writeOnly": true }, "Password": { "type": "string", "description": "A user's password. The system [password policy](#tag/SettingsPasswordPolicy) affects the values that will be accepted. Only required if 'EmailActivationLink' is false\n", "example": "Sunbreeze123", "writeOnly": true }, "EncryptionPassword": { "type": "string", "description": "A user's password used to decrypt appliance, that only applies to admin users. The system [password policy](#tag/SettingsPasswordPolicy) affects the values that will be accepted. Only required if 'EmailActivationLink' is false\n", "example": "Sunbreeze456", "writeOnly": true }, "PasswordExpiry": { "type": "integer", "description": "Expire user's password after this many days. Pass `-1 for *Never* or `0` to use system default. See\n[Security Settings](#tag/SettingsSecurity) for setting the default password expiry.\n", "default": 0, "enum": [ -1, 0, 30, 60, 90, 183, 365 ] }, "RoleID": { "type": "integer", "description": "ID of the [Role](#tag/Role) this user is assigned to", "example": 1 }, "RoleName": { "type": "string", "readOnly": true, "description": "Name of the [Role](#tag/Role) this user is assigned to", "example": "Admin" }, "Recovery": { "type": "object", "description": "Set a Recovery Question / Answer to allow password recovery for admin users", "writeOnly": true, "properties": { "Question": { "type": "string", "description": "Set a recovery question to allow password recovery for admin users", "example": "Do you prefer cats or dogs?" }, "Answer": { "type": "string", "description": "Set a recovery answer to allow password recovery for admin users", "example": "cats" } } }, "Type": { "type": "string", "description": "Type of user as determined by the system", "enum": [ "Local", "RADIUS", "LDAP", "SAML" ], "readOnly": true, "default": "Local" }, "UseRADIUS": { "type": "boolean", "description": "Use RADIUS authentication (if configured) for this user", "default": false }, "UseLDAP": { "type": "boolean", "description": "Use LDAP authentication (if configured) for this user", "default": false }, "UseSAML": { "type": "boolean", "description": "Use SAML authentication (if configured) for this user. This is set by the system", "default": false, "readOnly": true }, "Email": { "type": "string", "description": "Email address of this user", "example": "afox@skylarcompliance.com" }, "Created": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when user was created", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "Updated": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when user was last updated", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "Active": { "type": "boolean", "description": "Logged in status of this user", "example": false, "readOnly": true }, "LastActive": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when user was last active", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "PasswordUpdated": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when user's password was last updated", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "DomainIDs": { "type": "array", "description": "A list of [Domains](#tag/Domain) to assign a user to", "items": { "type": "integer" }, "default": [], "example": [ 1, 2, 3 ] }, "DomainNames": { "type": "string", "description": "Human readable field that concatenates all domains a user is assigned to", "example": "Domain A, Domain B, Domain C", "readOnly": true }, "LDAPGroupNames": { "type": "array", "description": "List of all LDAP groups' names an LDAP user is assigned to", "items": { "type": "string" }, "default": [], "example": [ "Group A", "Group B", "Group C" ], "readOnly": true }, "SAMLGroupNames": { "type": "array", "description": "List of all SAML groups' names an SAML user is assigned to", "items": { "type": "string" }, "default": [], "example": [ "Group A", "Group B", "Group C" ], "readOnly": true }, "Disabled": { "type": "boolean", "description": "Block a user from logging in. Currently logged in users being set as disabled will be logged out.", "default": false }, "AllowedNetworks": { "type": "array", "description": "Only allows the user to connect to Skylar Compliance from given subnets.\nUse [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation)\n", "items": { "type": "string" }, "default": [], "example": [ "172.16.0.0/12", "172.17.0.0/12" ] }, "Permissions": { "type": "object", "description": "The [Permissions](#tag/Permission) that a user has", "additionalProperties": { "type": "integer" }, "default": {}, "example": { "ViewDevices": 6, "ViewBackup": 8, "ViewAssets": 31 }, "readOnly": true }, "Address": { "type": "string", "description": "IP address of user's device used for login", "example": "127.0.0.1", "readOnly": true }, "UserAgent": { "type": "string", "description": "Device identification of user's device used for login", "example": "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)", "readOnly": true }, "LoggedIn": { "type": "string", "description": "Timestamp in [RFC3339](https://tools.ietf.org/html/rfc3339) format when user has logged in", "example": "2222-02-22T22:22:22.000Z", "readOnly": true }, "LoginToken": { "type": "string", "description": "Token for user logging in via login token authentication before they have set passwords.", "example": "ABCD1234", "readOnly": true }, "UseTOTP": { "type": "boolean", "description": "Use TOTP authentication (if configured) for this user", "default": false }, "ActivationLink": { "type": "string", "description": "Activation Link. It is only returned when creating a new user", "readOnly": true }, "Locked": { "type": "boolean", "description": "Whether or not the user is locked (reached the maximum number of login attempts)", "default": false }, "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable\nto them. Most users will only have one role per domain, but e.g. LDAP\nusers might have more if they belong to multiple groups that have a role\nfor the same domain, in which case the user's permissions will be a union\nof those roles' permissions.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 }, "External": { "type": "boolean", "description": "Whether the role is external (e.g. LDAP or SAML)", "default": false } }, "required": [ "DomainID", "RoleID" ] } }, "RolePermissions": { "type": "array", "description": "List of permissions that are assigned to the user's roles\n", "items": { "type": "object", "properties": { "RoleID": { "type": "integer", "description": "ID of the role", "example": 1 }, "Permissions": { "type": "array", "description": "List of permissions", "items": { "type": "integer", "example": [ 1, 2, 3 ] } } }, "required": [ "RoleID", "Permissions" ] } } }, "required": [ "FullName", "Username", "Email", "DomainRoles" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "FullName": [ "Must not be blank" ], "Username": [ "Must not be blank" ], "Password": [ "Must not be blank if 'EmailActivationLink' is false", "Does not conform with the current password policy" ], "EncryptionPassword": [ "Must be set if user has admin role", "Must be set different from user password", "Does not conform with the current password policy" ], "PasswordExpiry": [ "Must be one of -1, 0, 30, 60, 90, 183 or 365" ], "RoleID": [ "Must be set", "Role with ID 123 does not exist" ], "Recovery.Answer": [ "Must not be blank (if Recovery.Question is set)" ], "Email": [ "Must not be blank", "Is not a valid email address" ], "DomainIDs[0]": [ "Domain with ID 123 does not exist" ], "AllowedNetworks[0]": [ "Range '255.255.255.255/255' is not a valid network range in CIDR notatation" ] } } } } } }, "parameters": [] } }, "/users/broadcast": { "post": { "summary": "Broadcast user message", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "PermModifyUser" ] } ], "description": "Sends a message to a list of users by email", "operationId": "user_broadcast", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "IDs": { "type": "array", "description": "List of user IDs for the message to be broadcast to.", "items": { "type": "number" }, "example": [ 1, 2 ] }, "Message": { "type": "string", "description": "Message to be broadcast", "example": "Hello world" } } } } } }, "responses": { "204": { "description": "Message successfully broadcast" } } } }, "/users/ldap/groups": { "get": { "summary": "List LDAP groups", "tags": [ "User/LDAP" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewUsers" ] } ], "operationId": "list_ldap_groups", "description": "Retrieve all LDAP groups", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "offset": { "description": "The number of items skipped", "type": "integer", "minimum": 0, "default": 0 }, "limit": { "description": "The numbers of items returned", "type": "integer", "minimum": 1, "default": 50 }, "total": { "description": "The total number of items", "type": "integer" }, "search": { "description": "The search parameters used to filter items", "type": "object", "properties": { "fulltext": { "description": "Returned items match the search term", "type": "string", "example": "some text" } } }, "sort": { "description": "The sorting parameters used to sort items", "type": "array", "items": { "type": "object", "properties": { "field": { "description": "Name of the field used to sort items", "type": "string" }, "order": { "description": "Sorting order used to sort items", "type": "string", "enum": [ "asc", "desc" ] } } } }, "data": { "description": "The returned items", "type": "array", "items": { "$ref": "#/paths/~1users~1ldap~1groups/post/responses/200/content/application~1json/schema" } } }, "required": [ "offset", "limit", "total", "search", "sort", "data" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [ { "$ref": "#/paths/~1devices~1%7Bid%7D~1backups~1%7Bbackup_id%7D~1config/parameters/0" }, { "$ref": "#/paths/~1devices~1%7Bid%7D~1monitors/parameters/2" }, { "$ref": "#/paths/~1jobs/get/parameters/3" }, { "$ref": "#/paths/~1devices~1count/parameters/2" } ] }, "post": { "summary": "Create an LDAP group", "tags": [ "User/LDAP" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "create_ldap_group", "description": "Create an LDAP group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Create LDAP group request body", "description": "Schema of a request body for creating an LDAP group", "type": "object", "properties": { "DN": { "type": "string", "description": "A distinguished name that uniquely identifies a group", "example": "cn=Skylar_Compliance_Engineering,ou=Group,dc=skylarcompliance,dc=local" }, "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable to them.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 } }, "required": [ "DomainID", "RoleID" ] } } }, "required": [ "DN", "DomainRoles" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "title": "Persisted LDAP group", "description": "Schema of a persisted LDAP group", "type": "object", "properties": { "ID": { "type": "integer", "description": "ID of a persisted LDAP group", "example": 1, "default": 0 }, "DN": { "type": "string", "description": "Distinguished name that uniquely identifies a group", "example": "cn=Skylar_Compliance_Engineering,ou=Group,dc=skylarcompliance,dc=local" }, "Name": { "type": "string", "description": "Name of a group", "example": "Skylar Compliance Engineering" }, "RestorepointMembers": { "type": "array", "description": "List of Skylar Compliance users' usernames who are LDAP group members", "items": { "type": "string", "description": "Skylar Compliance user's username", "example": "admin" } }, "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable to them.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 }, "External": { "type": "boolean", "description": "Whether the role is from an external provider", "example": false } }, "required": [ "DomainID", "RoleID" ] } } }, "required": [ "ID", "DN", "Name", "RestorepointMembers", "DomainRoles" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "Input validation failed", "errors": { "DN": [ "Must not be blank" ], "DomainRoles": [ "Must not be empty" ], "DomainID": [ "Domain with ID 123 does not exist" ], "RoleID": [ "Role with ID 123 does not exist" ] } } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } }, "parameters": [] } }, "/users/ldap/groups/{id}": { "put": { "summary": "Update an LDAP group", "tags": [ "User/LDAP" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "update_ldap_group", "description": "Update an LDAP group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "title": "Update LDAP group request body", "description": "Schema of a request body for updating an LDAP group", "type": "object", "properties": { "DomainRoles": { "type": "array", "description": "List of DomainRole objects which link DomainIDs to the RoleID applicable to them.\n", "items": { "type": "object", "properties": { "DomainID": { "type": "integer", "description": "Domain ID", "example": 1 }, "RoleID": { "type": "integer", "description": "Role ID", "example": 3 } }, "required": [ "DomainID", "RoleID" ] } } }, "required": [ "DomainRoles" ] } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users~1ldap~1groups/post/responses/200/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1users~1ldap~1groups/post/responses/400/content/application~1json/example" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "delete": { "summary": "Delete an LDAP group", "tags": [ "User/LDAP" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "delete_ldap_group", "description": "Delete an LDAP group", "responses": { "204": { "description": "OK" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "LDAP group ID", "in": "path", "required": true } ] }, "/users/{id}": { "get": { "summary": "Retrieve a user", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ViewUserauth" ] } ], "operationId": "get_user", "description": "Retrieve a single user", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "message": "User does not exist", "errors": { "ID": [ "User with ID 123 does not exist" ] } } } } } } }, "put": { "summary": "Update a user", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "update_user", "description": "Update a user", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/paths/~1users/post/requestBody/content/application~1json/schema" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1users/post/responses/400/content/application~1json/example" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1users~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "delete": { "summary": "Delete a user", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "ModifyUser" ] } ], "operationId": "delete_user", "description": "Delete a user", "responses": { "204": { "description": "User deleted" }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1users~1%7Bid%7D/get/responses/404/content/application~1json/example" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "User ID", "in": "path", "required": true } ] }, "/users/{id}/action": { "post": { "summary": "Log user's action", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] } ], "operationId": "log_action", "description": "Log user's action", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "UITimeout": { "type": "integer", "description": "Session timeout for the Skylar Compliance UI in minutes", "default": 10 } }, "required": [ "UITimeout" ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" }, "example": { "$ref": "#/paths/~1users/post/responses/400/content/application~1json/example" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/paths/~1jobs/get/responses/401/content/application~1json/schema" } } } } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "User's ID", "in": "path", "required": true } ] }, "/users/{id}/activationlink": { "get": { "summary": "Sends the activation link to the user by email", "tags": [ "User" ], "security": [ { "Cookie": [] }, { "Token": [] }, { "Permissions": [ "PermModifyUser" ] } ], "description": "Sends the activation link to the user by email", "operationId": "email_activation_link", "responses": { "204": { "description": "Activation link successfully sent" } } }, "parameters": [ { "schema": { "type": "integer" }, "name": "id", "description": "User ID", "in": "path", "required": true } ] } }, "components": { "securitySchemes": { "Cookie": { "description": "The Skylar Compliance web interface uses session cookies to authenticate API requests coming from a user's browser.\nPlease use authentication tokens when integrating with the Skylar Compliance API programmatically.\n\nExample header:\n\n```http\nCookie: session=abcde12345; Path=/; HttpOnly\n```\n", "type": "apiKey", "in": "cookie", "name": "session" }, "Token": { "description": "To integrate with the Skylar Compliance API, please use the web interface to create API tokens. API requests via\ntoken should pass an `Authorization` header using the `Custom` prefix.\n\nExample header:\n\n```http\nAuthorization: Custom qVUXmMhPsle3NVU...\n```\n", "type": "apiKey", "in": "header", "name": "Authorization" }, "Permissions": { "description": "Lists required [Permissions](#tag/Permission) for each individual endpoint.\n\n**Please note:** Whilst this authentication method is listed as an OpenID Connect authentication type, it\nis only used for the purposes of displaying the required permissions on each endpoint and is _not_ a valid\nauthentication method by itself.\n\n- `ModifyDevice`\n- `BackupDevice`\n- `RestoreDevice`\n- `CommandDevice`\n- `ViewDeviceauth`\n- `ViewDevices`\n- `ListBackups`\n- `ViewBackup`\n- `ExportBackup`\n- `ModifyBackup`\n- `ViewLogs`\n- `ViewSyslogs`\n- `ViewSysadmin`\n- `UpdateSysadmin`\n- `ModifyUser`\n- `ViewUsers`\n- `ViewUserauth`\n- `ViewRoles`\n- `EditRoles`\n- `ModifyDiscovery`\n- `ListTemplates`\n- `ViewTemplate`\n- `ModifyTemplate`\n- `PushTemplate`\n- `ViewFirmware`\n- `ModifyFirmware`\n- `PushFirmware`\n- `ViewCredentials`\n- `ModifyCredentials`\n- `ModifyAssets`\n- `ViewAssets`\n- `ViewDomain`\n- `ModifyDomain`\n- `ViewDevicePolicy`\n- `ModifyDevicePolicy`\n- `ApplyDevicePolicy`\n- `ViewPassrules`\n- `ModifyPassrules`\n- `ViewRadius`\n- `ModifyRadius`\n- `ViewReports`\n- `ModifyReports`\n- `ArchivePlatform`\n- `ViewBackupSchedule`\n- `ModifyBackupSchedule`\n- `ViewLegacyReportAssets`\n- `ViewLegacyReportCompliance`\n- `ViewLegacyReportAdmin`\n- `ViewLegacyReportConfig`\n- `ViewLegacyReportBackups`\n- `ViewLegacyReportDashboard`\n- `ViewLegacyReportMonitor`\n- `AddDevice`\n- `DeleteDevice`\n- `ExportDevices`\n- `ExportUsers`\n- `ModifyLabels`\n- `ModifyTokens`\n- `OpenTerminal`\n- `ViewAllSchedules`\n- `ModifyAllSchedules`\n- `ViewDeviceCommand`\n- `ModifyDeviceCommand`\n- `ViewUnredactedBackup`\n", "type": "openIdConnect", "openIdConnectUrl": "https://ignore.example.com" } } }, "security": [ { "Cookie": [] }, { "Token": [] } ] }