solarwinds-itsm-api-definitions 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/lib/definitions/common/components.json +222 -58
  3. data/lib/definitions/common/examples/catalog_item.json +70 -0
  4. data/lib/definitions/common/examples/change.json +123 -0
  5. data/lib/definitions/common/examples/change_catalog.json +72 -0
  6. data/lib/definitions/common/examples/configuration_item.json +110 -0
  7. data/lib/definitions/common/examples/hardware.json +100 -0
  8. data/lib/definitions/common/examples/incident.json +130 -109
  9. data/lib/definitions/common/examples/problem.json +6 -4
  10. data/lib/definitions/common/examples/release.json +128 -0
  11. data/lib/definitions/common/examples/service_request.json +28 -0
  12. data/lib/definitions/common/examples/solution.json +44 -0
  13. data/lib/definitions/common/examples/user.json +6 -6
  14. data/lib/definitions/common/schemas/analytics/audit.json +28 -0
  15. data/lib/definitions/common/schemas/analytics/risk.json +28 -0
  16. data/lib/definitions/common/schemas/inventory/hardware.json +104 -0
  17. data/lib/definitions/common/schemas/inventory/mobile.json +73 -0
  18. data/lib/definitions/common/schemas/inventory/other_asset.json +74 -0
  19. data/lib/definitions/common/schemas/inventory/printer.json +41 -0
  20. data/lib/definitions/common/schemas/inventory/software.json +28 -0
  21. data/lib/definitions/common/schemas/inventory/warranty.json +40 -0
  22. data/lib/definitions/common/schemas/procurement/contract.json +67 -0
  23. data/lib/definitions/common/schemas/procurement/item.json +51 -0
  24. data/lib/definitions/common/schemas/procurement/purchase.json +57 -0
  25. data/lib/definitions/common/schemas/procurement/purchase_order.json +82 -0
  26. data/lib/definitions/common/schemas/procurement/vendor.json +67 -0
  27. data/lib/definitions/common/schemas/service_desk/catalog_item.json +71 -0
  28. data/lib/definitions/common/schemas/service_desk/change.json +88 -0
  29. data/lib/definitions/common/schemas/service_desk/change_catalog.json +77 -0
  30. data/lib/definitions/common/schemas/service_desk/comment.json +52 -0
  31. data/lib/definitions/common/schemas/service_desk/configuration_item.json +119 -0
  32. data/lib/definitions/common/schemas/service_desk/incident.json +89 -0
  33. data/lib/definitions/common/schemas/service_desk/problem.json +81 -0
  34. data/lib/definitions/common/schemas/service_desk/release.json +86 -0
  35. data/lib/definitions/common/schemas/service_desk/service_request.json +31 -0
  36. data/lib/definitions/common/schemas/service_desk/solution.json +61 -0
  37. data/lib/definitions/common/schemas/service_desk/time_track.json +37 -0
  38. data/lib/definitions/common/schemas/setup/category.json +54 -0
  39. data/lib/definitions/common/schemas/setup/department.json +48 -0
  40. data/lib/definitions/common/schemas/setup/group.json +65 -0
  41. data/lib/definitions/common/schemas/setup/role.json +51 -0
  42. data/lib/definitions/common/schemas/setup/site.json +64 -0
  43. data/lib/definitions/common/schemas/setup/user.json +67 -0
  44. data/lib/definitions/common/schemas/tasks/task.json +52 -0
  45. data/lib/definitions/openapi.json +91 -4
  46. data/lib/definitions/paths/attachments/attachments.json +12 -0
  47. data/lib/definitions/paths/audits/audits.json +35 -0
  48. data/lib/definitions/paths/audits/audits_by_id.json +37 -0
  49. data/lib/definitions/paths/catalog_items/catalog_item_by_id.json +83 -0
  50. data/lib/definitions/paths/catalog_items/catalog_items.json +69 -0
  51. data/lib/definitions/paths/categories/categories.json +62 -0
  52. data/lib/definitions/paths/categories/category_by_id.json +70 -0
  53. data/lib/definitions/paths/change_catalogs/change_catalog_by_id.json +83 -0
  54. data/lib/definitions/paths/change_catalogs/change_catalogs.json +69 -0
  55. data/lib/definitions/paths/changes/change_by_id.json +83 -0
  56. data/lib/definitions/paths/changes/changes.json +69 -0
  57. data/lib/definitions/paths/comments/comment_by_id.json +65 -0
  58. data/lib/definitions/paths/comments/comments.json +31 -0
  59. data/lib/definitions/paths/configuration_items/append_dependent_assets.json +24 -0
  60. data/lib/definitions/paths/configuration_items/configuration_item_by_id.json +83 -0
  61. data/lib/definitions/paths/configuration_items/configuration_items.json +69 -0
  62. data/lib/definitions/paths/configuration_items/delete_asset_link.json +24 -0
  63. data/lib/definitions/paths/contracts/contract_by_id.json +74 -0
  64. data/lib/definitions/paths/contracts/contracts.json +62 -0
  65. data/lib/definitions/paths/contracts/item_by_id.json +75 -0
  66. data/lib/definitions/paths/contracts/items.json +30 -0
  67. data/lib/definitions/paths/departments/department_by_id.json +70 -0
  68. data/lib/definitions/paths/departments/departments.json +62 -0
  69. data/lib/definitions/paths/groups/group_by_id.json +70 -0
  70. data/lib/definitions/paths/groups/groups.json +62 -0
  71. data/lib/definitions/paths/hardwares/hardware_by_id.json +83 -0
  72. data/lib/definitions/paths/hardwares/hardwares.json +69 -0
  73. data/lib/definitions/paths/hardwares/warranties.json +64 -0
  74. data/lib/definitions/paths/hardwares/warranty_by_id.json +75 -0
  75. data/lib/definitions/paths/incidents/incident_by_id.json +7 -7
  76. data/lib/definitions/paths/incidents/incidents.json +10 -10
  77. data/lib/definitions/paths/memberships/membership_by_id.json +20 -0
  78. data/lib/definitions/paths/memberships/memberships.json +29 -0
  79. data/lib/definitions/paths/mobiles/mobile_by_id.json +74 -0
  80. data/lib/definitions/paths/mobiles/mobiles.json +62 -0
  81. data/lib/definitions/paths/other_assets/other_asset_by_id.json +74 -0
  82. data/lib/definitions/paths/other_assets/other_assets.json +62 -0
  83. data/lib/definitions/paths/printers/printer_by_id.json +53 -0
  84. data/lib/definitions/paths/printers/printers.json +36 -0
  85. data/lib/definitions/paths/problems/problem_by_id.json +7 -8
  86. data/lib/definitions/paths/problems/problems.json +10 -10
  87. data/lib/definitions/paths/purchase_orders/purchase_order_by_id.json +74 -0
  88. data/lib/definitions/paths/purchase_orders/purchase_orders.json +62 -0
  89. data/lib/definitions/paths/purchases/purchase_by_id.json +65 -0
  90. data/lib/definitions/paths/purchases/purchases.json +31 -0
  91. data/lib/definitions/paths/releases/release_by_id.json +83 -0
  92. data/lib/definitions/paths/releases/releases.json +69 -0
  93. data/lib/definitions/paths/risks/risks.json +34 -0
  94. data/lib/definitions/paths/roles/role_by_id.json +70 -0
  95. data/lib/definitions/paths/roles/roles.json +62 -0
  96. data/lib/definitions/paths/service_requests/request_by_id.json +37 -0
  97. data/lib/definitions/paths/sites/site_by_id.json +74 -0
  98. data/lib/definitions/paths/sites/sites.json +62 -0
  99. data/lib/definitions/paths/softwares/software_by_id.json +24 -0
  100. data/lib/definitions/paths/softwares/softwares.json +36 -0
  101. data/lib/definitions/paths/solutions/solution_by_id.json +83 -0
  102. data/lib/definitions/paths/solutions/solutions.json +69 -0
  103. data/lib/definitions/paths/tasks/task_by_id.json +65 -0
  104. data/lib/definitions/paths/tasks/tasks.json +31 -0
  105. data/lib/definitions/paths/time_tracks/time_track_by_id.json +65 -0
  106. data/lib/definitions/paths/time_tracks/time_tracks.json +66 -0
  107. data/lib/definitions/paths/users/user_by_id.json +8 -9
  108. data/lib/definitions/paths/users/users.json +11 -11
  109. data/lib/definitions/paths/vendors/vendor_by_id.json +74 -0
  110. data/lib/definitions/paths/vendors/vendors.json +62 -0
  111. data/lib/resolved_schema/resolved_schema.json +1 -1
  112. metadata +100 -5
  113. data/lib/definitions/common/schemas/incident.json +0 -70
  114. data/lib/definitions/common/schemas/problem.json +0 -67
  115. data/lib/definitions/common/schemas/user.json +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdeef30e6c481c8f44e37d4e18207feac682d505b51736256a7ac96604d105c6
