From 60fb76f9a7c0a25a8269e7b4bef57a3e8cbafa45 Mon Sep 17 00:00:00 2001 From: Fabiano Eger Date: Thu, 8 Jan 2026 16:07:37 -0300 Subject: [PATCH 1/2] docs for profile backup routes --- docs/api/create-profile-backup.api.mdx | 76 ++++++++++++++++++++++++ docs/api/delete-profile-backup.api.mdx | 67 +++++++++++++++++++++ docs/api/download-profile-backup.api.mdx | 69 +++++++++++++++++++++ docs/api/list-profile-backups.api.mdx | 71 ++++++++++++++++++++++ docs/api/sidebar/api-sidebar.ts | 32 ++++++++++ 5 files changed, 315 insertions(+) create mode 100644 docs/api/create-profile-backup.api.mdx create mode 100644 docs/api/delete-profile-backup.api.mdx create mode 100644 docs/api/download-profile-backup.api.mdx create mode 100644 docs/api/list-profile-backups.api.mdx diff --git a/docs/api/create-profile-backup.api.mdx b/docs/api/create-profile-backup.api.mdx new file mode 100644 index 0000000..17a5b72 --- /dev/null +++ b/docs/api/create-profile-backup.api.mdx @@ -0,0 +1,76 @@ +--- +id: create-profile-backup +title: "Create Backup" +description: "Generate a comprehensive backup of your profile resources and files" +sidebar_label: "Create Backup" +hide_title: true +hide_table_of_contents: true +sidebar_class_name: "post api-method" +info_path: docs/api/tagoio-api +custom_edit_url: null +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; + + + + + + + + +Initiates a new backup generation for the specified profile. The backup is processed asynchronously in a background queue. + +**What's included in the backup:** +- User storage files (uploaded via `/files` route) +- Dashboard version history +- Analysis script versions +- All resource configurations as JSON files (devices, actions, dashboards, analysis, access management, networks, connectors, secrets, dictionaries, run users, etc.) + +**Important notes:** +- Backups are rate-limited (1 per day based on your account timezone) +- Free plan users do not have access to backup features +- Backup generation may take several minutes depending on profile size + + + + + + + + + + + + + + + diff --git a/docs/api/delete-profile-backup.api.mdx b/docs/api/delete-profile-backup.api.mdx new file mode 100644 index 0000000..307a586 --- /dev/null +++ b/docs/api/delete-profile-backup.api.mdx @@ -0,0 +1,67 @@ +--- +id: delete-profile-backup +title: "Delete Backup" +description: "Permanently remove a backup from storage" +sidebar_label: "Delete Backup" +hide_title: true +hide_table_of_contents: true +sidebar_class_name: "delete api-method" +info_path: docs/api/tagoio-api +custom_edit_url: null +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; + + + + + + + + +Permanently removes a backup from storage. This action is irreversible. + +**Security:** This endpoint requires account password verification to prevent accidental or unauthorized deletion. If you have Two-Factor Authentication (2FA) enabled, you must also provide the OTP code. + + + + + + + + + + + + + + + diff --git a/docs/api/download-profile-backup.api.mdx b/docs/api/download-profile-backup.api.mdx new file mode 100644 index 0000000..e996f5b --- /dev/null +++ b/docs/api/download-profile-backup.api.mdx @@ -0,0 +1,69 @@ +--- +id: download-profile-backup +title: "Download Backup" +description: "Generate a secure, time-limited download URL for a specific backup" +sidebar_label: "Download Backup" +hide_title: true +hide_table_of_contents: true +sidebar_class_name: "post api-method" +info_path: docs/api/tagoio-api +custom_edit_url: null +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; + + + + + + + + +Generates a secure, time-limited download URL for a specific backup. The download URL is valid for **2 hours**. + +**Security:** This endpoint requires account password verification to prevent unauthorized access to backup data. If you have Two-Factor Authentication (2FA) enabled, you must also provide the OTP code. + +**Important:** Only backups with status `completed` can be downloaded. + + + + + + + + + + + + + + + diff --git a/docs/api/list-profile-backups.api.mdx b/docs/api/list-profile-backups.api.mdx new file mode 100644 index 0000000..6f27bd0 --- /dev/null +++ b/docs/api/list-profile-backups.api.mdx @@ -0,0 +1,71 @@ +--- +id: list-profile-backups +title: "List Backups" +description: "Retrieve a list of all backups for the profile" +sidebar_label: "List Backups" +hide_title: true +hide_table_of_contents: true +sidebar_class_name: "get api-method" +info_path: docs/api/tagoio-api +custom_edit_url: null +--- + +import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint"; +import ParamsDetails from "@theme/ParamsDetails"; +import RequestSchema from "@theme/RequestSchema"; +import StatusCodes from "@theme/StatusCodes"; +import OperationTabs from "@theme/OperationTabs"; +import TabItem from "@theme/TabItem"; +import Heading from "@theme/Heading"; + + + + + + + + +Retrieves a paginated list of all backups for the specified profile. Use this endpoint to check backup status and find backup IDs for download or deletion. + +**Backup statuses:** +- `queued` - Backup request received, waiting for processing +- `processing` - Backup generation in progress +- `completed` - Backup ready for download +- `failed` - Backup generation failed (check error_message) + + + + + + + + + + + + + + + diff --git a/docs/api/sidebar/api-sidebar.ts b/docs/api/sidebar/api-sidebar.ts index 1af8419..acd8fdb 100644 --- a/docs/api/sidebar/api-sidebar.ts +++ b/docs/api/sidebar/api-sidebar.ts @@ -654,6 +654,38 @@ const sidebar: SidebarsConfig = { }, ], }, + { + type: "category", + label: "Backup", + collapsible: false, + className: "api-sub-category", + items: [ + { + type: "doc", + id: "api/create-profile-backup", + label: "Create Backup", + className: "api-method post", + }, + { + type: "doc", + id: "api/list-profile-backups", + label: "List Backups", + className: "api-method get", + }, + { + type: "doc", + id: "api/download-profile-backup", + label: "Download Backup", + className: "api-method post", + }, + { + type: "doc", + id: "api/delete-profile-backup", + label: "Delete Backup", + className: "api-method delete", + }, + ], + }, ], }, { From 108e9fad085fc1adca0e48619bee74170af8b5fb Mon Sep 17 00:00:00 2001 From: Fabiano Eger Date: Thu, 8 Jan 2026 16:31:55 -0300 Subject: [PATCH 2/2] update yml file --- docs/api/create-profile-backup.api.mdx | 22 +- docs/api/delete-profile-backup.api.mdx | 19 +- docs/api/download-profile-backup.api.mdx | 19 +- docs/api/list-profile-backups.api.mdx | 21 +- specs/tagoio-api.yaml | 377 ++++++++++++++++++++++- 5 files changed, 431 insertions(+), 27 deletions(-) diff --git a/docs/api/create-profile-backup.api.mdx b/docs/api/create-profile-backup.api.mdx index 17a5b72..718bb34 100644 --- a/docs/api/create-profile-backup.api.mdx +++ b/docs/api/create-profile-backup.api.mdx @@ -1,10 +1,11 @@ --- id: create-profile-backup title: "Create Backup" -description: "Generate a comprehensive backup of your profile resources and files" +description: "Initiates a new backup generation for the specified profile. The backup is processed asynchronously in a background queue." sidebar_label: "Create Backup" hide_title: true hide_table_of_contents: true +api: eJztWF1v27gS/SsD9qGtITm2Y+fDDwvkbrr3Zu+iDZIGxaIJbsfiyOJGJlWSiusN/N8vhqT80bTdLrCPzUtSaTQzPGdmeKaPwuPciel78S8s7ttG3GVCkiusarwyWkzFhVZeoScHCJqWMAt2MCdNFtkGSmPBVwSuoUKViiQ01pSqpj68raj7QDl+XJBzJAHdSheVNdq0rl6B0oDBbm5NqyV8bKml/q2+1b3euwr9cwdKF3UrSbKt33id9nq3OocbRxacNxbnBBzZwYu2qQ3yBw8K4cNBePoBrGk9veRvztFVM4NWwgNZx+eoFLtY8cszjfXKKQcRic7EhXd1DZacaW1BUBhdqnkbkXCADn69fvO6y0HSgyrIZYBFeJ+B7KLywxSEXzMusECNc1qQ9hlo8ktj713GITQV3liXgaPCkmc/KnhEq9i9bTW0jtiCfNF/GZG7WDTGetQetPHkElaRZwdoCSx6ymu1UJ4kvBhCQxYkrmCGTJLRsDKt5exMqz14taA/jY7w/WKJoKkxBQZpOApU+EDdcbzpuC8JfWvJbePv1s8CV+DxnsDRA1msYaF0ywUnqSEtlZ5zKqmmwKk/if1cUSA8eFABuxZryDllKFDD0ipPib+QS4PWUaidHYpQS7AMKnrasOpCz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XOWVGlKdW6TXOXH5Hwf4FantBprHpQkB2OQqizJEmusUEdTFji93m6T9HrToKZTTVmz2O3FLKXSiZ85+WjDseVeD95qAM6CA+xxwBHOamfgXpslK9mzSF58Gy/0jd8QeyPJErtPA+yVLge4cCGlz0+x6bM3ul4BPqCqcVYTqLLD1Sw12W48J3G8KTO125ZPkujEfMxi2ut9EcgdNb4NH8nrXnWu8zy/1aGCruPJg9XZ5QW8SiIGrmiujL7V7ypigXvPRthVAdcGf7Gtzywwt2idB2QK4iq1itEb1gFWRYXKbrHeqiX4uTLGERhNHTqlqWuz5IidlftM0c/JzC02lSqwTj6nvDMwWjc6bAPXPux8r9B5GDJmECG96Vql8w3Lirpu36obbpMYM2FI6DxZDXvu+53XXu/m6jeO8uGrt+TBh11OX7WsjeAd/QPpsRNOLfr8i5z2bmXOKebDVMI5NbVZbbLhhnGVaWsZJkHIwSx1KJSbq982Q3Wv3uKtaRaotON1L2SbiOUgMQbP0bSTiqkY9gf9QRKaWLDQDPLKOL/AMOzTyP05rjmb1WRvJD5udeqPnf/Hzv9j5//Kzp+Ek6dP/qCpUWmWV0G9P6bV4P1mfc3EdG+dmW3+j63iXWL6Xjw+Mu43tl6v+fHHlizL+7tMPKBVPBSC2JfK8d8ybXjfaN0XV0mAvIQvrzRfOUGnBzWLwQesW/6XyMQ9rfaXsvXdOut0GqcWDVgfN37n0yeb7t4qdfnm+q1Yr/8P6wAaKA== sidebar_class_name: "post api-method" info_path: docs/api/tagoio-api custom_edit_url: null @@ -30,9 +31,11 @@ import Heading from "@theme/Heading"; path={"/profile/{profile_id}/backup"} context={"endpoint"} > - + + + Initiates a new backup generation for the specified profile. The backup is processed asynchronously in a background queue. **What's included in the backup:** @@ -45,6 +48,8 @@ Initiates a new backup generation for the specified profile. The backup is proce - Backups are rate-limited (1 per day based on your account timezone) - Free plan users do not have access to backup features - Backup generation may take several minutes depending on profile size +- Restoration is manual - you can write scripts to parse the JSON files and recreate resources via API, or contact TagoIO support + - + - + - + + + + \ No newline at end of file diff --git a/docs/api/delete-profile-backup.api.mdx b/docs/api/delete-profile-backup.api.mdx index 307a586..6f77081 100644 --- a/docs/api/delete-profile-backup.api.mdx +++ b/docs/api/delete-profile-backup.api.mdx @@ -1,10 +1,11 @@ --- id: delete-profile-backup title: "Delete Backup" -description: "Permanently remove a backup from storage" +description: "Permanently removes a backup from storage. This action is irreversible." sidebar_label: "Delete Backup" hide_title: true hide_table_of_contents: true +api: eJztWFtv2zoS/isD9qGtIfkWOxc/HCDnJN01TtEGaYLioAlyaGlk8UQmVZKy6zX83xdDUrIVN213twvsw/alrTWc+eab4Vy4YZbPDZt8Yr/y5LEq2X3EUjSJFqUVSrIJu0K94BKlLdagcaGWaIDDzElDptUCjFWaz7ELN7kwwBM6CMKA0BqXqI2YFdi9k3ey0/mASaWFXU86HS+NMi2VkBY0fq6EJt1JoippoeTGrJROYYlaZCLhTq1VUJJWaUlQpCgtL0BpqCSvbK60+AemkGKBJN6FaQZrVUHOlwg3KxW/4YlVGs4rm6O0tdZXwzfnrwElnxWYRu7EojIWeGHInlqKFMHmCO9vriBRKbnDIqZK1E7BNGUT5ozilVaZKDCwGTHyC439VaVrNtmw4GbKJlZXGLFESYvS0idelkUA1PvLEPcbZpIcF5z+ZdclsglTs78wsUGvV/SJ1VRR8EpNqKxAQ6eaLzsNxmoh5+xpmP9QlT7kPlO6xT+LGH7hi7IgTWtV6Ydw5KGxtI2YsuWDt3ZoFWW1IMx8FwGlWcTMwtDXBRfFYQ7erEsElTn6RQbDN+fgcsfFC14pJ8eL1y14bQvbiJVCPlDwvk9GHeYfNzYYHo3Gx2y73Ta/ugB8FDZXlSUt9N8lLypsB+Y5GreRO+zsB+P/mob9OBzQveNiD7pDr9GUShoPf9jv019tdnxu+0uGKZgqSdCYrCqKNfsPMrqduRpNVdivZlBDegCyDyCUKJeGxnJbmT0VM6UK5K0kpltYez7qDw6dvd2vKzFM5ZIXIt3dEKUpK3+e3z8COuOFwW3EFmgMn3/9mjUkPUX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HC3oEmunlhfNntuF33KlDIKSWLOTqaJQK7JYSxmYcYMpqMDXHNVc8zIXCS+Czgkt1MTWrRQ0hX+w3KKBS24sDIgz8JTe1lel2bRXOdalZTe90TXxNgOHyI1FLaGlvltr7XRur9+SlT+fbcm9P/djelnR7Acf8SfAIyUEzev8DqbWCECYPB4KJVxgWah1g4YujMlVVaSuEjgMaiVdotxev20qeCvffItWCy6kAYP+8SMElox4G1S03VOIK2aDbr/bD4M0T2iQdpOnMnbBXWdpOrybT5u3hFZJ3Ozm8P+/0Tz/RhP6kcUvtlcWXEhqPG5S3ISR9FM93bOITVqD/qwmfrKbs+8jlitj6dhmQyl5q4vtln7+XKGmufI+YkuuBeF0U2YqTNje3TbzjTC+ug7N6DV8ffJ/xp2650qaQsIDAWMRe8R1e3ehKfknwDmY+P8tXDtOt/fbqJ5biDH//TcPJKbHn73zBysnOeVP0IRZ2m/K7q8mF5dvL28uKc7hcW7hBxTNV7RC8ZVH6x98/KME/bZhBZfzyq2jzGulP/8EBV5S7A== sidebar_class_name: "delete api-method" info_path: docs/api/tagoio-api custom_edit_url: null @@ -30,13 +31,16 @@ import Heading from "@theme/Heading"; path={"/profile/{profile_id}/backup/{backup_id}"} context={"endpoint"} > - + + + Permanently removes a backup from storage. This action is irreversible. **Security:** This endpoint requires account password verification to prevent accidental or unauthorized deletion. If you have Two-Factor Authentication (2FA) enabled, you must also provide the OTP code. + - + - + - + + + + \ No newline at end of file diff --git a/docs/api/download-profile-backup.api.mdx b/docs/api/download-profile-backup.api.mdx index e996f5b..4d0881e 100644 --- a/docs/api/download-profile-backup.api.mdx +++ b/docs/api/download-profile-backup.api.mdx @@ -1,10 +1,11 @@ --- id: download-profile-backup title: "Download Backup" -description: "Generate a secure, time-limited download URL for a specific backup" +description: "Generates a secure, time-limited download URL for a specific backup. The download URL is valid for **2 hours**." sidebar_label: "Download Backup" hide_title: true hide_table_of_contents: true +api: eJztWFtv2zgW/isE+9DWsORL7FwM7Czc226wgzZoEnRmkiCl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ToulfIkOR1TIt2DdhRYi5ZvjbCeC38MWdXBRao+m3x3nn1p5p1FEWX0kXQqbfcUc1Pjsnr+kD0HpZCyUvpRvyC3SARa0Zlq9yLbXzeP+P409XaSy9x4NECk1g7tixvLlExeZkpZYAoCTU6qcpztUKJNZUhC2aAExXwWoJaalZmImF54DnDIxGidS7dPe3Uumvba2YsGSFmxEN6XqdKcwtbZVCXlu0Yh2niZQYMgRkLWpIO+7jm2uudv/8VpXz8aksefGz79HWFQyD5AD9APWSCqnme39CpMwKgTl4fdCV5BWWu1o02mDAmU1XOXSVwOqiVdIGCi15dwTvx5lu0KpiQBi+dTtvgWBTiZWDRxlnGF7NRPIyHYaJmCU7UbgRVxhbMdZa6w9drZnOk6xTFu+1I/v976090bw0t0MJnOyhzJiT2unAe8uPwRb1Z0D6ddZaMRe3pWXvGb4biqz7NcK6eXdC7O0yIc51vNvjzpwo0TrVXfXrLtEDj3YzLhQknObdUPRJCz96HVvicPLyAfMWyuuNLnIHC1Y/SPr2BdXeFwhn9B6jzwOLxH2m2BXhztenXcxNi5r+/9KpEeNNtvd/ZfdEs/wIn3NI+StvekE7enZ6hy8PFvfDjkWYr3OTYyuvqr7huD3G/3dGcyWXltmLqeeKffwNWv8A2 sidebar_class_name: "post api-method" info_path: docs/api/tagoio-api custom_edit_url: null @@ -30,15 +31,18 @@ import Heading from "@theme/Heading"; path={"/profile/{profile_id}/backup/{backup_id}/download"} context={"endpoint"} > - + + + Generates a secure, time-limited download URL for a specific backup. The download URL is valid for **2 hours**. **Security:** This endpoint requires account password verification to prevent unauthorized access to backup data. If you have Two-Factor Authentication (2FA) enabled, you must also provide the OTP code. **Important:** Only backups with status `completed` can be downloaded. + - + - + - + + + + \ No newline at end of file diff --git a/docs/api/list-profile-backups.api.mdx b/docs/api/list-profile-backups.api.mdx index 6f27bd0..319627f 100644 --- a/docs/api/list-profile-backups.api.mdx +++ b/docs/api/list-profile-backups.api.mdx @@ -1,10 +1,11 @@ --- id: list-profile-backups title: "List Backups" -description: "Retrieve a list of all backups for the profile" +description: "Retrieves a paginated list of all backups for the specified profile. Use this endpoint to check backup status and find backup IDs for download or deletion." sidebar_label: "List Backups" hide_title: true hide_table_of_contents: true +api: eJztWG1v2zgS/isD9kNaQ1Jkx86LPyyQXtK9YItu0SZY3DVBS4sjmRuZVEkqrjfwfz8MKdlSvEmzxeJwHy5fktjDmWeeeSXvmeOFZdNP7DXPbuuK3URMoM2MrJzUik3ZB3RG4h1a4FDxQiruUEAprQOdAy9LmPmTFnJtwM0RbIWZzCUKqIzOZYkJXFkEN5cWUIlKS+XAacjmmN02p8E67moLXAnIpRLtxxdnQa/QS1VqLoD+xhIJXHKtrtVg8LqrAO10MLhWMXz5WmON4gvE0AgY/FqjdWAwQ3mHIoIll06qwhuojM7QWqkKf3r7b0dDgQoNJ9MgFZ0oDFrr5TO9qEp0Dwxyseqh96I5l2VPrqM2fAcvAzVojDafF2gtL/DVtWIR01UjeiHYlFEU3geOgy7LIlZxwxfo0FBY75niC2RTVvECWcQkhfRrjWbFIkaMSIOCTXNeWoyYzea44Gx6z9yqolNSOSzQsIjhN04esulw/TBD3vMCQdWLGZpAZcgS8uelwJzXpYPhK7aONmD4QtfK/S1wRukOnncBis5BOlxYqNBjwi2aUdqDo41A83r11/FYZ6QqunBYZpAK5DN3EaFiO+g+auPAW4SXmBRJBHsPzuxRknc/5Dbb6wFu6uqzFC3mirt5D7Iz9TMRHw5zno3FCZ9kJ/k4TYcjPsnzk9Eu9Ms5wsUZEUtl3oBg6xuyayutLFoyNUpT+tU/+7ZpGG2zME1bEWDrjEotr8uSWM+0cqgcaeBVVcrMZ9L+75bU3O96pGe/Y0a5VBkqDicDiNAOOnIzrUvkqus6cbT24OvSdUS5MdxnA6XP901J8R2Cj475LBuODgTm48nh0fFJOhwdjCdEcEviD0fI54GP/pMqGjv7j6nav0NjpVZSFfshRM2v+LETyR+yIgDNwc/fY6FLwQa4lX90fQ9NpNdtJkej48Nx+jAV38gSgU5TJ56tHFrSu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6rQ/sc3PyEduUVsHnEIQ7terYL2imWok1ZXxanm5uWQn8I+51pYGH7bs5Los9ZIstlI04iwKmo7e1wJ1YXg1lxkvG51TumkTW1dK0u3/o+MOLZxz62BInEGgdPeav5xjW+3bTYHKJNhsOERuHRoFPfVJq3UwuPrwlqx8eXRK7n/pxvS8pj0DfsO/AR4pIWhB53cw9aYyYQp4KJRwhlWpVxs0VDB2rutS+E7gMeil8oly9eHtpqn28i1MTb3gUlmw6BeSNrBkJNigPtps5WzKhkmapM3SxjNa2qgbVtq6BffNvmm5/oK2fUXodcT77cr3//eg/6n3oGZSO/zm9quSS0Xz3K+L980u+mlzx4zYtPdwMNu8+M21dSR5f095f2XK9Zo+Dg8htE8KaSkHt08hj6bHMx+DHkF+i6vtW9UdL2sS8Svw8xE87/nnSQCb96kfhPDDbzxPoto+U21h3dA/RhKuvxiolx+aZeQV/Pm7ziNY2t1Q9YBsQrdNsPXNOmp3NoIWBGhXrrrU7twgyafNrern80u2Xv8H+Se6zg== sidebar_class_name: "get api-method" info_path: docs/api/tagoio-api custom_edit_url: null @@ -30,9 +31,11 @@ import Heading from "@theme/Heading"; path={"/profile/{profile_id}/backup"} context={"endpoint"} > - + + + Retrieves a paginated list of all backups for the specified profile. Use this endpoint to check backup status and find backup IDs for download or deletion. **Backup statuses:** @@ -41,6 +44,7 @@ Retrieves a paginated list of all backups for the specified profile. Use this en - `completed` - Backup ready for download - `failed` - Backup generation failed (check error_message) + - + - + - + + + + \ No newline at end of file diff --git a/specs/tagoio-api.yaml b/specs/tagoio-api.yaml index a1d0376..ffc6319 100644 --- a/specs/tagoio-api.yaml +++ b/specs/tagoio-api.yaml @@ -8650,7 +8650,382 @@ paths: schema: type: string example: Type a profile ID - description: Can be found in the profile's information tab "More" + description: Can be found in the profile's information tab "More" + /profile/{profile_id}/backup: + post: + tags: + - Backup + summary: Create Backup + description: | + Initiates a new backup generation for the specified profile. The backup is processed asynchronously in a background queue. + + **What's included in the backup:** + - User storage files (uploaded via `/files` route) + - Dashboard version history + - Analysis script versions + - All resource configurations as JSON files (devices, actions, dashboards, analysis, access management, networks, connectors, secrets, dictionaries, run users, etc.) + + **Important notes:** + - Backups are rate-limited (1 per day based on your account timezone) + - Free plan users do not have access to backup features + - Backup generation may take several minutes depending on profile size + - Restoration is manual - you can write scripts to parse the JSON files and recreate resources via API, or contact TagoIO support + operationId: createProfileBackup + responses: + '200': + description: Backup creation initiated successfully + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: Backup generation has been queued and will be processed shortly. You can check the status using the list backups endpoint. + profile: + type: string + example: 61fac4d9a5c9f40012a5ff92 + backup_id: + type: string + example: 678abc123def456789012345 + '403': + description: Forbidden - Free plan or rate limit exceeded + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: Daily backup limit reached (1 backups per day). Please try again in 8 hours or contact support to increase your limit. + get: + tags: + - Backup + summary: List Backups + description: | + Retrieves a paginated list of all backups for the specified profile. Use this endpoint to check backup status and find backup IDs for download or deletion. + + **Backup statuses:** + - `queued` - Backup request received, waiting for processing + - `processing` - Backup generation in progress + - `completed` - Backup ready for download + - `failed` - Backup generation failed (check error_message) + operationId: listProfileBackups + parameters: + - name: page + in: query + required: false + schema: + type: integer + example: 1 + description: Page number for pagination (default 1) + - name: amount + in: query + required: false + schema: + type: integer + example: 20 + description: Number of items per page (default 20) + - name: orderBy + in: query + required: false + schema: + type: string + example: created_at,desc + description: Sort order (e.g., 'created_at,desc' or 'created_at,asc') + responses: + '200': + description: List of backups retrieved successfully + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: true + result: + type: array + items: + type: object + properties: + id: + type: string + example: 678abc123def456789012345 + profile: + type: string + example: 61fac4d9a5c9f40012a5ff92 + file_path: + type: string + example: profile/61fac4d9a5c9f40012a5ff92/versioning/backup/backup-61fac4d9a5c9f40012a5ff92.zip + version_id: + type: string + example: abc123def456 + file_size: + type: number + example: 15728640 + description: File size in bytes + status: + type: string + enum: [queued, processing, completed, failed] + example: completed + error_message: + type: string + example: null + description: Error message if status is 'failed' + created_at: + type: string + example: '2025-01-07T14:30:00.000Z' + '403': + description: Forbidden - Free plan users cannot access backup features + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: Backup feature is not available on the free plan. Please upgrade your plan to access backup functionality. + parameters: + - name: profile_id + in: path + required: true + schema: + type: string + example: 61fac4d9a5c9f40012a5ff92 + description: The ID of the profile + /profile/{profile_id}/backup/{backup_id}/download: + post: + tags: + - Backup + summary: Download Backup + description: | + Generates a secure, time-limited download URL for a specific backup. The download URL is valid for **2 hours**. + + **Security:** This endpoint requires account password verification to prevent unauthorized access to backup data. If you have Two-Factor Authentication (2FA) enabled, you must also provide the OTP code. + + **Important:** Only backups with status `completed` can be downloaded. + operationId: downloadProfileBackup + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - password + properties: + password: + type: string + description: Your account password for verification + example: your_account_password + otp_type: + type: string + enum: [authenticator, sms, email] + description: Type of OTP if 2FA is enabled (optional) + example: authenticator + pin_code: + type: string + description: OTP code if 2FA is enabled (optional) + example: '123456' + examples: + Without 2FA: + value: + password: your_account_password + With 2FA enabled: + value: + password: your_account_password + otp_type: authenticator + pin_code: '123456' + responses: + '200': + description: Download URL generated successfully + content: + application/json: + schema: + type: object + properties: + url: + type: string + example: https://s3.amazonaws.com/tago-io/...?X-Amz-Algorithm=... + description: Pre-signed S3 URL for downloading the backup (valid for 2 hours) + size: + type: number + example: 15728640 + description: File size in bytes + size_unit: + type: string + example: bytes + file_size_mb: + type: string + example: '15.00' + description: File size in megabytes (formatted) + expire_at: + type: string + example: '2025-01-07T16:30:00.000Z' + description: When the download URL expires + backup_id: + type: string + example: 678abc123def456789012345 + created_at: + type: string + example: '2025-01-07T14:30:00.000Z' + '400': + description: Bad request - Backup not ready or invalid parameters + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: 'Backup is not ready for download. Current status: processing' + '401': + description: Unauthorized - Invalid password or OTP + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: Invalid password + '404': + description: Not found - Backup does not exist + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: Backup not found or you don't have permission to access it. + parameters: + - name: profile_id + in: path + required: true + schema: + type: string + example: 61fac4d9a5c9f40012a5ff92 + description: The ID of the profile + - name: backup_id + in: path + required: true + schema: + type: string + example: 678abc123def456789012345 + description: The ID of the backup to download + /profile/{profile_id}/backup/{backup_id}: + delete: + tags: + - Backup + summary: Delete Backup + description: | + Permanently removes a backup from storage. This action is irreversible. + + **Security:** This endpoint requires account password verification to prevent accidental or unauthorized deletion. If you have Two-Factor Authentication (2FA) enabled, you must also provide the OTP code. + operationId: deleteProfileBackup + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - password + properties: + password: + type: string + description: Your account password for verification + example: your_account_password + otp_type: + type: string + enum: [authenticator, sms, email] + description: Type of OTP if 2FA is enabled (optional) + example: authenticator + pin_code: + type: string + description: OTP code if 2FA is enabled (optional) + example: '123456' + examples: + Without 2FA: + value: + password: your_account_password + With 2FA enabled: + value: + password: your_account_password + otp_type: authenticator + pin_code: '123456' + responses: + '200': + description: Backup deleted successfully + content: + application/json: + schema: + type: object + properties: + result: + type: string + example: Backup successfully removed + status: + type: boolean + example: true + '401': + description: Unauthorized - Invalid password or OTP + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: Invalid password + '404': + description: Not found - Backup does not exist + content: + application/json: + schema: + type: object + properties: + status: + type: boolean + example: false + message: + type: string + example: Backup not found or you don't have permission to delete it. + parameters: + - name: profile_id + in: path + required: true + schema: + type: string + example: 61fac4d9a5c9f40012a5ff92 + description: The ID of the profile + - name: backup_id + in: path + required: true + schema: + type: string + example: 678abc123def456789012345 + description: The ID of the backup to delete /dictionary: get: tags: