solarwinds-itsm-api-definitions 0.1.1 → 0.1.6
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 +298 -49
- data/lib/definitions/common/examples/catalog_item.json +70 -0
- data/lib/definitions/common/examples/change.json +127 -0
- data/lib/definitions/common/examples/change_catalog.json +92 -0
- data/lib/definitions/common/examples/configuration_item.json +108 -0
- data/lib/definitions/common/examples/hardware.json +125 -0
- data/lib/definitions/common/examples/incident.json +134 -109
- data/lib/definitions/common/examples/problem.json +132 -0
- data/lib/definitions/common/examples/release.json +150 -0
- data/lib/definitions/common/examples/service_request.json +28 -0
- data/lib/definitions/common/examples/solution.json +49 -0
- data/lib/definitions/common/examples/user.json +106 -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 +85 -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 +117 -0
- data/lib/definitions/common/schemas/service_desk/incident.json +99 -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 +105 -10
- 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 +7 -7
- data/lib/definitions/paths/incidents/incidents.json +11 -11
- 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/solarwinds/itsm/api/definitions.rb +52 -3
- metadata +106 -4
- data/lib/definitions/common/schemas/incident.json +0 -78
- data/lib/resolved_schema/resolved_schema.json +0 -1
@@ -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
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getWarranties",
|
4
|
+
"description": "List of warranties",
|
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": {
|
16
|
+
"description": "List of warranties",
|
17
|
+
"type": "array",
|
18
|
+
"items": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" }
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"application/xml": {
|
22
|
+
"schema": {
|
23
|
+
"description": "List of warranties",
|
24
|
+
"type": "array",
|
25
|
+
"xml": { "name": "/", "wrapped": true },
|
26
|
+
"items": { "$ref": "../../common/schemas/inventory/warranty.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": "createWarranty",
|
38
|
+
"description": "Create new Warranty",
|
39
|
+
"tags": ["Hardware"],
|
40
|
+
"parameters": [
|
41
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
42
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
43
|
+
],
|
44
|
+
"requestBody": {
|
45
|
+
"required": true,
|
46
|
+
"description": "Warranty fields to fill",
|
47
|
+
"content": {
|
48
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/request" } },
|
49
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/request" } }
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"responses": {
|
53
|
+
"200": {
|
54
|
+
"description": "Object created and returned correctly",
|
55
|
+
"content": {
|
56
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" } },
|
57
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" } }
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"400": { "description": "Bad request" },
|
61
|
+
"500": { "description": "Server error" }
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
{
|
2
|
+
"put": {
|
3
|
+
"operationId": "updateWarrantyById",
|
4
|
+
"description": "Update warranty with specified fields",
|
5
|
+
"tags": ["Hardware"],
|
6
|
+
"parameters": [
|
7
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
8
|
+
{
|
9
|
+
"name": "hardware_id",
|
10
|
+
"in": "path",
|
11
|
+
"schema": { "type": "string" },
|
12
|
+
"required": true,
|
13
|
+
"description": "Numeric ID of the hardware"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "warranty_id",
|
17
|
+
"in": "path",
|
18
|
+
"schema": { "type": "string" },
|
19
|
+
"required": true,
|
20
|
+
"description": "Numeric ID of the warranty"
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"requestBody": {
|
24
|
+
"required": true,
|
25
|
+
"description": "Warranty fields to update",
|
26
|
+
"content": {
|
27
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/request" } },
|
28
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/request" } }
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"responses": {
|
32
|
+
"200": {
|
33
|
+
"description": "Object was updated correctly",
|
34
|
+
"content": {
|
35
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" } },
|
36
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/warranty.json#/components/schemas/response" } }
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"400": { "description": "Bad request" },
|
40
|
+
"404": { "description": "Not found" },
|
41
|
+
"500": { "description": "Internal Server Error" }
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"delete": {
|
45
|
+
"operationId": "deleteWarrantyById",
|
46
|
+
"description": "Delete warranty",
|
47
|
+
"tags": ["Hardware"],
|
48
|
+
"parameters": [
|
49
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
50
|
+
{
|
51
|
+
"name": "hardware_id",
|
52
|
+
"in": "path",
|
53
|
+
"schema": { "type": "string" },
|
54
|
+
"required": true,
|
55
|
+
"description": "Numeric ID of the hardware"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "warranty_id",
|
59
|
+
"in": "path",
|
60
|
+
"schema": { "type": "string" },
|
61
|
+
"required": true,
|
62
|
+
"description": "Numeric ID of the warranty"
|
63
|
+
}
|
64
|
+
],
|
65
|
+
"responses": {
|
66
|
+
"200": {
|
67
|
+
"description": "Message regarding a successful operation",
|
68
|
+
"content": { "application/json": { "example": { "messages": { "message": "Deleted warranty" } } } }
|
69
|
+
},
|
70
|
+
"400": { "description": "Bad request" },
|
71
|
+
"404": { "description": "Not found" },
|
72
|
+
"500": { "description": "Internal Server Error" }
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
@@ -12,10 +12,10 @@
|
|
12
12
|
"description": "Object was returned correctly",
|
13
13
|
"content": {
|
14
14
|
"application/json": {
|
15
|
-
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
15
|
+
"schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" },
|
16
16
|
"example": { "$ref": "../../common/examples/incident.json#/examples/response/json" }
|
17
17
|
},
|
18
|
-
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
18
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" } }
|
19
19
|
}
|
20
20
|
},
|
21
21
|
"400": { "description": "Bad request" },
|
@@ -36,10 +36,10 @@
|
|
36
36
|
"description": "Incident fields to update",
|
37
37
|
"content": {
|
38
38
|
"application/json": {
|
39
|
-
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
39
|
+
"schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/request/put" },
|
40
40
|
"example": { "$ref": "../../common/examples/incident.json#/examples/request/json" }
|
41
41
|
},
|
42
|
-
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
42
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/request/put" } }
|
43
43
|
}
|
44
44
|
},
|
45
45
|
"responses": {
|
@@ -47,10 +47,10 @@
|
|
47
47
|
"description": "Object was updated correctly",
|
48
48
|
"content": {
|
49
49
|
"application/json": {
|
50
|
-
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
50
|
+
"schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" },
|
51
51
|
"example": { "$ref": "../../common/examples/incident.json#/examples/response/json" }
|
52
52
|
},
|
53
|
-
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
53
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" } }
|
54
54
|
}
|
55
55
|
},
|
56
56
|
"400": { "description": "Bad request" },
|
@@ -68,7 +68,7 @@
|
|
68
68
|
],
|
69
69
|
"responses": {
|
70
70
|
"200": {
|
71
|
-
"description": "
|
71
|
+
"description": "Returns the deleted incident's id",
|
72
72
|
"content": {
|
73
73
|
"application/json": {
|
74
74
|
"example": { "deleted_ids": ["1"] }
|
@@ -7,22 +7,23 @@
|
|
7
7
|
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" }
|
8
8
|
],
|
9
9
|
"responses": {
|
10
|
-
"200": {
|
10
|
+
"200": {
|
11
11
|
"description": "Object was returned correctly",
|
12
12
|
"content": {
|
13
13
|
"application/json": {
|
14
|
-
"schema": {
|
14
|
+
"schema": {
|
15
15
|
"description": "List of incidents",
|
16
16
|
"type": "array",
|
17
|
-
"items": { "
|
17
|
+
"items": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" }
|
18
18
|
},
|
19
19
|
"example": [{ "$ref": "../../common/examples/incident.json#/examples/response/json" }]
|
20
20
|
},
|
21
21
|
"application/xml": {
|
22
|
-
"schema": {
|
22
|
+
"schema": {
|
23
23
|
"description": "List of incidents",
|
24
24
|
"type": "array",
|
25
|
-
"
|
25
|
+
"xml": { "name": "/", "wrapped": true },
|
26
|
+
"items": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" }
|
26
27
|
}
|
27
28
|
}
|
28
29
|
}
|
@@ -44,21 +45,21 @@
|
|
44
45
|
"description": "Incident fields to fill",
|
45
46
|
"content": {
|
46
47
|
"application/json": {
|
47
|
-
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
48
|
+
"schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/request/post" },
|
48
49
|
"example": { "$ref": "../../common/examples/incident.json#/examples/request/json" }
|
49
50
|
},
|
50
|
-
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
51
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/request/post" } }
|
51
52
|
}
|
52
53
|
},
|
53
54
|
"responses": {
|
54
|
-
"200": {
|
55
|
+
"200": {
|
55
56
|
"description": "Object created and returned correctly",
|
56
57
|
"content": {
|
57
58
|
"application/json": {
|
58
|
-
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
59
|
+
"schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" },
|
59
60
|
"example": { "$ref": "../../common/examples/incident.json#/examples/response/json" }
|
60
61
|
},
|
61
|
-
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/
|
62
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/service_desk/incident.json#/components/schemas/response" } }
|
62
63
|
}
|
63
64
|
},
|
64
65
|
"400": { "description": "Bad request" },
|
@@ -66,4 +67,3 @@
|
|
66
67
|
}
|
67
68
|
}
|
68
69
|
}
|
69
|
-
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"delete": {
|
3
|
+
"operationId": "deleteMemebershipById",
|
4
|
+
"description": "Delete membership.\nExample: curl -H \"X-Samanage-Authorization: Bearer TOKEN\" -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X DELETE https://api.samanage.com/memberships/1.xml",
|
5
|
+
"tags": ["Membership"],
|
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": "Message regarding a successful operation",
|
13
|
+
"content": { "application/json": { "example": { "messages": { "message": "Deleted membership" } } } }
|
14
|
+
},
|
15
|
+
"400": { "description": "Bad request" },
|
16
|
+
"404": { "description": "Not found" },
|
17
|
+
"500": { "description": "Internal Server Error" }
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"post": {
|
3
|
+
"operationId": "createMembership",
|
4
|
+
"description": "Create new Membership. Memberships are used to relate a user to a group.\nExample: curl -H \"X-Samanage-Authorization: Bearer TOKEN\" -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X POST https://api.samanage.com/memberships.xml?group_id=1&user_ids=1",
|
5
|
+
"tags": ["Membership"],
|
6
|
+
"parameters": [
|
7
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
8
|
+
{
|
9
|
+
"name": "group_id",
|
10
|
+
"in": "query",
|
11
|
+
"schema": { "type": "string" },
|
12
|
+
"required": true,
|
13
|
+
"description": "Numeric ID of the group"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "user_ids",
|
17
|
+
"in": "query",
|
18
|
+
"schema": { "type": "string" },
|
19
|
+
"required": true,
|
20
|
+
"description": "Numeric IDs of the users"
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"responses": {
|
24
|
+
"200": { "description": "membership created and returned correctly" },
|
25
|
+
"400": { "description": "Bad request" },
|
26
|
+
"500": { "description": "Server error" }
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getMobileById",
|
4
|
+
"description": "Get mobile device",
|
5
|
+
"tags": ["Mobile Device"],
|
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/inventory/mobile.json#/components/schemas/response" } },
|
15
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/mobile.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": "updateMobileById",
|
25
|
+
"description": "Update mobile device with specified fields",
|
26
|
+
"tags": ["Mobile Device"],
|
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": "Mobile device fields to update",
|
34
|
+
"content": {
|
35
|
+
"application/json": { "schema": { "$ref": "../../common/schemas/inventory/mobile.json#/components/schemas/request/put" } },
|
36
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/mobile.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/inventory/mobile.json#/components/schemas/response" } },
|
44
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/inventory/mobile.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": "deleteMobileById",
|
54
|
+
"description": "Delete mobile device",
|
55
|
+
"tags": ["Mobile Device"],
|
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": "Returns the deleted mobile's id",
|
63
|
+
"content": {
|
64
|
+
"application/json": {
|
65
|
+
"example": { "deleted_ids": ["1"] }
|
66
|
+
}
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"400": { "description": "Bad request" },
|
70
|
+
"404": { "description": "Not found" },
|
71
|
+
"500": { "description": "Internal Server Error" }
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|