solarwinds-itsm-api-definitions 0.1.0 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/definitions/common/components.json +258 -50
  3. data/lib/definitions/common/examples/catalog_item.json +70 -0
  4. data/lib/definitions/common/examples/change.json +127 -0
  5. data/lib/definitions/common/examples/change_catalog.json +92 -0
  6. data/lib/definitions/common/examples/configuration_item.json +110 -0
  7. data/lib/definitions/common/examples/hardware.json +125 -0
  8. data/lib/definitions/common/examples/incident.json +133 -116
  9. data/lib/definitions/common/examples/problem.json +132 -0
  10. data/lib/definitions/common/examples/release.json +150 -0
  11. data/lib/definitions/common/examples/service_request.json +28 -0
  12. data/lib/definitions/common/examples/solution.json +49 -0
  13. data/lib/definitions/common/examples/user.json +106 -0
  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 +104 -10
  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 +22 -4
  76. data/lib/definitions/paths/incidents/incidents.json +34 -6
  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 +83 -0
  86. data/lib/definitions/paths/problems/problems.json +69 -0
  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 +83 -0
  108. data/lib/definitions/paths/users/users.json +69 -0
  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. data/lib/solarwinds/itsm/api/definitions.rb +49 -0
  113. metadata +106 -3
  114. data/lib/definitions/common/schemas/incident.json +0 -86
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fe761099780267ecb3e085a1203ec772408338e76f62140c60d60943ba9c8c6
4
- data.tar.gz: 62ea3b9eaed6f18088901377c5f53c92f01d33b49b2d86357408e90940dff5d3
3
+ metadata.gz: eeb6476d02c2ca9f56b3cfd46fdefe946aa122d6259f66a7f7db7b83a8bb5d83
4
+ data.tar.gz: 9eeb50009c0c36155c3f2a8eed44f545e1093f3ec2f261a79fbcc785d43f77eb
5
5
  SHA512:
6
- metadata.gz: 8990b8bbc86c60505961df926674c681959692109a280a277f17f905ab373a49da58101e77190388b35bdde9cfface4f00f430aa3c5bd66f882134ddd7e7a2f5
7
- data.tar.gz: 918a69da60a74be4ff05cdd5c816a0f8fa0e731e086e344a8487b7a2a5a55c6edbd4dc64e1b5fbcf5b8ee987758d7ce9b09d65bebeb559621f52ceab2b6fb731
6
+ metadata.gz: cc29f99f9dd7fb383441c924c7843ec3c162e9fb6830b1a2c59821a2fbe533a1f3e3e70f065c38b0378079032c8995c4036b444e4ff58a7fa5e3176e7a644c05
7
+ data.tar.gz: 4a6cfd897c9ad29c8ee3128e3fb4b493d73280a5113c3ade72238b3b98a76b26a07f1c90e6d68cb9dfe9968aec261b5adc2f5d4d1d57aaa251bedcb90a3ab530
@@ -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,46 +42,119 @@
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
- "ids_array": {
43
- "type": "array",
44
- "items": {
45
- "$ref": "components.json#/components/common/schemas/association_by_id"
54
+ "attachment_numbers": {
55
+ "anyOf": [
56
+ { "$ref": "components.json#/components/request/schemas/numbers_array" },
57
+ { "$ref": "components.json#/components/request/schemas/number_property" }
58
+ ]
59
+ },
60
+ "number_property": {
61
+ "type": "object",
62
+ "properties": {
63
+ "number": { "anyOf": [ { "type": "string", "example": "1" }, { "type": "integer", "example": 1 }] }
46
64
  }
47
65
  },
48
66
  "numbers_array": {
49
67
  "type": "array",
50
- "items": {
51
- "type": "object",
52
- "properties": {
53
- "number": {
54
- "oneOf": [{ "type": "string" }, { "type": "integer" }]
55
- }
56
- }
57
- }
68
+ "items": { "$ref": "components.json#/components/request/schemas/number_property" }
69
+ },
70
+ "value_of_custom_field": {
71
+ "anyOf":[
72
+ { "type": "string", "example": "content" }, { "type": "integer", "example": 1 }, { "type": "null" },
73
+ { "content": { "application/octet-stream": {} }, "description": "attachment custom field" }
74
+ ]
58
75
  },
59
76
  "custom_field": {
60
77
  "type": "object",
61
- "required": ["name", "value"],
78
+ "required": ["name"],
62
79
  "properties": {
63
- "name": { "type": "string" },
64
- "value": { "type": "string" }
80
+ "name": { "type": "string", "example": "Name of custom text field" },
81
+ "value": { "$ref": "components.json#/components/request/schemas/value_of_custom_field" },
82
+ "user_value": { "$ref": "components.json#/components/request/schemas/association_by_email" }
65
83
  }
66
84
  },
67
- "custom_field_value": {
68
- "type": "array",
69
- "items": { "$ref": "components.json#/components/request/schemas/custom_field" }
85
+ "custom_fields_value": {
86
+ "anyOf": [
87
+ { "type": "array", "items": { "$ref": "components.json#/components/request/schemas/custom_field" } },
88
+ { "$ref": "components.json#/components/request/schemas/custom_field" }
89
+ ]
90
+ },
91
+ "custom_fields_values": {
92
+ "type": "object",
93
+ "required": ["custom_fields_value"],
94
+ "properties": { "custom_fields_value": { "$ref": "components.json#/components/request/schemas/custom_fields_value" } }
95
+ },
96
+ "custom_field_by_id": {
97
+ "type": "object",
98
+ "properties": {
99
+ "id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
100
+ "custom_field_id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
101
+ "value": { "$ref": "components.json#/components/request/schemas/value_of_custom_field" }
102
+ }
103
+ },
104
+ "custom_fields_values_attributes": {
105
+ "anyOf": [
106
+ { "type": "array", "items": { "$ref": "components.json#/components/request/schemas/custom_field_by_id" } },
107
+ { "type": "object", "items": { "$ref": "components.json#/components/request/schemas/custom_field_by_id" } }
108
+ ]
109
+ },
110
+ "approval_levels_attributes": {
111
+ "anyOf": [
112
+ { "type": "array", "items": { "$ref": "components.json#/components/request/schemas/approval_level" } },
113
+ { "type": "object", "items": { "$ref": "components.json#/components/request/schemas/approval_level" } }
114
+ ]
70
115
  },
71
- "custom_field_values": {
116
+ "approval_level": {
72
117
  "type": "object",
73
- "required": ["custom_field_value"],
74
118
  "properties": {
75
- "custom_field_value": { "$ref": "components.json#/components/request/schemas/custom_field_value" }
119
+ "id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
120
+ "approver_ids": { "type": "string", "example": "1, 2" },
121
+ "approval_condition": { "type": "string", "example": "1" }
76
122
  }
123
+ },
124
+ "bio": {
125
+ "type": "object",
126
+ "properties": {
127
+ "manufacturer": { "type": "string", "example": "Dell" },
128
+ "ssn": { "anyOf": [{ "type": "string", "example": "1" },{ "type": "integer", "example": 1 }] },
129
+ "model": { "type": "string", "example": "model description" },
130
+ "version": { "anyOf": [{ "type": "string", "example": "1" },{ "type": "integer", "example": 1 }] },
131
+ "bios_date": { "type": "string", "example": "2020-01-01 00:00" }
132
+ }
133
+ },
134
+ "variable": {
135
+ "type": "object",
136
+ "required": ["name"],
137
+ "properties": {
138
+ "name": { "type": "string", "example": "Variable name" },
139
+ "value": { "type": "string", "example": "Content" },
140
+ "user_value": { "$ref": "components.json#/components/request/schemas/association_by_email" }
141
+ }
142
+ },
143
+ "cc_array": {
144
+ "type": "array",
145
+ "items": { "type": "string", "format": "email", "example": "john.doe@email.com" },
146
+ "xml": { "wrapped": true },
147
+ "description": "for xml requests, please add: type=\"array\". for example: \"\\<cc type='array'\\> \\<cc\\>john.doe@email.com\\<\/cc\\> \\<\/cc\\>\""
148
+ },
149
+ "reports_to": {
150
+ "oneOf": [
151
+ {
152
+ "type": "object",
153
+ "required": ["id"],
154
+ "properties": { "id": { "$ref": "components.json#/components/common/schemas/association_by_id" } }
155
+ },
156
+ { "$ref": "components.json#/components/request/schemas/association_by_email" }
157
+ ]
77
158
  }
78
159
  }
79
160
  },
@@ -81,20 +162,19 @@
81
162
  "schemas": {
82
163
  "id": {
83
164
  "readOnly": true,
84
- "oneOf": [{ "type": "string" }, { "type": "integer" }]
165
+ "oneOf": [{ "type": "string", "example": "1" }, { "type": "integer", "example": 1 }]
85
166
  },
86
167
  "custom_field": {
87
168
  "type": "object",
88
169
  "properties": {
89
170
  "id": { "$ref": "components.json#/components/response/schemas/id" },
90
171
  "custom_field_id": { "$ref": "components.json#/components/response/schemas/id" },
91
- "name": { "type": "string" },
92
- "value": { "type": "string" },
93
- "options": { "type": "string" },
94
- "type_name": { "type": "string" }
172
+ "name": { "type": "string", "example": " Name of custom text field" },
173
+ "value": { "type": "string", "example": "content" },
174
+ "type_name": { "type": "string", "example": "Text" }
95
175
  }
96
176
  },
97
- "custom_field_values": {
177
+ "custom_fields_values": {
98
178
  "type": "array",
99
179
  "items": { "$ref": "components.json#/components/response/schemas/custom_field" }
100
180
  },
@@ -102,8 +182,8 @@
102
182
  "type": "object",
103
183
  "properties": {
104
184
  "id": { "$ref": "components.json#/components/response/schemas/id" },
105
- "name": { "type": "string" },
106
- "default_tags": { "type": "string" },
185
+ "name": { "type": "string", "example": "Category / Subcategory name" },
186
+ "default_tags": { "type": "string", "example": "tag1, tag2" },
107
187
  "parent_id": { "$ref": "components.json#/components/response/schemas/id" },
108
188
  "default_assignee_id": { "$ref": "components.json#/components/response/schemas/id" }
109
189
  }
@@ -111,35 +191,36 @@
111
191
  "avatar": {
112
192
  "type": "object",
113
193
  "properties": {
114
- "type": { "type": "string" },
115
- "color": { "type": "string" },
194
+ "type": { "type": "string", "example": "initials" },
195
+ "color": { "type": "string", "example": "#1000" },
116
196
  "initials": {
117
197
  "type": "string",
118
198
  "minLength": 2,
119
- "maxLength": 2
199
+ "maxLength": 2,
200
+ "example": "JD"
120
201
  }
121
202
  }
122
203
  },
123
- "assignee_details": {
204
+ "group_details": {
124
205
  "type": "object",
125
206
  "properties": {
126
207
  "group_id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
127
- "is_user": { "oneOf": [{ "type": "string" }, { "type": "boolean" }] },
208
+ "is_user": { "oneOf": [{ "type": "string", "example": "true" }, { "type": "boolean" }] },
128
209
  "id": { "$ref": "components.json#/components/response/schemas/id" },
129
- "name": { "type": "string" },
130
- "email": { "type": "string" },
210
+ "name": { "type": "string", "example": "John Doe" },
211
+ "email": { "type": "string", "example": "john.doe@email.com" },
131
212
  "avatar": { "$ref": "components.json#/components/response/schemas/avatar" }
132
213
  }
133
214
  },
134
- "requester_details": {
215
+ "user_details": {
135
216
  "type": "object",
136
217
  "properties": {
137
218
  "id": { "$ref": "components.json#/components/response/schemas/id" },
138
219
  "account_id": { "$ref": "components.json#/components/response/schemas/id" },
139
220
  "user_id": { "$ref": "components.json#/components/response/schemas/id" },
140
- "email": { "type": "string" },
141
- "name": { "type": "string" },
142
- "disabled": { "type": "boolean" },
221
+ "email": { "type": "string", "example": "john.doe@email.com" },
222
+ "name": { "type": "string", "example": "John Doe" },
223
+ "disabled": { "type": "boolean", "example": false },
143
224
  "avatar": { "$ref": "components.json#/components/response/schemas/avatar" }
144
225
  }
145
226
  },
@@ -147,18 +228,18 @@
147
228
  "type": "object",
148
229
  "properties": {
149
230
  "id": { "$ref": "components.json#/components/response/schemas/id" },
150
- "name": { "type": "string" },
151
- "description": { "type": "string" },
152
- "location": { "type": "string" },
153
- "timezone": { "type": "string" }
231
+ "name": { "type": "string", "example": "Austin TX, USA" },
232
+ "description": { "type": "string", "example": "AUS" },
233
+ "location": { "type": "string", "example": "AUS" },
234
+ "timezone": { "type": "string", "example": "UTC-6h" }
154
235
  }
155
236
  },
156
237
  "department_response": {
157
238
  "type": "object",
158
239
  "properties": {
159
240
  "id": { "$ref": "components.json#/components/response/schemas/id" },
160
- "name": { "type": "string" },
161
- "description": { "type": "string" },
241
+ "name": { "type": "string", "example": "Support" },
242
+ "description": { "type": "string", "example": "Support Department" },
162
243
  "default_assignee_id": { "$ref": "components.json#/components/response/schemas/id" }
163
244
  }
164
245
  },
@@ -168,16 +249,143 @@
168
249
  "type": "object",
169
250
  "properties": {
170
251
  "id": { "$ref": "components.json#/components/common/schemas/association_by_id" },
171
- "href": { "type": "string" }
252
+ "href": { "type": "string", "example": "https://mydomain.com/object_type/1" }
172
253
  }
173
254
  }
255
+ },
256
+ "role": {
257
+ "type": "object",
258
+ "properties": {
259
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
260
+ "name": { "type": "string", "example": "Requester" },
261
+ "description": { "type": "string", "example": "Requester role" },
262
+ "portal": { "type": "boolean", "example": true },
263
+ "show_my_tasks": { "type": "boolean", "example": true }
264
+ }
265
+ },
266
+ "tag": {
267
+ "type": "object",
268
+ "properties": {
269
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
270
+ "name": { "type": "string", "example": "tag name" },
271
+ "taggings_count": { "type": "integer", "example": 1 }
272
+ }
273
+ },
274
+ "tags": {
275
+ "type": "array",
276
+ "items": { "$ref": "components.json#/components/response/schemas/tag" }
277
+ },
278
+ "approvers": {
279
+ "type": "array",
280
+ "items": { "$ref": "components.json#/components/response/schemas/group_details" }
281
+ },
282
+ "creator": {
283
+ "type": "object",
284
+ "properties": {
285
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
286
+ "name": { "type": "string", "example": "tag name" },
287
+ "email": { "type": "string", "format": "email", "example": "john.doe@email.com" }
288
+ }
289
+ },
290
+ "ci_type": {
291
+ "type": "object",
292
+ "properties": {
293
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
294
+ "name": { "type": "string", "example": "Building" },
295
+ "description": { "type": "string", "example": "Configuration Item - Building" },
296
+ "parent_id": { "$ref": "components.json#/components/response/schemas/id" },
297
+ "custom": { "type": "boolean", "example": false },
298
+ "icon_name": { "type": "string", "example": "BUILDING" },
299
+ "updated_at": { "type": "string", "example": "2025-01-01T00:00:00.000+01:00" }
300
+ }
301
+ },
302
+ "bioses": {
303
+ "type": "array",
304
+ "items": {
305
+ "type": "object",
306
+ "properties": {
307
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
308
+ "manufacturer": { "type": "string", "example": "Dell" },
309
+ "ssn": { "type": "string", "example": "1" },
310
+ "model": { "type": "string", "example": "model description" },
311
+ "version": { "type": "string", "example": "1" },
312
+ "bios_date": { "type": "string", "example": "2020-01-01 00:00" },
313
+ "reported_at": { "type": "string", "example": "2020-01-01 00:00" }
314
+ }
315
+ }
316
+ },
317
+ "asset_type": {
318
+ "type": "object",
319
+ "properties": {
320
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
321
+ "account_id": { "$ref": "components.json#/components/response/schemas/id" },
322
+ "parent_id": { "$ref": "components.json#/components/response/schemas/id" },
323
+ "name": { "type": "string", "example": "Asset Type" }
324
+ }
325
+ },
326
+ "vendor": {
327
+ "type": "object",
328
+ "properties": {
329
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
330
+ "name": { "type": "string", "example": "Google" },
331
+ "address": { "type": "string", "example": "address description" },
332
+ "country": { "type": "string", "example": "US" },
333
+ "city": { "type": "string", "example": "Texas" },
334
+ "zip": { "type": "string", "example": "1" },
335
+ "tech_support": { "type": "string", "example": "+000000000", "description": "support phone number" },
336
+ "business_phone": { "type": "string", "example": "+000000000", "description": "business phone" },
337
+ "url": { "type": "string", "example": "www.google.com" },
338
+ "created_at": { "type": "string", "example": "2020-01-01T00:00:00.000+01:00" },
339
+ "updated_at": { "type": "string", "example": "2020-10-01T00:00:00.000+01:00" }
340
+ }
341
+ },
342
+ "procurement_items": {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "object",
346
+ "properties": {
347
+ "name": { "type": "string", "example": "Item Name" },
348
+ "version": { "type": "string", "example": "0.0.0" },
349
+ "quantity": { "type": "string", "example": "1" },
350
+ "notes": { "type": "string", "example": "Item notes" },
351
+ "created_at": { "type": "string", "example": "2020-01-01T00:00:00.000+01:00" },
352
+ "updated_at": { "type": "string", "example": "2020-10-01T00:00:00.000+01:00" },
353
+ "tag": { "type": "string", "example": "example tag" }
354
+ }
355
+ }
356
+ },
357
+ "id_name_href": {
358
+ "type": "object",
359
+ "properties": {
360
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
361
+ "name": { "type": "string", "example": "Object Name" },
362
+ "href": { "type": "string", "example": "/objects/1" }
363
+ }
364
+ },
365
+ "parent_object": {
366
+ "type": "object",
367
+ "properties": {
368
+ "id": { "$ref": "components.json#/components/response/schemas/id" },
369
+ "class": { "type": "string", "example": "Incident" }
370
+ }
174
371
  }
175
372
  }
176
373
  },
177
374
  "common": {
178
375
  "schemas": {
179
376
  "association_by_id": {
180
- "oneOf": [{ "type": "string" }, { "type": "integer" }]
377
+ "anyOf": [{ "type": "string", "example": "1" }, { "type": "integer", "example": 1 }]
378
+ },
379
+ "ids_array": {
380
+ "type": "array",
381
+ "items": {
382
+ "$ref": "components.json#/components/common/schemas/association_by_id"
383
+ },
384
+ "xml": { "wrapped": true },
385
+ "description": "for xml requests, please add: type=\"array\", for example: <incident_ids type=\"array\"><incident_id>1</incident_id></incident_ids>"
386
+ },
387
+ "number_or_string": {
388
+ "anyOf": [{ "type": "string", "example": "1" }, { "type": "integer", "example": 1 }]
181
389
  }
182
390
  }
183
391
  }
@@ -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
+ }