solarwinds-itsm-api-definitions 0.1.3 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Redocly/development.html +126 -0
  3. data/Redocly/index.html +126 -0
  4. data/Redocly/redoc/favicon.ico +0 -0
  5. data/Redocly/redoc/schema/resolved_schema.json +1 -0
  6. data/lib/definitions/common/components.json +270 -58
  7. data/lib/definitions/common/examples/catalog_item.json +70 -0
  8. data/lib/definitions/common/examples/change.json +127 -0
  9. data/lib/definitions/common/examples/change_catalog.json +92 -0
  10. data/lib/definitions/common/examples/configuration_item.json +108 -0
  11. data/lib/definitions/common/examples/hardware.json +125 -0
  12. data/lib/definitions/common/examples/incident.json +134 -109
  13. data/lib/definitions/common/examples/problem.json +126 -102
  14. data/lib/definitions/common/examples/release.json +150 -0
  15. data/lib/definitions/common/examples/service_request.json +28 -0
  16. data/lib/definitions/common/examples/solution.json +49 -0
  17. data/lib/definitions/common/examples/user.json +100 -70
  18. data/lib/definitions/common/schemas/analytics/audit.json +28 -0
  19. data/lib/definitions/common/schemas/analytics/risk.json +28 -0
  20. data/lib/definitions/common/schemas/inventory/hardware.json +104 -0
  21. data/lib/definitions/common/schemas/inventory/mobile.json +73 -0
  22. data/lib/definitions/common/schemas/inventory/other_asset.json +74 -0
  23. data/lib/definitions/common/schemas/inventory/printer.json +41 -0
  24. data/lib/definitions/common/schemas/inventory/software.json +28 -0
  25. data/lib/definitions/common/schemas/inventory/warranty.json +40 -0
  26. data/lib/definitions/common/schemas/procurement/contract.json +67 -0
  27. data/lib/definitions/common/schemas/procurement/item.json +51 -0
  28. data/lib/definitions/common/schemas/procurement/purchase.json +57 -0
  29. data/lib/definitions/common/schemas/procurement/purchase_order.json +85 -0
  30. data/lib/definitions/common/schemas/procurement/vendor.json +67 -0
  31. data/lib/definitions/common/schemas/service_desk/catalog_item.json +71 -0
  32. data/lib/definitions/common/schemas/service_desk/change.json +88 -0
  33. data/lib/definitions/common/schemas/service_desk/change_catalog.json +77 -0
  34. data/lib/definitions/common/schemas/service_desk/comment.json +52 -0
  35. data/lib/definitions/common/schemas/service_desk/configuration_item.json +117 -0
  36. data/lib/definitions/common/schemas/service_desk/incident.json +99 -0
  37. data/lib/definitions/common/schemas/service_desk/problem.json +81 -0
  38. data/lib/definitions/common/schemas/service_desk/release.json +86 -0
  39. data/lib/definitions/common/schemas/service_desk/service_request.json +31 -0
  40. data/lib/definitions/common/schemas/service_desk/solution.json +61 -0
  41. data/lib/definitions/common/schemas/service_desk/time_track.json +37 -0
  42. data/lib/definitions/common/schemas/setup/category.json +54 -0
  43. data/lib/definitions/common/schemas/setup/department.json +48 -0
  44. data/lib/definitions/common/schemas/setup/group.json +65 -0
  45. data/lib/definitions/common/schemas/setup/role.json +51 -0
  46. data/lib/definitions/common/schemas/setup/site.json +64 -0
  47. data/lib/definitions/common/schemas/setup/user.json +67 -0
  48. data/lib/definitions/common/schemas/tasks/task.json +52 -0
  49. data/lib/definitions/openapi.json +100 -8
  50. data/lib/definitions/paths/attachments/attachments.json +12 -0
  51. data/lib/definitions/paths/audits/audits.json +35 -0
  52. data/lib/definitions/paths/audits/audits_by_id.json +37 -0
  53. data/lib/definitions/paths/catalog_items/catalog_item_by_id.json +83 -0
  54. data/lib/definitions/paths/catalog_items/catalog_items.json +69 -0
  55. data/lib/definitions/paths/categories/categories.json +62 -0
  56. data/lib/definitions/paths/categories/category_by_id.json +70 -0
  57. data/lib/definitions/paths/change_catalogs/change_catalog_by_id.json +83 -0
  58. data/lib/definitions/paths/change_catalogs/change_catalogs.json +69 -0
  59. data/lib/definitions/paths/changes/change_by_id.json +83 -0
  60. data/lib/definitions/paths/changes/changes.json +69 -0
  61. data/lib/definitions/paths/comments/comment_by_id.json +65 -0
  62. data/lib/definitions/paths/comments/comments.json +31 -0
  63. data/lib/definitions/paths/configuration_items/append_dependent_assets.json +24 -0
  64. data/lib/definitions/paths/configuration_items/configuration_item_by_id.json +83 -0
  65. data/lib/definitions/paths/configuration_items/configuration_items.json +69 -0
  66. data/lib/definitions/paths/configuration_items/delete_asset_link.json +24 -0
  67. data/lib/definitions/paths/contracts/contract_by_id.json +74 -0
  68. data/lib/definitions/paths/contracts/contracts.json +62 -0
  69. data/lib/definitions/paths/contracts/item_by_id.json +75 -0
  70. data/lib/definitions/paths/contracts/items.json +30 -0
  71. data/lib/definitions/paths/departments/department_by_id.json +70 -0
  72. data/lib/definitions/paths/departments/departments.json +62 -0
  73. data/lib/definitions/paths/groups/group_by_id.json +70 -0
  74. data/lib/definitions/paths/groups/groups.json +62 -0
  75. data/lib/definitions/paths/hardwares/hardware_by_id.json +83 -0
  76. data/lib/definitions/paths/hardwares/hardwares.json +69 -0
  77. data/lib/definitions/paths/hardwares/warranties.json +64 -0
  78. data/lib/definitions/paths/hardwares/warranty_by_id.json +75 -0
  79. data/lib/definitions/paths/incidents/incident_by_id.json +7 -7
  80. data/lib/definitions/paths/incidents/incidents.json +10 -10
  81. data/lib/definitions/paths/memberships/membership_by_id.json +20 -0
  82. data/lib/definitions/paths/memberships/memberships.json +29 -0
  83. data/lib/definitions/paths/mobiles/mobile_by_id.json +74 -0
  84. data/lib/definitions/paths/mobiles/mobiles.json +62 -0
  85. data/lib/definitions/paths/other_assets/other_asset_by_id.json +74 -0
  86. data/lib/definitions/paths/other_assets/other_assets.json +62 -0
  87. data/lib/definitions/paths/printers/printer_by_id.json +53 -0
  88. data/lib/definitions/paths/printers/printers.json +36 -0
  89. data/lib/definitions/paths/problems/problem_by_id.json +7 -8
  90. data/lib/definitions/paths/problems/problems.json +10 -10
  91. data/lib/definitions/paths/purchase_orders/purchase_order_by_id.json +74 -0
  92. data/lib/definitions/paths/purchase_orders/purchase_orders.json +62 -0
  93. data/lib/definitions/paths/purchases/purchase_by_id.json +65 -0
  94. data/lib/definitions/paths/purchases/purchases.json +31 -0
  95. data/lib/definitions/paths/releases/release_by_id.json +83 -0
  96. data/lib/definitions/paths/releases/releases.json +69 -0
  97. data/lib/definitions/paths/risks/risks.json +34 -0
  98. data/lib/definitions/paths/roles/role_by_id.json +70 -0
  99. data/lib/definitions/paths/roles/roles.json +62 -0
  100. data/lib/definitions/paths/service_requests/request_by_id.json +37 -0
  101. data/lib/definitions/paths/sites/site_by_id.json +74 -0
  102. data/lib/definitions/paths/sites/sites.json +62 -0
  103. data/lib/definitions/paths/softwares/software_by_id.json +24 -0
  104. data/lib/definitions/paths/softwares/softwares.json +36 -0
  105. data/lib/definitions/paths/solutions/solution_by_id.json +83 -0
  106. data/lib/definitions/paths/solutions/solutions.json +69 -0
  107. data/lib/definitions/paths/tasks/task_by_id.json +65 -0
  108. data/lib/definitions/paths/tasks/tasks.json +31 -0
  109. data/lib/definitions/paths/time_tracks/time_track_by_id.json +65 -0
  110. data/lib/definitions/paths/time_tracks/time_tracks.json +66 -0
  111. data/lib/definitions/paths/users/user_by_id.json +8 -9
  112. data/lib/definitions/paths/users/users.json +11 -11
  113. data/lib/definitions/paths/vendors/vendor_by_id.json +74 -0
  114. data/lib/definitions/paths/vendors/vendors.json +62 -0
  115. data/lib/solarwinds/itsm/api/definitions.rb +52 -3
  116. metadata +104 -6
  117. data/lib/definitions/common/schemas/incident.json +0 -70
  118. data/lib/definitions/common/schemas/problem.json +0 -67
  119. data/lib/definitions/common/schemas/user.json +0 -54
  120. data/lib/resolved_schema/resolved_schema.json +0 -1
@@ -0,0 +1,52 @@
1
+ {
2
+ "components": {
3
+ "schemas": {
4
+ "request": {
5
+ "post": {
6
+ "type": "object",
7
+ "xml": { "name": "/" },
8
+ "properties": {
9
+ "task": {
10
+ "type": "object",
11
+ "required": ["name"],
12
+ "properties": { "$ref": "task.json#/components/schemas/request_properties" }
13
+ }
14
+ }
15
+ },
16
+ "put": {
17
+ "type": "object",
18
+ "xml": { "name": "/" },
19
+ "properties": {
20
+ "task": {
21
+ "type": "object",
22
+ "properties": { "$ref": "task.json#/components/schemas/request_properties" }
23
+ }
24
+ }
25
+ }
26
+ },
27
+ "request_properties": {
28
+ "name": { "type": "string", "example": "Task Name" },
29
+ "assignee": { "$ref": "../../components.json#/components/request/schemas/association_by_email" },
30
+ "due_at": { "type": "string", "example": "Jan 01, 2030" },
31
+ "is_complete": { "type": "boolean", "example": false }
32
+ },
33
+ "response": {
34
+ "type": "object",
35
+ "xml": { "name": "/", "wrapped": true },
36
+ "properties": {
37
+ "task": {
38
+ "type": "object",
39
+ "properties": {
40
+ "id": { "$ref": "../../components.json#/components/response/schemas/id" },
41
+ "name": { "type": "string", "example": "Task Name" },
42
+ "due_at": { "type": "string", "example": "2030-01-01T00:00:00.000+01:00" },
43
+ "requester": { "$ref": "../../components.json#/components/response/schemas/user_details" },
44
+ "assignee": { "$ref": "../../components.json#/components/response/schemas/group_details" },
45
+ "parent": { "$ref": "../../components.json#/components/response/schemas/parent_object" }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "openapi": "3.0.1",
3
3
  "info": {
4
- "title": "SolarWinds ITSM API",
5
- "description": "All SolarWinds ITSM API definitions",
6
- "version": "0.1.3",
4
+ "title": "SolarWinds Service Desk API",
5
+ "description":
6
+ "All SolarWinds Service Desk API definitions\n# General Concepts\n## Service URL\nFor US based customers, please use `https://api.samanage.com`\n\n For European based customers, please use `https://apieu.samanage.com`\n\n## Formats\n\nYou can use XML or JSON format for your request.\n\nXML Example: `curl -H \"X-Samanage-Authorization: Bearer TOKEN\" -H \"Accept: application/vnd.samanage.v2.1+xml\" -X GET https://api.samanage.com/incidents.xml`\n\nJSON Example: `curl -H \"X-Samanage-Authorization: Bearer TOKEN\" -H \"Accept: application/vnd.samanage.v2.1+json\" -H \"Content-Type: application/json\" -X GET https://api.samanage.com/incidents.json`\n\nFor create and update, the provided data needs to be in the correct format.\n\nXML Example: `<incident> <field_to_update>content</field_to_update> </incident>`\n\nJSON Example: `{\"incident\": {\"field_to_update\": \"content\"}}`\n\nTo clear fields, use the following format:\n\nXML Example: `<incident> <field_to_update></field_to_update> </incident>`\n\nJSON Example: `{\"incident\": {\"field_to_update\": \"\"}}`\n\n## Authentication\nThe API authentication is token-based. Admins can generate a token directly from the user setup page. The token is needed by the API developer to gain access to specific items in SolarWinds accessible only via the API. When an admin re-generates their token (via the user setup page), all previously generated tokens become invalid.\n\nThe tokens are relatively long strings that resemble the following: <div style=\"word-wrap: break-word;\"> AAAZWV0YXkubmF0YW4rNUBzYW1hbmFnZS5jb20hbGciOiJIUzUxMiJ9.eyJ1c2VyX2ljIjoxMjU2OTQzLCJnZW5lcmF0ZWRfYXQiOiIyMDE3LTA2LTA3IDA5OjE3OjI5In0.j_H15qzJJr9vXGAHCThLEOQrE9GGbjMxZJOs5zAf_iqaGqxlIOAmvPpBx0td_C3r7dliAfXXIgdqhZHVoK1KTwAzd1</div>\n\nIn order to supply the API token you should pass X-Samanage-Authorization header in the following format: “Bearer API_TOKEN_STRING”.\n\nThe API call resembles the following:\n\n`curl -H \"X-Samanage-Authorization: Bearer AAAZWV0YXkubmF0YW4rNUBzYW1hbmFnZS5jb20hbGciOiJIUzUxMiJ9.eyJ1c2VyX2ljIjoxMjU2OTQzLCJnZW5lcmF0ZWRfYXQiOiIyMDE3LTA2LTA3IDA5OjE3OjI5In0.j_H15qzJJr9vXGAHCThLEOQrE9GGbjMxZJOs5zAf_iqaGqxlIOAmvPpBx0td_C3r7dliAfXXIgdqhZHVoK1KTwAzd1\" -H \"Accept: application/vnd.samanage.v2.1+json\" https://api.samanage.com/hardwares.json`\n\nIf the authentication fails, a “401 Unauthorized” message will be returned.\n## Security\nSWSD uses a secured API channel. To connect to the regional API server, use the account admin users’ token information and connect using Token-based authentication. Requests should never be transferred in plain text over the wire. Instead, use SSL version 1.2 or higher (which can be accessed using https://) to ensure that all communication with the server is encrypted and secured.\n\nTo ensure API performance and avoid denial of service, we employ API call limits based per minute as defined by the Service Desk plan of the endpoint user.\n\nPackages:\n\nProfessional Plan - 1000 calls per minute\n\nEnterprise Plan - 1500 calls per minute\n## Versioning\nClients must provide the version number they are ready to work with in the “Accept” HTTP header. A valid \"Accept\" header should specify current content type and version number. For example, “application/vnd.samanage.v2.1+xml”.\n When no “Accept” header is specified, the API will default to version 2.1.\nIf you request an API version that is no longer supported, the API will respond with an HTTP status code of “406 – Not Acceptable”.\n\nExample: \n`curl -H \"X-Samanage-Authorization: Bearer TOKEN\" -H \"Accept: application/vnd.samanage.v2.1+json\" https://api.samanage.com/hardwares.json`\n## Version History\n* 1.0: Deprecated\n* 1.1: Changed structure of custom_fields_values\n* 1.2: Changed name of “incident_type” to “category” in Catalog items and Incidents\n* 1.3: Updates to incidents or comments will not send an email or a notification to the users. To enable this feature you must add add_callbacks=true to the url.\n* 2.1: Token based authentication\n## Pagination\nEvery response with a large data set will be paginated. The response will include the pagination data as headers and links (formatted as <url>; rel=”relative”). For example:\n\nX-Per-Page: 50\n\nX-Total-Count: 3099\n\nX-Total-Pages: 62\n\nLink: `<https://api.samanage.com/incidents.xml?page=1>`; rel=\"first\",\n\n`<https://api.samanage.com/incidents.xml?page=8>`; rel=\"prev\",\n\n`<https://api.samanage.com/incidents.xml?page=10>`; rel=\"next\",\n\n`<https://api.samanage.com/incidents.xml?page=62>`; rel=\"last\"\n\nYou can request a specific page by providing a “page” parameter. For example, to request the third page of the hardware list, you can use the following command: `curl -H \"X-Samanage-Authorization: Bearer TOKEN\" https://api.samanage.com/hardwares.json?page=3`\n\nTo control the number of rows returned, provide the per_page parameter. For example, to request 100 rows with each results page, you can use the following command: `curl -H \"X-Samanage-Authorization: Bearer TOKEN\" https://api.samanage.com/hardwares.json?per_page=100`\n## API Entry Point\n All communication with the API begins with a list of available services. Although it is possible to get directly to a specific service URL, we advise you begin with the api.xml entry point. This ensures your program will run seamlessly if changes are made to the underlying URLs for services in future versions of the API.\n\n**Request**\n\nGET api.samanage.com/api.json \n`curl -H \"X-Samanage-Authorization: Bearer TOKEN\" -H \"Accept: application/json\" -X GET https://api.samanage.com/api.json`\n\n**Response**\n\n`[{\"name\":\"Computers List\",\"href\":\"https://api.samanage.com/hardwares.json\"},`\n\n`{\"name\":\"Helpdesk Incidents List\",\"href\":\"https://api.samanage.com/incidents.json\"},`\n\n`{\"name\":\"Changes List\",\"href\":\"https://api.samanage.com/changes.json\"},`\n\n`...]`\n## Short / long layout\nFor all APIs, you can specify the layout (short / long). This affects the length of the returned records, and is relevant for changes, contracts, hardwares, incidents, other assets, problems, and solutions.\n\nTo use, add the parameter to the request: “?layout=short” or “?layout=long”. If not present, the default is “short”.\n## Searching\nYou can search for records by using query parameters on top of the base URL. For example, when requesting a list of hardwares, you may want to limit them to only those with a specific IP address. This could be accomplished with a request like -\n\n GET api.samanage.com/hardwares.xml?ip_address=123.456*\n\nHere, ip_address is a query parameter that implements a filter where the IP equals 123.456.xxx.xxx.\n\nOther examples: `https://api.samanage.com/other_assets.json?asset_id=XXXXXXXX`, `https://api.samanage.com/hardwares.json?asset_tag=XXXXXXXX`\n## Date formats\nThe following date formats are allowed as input when updating date fields:\n\n* January 21, 2015\n* January 21 2015\n* Jan 21, 2015\n* Jan 21 2015\n* 21/1/2015\n* 2015/1/21\n* 21-1-2015\n* 2015-1-21\n*21.1.2015 \n* 2015.1.21\n## Custom fields\nTo set custom fields, use the following data format:\n\n XML Example:\n\n`<incident><custom_fields_values>`\n\n`<custom_fields_value><name>field name</name><value>content</value></custom_fields_value>`\n\n`</custom_fields_values></incident>`\n\nJSON Example:\n\n`{\"incident\": {\"custom_fields_values\": {\"custom_fields_value\": [{\"name\": \"field name\",\"value\": \"content\"}]}}}`<br><br><hr></hr>",
7
+ "version": "0.1.8",
8
+ "x-logo": {
9
+ "url": "https://tse4.mm.bing.net/th?id=OIP.lhiASqIhZ7Ow90BTOuu5kAHaEH&pid=Api&P=0&w=301&h=168",
10
+ "href": "https://support.solarwinds.com"
11
+ },
7
12
  "contact": {
8
13
  "name": "API Support",
9
- "url": "samanage.com/support",
10
- "email": "support@samanage.com"
14
+ "url": "https://support.solarwinds.com",
15
+ "email": "servicedesksupport@solarwinds.com"
11
16
  }
12
17
  },
13
18
  "servers": [
@@ -17,14 +22,101 @@
17
22
  "paths": {
18
23
  "/incidents/{id}": { "$ref": "paths/incidents/incident_by_id.json" },
19
24
  "/incidents": { "$ref": "paths/incidents/incidents.json" },
25
+ "/problems/{id}": { "$ref": "paths/problems/problem_by_id.json" },
26
+ "/problems": { "$ref": "paths/problems/problems.json" },
27
+ "/changes/{id}": { "$ref": "paths/changes/change_by_id.json" },
28
+ "/changes": { "$ref": "paths/changes/changes.json" },
29
+ "/change_catalogs/{id}": { "$ref": "paths/change_catalogs/change_catalog_by_id.json" },
30
+ "/change_catalogs": { "$ref": "paths/change_catalogs/change_catalogs.json" },
31
+ "/releases/{id}": { "$ref": "paths/releases/release_by_id.json" },
32
+ "/releases": { "$ref": "paths/releases/releases.json" },
33
+ "/solutions/{id}": { "$ref": "paths/solutions/solution_by_id.json" },
34
+ "/solutions": { "$ref": "paths/solutions/solutions.json" },
35
+ "/catalog_items/{id}": { "$ref": "paths/catalog_items/catalog_item_by_id.json" },
36
+ "/catalog_items": { "$ref": "paths/catalog_items/catalog_items.json" },
37
+ "/catalog_items/{id}/service_requests": { "$ref": "paths/service_requests/request_by_id.json" },
38
+ "/configuration_items/{id}": { "$ref": "paths/configuration_items/configuration_item_by_id.json" },
39
+ "/configuration_items": { "$ref": "paths/configuration_items/configuration_items.json" },
40
+ "/configuration_items/{id}/append_multiple_dependent_assets": { "$ref": "paths/configuration_items/append_dependent_assets.json" },
41
+ "/asset_links/delete_asset_link_by_id": { "$ref": "paths/configuration_items/delete_asset_link.json" },
20
42
  "/users/{id}": { "$ref": "paths/users/user_by_id.json" },
21
43
  "/users": { "$ref": "paths/users/users.json" },
22
- "/problems/{id}": { "$ref": "paths/problems/problem_by_id.json" },
23
- "/problems": { "$ref": "paths/problems/problems.json" }
44
+ "/sites/{id}": { "$ref": "paths/sites/site_by_id.json" },
45
+ "/sites": { "$ref": "paths/sites/sites.json" },
46
+ "/departments/{id}": { "$ref": "paths/departments/department_by_id.json" },
47
+ "/departments": { "$ref": "paths/departments/departments.json" },
48
+ "/roles/{id}": { "$ref": "paths/roles/role_by_id.json" },
49
+ "/roles": { "$ref": "paths/roles/roles.json" },
50
+ "/groups/{id}": { "$ref": "paths/groups/group_by_id.json" },
51
+ "/groups": { "$ref": "paths/groups/groups.json" },
52
+ "/categories/{id}": { "$ref": "paths/categories/category_by_id.json" },
53
+ "/categories": { "$ref": "paths/categories/categories.json" },
54
+ "/hardwares/{id}": { "$ref": "paths/hardwares/hardware_by_id.json" },
55
+ "/hardwares": { "$ref": "paths/hardwares/hardwares.json" },
56
+ "/mobiles/{id}": { "$ref": "paths/mobiles/mobile_by_id.json" },
57
+ "/mobiles": { "$ref": "paths/mobiles/mobiles.json" },
58
+ "/other_assets/{id}": { "$ref": "paths/other_assets/other_asset_by_id.json" },
59
+ "/other_assets": { "$ref": "paths/other_assets/other_assets.json" },
60
+ "/softwares/{id}": { "$ref": "paths/softwares/software_by_id.json" },
61
+ "/softwares": { "$ref": "paths/softwares/softwares.json" },
62
+ "/printers/{id}": { "$ref": "paths/printers/printer_by_id.json" },
63
+ "/printers": { "$ref": "paths/printers/printers.json" },
64
+ "/contracts/{id}": { "$ref": "paths/contracts/contract_by_id.json" },
65
+ "/contracts": { "$ref": "paths/contracts/contracts.json" },
66
+ "/purchase_orders/{id}": { "$ref": "paths/purchase_orders/purchase_order_by_id.json" },
67
+ "/purchase_orders": { "$ref": "paths/purchase_orders/purchase_orders.json" },
68
+ "/vendors/{id}": { "$ref": "paths/vendors/vendor_by_id.json" },
69
+ "/vendors": { "$ref": "paths/vendors/vendors.json" },
70
+ "/contracts/{id}/items": { "$ref": "paths/contracts/items.json" },
71
+ "/contracts/{contract_id}/items/{item_id}": { "$ref": "paths/contracts/item_by_id.json" },
72
+ "/{object_type}/{id}/tasks": { "$ref": "paths/tasks/tasks.json" },
73
+ "/{object_type}/{id}/tasks/{task_id}": { "$ref": "paths/tasks/task_by_id.json" },
74
+ "/{object_type}/{id}/comments": { "$ref": "paths/comments/comments.json" },
75
+ "/{object_type}/{id}/comments/{comment_id}": { "$ref": "paths/comments/comment_by_id.json" },
76
+ "/hardwares/{id}/warranties": { "$ref": "paths/hardwares/warranties.json" },
77
+ "/hardwares/{hardware_id}/warranties/{warranty_id}": { "$ref": "paths/hardwares/warranty_by_id.json" },
78
+ "/{object_type}/{id}/time_tracks": { "$ref": "paths/time_tracks/time_tracks.json" },
79
+ "/{object_type}/{id}/time_tracks/{time_track_id}": { "$ref": "paths/time_tracks/time_track_by_id.json" },
80
+ "/{object_type}/{id}/purchases": { "$ref": "paths/purchases/purchases.json" },
81
+ "/{object_type}/{id}/purchases/{purchase_id}": { "$ref": "paths/purchases/purchase_by_id.json" },
82
+ "/memberships": { "$ref": "paths/memberships/memberships.json" },
83
+ "/memberships/{id}": { "$ref": "paths/memberships/membership_by_id.json" },
84
+ "/audits": { "$ref": "paths/audits/audits.json" },
85
+ "/{object_type}/{id}/audits": { "$ref": "paths/audits/audits_by_id.json" },
86
+ "/risks": { "$ref": "paths/risks/risks.json" },
87
+ "/attachments": { "$ref": "paths/attachments/attachments.json" }
24
88
  },
25
89
  "tags": [
26
90
  { "name": "Incident", "description": "Incident operations" },
91
+ { "name": "Problem", "description": "Problem operations" },
92
+ { "name": "Change", "description": "Change operations" },
93
+ { "name": "Change Catalog", "description": "Change catalog operations" },
94
+ { "name": "Release", "description": "Release operations" },
95
+ { "name": "Solution", "description": "Solution operations" },
96
+ { "name": "Catalog Item", "description": "Catalog Item operations" },
97
+ { "name": "Service Request", "description": "Requesting a service" },
98
+ { "name": "Configuration Item", "description": "Configuration Item operations" },
27
99
  { "name": "User", "description": "User operations" },
28
- { "name": "Problem", "description": "Problem operations" }
100
+ { "name": "Site", "description": "Site operations" },
101
+ { "name": "Department", "description": "Department operations" },
102
+ { "name": "Role", "description": "Role operations" },
103
+ { "name": "Group", "description": "Group operations" },
104
+ { "name": "Membership", "description": "Membership operations" },
105
+ { "name": "Category", "description": "Category operations" },
106
+ { "name": "Hardware", "description": "Hardware operations" },
107
+ { "name": "Mobile Device", "description": "Mobile device operations" },
108
+ { "name": "Other Asset", "description": "Other asset operations" },
109
+ { "name": "Software", "description": "Software operations" },
110
+ { "name": "Printer", "description": "Printer operations" },
111
+ { "name": "Contract", "description": "Contract operations" },
112
+ { "name": "Purchase Order", "description": "Purchase order operations" },
113
+ { "name": "Vendor", "description": "Vendor operations" },
114
+ { "name": "Task", "description": "Task operations" },
115
+ { "name": "Comment", "description": "Comment operations" },
116
+ { "name": "Time Track", "description": "Time Track operations" },
117
+ { "name": "Purchase", "description": "Purchase operations" },
118
+ { "name": "Audit", "description": "Audit operations" },
119
+ { "name": "Risk", "description": "Risk operations" },
120
+ { "name": "Attachment", "description": "Attachment operations" }
29
121
  ]
30
122
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "post": {
3
+ "operationId": "createAttachment",
4
+ "description": "Create a new attachment: <p>curl -H 'X-Samanage-Authorization: Bearer TOKEN' <br>-F 'file[attachable_type]=PARENT_OBJECT_TYPE' <br>-F 'file[attachable_id]=PARENT_OBJECT_ID' <br>-F 'file[attachment]=@/PATH/TO/FILE' <br>-H 'Accept: application/vnd.samanage.v1.3+xml' <br>-H 'Content-Type: multipart/form-data' <br>-X POST https://api.samanage.com/attachments.xml/json </p>",
5
+ "tags": ["Attachment"],
6
+ "responses": {
7
+ "200": { "description": "File successfully attached" },
8
+ "400": { "description": "Bad request" },
9
+ "500": { "description": "Server error" }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getAudits",
4
+ "description": "List of audits",
5
+ "tags": ["Audit"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
8
+ ],
9
+ "responses": {
10
+ "200": {
11
+ "description": "Object was returned correctly",
12
+ "content": {
13
+ "application/json": {
14
+ "schema": {
15
+ "description": "List of audits",
16
+ "type": "array",
17
+ "items": { "$ref": "../../common/schemas/analytics/audit.json#/components/schemas/response" }
18
+ }
19
+ },
20
+ "application/xml": {
21
+ "schema": {
22
+ "description": "List of audits",
23
+ "type": "array",
24
+ "xml": { "name": "/", "wrapped": true },
25
+ "items": { "$ref": "../../common/schemas/analytics/audit.json#/components/schemas/response" }
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "400": { "description": "Bad request" },
31
+ "404": { "description": "Not found" },
32
+ "500": { "description": "Server error" }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getAuditById",
4
+ "description": "Get audits of a specific object. Example: curl -X GET \"https://api.samanage.com/incidents/1/audits\" -H \"accept: application/json\" -H \"X-Samanage-Authorization: Bearer TOKEN\"",
5
+ "tags": ["Audit"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" },
8
+ { "$ref": "../../common/components.json#/components/request/parameters/id_param" },
9
+ { "$ref": "../../common/components.json#/components/request/parameters/object_param" }
10
+ ],
11
+ "responses": {
12
+ "200": {
13
+ "description": "Object was returned correctly",
14
+ "content": {
15
+ "application/json": {
16
+ "schema": {
17
+ "description": "List of audits of a specific object",
18
+ "type": "array",
19
+ "items": { "$ref": "../../common/schemas/analytics/audit.json#/components/schemas/response" }
20
+ }
21
+ },
22
+ "application/xml": {
23
+ "schema": {
24
+ "description": "List of audits of a specific object",
25
+ "type": "array",
26
+ "xml": { "name": "/", "wrapped": true },
27
+ "items": { "$ref": "../../common/schemas/analytics/audit.json#/components/schemas/response" }
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "400": { "description": "Bad request" },
33
+ "404": { "description": "Not found" },
34
+ "500": { "description": "Internal Server Error" }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getCatalogItemById",
4
+ "description": "Get catalog item",
5
+ "tags": ["Catalog Item"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" },
8
+ { "$ref": "../../common/components.json#/components/request/parameters/id_param" }
9
+ ],
10
+ "responses": {
11
+ "200": {
12
+ "description": "Object was returned correctly",
13
+ "content": {
14
+ "application/json": {
15
+ "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" },
16
+ "example": { "$ref": "../../common/examples/catalog_item.json#/examples/response/json" }
17
+ },
18
+ "application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" } }
19
+ }
20
+ },
21
+ "400": { "description": "Bad request" },
22
+ "404": { "description": "Not found" },
23
+ "500": { "description": "Internal Server Error" }
24
+ }
25
+ },
26
+ "put": {
27
+ "operationId": "updateCatalogItemById",
28
+ "description": "Update catalog item with specified fields",
29
+ "tags": ["Catalog Item"],
30
+ "parameters": [
31
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" },
32
+ { "$ref": "../../common/components.json#/components/request/parameters/id_param" }
33
+ ],
34
+ "requestBody": {
35
+ "required": true,
36
+ "description": "Catalog item fields to update",
37
+ "content": {
38
+ "application/json": {
39
+ "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/request/put" },
40
+ "example": { "$ref": "../../common/examples/catalog_item.json#/examples/request/json" }
41
+ },
42
+ "application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/request/put" } }
43
+ }
44
+ },
45
+ "responses": {
46
+ "200": {
47
+ "description": "Object was updated correctly",
48
+ "content": {
49
+ "application/json": {
50
+ "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" },
51
+ "example": { "$ref": "../../common/examples/catalog_item.json#/examples/response/json" }
52
+ },
53
+ "application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" } }
54
+ }
55
+ },
56
+ "400": { "description": "Bad request" },
57
+ "404": { "description": "Not found" },
58
+ "500": { "description": "Internal Server Error" }
59
+ }
60
+ },
61
+ "delete": {
62
+ "operationId": "deleteCatalogItemById",
63
+ "description": "Delete catalog item",
64
+ "tags": ["Catalog Item"],
65
+ "parameters": [
66
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" },
67
+ { "$ref": "../../common/components.json#/components/request/parameters/id_param" }
68
+ ],
69
+ "responses": {
70
+ "200": {
71
+ "description": "Returns the deleted catalog item's id",
72
+ "content": {
73
+ "application/json": {
74
+ "example": { "deleted_ids": ["1"] }
75
+ }
76
+ }
77
+ },
78
+ "400": { "description": "Bad request" },
79
+ "404": { "description": "Not found" },
80
+ "500": { "description": "Internal Server Error" }
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getCatalogItems",
4
+ "description": "List of catalog items",
5
+ "tags": ["Catalog Item"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
8
+ ],
9
+ "responses": {
10
+ "200": {
11
+ "description": "Object was returned correctly",
12
+ "content": {
13
+ "application/json": {
14
+ "schema": {
15
+ "description": "List of catalog items",
16
+ "type": "array",
17
+ "items": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" }
18
+ },
19
+ "example": [{ "$ref": "../../common/examples/catalog_item.json#/examples/response/json" }]
20
+ },
21
+ "application/xml": {
22
+ "schema": {
23
+ "description": "List of catalog items",
24
+ "type": "array",
25
+ "xml": { "name": "/", "wrapped": true },
26
+ "items": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" }
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "400": { "description": "Bad request" },
32
+ "404": { "description": "Not found" },
33
+ "500": { "description": "Server error" }
34
+ }
35
+ },
36
+ "post": {
37
+ "operationId": "createCatalogItem",
38
+ "description": "Create new catalog item",
39
+ "tags": ["Catalog Item"],
40
+ "parameters": [
41
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
42
+ ],
43
+ "requestBody": {
44
+ "required": true,
45
+ "description": "Catalog Item fields to fill",
46
+ "content": {
47
+ "application/json": {
48
+ "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/request/post" },
49
+ "example": { "$ref": "../../common/examples/catalog_item.json#/examples/request/json" }
50
+ },
51
+ "application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/request/post" } }
52
+ }
53
+ },
54
+ "responses": {
55
+ "200": {
56
+ "description": "Object created and returned correctly",
57
+ "content": {
58
+ "application/json": {
59
+ "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" },
60
+ "example": { "$ref": "../../common/examples/catalog_item.json#/examples/response/json" }
61
+ },
62
+ "application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/catalog_item.json#/components/schemas/response" } }
63
+ }
64
+ },
65
+ "400": { "description": "Bad request" },
66
+ "500": { "description": "Server error" }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getCategories",
4
+ "description": "List of categories",
5
+ "tags": ["Category"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
8
+ ],
9
+ "responses": {
10
+ "200": {
11
+ "description": "Object was returned correctly",
12
+ "content": {
13
+ "application/json": {
14
+ "schema": {
15
+ "description": "List of categories",
16
+ "type": "array",
17
+ "items": { "allOf": [{ "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" }] }
18
+ }
19
+ },
20
+ "application/xml": {
21
+ "schema": {
22
+ "description": "List of categories",
23
+ "type": "array",
24
+ "xml": { "name": "/", "wrapped": true },
25
+ "items": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" }
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "400": { "description": "Bad request" },
31
+ "404": { "description": "Not found" },
32
+ "500": { "description": "Server error" }
33
+ }
34
+ },
35
+ "post": {
36
+ "operationId": "createCategory",
37
+ "description": "Create new category",
38
+ "tags": ["Category"],
39
+ "parameters": [
40
+ { "$ref": "../../common/components.json#/components/request/parameters/token_param" }
41
+ ],
42
+ "requestBody": {
43
+ "required": true,
44
+ "description": "Category fields to fill",
45
+ "content": {
46
+ "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/request/post" } },
47
+ "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/request/post" } }
48
+ }
49
+ },
50
+ "responses": {
51
+ "200": {
52
+ "description": "Object created and returned correctly",
53
+ "content": {
54
+ "application/json": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } },
55
+ "application/xml": { "schema": { "$ref": "../../common/schemas/setup/category.json#/components/schemas/response" } }
56
+ }
57
+ },
58
+ "400": { "description": "Bad request" },
59
+ "500": { "description": "Server error" }
60
+ }
61
+ }
62
+ }