{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"5dc0a372-29c8-440f-9aec-d63cbe6dcf1c","name":"SNAG-View-4-API","description":"This documentation describes all API endpoints, methods and objects in SNAG-View4. The API endpoints are listed alphabetically.\n\nTo run examples from documentation inside Postman, you have to execute \"Login\" request first. This will set necessary cookies in Postman and all other requests can be executed.\n\n# Concepts\n\n## Bearer-Token\n\nSV4 uses tokens to allow access to the API. You can get a token by using the token API endpoints.\n\nSV4 expects the to be included in all API requests to the server in a parameter that looks like the following.\n\n```\n/rest/v1/...?token=\n\n ```\n\nor as cookie in body of request (recommended)\n\n```\n/rest/v1/ \\\n--header 'Content-Type: application/json' \\\n--header 'Cookie: impersonation-token='\n\n ```\n\n## HTTP Methods\n\nWe use following HTTP methods.\n\n| Method | Action |\n| --- | --- |\n| GET | Read |\n| POST | Create |\n| PATCH | Update |\n| DELETE | Delete |\n\n**You can use body or query parameters (URL) for all methods. Do not mix both. If you do so query parameters from URL overwrite parameters in body.**\n\n## Query Parameters\n\nThese parameters can be added to the query. They are send via body or  \nurl arguments. For your convienence we use the body method in this  \ndocumentation.\n\n| Parameter | Default | Description |\n| --- | --- | --- |\n| sort | id/ASC | Defines the sorting attribute and order. |\n| logic | Filter Logic Block | Defines the filter which will be user to calculate the needed object list. |\n| start | 0 | Defines the start number. |\n| limit | 0 | Defines the return limit. |\n| detailed | false | Query returns additional information for objects if available. |\n\n**Parameter \"detailed\": true is used in this documentation for API requests quering single object by name with GET method.**\n\n## Requests\n\n### Request response schema\n\nResponses of the API correspond to a certain scheme.\n\nFirst in response is \"status\", followed by a \"message\" According API endpoint you get objects.\n\n```\n{\n    \"status\": status code,\n    \"msg\": \"message depending called api endpoint\",\n    \"data\": {\n        \"type\": \"requested object\",\n        \"start\": 0,\n        \"limit\": 0,\n        \"total\": 6,\n        \"objects\": [\n            {\n                \"id\": \"ID\",\n                \"name\": \"name\",\n                ...\n\n ```\n\n### Request with body\n\nIn this documentation we use requests with bodies. It is more readable.\n\n```\ncurl --location --request POST 'SERVER/rest/v1/API ENDPOINT\n--header 'Content-Type: application/json'\n--header 'Cookie: impersonation-token=IMPERSONATION TOKEN'\n--data '{...}'\n\n ```\n\n### Request with parameters\n\nYou can use requests with parameters.\n\n**Filters in parameters have to be URL encoded.**\n\nFollowing request with parameters is same as request with body.\n\n```\ncurl --location --request GET \"SERVER/rest/v1/device?detailed=false&logic=name like \"*\"&token=TOKEN\"\n\n ```\n\n## Object Parameters\n\nMost SNAG-View 4 objects have object parameters. These parameters can be used either to link (add_object) to other objects, or unlink (remove_object) from them. Some parameters are only available when creating objects. The parameters available for an object are documented for each object under \" parameters\".\n\n## ObjectScope\n\nMost object parameters must be used with an objectscope. In this case, the parameter type is \"objectscope\". How it works:\n\nThe parameter defines the kind of object, e.g. add_tags defines the object type \"Tag\" and the action \"add\".\n\nThe simplest objectscope is an array of IDs for the object of the parameter.\n\n``` json\n{\n  \"changes\": {\n    \"add_tags\": {\n      \"objects\": [\n        \"1\",\n        \"2\"\n      ]\n    }\n  }\n}\n\n ```\n\nObjectscope can be used with a filter:\n\n``` json\n{\n    \"changes\": {\n        \"add_tags\": {\n            \"objects\": [],\n            \"filter\": {\n                \"type\": \"and\",\n                \"conditions\": [\n                    {\n                        \"attribute\": \"name\",\n                        \"operator\": \"in\",\n                        \"value\": [\n                            \"windows\",\n                            \"mssql\"\n                        ]\n                    }\n                ],\n                \"blocks\": []\n            }\n        }\n    }\n}\n\n ```\n\nIt is also possible to combine IDs from \"objects\" with a filter:\n\n``` json\n{\n    \"changes\": {\n        \"add_tags\": {\n            \"objects\": [\"1\"],\n            \"filter\": {\n                \"type\": \"and\",\n                \"conditions\": [\n                    {\n                        \"attribute\": \"name\",\n                        \"operator\": \"is\",\n                        \"value\": \"windows\"\n                    }\n                ],\n                \"blocks\": []\n            }\n        }\n    }\n}\n\n ```\n\n## PermissionScope\n\nIn SNAG-View 4 are three permissions:\n\n- read (r)\n    \n- write (w)\n    \n- delete (d)\n    \n\nPermissions can be combined to\n\n- r\n    \n- rw\n    \n- rwd\n    \n\nWith \"PermissionScope\" permissions for objects will be defined.\n\nHow it works:\n\nThe \"permissions\" parameter defines the permissions of object type, e.g. \"device_permissions\" defines the permission for object of typ \"device\". The other parameters define actions for permissions (add, remove).\n\nThe simplest permissionscope is an array of permissions for object IDs:\n\n``` json\n{\n    \"objects\": [\n        {\n            \"name\": \"<APPROVAL-NAME>\",\n            \"device_permissions\": {\n                \"rwd\": {\n                    \"objects\": [\"1\",\"2\"]\n                }\n            }\n        }\n    ]\n}\n\n ```\n\nPermissionscope can be used with a filter:\n\n``` json\n{\n    \"objects\": [\n        {\n            \"name\": \"<APPROVAL-NAME>\",\n            \"device_permissions\": {\n                \"rwd\": {\n                    \"objects\": [],\n            \"filter\": {\n                        \"type\": \"and\",\n                        \"conditions\": [\n                            {\n                                \"attribute\": \"name\",\n                                \"operator\": \"is\",\n                                \"value\": \"snag-view\"\n                            }\n                        ],\n                        \"blocks\": []\n                    },\n                \"users\": {\n                \"objects\": [],\n                }\n            }\n        }\n    ]\n}\n\n ```\n\nIt is also possible to combine IDs from \"objects\" and \"users\" with a filter:\n\n``` json\n{\n    \"objects\": [\n        {\n            \"name\": \"test1\",\n            \"device_permissions\": {\n                \"r\": {\n                    \"objects\": [],            \n                    \"filter\": {\n                        \"type\": \"and\",\n                        \"conditions\": [\n                            {\n                                \"attribute\": \"name\",\n                                \"operator\": \"in\",\n                                \"value\": [\"<VALUE1>\",\"<VALUE2>\"]\n                            }\n                        ],\n                        \"blocks\": []\n                    }\n                }\n            },\n            \"users\": {\n                \"objects\": [],\n                            \"filter\": {\n                        \"type\": \"and\",\n                        \"conditions\": [\n                            {\n                                \"attribute\": \"name\",\n                                \"operator\": \"like\",\n                                \"value\": \"<STRING>*\"\n                            }\n                        ],\n                        \"blocks\": []\n                    }\n            }\n        }\n    ]\n}\n\n ```\n\n## SNAG-View 4 status codes\n\nSNAG-View 4 has it's own status codes.  \nSuccessfull requests return 200 status followed by a message.\n\n```\n{  \n\"status\": 200,  \n\"msg\": \"Message according result.\"  \n}\n\n ```\n\n## SV4 error codes\n\nSV4 error codes are followed by a message describes the occured error.\n\n| Code | Message | Notes |\n| --- | --- | --- |\n| 401 | \"login required\" | Missing token |\n| 500 | \"code=404, message=Not Found\" | API endpoint does not exist |\n|  | msg\": \"unauthorized\" | Wrong credentials |\n|  | could not bind request data to insert request struct: could not decode data: json: unknown field | Fieldname from request does not exist |\n|  | \"could not bind request data to insert request struct: could not decode data: invalid character 'x' after object key:value pair\" | wrong value for option in API-request |\n|  | \"needed permission: ...\" | User has insufficent permissions for this action. |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"24330141","team":4272543,"collectionId":"5dc0a372-29c8-440f-9aec-d63cbe6dcf1c","publishedId":"2sBXqRjHBZ","public":true,"publicUrl":"https://apidoc.snag-view.de","privateUrl":"https://go.postman.co/documentation/24330141-5dc0a372-29c8-440f-9aec-d63cbe6dcf1c","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.11.6","publishDate":"2026-05-18T09:16:46.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/f9480c944e0f2881233d7b6e6de36a3e24557302bb40fc9baafee80463a1eb70","favicon":"https://snag-view.de/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://apidoc.snag-view.de/view/metadata/2sBXqRjHBZ"}