4
- data.tar.gz: 68c9235b9579912c4ede1e0ab9d5e51fcd8b5eeecd36aab4ceb7e28b4005a781
3
+ metadata.gz: 700321baa2a625ed3363bf49e1c3b0768acb7005fdae052fd026c22c12d86fd5
4
+ data.tar.gz: 32a50496f7ee3522926e8fdbe37fb9633dfa42cacb376d19dc6cf1e529437434
5
5
  SHA512:
6
- metadata.gz: 5b6d166fc3c96f5dae026d408b3c5e212bbaa9c46a40a550a502305ad9d3b123ca4f7d7734377caa8bf24b5eb4743f4b793f0431e6b82598b52f404559d3b531
7
- data.tar.gz: d57042d57130302d6d36265a04490910f8aaf98b749b96bb0dabee360224f940b114f6f50b0b40dab3695994ff2b29f373fad781e610cd3c582a988c56f0a29c
6
+ metadata.gz: 0ae6cd0e1366aa2deccfa53e7ae087854593ba98aff32dbe6b640fb95c092376f7edb567a03811a4b70a6db5faa929e9d1e686504f73cbe1ed2dbe8dba8d703e
7
+ data.tar.gz: 05ebb504e6cb025dc9f80a2f72a9e31528130c49b3a992a09e33596aebb8f65c8a15a266a9a1643828f6718c1010407b3f77538194b98dcd3b1cdf00f8299814
@@ -14,6 +14,14 @@
14
14
  "schema": { "type": "string" },
