solarwinds-itsm-api-definitions 0.0.9 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/definitions/common/components.json +354 -124
- data/lib/definitions/common/examples/catalog_item.json +70 -0
- data/lib/definitions/common/examples/change.json +123 -0
- data/lib/definitions/common/examples/change_catalog.json +72 -0
- data/lib/definitions/common/examples/configuration_item.json +110 -0
- data/lib/definitions/common/examples/hardware.json +100 -0
- data/lib/definitions/common/examples/incident.json +129 -115
- data/lib/definitions/common/examples/problem.json +110 -0
- data/lib/definitions/common/examples/release.json +128 -0
- data/lib/definitions/common/examples/service_request.json +28 -0
- data/lib/definitions/common/examples/solution.json +44 -0
- data/lib/definitions/common/examples/user.json +76 -0
- data/lib/definitions/common/schemas/analytics/audit.json +28 -0
- data/lib/definitions/common/schemas/analytics/risk.json +28 -0
- data/lib/definitions/common/schemas/inventory/hardware.json +104 -0
- data/lib/definitions/common/schemas/inventory/mobile.json +73 -0
- data/lib/definitions/common/schemas/inventory/other_asset.json +74 -0
- data/lib/definitions/common/schemas/inventory/printer.json +41 -0
- data/lib/definitions/common/schemas/inventory/software.json +28 -0
- data/lib/definitions/common/schemas/inventory/warranty.json +40 -0
- data/lib/definitions/common/schemas/procurement/contract.json +67 -0
- data/lib/definitions/common/schemas/procurement/item.json +51 -0
- data/lib/definitions/common/schemas/procurement/purchase.json +57 -0
- data/lib/definitions/common/schemas/procurement/purchase_order.json +82 -0
- data/lib/definitions/common/schemas/procurement/vendor.json +67 -0
- data/lib/definitions/common/schemas/service_desk/catalog_item.json +71 -0
- data/lib/definitions/common/schemas/service_desk/change.json +88 -0
- data/lib/definitions/common/schemas/service_desk/change_catalog.json +77 -0
- data/lib/definitions/common/schemas/service_desk/comment.json +52 -0
- data/lib/definitions/common/schemas/service_desk/configuration_item.json +119 -0
- data/lib/definitions/common/schemas/service_desk/incident.json +89 -0
- data/lib/definitions/common/schemas/service_desk/problem.json +81 -0
- data/lib/definitions/common/schemas/service_desk/release.json +86 -0
- data/lib/definitions/common/schemas/service_desk/service_request.json +31 -0
- data/lib/definitions/common/schemas/service_desk/solution.json +61 -0
- data/lib/definitions/common/schemas/service_desk/time_track.json +37 -0
- data/lib/definitions/common/schemas/setup/category.json +54 -0
- data/lib/definitions/common/schemas/setup/department.json +48 -0
- data/lib/definitions/common/schemas/setup/group.json +65 -0
- data/lib/definitions/common/schemas/setup/role.json +51 -0
- data/lib/definitions/common/schemas/setup/site.json +64 -0
- data/lib/definitions/common/schemas/setup/user.json +67 -0
- data/lib/definitions/common/schemas/tasks/task.json +52 -0
- data/lib/definitions/openapi.json +96 -6
- data/lib/definitions/paths/attachments/attachments.json +12 -0
- data/lib/definitions/paths/audits/audits.json +35 -0
- data/lib/definitions/paths/audits/audits_by_id.json +37 -0
- data/lib/definitions/paths/catalog_items/catalog_item_by_id.json +83 -0
- data/lib/definitions/paths/catalog_items/catalog_items.json +69 -0
- data/lib/definitions/paths/categories/categories.json +62 -0
- data/lib/definitions/paths/categories/category_by_id.json +70 -0
- data/lib/definitions/paths/change_catalogs/change_catalog_by_id.json +83 -0
- data/lib/definitions/paths/change_catalogs/change_catalogs.json +69 -0
- data/lib/definitions/paths/changes/change_by_id.json +83 -0
- data/lib/definitions/paths/changes/changes.json +69 -0
- data/lib/definitions/paths/comments/comment_by_id.json +65 -0
- data/lib/definitions/paths/comments/comments.json +31 -0
- data/lib/definitions/paths/configuration_items/append_dependent_assets.json +24 -0
- data/lib/definitions/paths/configuration_items/configuration_item_by_id.json +83 -0
- data/lib/definitions/paths/configuration_items/configuration_items.json +69 -0
- data/lib/definitions/paths/configuration_items/delete_asset_link.json +24 -0
- data/lib/definitions/paths/contracts/contract_by_id.json +74 -0
- data/lib/definitions/paths/contracts/contracts.json +62 -0
- data/lib/definitions/paths/contracts/item_by_id.json +75 -0
- data/lib/definitions/paths/contracts/items.json +30 -0
- data/lib/definitions/paths/departments/department_by_id.json +70 -0
- data/lib/definitions/paths/departments/departments.json +62 -0
- data/lib/definitions/paths/groups/group_by_id.json +70 -0
- data/lib/definitions/paths/groups/groups.json +62 -0
- data/lib/definitions/paths/hardwares/hardware_by_id.json +83 -0
- data/lib/definitions/paths/hardwares/hardwares.json +69 -0
- data/lib/definitions/paths/hardwares/warranties.json +64 -0
- data/lib/definitions/paths/hardwares/warranty_by_id.json +75 -0
- data/lib/definitions/paths/incidents/incident_by_id.json +28 -10
- data/lib/definitions/paths/incidents/incidents.json +36 -8
- data/lib/definitions/paths/memberships/membership_by_id.json +20 -0
- data/lib/definitions/paths/memberships/memberships.json +29 -0
- data/lib/definitions/paths/mobiles/mobile_by_id.json +74 -0
- data/lib/definitions/paths/mobiles/mobiles.json +62 -0
- data/lib/definitions/paths/other_assets/other_asset_by_id.json +74 -0
- data/lib/definitions/paths/other_assets/other_assets.json +62 -0
- data/lib/definitions/paths/printers/printer_by_id.json +53 -0
- data/lib/definitions/paths/printers/printers.json +36 -0
- data/lib/definitions/paths/problems/problem_by_id.json +83 -0
- data/lib/definitions/paths/problems/problems.json +69 -0
- data/lib/definitions/paths/purchase_orders/purchase_order_by_id.json +74 -0
- data/lib/definitions/paths/purchase_orders/purchase_orders.json +62 -0
- data/lib/definitions/paths/purchases/purchase_by_id.json +65 -0
- data/lib/definitions/paths/purchases/purchases.json +31 -0
- data/lib/definitions/paths/releases/release_by_id.json +83 -0
- data/lib/definitions/paths/releases/releases.json +69 -0
- data/lib/definitions/paths/risks/risks.json +34 -0
- data/lib/definitions/paths/roles/role_by_id.json +70 -0
- data/lib/definitions/paths/roles/roles.json +62 -0
- data/lib/definitions/paths/service_requests/request_by_id.json +37 -0
- data/lib/definitions/paths/sites/site_by_id.json +74 -0
- data/lib/definitions/paths/sites/sites.json +62 -0
- data/lib/definitions/paths/softwares/software_by_id.json +24 -0
- data/lib/definitions/paths/softwares/softwares.json +36 -0
- data/lib/definitions/paths/solutions/solution_by_id.json +83 -0
- data/lib/definitions/paths/solutions/solutions.json +69 -0
- data/lib/definitions/paths/tasks/task_by_id.json +65 -0
- data/lib/definitions/paths/tasks/tasks.json +31 -0
- data/lib/definitions/paths/time_tracks/time_track_by_id.json +65 -0
- data/lib/definitions/paths/time_tracks/time_tracks.json +66 -0
- data/lib/definitions/paths/users/user_by_id.json +83 -0
- data/lib/definitions/paths/users/users.json +69 -0
- data/lib/definitions/paths/vendors/vendor_by_id.json +74 -0
- data/lib/definitions/paths/vendors/vendors.json +62 -0
- data/lib/resolved_schema/resolved_schema.json +1 -1
- metadata +106 -3
- data/lib/definitions/common/schemas/incident.json +0 -106
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"post": {
|
3
|
+
"operationId": "createItem",
|
4
|
+
"description": "Create new contract's Item",
|
5
|
+
"tags": ["Contract"],
|
6
|
+
"parameters": [
|
7
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
8
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
9
|
+
],
|
10
|
+
"requestBody": {
|
11
|
+
"required": true,
|
12
|
+
"description": "Item fields to fill",
|
13
|
+
"content": {
|
14
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/procurement/item.json#/components/schemas/request/post" } },
|
15
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/procurement/item.json#/components/schemas/request/post" } }
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"responses": {
|
19
|
+
"200": {
|
20
|
+
"description": "Object created and returned correctly",
|
21
|
+
"content": {
|
22
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/procurement/item.json#/components/schemas/response" } },
|
23
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/procurement/item.json#/components/schemas/response" } }
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"400": { "description": "Bad request" },
|
27
|
+
"500": { "description": "Server error" }
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getDepartmentById",
|
4
|
+
"description": "Get department",
|
5
|
+
"tags": ["Department"],
|
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": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } },
|
15
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } }
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"400": { "description": "Bad request" },
|
19
|
+
"404": { "description": "Not found" },
|
20
|
+
"500": { "description": "Internal Server Error" }
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"put": {
|
24
|
+
"operationId": "updateDepartmentById",
|
25
|
+
"description": "Update department with specified fields",
|
26
|
+
"tags": ["Department"],
|
27
|
+
"parameters": [
|
28
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
29
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
30
|
+
],
|
31
|
+
"requestBody": {
|
32
|
+
"required": true,
|
33
|
+
"description": "Department fields to update",
|
34
|
+
"content": {
|
35
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/request/put" } },
|
36
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/request/put" } }
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"responses": {
|
40
|
+
"200": {
|
41
|
+
"description": "Object was updated correctly",
|
42
|
+
"content": {
|
43
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } },
|
44
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } }
|
45
|
+
}
|
46
|
+
},
|
47
|
+
"400": { "description": "Bad request" },
|
48
|
+
"404": { "description": "Not found" },
|
49
|
+
"500": { "description": "Internal Server Error" }
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"delete": {
|
53
|
+
"operationId": "deleteDepartmentById",
|
54
|
+
"description": "Delete department",
|
55
|
+
"tags": ["Department"],
|
56
|
+
"parameters": [
|
57
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
58
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
59
|
+
],
|
60
|
+
"responses": {
|
61
|
+
"200": {
|
62
|
+
"description": "Message regarding a successful operation",
|
63
|
+
"content": { "application/json": { "example": { "messages": { "message": "Deleted department" } } } }
|
64
|
+
},
|
65
|
+
"400": { "description": "Bad request" },
|
66
|
+
"404": { "description": "Not found" },
|
67
|
+
"500": { "description": "Internal Server Error" }
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getDepartments",
|
4
|
+
"description": "List of Departments",
|
5
|
+
"tags": ["Department"],
|
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 departments",
|
16
|
+
"type": "array",
|
17
|
+
"items": { "allOf": [{ "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" }] }
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"application/xml": {
|
21
|
+
"schema": {
|
22
|
+
"description": "List of departments",
|
23
|
+
"type": "array",
|
24
|
+
"xml": { "name": "/", "wrapped": true },
|
25
|
+
"items": { "$ref": "../../common/schemas/setup/department.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": "createDepartment",
|
37
|
+
"description": "Create new department",
|
38
|
+
"tags": ["Department"],
|
39
|
+
"parameters": [
|
40
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" }
|
41
|
+
],
|
42
|
+
"requestBody": {
|
43
|
+
"required": true,
|
44
|
+
"description": "Department fields to fill",
|
45
|
+
"content": {
|
46
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/request/post" } },
|
47
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.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/department.json#/components/schemas/response" } },
|
55
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/department.json#/components/schemas/response" } }
|
56
|
+
}
|
57
|
+
},
|
58
|
+
"400": { "description": "Bad request" },
|
59
|
+
"500": { "description": "Server error" }
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getGroupById",
|
4
|
+
"description": "Get group",
|
5
|
+
"tags": ["Group"],
|
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": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/response" } },
|
15
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/response" } }
|
16
|
+
}
|
17
|
+
},
|
18
|
+
"400": { "description": "Bad request" },
|
19
|
+
"404": { "description": "Not found" },
|
20
|
+
"500": { "description": "Internal Server Error" }
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"put": {
|
24
|
+
"operationId": "updateGroupById",
|
25
|
+
"description": "Update group with specified fields",
|
26
|
+
"tags": ["Group"],
|
27
|
+
"parameters": [
|
28
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
29
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
30
|
+
],
|
31
|
+
"requestBody": {
|
32
|
+
"required": true,
|
33
|
+
"description": "Group fields to update",
|
34
|
+
"content": {
|
35
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/request/put" } },
|
36
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/request/put" } }
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"responses": {
|
40
|
+
"200": {
|
41
|
+
"description": "Object was updated correctly",
|
42
|
+
"content": {
|
43
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/response" } },
|
44
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/response" } }
|
45
|
+
}
|
46
|
+
},
|
47
|
+
"400": { "description": "Bad request" },
|
48
|
+
"404": { "description": "Not found" },
|
49
|
+
"500": { "description": "Internal Server Error" }
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"delete": {
|
53
|
+
"operationId": "deleteGroupById",
|
54
|
+
"description": "Delete group",
|
55
|
+
"tags": ["Group"],
|
56
|
+
"parameters": [
|
57
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
58
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
59
|
+
],
|
60
|
+
"responses": {
|
61
|
+
"200": {
|
62
|
+
"description": "Message regarding a successful operation",
|
63
|
+
"content": { "application/json": { "example": { "messages": { "message": "Deleted group" } } } }
|
64
|
+
},
|
65
|
+
"400": { "description": "Bad request" },
|
66
|
+
"404": { "description": "Not found" },
|
67
|
+
"500": { "description": "Internal Server Error" }
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getGroups",
|
4
|
+
"description": "List of groups",
|
5
|
+
"tags": ["Group"],
|
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 groups",
|
16
|
+
"type": "array",
|
17
|
+
"items": { "allOf": [{ "$ref": "../../common/schemas/setup/group.json#/components/schemas/response" }] }
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"application/xml": {
|
21
|
+
"schema": {
|
22
|
+
"description": "List of groups",
|
23
|
+
"type": "array",
|
24
|
+
"xml": { "name": "/", "wrapped": true },
|
25
|
+
"items": { "$ref": "../../common/schemas/setup/group.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": "createGroup",
|
37
|
+
"description": "Create new group",
|
38
|
+
"tags": ["Group"],
|
39
|
+
"parameters": [
|
40
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" }
|
41
|
+
],
|
42
|
+
"requestBody": {
|
43
|
+
"required": true,
|
44
|
+
"description": "Group fields to fill",
|
45
|
+
"content": {
|
46
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/request/post" } },
|
47
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/group.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/group.json#/components/schemas/response" } },
|
55
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/setup/group.json#/components/schemas/response" } }
|
56
|
+
}
|
57
|
+
},
|
58
|
+
"400": { "description": "Bad request" },
|
59
|
+
"500": { "description": "Server error" }
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getHardwareById",
|
4
|
+
"description": "Get hardware",
|
5
|
+
"tags": ["Hardware"],
|
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/inventory/hardware.json#/components/schemas/response" },
|
16
|
+
"example": { "$ref": "../../common/examples/hardware.json#/examples/response" }
|
17
|
+
},
|
18
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/hardware.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": "updateHardwareById",
|
28
|
+
"description": "Update hardware with specified fields",
|
29
|
+
"tags": ["Hardware"],
|
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": "Hardware fields to update",
|
37
|
+
"content": {
|
38
|
+
"application/json": {
|
39
|
+
"schema": { "$ref": "../../common/schemas/inventory/hardware.json#/components/schemas/request/put" },
|
40
|
+
"example": { "$ref": "../../common/examples/hardware.json#/examples/request" }
|
41
|
+
},
|
42
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/hardware.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/inventory/hardware.json#/components/schemas/response" },
|
51
|
+
"example": { "$ref": "../../common/examples/hardware.json#/examples/response" }
|
52
|
+
},
|
53
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/hardware.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": "deleteHardwareById",
|
63
|
+
"description": "Delete hardware",
|
64
|
+
"tags": ["Hardware"],
|
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 hardware'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": "getHardwares",
|
4
|
+
"description": "List of hardwares",
|
5
|
+
"tags": ["Hardware"],
|
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 hardwares",
|
16
|
+
"type": "array",
|
17
|
+
"items": { "$ref": "../../common/schemas/inventory/hardware.json#/components/schemas/response" }
|
18
|
+
},
|
19
|
+
"example": [{ "$ref": "../../common/examples/hardware.json#/examples/response" }]
|
20
|
+
},
|
21
|
+
"application/xml": {
|
22
|
+
"schema": {
|
23
|
+
"description": "List of hardwares",
|
24
|
+
"type": "array",
|
25
|
+
"xml": { "name": "/", "wrapped": true },
|
26
|
+
"items": { "$ref": "../../common/schemas/inventory/hardware.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": "createHardware",
|
38
|
+
"description": "Create new hardware",
|
39
|
+
"tags": ["Hardware"],
|
40
|
+
"parameters": [
|
41
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" }
|
42
|
+
],
|
43
|
+
"requestBody": {
|
44
|
+
"required": true,
|
45
|
+
"description": "Hardware fields to fill",
|
46
|
+
"content": {
|
47
|
+
"application/json": {
|
48
|
+
"schema": { "$ref": "../../common/schemas/inventory/hardware.json#/components/schemas/request/post" },
|
49
|
+
"example": { "$ref": "../../common/examples/hardware.json#/examples/request" }
|
50
|
+
},
|
51
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/hardware.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/inventory/hardware.json#/components/schemas/response" },
|
60
|
+
"example": { "$ref": "../../common/examples/hardware.json#/examples/response" }
|
61
|
+
},
|
62
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/hardware.json#/components/schemas/response" } }
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"400": { "description": "Bad request" },
|
66
|
+
"500": { "description": "Server error" }
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|