15
15
  "required": true,
16
16
  "description": "Numeric ID of the object to get or update"
17
+ },
18
+ "object_param": {
19
+ "name": "object_type",
20
+ "in": "path",
21
+ "schema": { "type": "string" },
22
+ "required": true,
23
+ "description": "Source object type",
24
+ "example": "incidents"
17
25
  }
18
26
  },
19
27
  "schemas": {
@@ -23,7 +31,7 @@
23
31
  "type": "object",
24
32
  "required": ["name"],
25
33
  "properties": {
26
- "name": { "type": "string" }
34
+ "name": { "type": "string", "example": "Object Name" }
27
35
  }
28
36
  },
29
37
  { "enum": ["nil", "", null] }]
@@ -34,42 +42,45 @@
34
42
  "type": "object",
35
43
  "required": ["email"],
36
44
  "properties": {
37
- "email": { "type": "string" }
45
+ "email": {
46
+ "type": "string",
47
+ "format": "email",
48
+ "example": "john.doe@email.com"
49
+ }
38
50
  }
39
51
  },
40
52
  { "enum": ["nil", "", null] }]
41
53
  },
42
- "numbers_array": {
43
- "type": "array",
44
- "items": {
45
- "type": "object",
46
- "properties": {
47
- "number": { "type": "string" }
48
- }
49
- }
54
+ "attachment_numbers": {
55
+ "anyOf": [
56
+ { "$ref": "components.json#/components/request/schemas/numbers_array" },
57
+ { "$ref": "components.json#/components/request/schemas/number_property" }
58
+ ]
50
59
  },
51
- "custom_field": {
60
+ "number_property": {
52
61
  "type": "object",
53
- "required": ["name", "value"],
54
62
  "properties": {
55
- "name": { "type": "string" },
56
- "value": { "type": "string" }
63
+ "number": { "anyOf": [ { "type": "string", "example": "1" }, { "type": "integer", "example": 1 }] }
57
64
  }
58
65
  },
59
- "custom_field_value": {
66
+ "numbers_array": {
60
67
  "type": "array",
61
- "items": { "$ref": "components.json#/components/request/schemas/custom_field" }
68
+ "items": { "$ref": "components.json#/components/request/schemas/number_property" }
62
69
  },
63
- "custom_field_values": {
70
+ "custom_field": {
64
71
  "type": "object",
65
- "required": ["custom_field_value"],
72
+ "required": ["name"],
66
73
  "properties": {
67
- "custom_field_value": { "$ref": "components.json#/components/request/schemas/custom_field_value" }
74
+ "name": { "type": "string", "example": "Name of custom text field" },
75
+ "value": { "type": "string", "example": "content" },
76
+ "user_value": { "$ref": "components.json#/components/request/schemas/association_by_email" }
68
77
  }
69
78
  },
70
79
  "custom_fields_value": {
71
- "type": "array",
72
- "items": { "$ref": "components.json#/components/request/schemas/custom_field" }
80
+ "anyOf": [
81
+ { "type": "array", "items": { "$ref": "components.json#/components/request/schemas/custom_field" } },
82
+ { "$ref": "components.json#/components/request/schemas/custom_field" }
83
+ ]
73
84
  },
74
85
  "custom_fields_values": {
75
86
  "type": "object",
@@ -78,11 +89,65 @@
78
89
  },
79
90
  "custom_field_by_id": {
80
91
  "type": "object",
81
- "properties": { "custom_field_id": { "type": "integer" }, "value": { "type": "string" } }
92
+ "properties": {
93
+ "id": { "type": "string", "example": "1" },
94
+ "custom_field_id": { "type": "integer", "example": 1 },
95
+ "value": { "type": "string", "example": "content" } }
82
96
  },
83
97
  "custom_fields_values_attributes": {
98
+ "anyOf": [
99
+ { "type": "array", "items": { "$ref": "components.json#/components/request/schemas/custom_field_by_id" } },
100
+ { "type": "object", "items": { "$ref": "components.json#/components/request/schemas/custom_field_by_id" } }
101
+ ]
102
+ },
103
+ "approval_levels_attributes": {
104
+ "anyOf": [
105
+ { "type": "array", "items": { "$ref": "components.json#/components/request/schemas/approval_level" } },
106
+ { "type": "object", "items": { "$ref": "components.json#/components/request/schemas/approval_level" } }
107
+ ]
108
+ },
109
+ "approval_level": {
110
+ "type": "object",
111
+ "properties": {
112
+ "id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
113
+ "approver_ids": { "type": "string", "example": "1, 2" },
114
+ "approval_condition": { "type": "string", "example": "1" }
115
+ }
116
+ },
117
+ "bio": {
118
+ "type": "object",
119
+ "properties": {
120
+ "manufacturer": { "type": "string", "example": "Dell" },
121
+ "ssn": { "anyOf": [{ "type": "string", "example": "1" },{ "type": "integer", "example": 1 }] },
122
+ "model": { "type": "string", "example": "model description" },
123
+ "version": { "anyOf": [{ "type": "string", "example": "1" },{ "type": "integer", "example": 1 }] },
124
+ "bios_date": { "type": "string", "example": "2020-01-01 00:00" }
125
+ }
126
+ },
127
+ "variable": {
128
+ "type": "object",
129
+ "required": ["name"],
130
+ "properties": {
131
+ "name": { "type": "string", "example": "Variable name" },
132
+ "value": { "type": "string", "example": "Content" },
133
+ "user_value": { "$ref": "components.json#/components/request/schemas/association_by_email" }
134
+ }
135
+ },
136
+ "cc_array": {
84
137
  "type": "array",
85
- "items": { "$ref": "components.json#/components/request/schemas/custom_field_by_id" }
138
+ "items": { "type": "string", "format": "email", "example": "john.doe@email.com" },
139
+ "xml": { "wrapped": true },
140
+ "description": "for xml requests, please add: type=\"array\". for example: \"\\<cc type='array'\\> \\<cc\\>john.doe@email.com\\<\/cc\\> \\<\/cc\\>\""
141
+ },
142
+ "reports_to": {
143
+ "oneOf": [
144
+ {
145
+ "type": "object",
146
+ "required": ["id"],
147
+ "properties": { "id": { "$ref": "components.json#/components/common/schemas/association_by_id" } }
148
+ },
149
+ { "$ref": "components.json#/components/request/schemas/association_by_email" }
150
+ ]
86
151
  }
87
152
  }
88
153
  },
@@ -90,20 +155,19 @@
90
155
  "schemas": {
91
156
  "id": {
92
157
  "readOnly": true,
93
- "oneOf": [{ "type": "string" }, { "type": "integer" }]
158
+ "oneOf": [{ "type": "string", "example": "1" }, { "type": "integer", "example": 1 }]
94
159
  },
95
160
  "custom_field": {
96
161
  "type": "object",
97
162
  "properties": {
98
163
  "id": { "$ref": "components.json#/components/response/schemas/id" },
99
164
  "custom_field_id": { "$ref": "components.json#/components/response/schemas/id" },
100
- "name": { "type": "string" },
101
- "value": { "type": "string" },
102
- "options": { "type": "string" },
103
- "type_name": { "type": "string" }
165
+ "name": { "type": "string", "example": " Name of custom text field" },
166
+ "value": { "type": "string", "example": "content" },
167
+ "type_name": { "type": "string", "example": "Text" }
104
168
  }
105
169
  },
106
- "custom_field_values": {
170
+ "custom_fields_values": {
107
171
  "type": "array",
108
172
  "items": { "$ref": "components.json#/components/response/schemas/custom_field" }
109
173
  },
@@ -111,8 +175,8 @@
111
175
  "type": "object",
112
176
  "properties": {
113
177
  "id": { "$ref": "components.json#/components/response/schemas/id" },
114
- "name": { "type": "string" },
115
- "default_tags": { "type": "string" },
178
+ "name": { "type": "string", "example": "Category / Subcategory name" },
179
+ "default_tags": { "type": "string", "example": "tag1, tag2" },
116
180
  "parent_id": { "$ref": "components.json#/components/response/schemas/id" },
117
181
  "default_assignee_id": { "$ref": "components.json#/components/response/schemas/id" }
118
182
  }
@@ -120,35 +184,36 @@
120
184
  "avatar": {
121
185
  "type": "object",
122
186
  "properties": {
123
- "type": { "type": "string" },
124
- "color": { "type": "string" },
187
+ "type": { "type": "string", "example": "initials" },
188
+ "color": { "type": "string", "example": "#1000" },
125
189
  "initials": {
126
190
  "type": "string",
127
191
  "minLength": 2,
128
- "maxLength": 2
192
+ "maxLength": 2,
193
+ "example": "JD"
129
194
  }
130
195
  }
131
196
  },
132
- "assignee_details": {
197
+ "group_details": {
133
198
  "type": "object",
134
199
  "properties": {
135
200
  "group_id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
136
- "is_user": { "oneOf": [{ "type": "string" }, { "type": "boolean" }] },
201
+ "is_user": { "oneOf": [{ "type": "string", "example": "true" }, { "type": "boolean" }] },
137
202
  "id": { "$ref": "components.json#/components/response/schemas/id" },
138
- "name": { "type": "string" },
139
- "email": { "type": "string" },
203
+ "name": { "type": "string", "example": "John Doe" },
204
+ "email": { "type": "string", "example": "john.doe@email.com" },
140
205
  "avatar": { "$ref": "components.json#/components/response/schemas/avatar" }
141
206
  }
142
207
  },
143
- "requester_details": {
208
+ "user_details": {
144
209
  "type": "object",
145
210
  "properties": {
146
211
  "id": { "$ref": "components.json#/components/response/schemas/id" },
147
212
  "account_id": { "$ref": "components.json#/components/response/schemas/id" },
148
213
  "user_id": { "$ref": "components.json#/components/response/schemas/id" },
149
- "email": { "type": "string" },
150
- "name": { "type": "string" },
151
- "disabled": { "type": "boolean" },
214
+ "email": { "type": "string", "example": "john.doe@email.com" },
215
+ "name": { "type": "string", "example": "John Doe" },
216
+ "disabled": { "type": "boolean", "example": false },
152
217
  "avatar": { "$ref": "components.json#/components/response/schemas/avatar" }
153
218
  }
154
219
  },
@@ -156,18 +221,18 @@
156
221
  "type": "object",
157
222
  "properties": {
158
223
  "id": { "$ref": "components.json#/components/response/schemas/id" },
159
- "name": { "type": "string" },
160
- "description": { "type": "string" },
161
- "location": { "type": "string" },
162
- "timezone": { "type": "string" }
224
+ "name": { "type": "string", "example": "Austin TX, USA" },
225
+ "description": { "type": "string", "example": "AUS" },
226
+ "location": { "type": "string", "example": "AUS" },
227
+ "timezone": { "type": "string", "example": "UTC-6h" }
163
228
  }
164
229
  },
165
230
  "department_response": {
166
231
  "type": "object",
167
232
  "properties": {
168
233
  "id": { "$ref": "components.json#/components/response/schemas/id" },
169
- "name": { "type": "string" },
170
- "description": { "type": "string" },
234
+ "name": { "type": "string", "example": "Support" },
235
+ "description": { "type": "string", "example": "Support Department" },
171
236
  "default_assignee_id": { "$ref": "components.json#/components/response/schemas/id" }
172
237
  }
173
238
  },
@@ -177,7 +242,7 @@
177
242
  "type": "object",
178
243
  "properties": {
179
244
  "id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
180
- "href": { "type": "string" }
245
+ "href": { "type": "string", "example": "https://mydomain.com/object_type/1" }
181
246
  }
182
247
  }
183
248
  },
@@ -185,36 +250,135 @@
185
250
  "type": "object",
186
251
  "properties": {
187
252
  "id": { "$ref": "components.json#/components/response/schemas/id" },
188
- "name": { "type": "string" },
189
- "description": { "type": "string" },
190
- "portal": { "type": "boolean" },
191
- "show_my_tasks": { "type": "boolean" }
253
+ "name": { "type": "string", "example": "Requester" },
254
+ "description": { "type": "string", "example": "Requester role" },
255
+ "portal": { "type": "boolean", "example": true },
256
+ "show_my_tasks": { "type": "boolean", "example": true }
192
257
  }
193
258
  },
194
259
  "tag": {
195
260
  "type": "object",
196
261
  "properties": {
197
262
  "id": { "$ref": "components.json#/components/response/schemas/id" },
198
- "name": { "type": "string" },
199
- "taggings_count": { "type": "integer" }
263
+ "name": { "type": "string", "example": "tag name" },
264
+ "taggings_count": { "type": "integer", "example": 1 }
200
265
  }
201
266
  },
202
267
  "tags": {
203
268
  "type": "array",
204
269
  "items": { "$ref": "components.json#/components/response/schemas/tag" }
270
+ },
271
+ "approvers": {
272
+ "type": "array",
273
+ "items": { "$ref": "components.json#/components/response/schemas/group_details" }
274
+ },
275
+ "creator": {
276
+ "type": "object",
277
+ "properties": {
278
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
279
+ "name": { "type": "string", "example": "tag name" },
280
+ "email": { "type": "string", "format": "email", "example": "john.doe@email.com" }
281
+ }
282
+ },
283
+ "ci_type": {
284
+ "type": "object",
285
+ "properties": {
286
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
287
+ "name": { "type": "string", "example": "Building" },
288
+ "description": { "type": "string", "example": "Configuration Item - Building" },
289
+ "parent_id": { "$ref": "components.json#/components/response/schemas/id" },
290
+ "custom": { "type": "boolean", "example": false },
291
+ "icon_name": { "type": "string", "example": "BUILDING" },
292
+ "updated_at": { "type": "string", "example": "2025-01-01T00:00:00.000+01:00" }
293
+ }
294
+ },
295
+ "bioses": {
296
+ "type": "array",
297
+ "items": {
298
+ "type": "object",
299
+ "properties": {
300
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
301
+ "manufacturer": { "type": "string", "example": "Dell" },
302
+ "ssn": { "type": "string", "example": "1" },
303
+ "model": { "type": "string", "example": "model description" },
304
+ "version": { "type": "string", "example": "1" },
305
+ "bios_date": { "type": "string", "example": "2020-01-01 00:00" },
306
+ "reported_at": { "type": "string", "example": "2020-01-01 00:00" }
307
+ }
308
+ }
309
+ },
310
+ "asset_type": {
311
+ "type": "object",
312
+ "properties": {
313
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
314
+ "account_id": { "$ref": "components.json#/components/response/schemas/id" },
315
+ "parent_id": { "$ref": "components.json#/components/response/schemas/id" },
316
+ "name": { "type": "string", "example": "Asset Type" }
317
+ }
318
+ },
319
+ "vendor": {
320
+ "type": "object",
321
+ "properties": {
322
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
323
+ "name": { "type": "string", "example": "Google" },
324
+ "address": { "type": "string", "example": "address description" },
325
+ "country": { "type": "string", "example": "US" },
326
+ "city": { "type": "string", "example": "Texas" },
327
+ "zip": { "type": "string", "example": "1" },
328
+ "tech_support": { "type": "string", "example": "+000000000", "description": "support phone number" },
329
+ "business_phone": { "type": "string", "example": "+000000000", "description": "business phone" },
330
+ "url": { "type": "string", "example": "www.google.com" },
331
+ "created_at": { "type": "string", "example": "2020-01-01T00:00:00.000+01:00" },
332
+ "updated_at": { "type": "string", "example": "2020-10-01T00:00:00.000+01:00" }
333
+ }
334
+ },
335
+ "procurement_items": {
336
+ "type": "array",
337
+ "items": {
338
+ "type": "object",
339
+ "properties": {
340
+ "name": { "type": "string", "example": "Item Name" },
341
+ "version": { "type": "string", "example": "0.0.0" },
342
+ "quantity": { "type": "string", "example": "1" },
343
+ "notes": { "type": "string", "example": "Item notes" },
344
+ "created_at": { "type": "string", "example": "2020-01-01T00:00:00.000+01:00" },
345
+ "updated_at": { "type": "string", "example": "2020-10-01T00:00:00.000+01:00" },
346
+ "tag": { "type": "string", "example": "example tag" }
347
+ }
348
+ }
349
+ },
350
+ "id_name_href": {
351
+ "type": "object",
352
+ "properties": {
353
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
354
+ "name": { "type": "string", "example": "Object Name" },
355
+ "href": { "type": "string", "example": "/objects/1" }
356
+ }
357
+ },
358
+ "parent_object": {
359
+ "type": "object",
360
+ "properties": {
361
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
362
+ "class": { "type": "string", "example": "Incident" }
363
+ }
205
364
  }
206
365
  }
207
366
  },
208
367
  "common": {
209
368
  "schemas": {
210
369
  "association_by_id": {
211
- "oneOf": [{ "type": "string" }, { "type": "integer" }]
370
+ "anyOf": [{ "type": "string", "example": "1" }, { "type": "integer", "example": 1 }]
212
371
  },
213
372
  "ids_array": {
214
373
  "type": "array",
215
374
  "items": {
216
- "$ref": "components.json#/components/common/schemas/association_by_id"
217
- }
375
+ "$ref": "components.json#/components/common/schemas/association_by_id"
376
+ },
377
+ "xml": { "wrapped": true },
378
+ "description": "for xml requests, please add: type=\"array\", for example: <incident_ids type=\"array\"><incident_id>1</incident_id></incident_ids>"
379
+ },
380
+ "number_or_string": {
381
+ "anyOf": [{ "type": "string", "example": "1" }, { "type": "integer", "example": 1 }]
218
382
  }
219
383
  }
220
384
  }
@@ -0,0 +1,70 @@
1
+ {
2
+ "examples": {
3
+ "request": {
4
+ "json": {
5
+ "catalog_item": {
6
+ "name": "CI Name",
7
+ "site_id": 1,
8
+ "department_id": 1,
9
+ "description": "description",
10
+ "state": "Approved",
11
+ "default_assignee_id": "1",
12
+ "category": { "name": "Facilities" },
13
+ "subcategory": { "name": "Equipment" },
14
+ "expected_delivery_time": "1 day",
15
+ "currency": "USD",
16
+ "price": "1",
17
+ "show_price": true,
18
+ "add_to_tag_list": "tag1",
19
+ "remove_from_tag_list": "tag2",
20
+ "tag_list": "tag1"
21
+ }
22
+ }
23
+ },
24
+ "response": {
25
+ "json": {
26
+ "catalog_item": {
27
+ "id": "10000",
28
+ "number": "1000",
29
+ "name": "CI Name",
30
+ "description": "description",
31
+ "created_at": "2025-01-01T00:00:00.000+01:00",
32
+ "site": {
33
+ "id": "1",
34
+ "name": "Austin TX, USA",
35
+ "location": "AUS",
36
+ "description": "",
37
+ "time_zone": ""
38
+ },
39
+ "department": {
40
+ "id": "1",
41
+ "name": "Support",
42
+ "description": "",
43
+ "default_assignee_id": "1"
44
+ },
45
+ "category": {
46
+ "id": "10000",
47
+ "name": "Facilities",
48
+ "default_tags": "tagA, tagB",
49
+ "parent_id": "null",
50
+ "default_assignee_id": "1"
51
+ },
52
+ "subcategory": {
53
+ "id": "1000",
54
+ "name": "Equipment",
55
+ "default_tags": "",
56
+ "parent_id": "10000",
57
+ "default_assignee_id": "1"
58
+ },
59
+ "expected_delivery_time": "1 day",
60
+ "currency": "USD",
61
+ "price": "1",
62
+ "show_price": true,
63
+ "tags": [{ "id": 1, "name": "tag1", "taggings_count": 1 }],
64
+ "origin": "api",
65
+ "incidents": [{ "id": "100", "href": "https://mydomain.com/incidents/100"}]
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }