solarwinds-itsm-api-definitions 0.0.2 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7ea66292b7c9f3019dedc2b63e45fba1a1517501c3d20213b075440091b2ef1
4
- data.tar.gz: 88c5a8e92f0f4539d98b78aa306798401fdbd9f6f1684a0a60b5efa9b30fa5ba
3
+ metadata.gz: 7245e53cab64ef2d471ea8388b322e8e7277f802576b7a989856b28ba1c3f998
4
+ data.tar.gz: 74f1370701759fc97221d80257a86171a4c34bce41676e99f2e915c4de9896bf
5
5
  SHA512:
6
- metadata.gz: 2c1bd3454a5d487a990e01608c448ae5b60fa22d138a9c3716809c97bc2c22878427cd504a20edd9a8f4d5dc808b23d472cf51accf5d7c61c3acc744679ed47e
7
- data.tar.gz: 68d1aa1a5a8a3fad5f53c16e39cba6c2c44065306c04f67d3aaf001e72cbfb117d77b8252ad8a0c2a4d0dedce77a3c1e0d82a5527437e9737b35de3b00729701
6
+ metadata.gz: cf38c21c21122e1076d343c5692a8ea104aeae7fb739584bf73e47e5805b29fa579de89067f652c1e98933bae16621a9e44acc516f99d05e93bc46245134cdba
7
+ data.tar.gz: c160b23959ccf1cbfadfcb0e7f591842aa073718ede976590606e955c1ec0e10f7f876edd2e62f48821e4908cd018b1303a7463e6168de3960b62c57e735e8b2
@@ -12,22 +12,144 @@
12
12
  "in": "path",
13
13
  "schema": { "oneOf": [{ "type": "string" }, { "type": "integer" }] },
14
14
  "required": true,
15
- "description": "Numeric ID of the incident to update"
15
+ "description": "Numeric ID of the object to get or update"
16
16
  }
17
17
  },
18
18
  "schemas": {
19
+ "association_by_id": {
20
+ "oneOf": [{ "type": "string" }, { "type": "integer" }]
21
+ },
19
22
  "association_by_name": {
20
23
  "type": "object",
21
24
  "oneOf": [{
22
25
  "type": "object",
26
+ "required": ["name"],
23
27
  "properties": {
24
- "name": { "type": "string", "required": true }
28
+ "name": { "type": "string" }
25
29
  }
26
30
  },
27
31
  { "enum": ["nil", "", null] }]
28
32
  },
29
- "association_by_id": {
33
+ "association_by_email": {
34
+ "type": "object",
35
+ "oneOf": [{
36
+ "type": "object",
37
+ "required": ["email"],
38
+ "properties": {
39
+ "email": { "type": "string" }
40
+ }
41
+ },
42
+ { "enum": ["nil", "", null] }]
43
+ },
44
+ "id": {
45
+ "readOnly": true,
30
46
  "oneOf": [{ "type": "string" }, { "type": "integer" }]
47
+ },
48
+ "custom_field": {
49
+ "type": "object",
50
+ "oneOf": [{
51
+ "type": "object",
52
+ "required": ["name", "value"],
53
+ "properties": {
54
+ "name": { "type": "string" },
55
+ "value": { "type": "string" }
56
+ }
57
+ }]
58
+ },
59
+ "custom_field_value": {
60
+ "type": "array",
61
+ "items": {
62
+ "allOf": [{ "$ref": "components.json#/components/schemas/custom_field" }]
63
+ }
64
+ },
65
+ "custom_field_values": {
66
+ "type": "object",
67
+ "oneOf": [{
68
+ "type": "object",
69
+ "required": ["custom_field_value"],
70
+ "properties": {
71
+ "custom_field_value": { "$ref": "components.json#/components/schemas/custom_field_value" }
72
+ }
73
+ }]
74
+ },
75
+ "category_subcategory": {
76
+ "type": "object",
77
+ "properties": {
78
+ "id": { "$ref": "components.json#/components/schemas/id" },
79
+ "name": { "type": "string" },
80
+ "default_tags": { "type": "string" },
81
+ "parent_id": { "$ref": "components.json#/components/schemas/id" },
82
+ "default_assignee_id": { "$ref": "components.json#/components/schemas/id" }
83
+ }
84
+ },
85
+ "avatar": {
86
+ "type": "object",
87
+ "properties": {
88
+ "type": { "type": "string" },
89
+ "color": { "type": "string" },
90
+ "initials": {
91
+ "type": "string",
92
+ "minLength": 2,
93
+ "maxLength": 2
94
+ }
95
+ }
96
+ },
97
+ "requester_assignee_details": {
98
+ "type": "object",
99
+ "properties": {
100
+ "group_id": { "$ref": "components.json#/components/schemas/association_by_id" },
101
+ "is_user": { "oneOf": [{ "type": "string" }, { "type": "boolean" }] },
102
+ "id": { "$ref": "components.json#/components/schemas/id" },
103
+ "name": { "type": "string" },
104
+ "email": { "type": "string" },
105
+ "avatar": { "$ref": "components.json#/components/schemas/avatar" }
106
+ }
107
+ },
108
+ "site_response": {
109
+ "type": "object",
110
+ "properties": {
111
+ "id": { "$ref": "components.json#/components/schemas/id" },
112
+ "name": { "type": "string" },
113
+ "description": { "type": "string" },
114
+ "location": { "type": "string" },
115
+ "timezone": { "type": "string" }
116
+ }
117
+ },
118
+ "department_response": {
119
+ "type": "object",
120
+ "properties": {
121
+ "id": { "$ref": "components.json#/components/schemas/id" },
122
+ "name": { "type": "string" },
123
+ "description": { "type": "string" },
124
+ "default_assignee_id": { "$ref": "components.json#/components/schemas/id" }
125
+ }
126
+ },
127
+ "ids_array": {
128
+ "type": "array",
129
+ "items": {
130
+ "$ref": "components.json#/components/schemas/association_by_id"
131
+ }
132
+ },
133
+ "numbers_array": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "object",
137
+ "properties": {
138
+ "number": {
139
+ "oneOf": [{ "type": "string" }, { "type": "integer" }]
140
+ }
141
+ }
142
+ }
143
+ },
144
+ "response_attachments": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "object",
148
+ "properties": {
149
+ "id": { "$ref": "components.json#/components/schemas/association_by_id" },
150
+ "href": { "type": "string" }
151
+ }
152
+ }
31
153
  }
32
154
  }
33
155
  }
@@ -0,0 +1,122 @@
1
+ {
2
+ "examples": {
3
+ "request": {
4
+ "json": {
5
+ "incident": {
6
+ "name": "Incident Name",
7
+ "site_id": 1,
8
+ "department_id": 1,
9
+ "description": "description",
10
+ "state_id": 1,
11
+ "assignee": { "email": "john.doe@email.com" },
12
+ "requester": { "email": "john.doe@email.com" },
13
+ "priority": "High",
14
+ "category": { "name": "Facilities" },
15
+ "subcategory": { "name": "Equipment" },
16
+ "due_at": "Jan 01,2022",
17
+ "add_to_tag_list": "tag1, tag2",
18
+ "custom_fields_values": {
19
+ "custom_fields_value": [
20
+ { "name": "field name", "value": "content" }
21
+ ]
22
+ },
23
+ "incidents": [{ "number": "123" }],
24
+ "problems": [{ "number": "123" }],
25
+ "changes": [{ "number": "123" }],
26
+ "solutions": [{ "number" :"123" }],
27
+ "releases": [{ "number": "123" }],
28
+ "configuration_item_ids":["123"]
29
+ }
30
+ },
31
+ "xml": {
32
+ "description": "shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719",
33
+ "xml": "<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"
34
+ }
35
+ },
36
+ "response": {
37
+ "json": {
38
+ "incident": {
39
+ "id": "78912",
40
+ "number": "234",
41
+ "name": "Incident Name",
42
+ "description": "description",
43
+ "state": "New",
44
+ "site": {
45
+ "id": "1",
46
+ "name": "Austin TX, USA",
47
+ "location": "AUS",
48
+ "description": "",
49
+ "time_zone": ""
50
+ },
51
+ "department": {
52
+ "id": "1",
53
+ "name": "Support",
54
+ "description": "",
55
+ "default_assignee_id": "1"
56
+ },
57
+ "category": {
58
+ "id": "12",
59
+ "name": "Facilities",
60
+ "default_tags": "tagA, tagB",
61
+ "parent_id": "null",
62
+ "default_assignee_id": "1"
63
+ },
64
+ "subcategory": {
65
+ "id": "13",
66
+ "name": "Equipment",
67
+ "default_tags": "",
68
+ "parent_id": "12",
69
+ "default_assignee_id": "1"
70
+ },
71
+ "priority": "High",
72
+ "assignee": {
73
+ "group_id": "1",
74
+ "is_user": "true",
75
+ "id": "1",
76
+ "name": "Jogn Doe",
77
+ "email": "john.doe@email.com",
78
+ "avatar": {
79
+ "type": "initials",
80
+ "color": "#fd4165",
81
+ "initials": "AA"
82
+ }
83
+ },
84
+ "requester": {
85
+ "group_id": "1",
86
+ "is_user": "true",
87
+ "id": "1",
88
+ "name": "John Doe",
89
+ "email": "john.doe@email.com",
90
+ "avatar": {
91
+ "type": "initials",
92
+ "color": "#fd4165",
93
+ "initials": "AA"
94
+ }
95
+ },
96
+ "custom_fields_values": [
97
+ {
98
+ "id": "1223",
99
+ "custom_field_id": "1",
100
+ "name": "field name",
101
+ "value": "content",
102
+ "options": "",
103
+ "type_name": "Text"
104
+ }
105
+ ],
106
+ "due_at": "2022-01-01T00:00:00.000+01:00",
107
+ "origin": "api",
108
+ "incidents": [{ "id": "123", "href": "https://mydomain.com/incidents/123"}],
109
+ "problems": [{ "id": "123", "href": "https://mydomain.com/problems/123"}],
110
+ "changes": [{ "id": "123", "href": "https://mydomain.com/changes/123"}],
111
+ "solutions": [{ "id": "123", "href": "https://mydomain.com/solutions/123"}],
112
+ "releases": [{ "id": "123", "href": "https://mydomain.com/releases/123"}],
113
+ "configuration_items": [{ "id": "123", "href": "https://mydomain.com/configuration_items/123"}]
114
+ }
115
+ },
116
+ "xml": {
117
+ "description": "shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719",
118
+ "xml": "<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"
119
+ }
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "components": {
3
+ "schemas": {
4
+ "incident": {
5
+ "request": {
6
+ "type": "object",
7
+ "properties": {
8
+ "incident": {
9
+ "type": "object",
10
+ "properties": {
11
+ "name": { "type": "string" },
12
+ "site_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
13
+ "department_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
14
+ "description": { "type": "string" },
15
+ "state_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
16
+ "assignee": { "$ref": "../components.json#/components/schemas/association_by_email" },
17
+ "assignee_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
18
+ "priority": { "$ref": "../components.json#/components/schemas/association_by_id" },
19
+ "requester": { "$ref": "../components.json#/components/schemas/association_by_email" },
20
+ "category": { "$ref": "../components.json#/components/schemas/association_by_name" },
21
+ "subcategory": { "$ref": "../components.json#/components/schemas/association_by_name" },
22
+ "due_at": { "type": "string" },
23
+ "add_to_tag_list": { "type": "string" },
24
+ "custom_field_values": { "$ref": "../components.json#/components/schemas/custom_field_values" },
25
+ "incidents": { "$ref": "../components.json#/components/schemas/numbers_array" },
26
+ "solutions": { "$ref": "../components.json#/components/schemas/numbers_array" },
27
+ "changes": { "$ref": "../components.json#/components/schemas/numbers_array" },
28
+ "problems": { "$ref": "../components.json#/components/schemas/numbers_array" },
29
+ "releases": { "$ref": "../components.json#/components/schemas/numbers_array" },
30
+ "configuration_item_ids": { "$ref": "../components.json#/components/schemas/ids_array" }
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "response": {
36
+ "type": "object",
37
+ "properties": {
38
+ "incident": {
39
+ "type": "object",
40
+ "properties": {
41
+ "id": { "$ref": "../components.json#/components/schemas/id" },
42
+ "name": { "type": "string" },
43
+ "description": { "type": "string" },
44
+ "site": { "$ref": "../components.json#/components/schemas/site_response" },
45
+ "department": { "$ref": "../components.json#/components/schemas/department_response" },
46
+ "state": { "type": "string" },
47
+ "priority": { "type": "string" },
48
+ "assignee": { "$ref": "../components.json#/components/schemas/requester_assignee_details" },
49
+ "requester": { "$ref": "../components.json#/components/schemas/requester_assignee_details" },
50
+ "category": { "$ref": "../components.json#/components/schemas/category_subcategory" },
51
+ "subcategory": { "$ref": "../components.json#/components/schemas/category_subcategory" },
52
+ "due_at": { "type": "string" },
53
+ "custom_field_values": { "$ref": "../components.json#/components/schemas/custom_field_values" },
54
+ "created_by": { "$ref": "../components.json#/components/schemas/requester_assignee_details" },
55
+ "origin": { "type": "string" },
56
+ "incidents": { "$ref": "../components.json#/components/schemas/response_attachments" },
57
+ "solutions": { "$ref": "../components.json#/components/schemas/response_attachments" },
58
+ "changes": { "$ref": "../components.json#/components/schemas/response_attachments" },
59
+ "problems": { "$ref": "../components.json#/components/schemas/response_attachments" },
60
+ "releases": { "$ref": "../components.json#/components/schemas/response_attachments" },
61
+ "configuration_item_ids": { "$ref": "../components.json#/components/schemas/response_attachments" }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "incidents": {
68
+ "description": "List of incidents",
69
+ "type": "array",
70
+ "items": {
71
+ "allOf": [{ "$ref": "incident.json#/components/schemas/incident/response" }]
72
+ }
73
+ },
74
+ "incident_request_content": {
75
+ "application/json": {
76
+ "schema": { "$ref": "incident.json#/components/schemas/incident/request" },
77
+ "example": { "$ref": "../examples/incident.json#/examples/request/json" }
78
+ },
79
+ "application/xml": {
80
+ "schema": { "$ref": "incident.json#/components/schemas/incident/request" },
81
+ "example": { "$ref": "../examples/incident.json#/examples/request/xml" }
82
+ }
83
+ },
84
+ "many_incidents_content": {
85
+ "application/json": {
86
+ "schema": { "$ref": "incident.json#/components/schemas/incidents" },
87
+ "example": [{ "$ref": "../examples/incident.json#/examples/response/json" }]
88
+ },
89
+ "application/xml": {
90
+ "schema": { "$ref": "incident.json#/components/schemas/incidents" },
91
+ "example": [{ "$ref": "../examples/incident.json#/examples/response/xml" }]
92
+ }
93
+ },
94
+ "incident_response_content": {
95
+ "application/json": {
96
+ "schema": { "$ref": "incident.json#/components/schemas/incident/response" },
97
+ "example": { "$ref": "../examples/incident.json#/examples/response/json" }
98
+ },
99
+ "application/xml": {
100
+ "schema": { "$ref": "incident.json#/components/schemas/incident/response" },
101
+ "example": { "$ref": "../examples/incident.json#/examples/response/xml" }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "SolarWinds ITSM API",
5
5
  "description": "All SolarWinds ITSM API definitions",
6
- "version": "0.0.1",
6
+ "version": "0.0.7",
7
7
  "contact": {
8
8
  "name": "API Support",
9
9
  "url": "samanage.com/support",
@@ -15,6 +15,13 @@
15
15
  { "url": "https://apieu.samanage.com" }
16
16
  ],
17
17
  "paths": {
18
- "$ref": "paths/paths.json"
19
- }
18
+ "/incidents/{id}": { "$ref": "paths/incidents/incident_by_id.json" },
19
+ "/incidents": { "$ref": "paths/incidents/incidents.json" }
20
+ },
21
+ "tags": [
22
+ {
23
+ "name": "Incident",
24
+ "description": "Incident operations"
25
+ }
26
+ ]
20
27
  }
@@ -0,0 +1,65 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getIncidentById",
4
+ "description": "Get incident",
5
+ "tags": ["Incident"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/parameters/id_param" },
8
+ { "$ref": "../../common/components.json#/components/parameters/token_param" }
9
+ ],
10
+ "responses": {
11
+ "200": {
12
+ "description": "Object was returned correctly",
13
+ "content": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident_response_content" }
14
+ },
15
+ "400": { "description": "Bad request" },
16
+ "404": { "description": "Not found" },
17
+ "500": { "description": "Internal Server Error" }
18
+ }
19
+ },
20
+ "put": {
21
+ "operationId": "updateIncidentById",
22
+ "description": "Update incident with specified fields",
23
+ "tags": ["Incident"],
24
+ "parameters": [
25
+ { "$ref": "../../common/components.json#/components/parameters/id_param" },
26
+ { "$ref": "../../common/components.json#/components/parameters/token_param" }
27
+ ],
28
+ "requestBody": {
29
+ "required": true,
30
+ "description": "Incident fields to update",
31
+ "content": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident_request_content" }
32
+ },
33
+ "responses": {
34
+ "200": {
35
+ "description": "Object was updated correctly",
36
+ "content": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident_response_content" }
37
+ },
38
+ "400": { "description": "Bad request" },
39
+ "404": { "description": "Not found" },
40
+ "500": { "description": "Internal Server Error" }
41
+ }
42
+ },
43
+ "delete": {
44
+ "operationId": "deleteIncidentById",
45
+ "description": "Delete incident",
46
+ "tags": ["Incident"],
47
+ "parameters": [
48
+ { "$ref": "../../common/components.json#/components/parameters/id_param" },
49
+ { "$ref": "../../common/components.json#/components/parameters/token_param" }
50
+ ],
51
+ "responses": {
52
+ "200": {
53
+ "description": "Object was returned correctly",
54
+ "content": {
55
+ "application/json": {
56
+ "example": { "deleted_ids": ["1"] }
57
+ }
58
+ }
59
+ },
60
+ "400": { "description": "Bad request" },
61
+ "404": { "description": "Not found" },
62
+ "500": { "description": "Internal Server Error" }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "get": {
3
+ "operationId": "getIncidents",
4
+ "description": "List of incidents",
5
+ "tags": ["Incident"],
6
+ "parameters": [
7
+ { "$ref": "../../common/components.json#/components/parameters/token_param" }
8
+ ],
9
+ "responses": {
10
+ "200": {
11
+ "description": "Object was returned correctly",
12
+ "content": { "$ref": "../../common/schemas/incident.json#/components/schemas/many_incidents_content" }
13
+ },
14
+ "400": { "description": "Bad request" },
15
+ "404": { "description": "Not found" },
16
+ "500": { "description": "Server error" }
17
+ }
18
+ },
19
+ "post": {
20
+ "operationId": "createIncident",
21
+ "description": "Create new incident",
22
+ "tags": ["Incident"],
23
+ "parameters": [
24
+ { "$ref": "../../common/components.json#/components/parameters/token_param" }
25
+ ],
26
+ "requestBody": {
27
+ "required": true,
28
+ "description": "Incident fields to fill",
29
+ "content": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident_request_content" }
30
+ },
31
+ "responses": {
32
+ "200": {
33
+ "description": "Object created and returned correctly",
34
+ "content": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident_response_content" }
35
+ },
36
+ "400": { "description": "Bad request" },
37
+ "500": { "description": "Server error" }
38
+ }
39
+ }
40
+ }
41
+
@@ -1 +1 @@
1
- {"openapi":"3.0.1","info":{"title":"SolarWinds ITSM API","description":"All SolarWinds ITSM API definitions","version":"0.0.1","contact":{"name":"API Support","url":"samanage.com/support","email":"support@samanage.com"}},"servers":[{"url":"https://api.samanage.com"},{"url":"https://apieu.samanage.com"}],"paths":{"/incidents/{id}":{"put":{"operationId":"updateIncidentById","description":"The update API for incidents in JSON","parameters":[{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"string"},{"type":"integer"}]},"required":true,"description":"Numeric ID of the incident to update"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"site":{"type":"object","oneOf":[{"type":"object","properties":{"name":{"type":"string","required":true}}},{"enum":["nil","",null]}]},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department":{"type":"object","oneOf":[{"type":"object","properties":{"name":{"type":"string","required":true}}},{"enum":["nil","",null]}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","properties":{"email":{"type":"string","required":true}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}},"examples":{"0":{"value":"{\"incident\":{\"site\":{\"name\":\"SITE-NAME\"},\"department\":{\"name\":\"DEPARTMENT-NAME\"},\"site_id\":SITE-ID,\"department_id\":DEPARTMENT-ID,\"description\":\"SOMEDESCRIPTION\",\"state\":\"SITE-NAME\",\"assignee\":{\"email\":\"EMAIL\"}}}"}}}}},"responses":{"200":{"description":"Object was updated correctly"},"404":{"description":"Not found"}}}}}}
1
+ {"openapi":"3.0.1","info":{"title":"SolarWinds ITSM API","description":"All SolarWinds ITSM API definitions","version":"0.0.7","contact":{"name":"API Support","url":"samanage.com/support","email":"support@samanage.com"}},"servers":[{"url":"https://api.samanage.com"},{"url":"https://apieu.samanage.com"}],"paths":{"/incidents/{id}":{"get":{"operationId":"getIncidentById","description":"Get incident","tags":["Incident"],"parameters":[{"name":"id","in":"path","schema":{"oneOf":[{"type":"string"},{"type":"integer"}]},"required":true,"description":"Numeric ID of the object to get or update"},{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"}],"responses":{"200":{"description":"Object was returned correctly","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}},"example":{"incident":{"id":"78912","number":"234","name":"Incident Name","description":"description","state":"New","site":{"id":"1","name":"Austin TX, USA","location":"AUS","description":"","time_zone":""},"department":{"id":"1","name":"Support","description":"","default_assignee_id":"1"},"category":{"id":"12","name":"Facilities","default_tags":"tagA, tagB","parent_id":"null","default_assignee_id":"1"},"subcategory":{"id":"13","name":"Equipment","default_tags":"","parent_id":"12","default_assignee_id":"1"},"priority":"High","assignee":{"group_id":"1","is_user":"true","id":"1","name":"Jogn Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"requester":{"group_id":"1","is_user":"true","id":"1","name":"John Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"custom_fields_values":[{"id":"1223","custom_field_id":"1","name":"field name","value":"content","options":"","type_name":"Text"}],"due_at":"2022-01-01T00:00:00.000+01:00","origin":"api","incidents":[{"id":"123","href":"https://mydomain.com/incidents/123"}],"problems":[{"id":"123","href":"https://mydomain.com/problems/123"}],"changes":[{"id":"123","href":"https://mydomain.com/changes/123"}],"solutions":[{"id":"123","href":"https://mydomain.com/solutions/123"}],"releases":[{"id":"123","href":"https://mydomain.com/releases/123"}],"configuration_items":[{"id":"123","href":"https://mydomain.com/configuration_items/123"}]}}},"application/xml":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}},"example":{"description":"shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719","xml":"<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"}}}},"400":{"description":"Bad request"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}}},"put":{"operationId":"updateIncidentById","description":"Update incident with specified fields","tags":["Incident"],"parameters":[{"name":"id","in":"path","schema":{"oneOf":[{"type":"string"},{"type":"integer"}]},"required":true,"description":"Numeric ID of the object to get or update"},{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"}],"requestBody":{"required":true,"description":"Incident fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"name":{"type":"string"},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"priority":{"oneOf":[{"type":"string"},{"type":"integer"}]},"requester":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"category":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"subcategory":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"due_at":{"type":"string"},"add_to_tag_list":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"incidents":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"changes":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"problems":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"releases":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"configuration_item_ids":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}}},"example":{"incident":{"name":"Incident Name","site_id":1,"department_id":1,"description":"description","state_id":1,"assignee":{"email":"john.doe@email.com"},"requester":{"email":"john.doe@email.com"},"priority":"High","category":{"name":"Facilities"},"subcategory":{"name":"Equipment"},"due_at":"Jan 01,2022","add_to_tag_list":"tag1, tag2","custom_fields_values":{"custom_fields_value":[{"name":"field name","value":"content"}]},"incidents":[{"number":"123"}],"problems":[{"number":"123"}],"changes":[{"number":"123"}],"solutions":[{"number":"123"}],"releases":[{"number":"123"}],"configuration_item_ids":["123"]}}},"application/xml":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"name":{"type":"string"},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"priority":{"oneOf":[{"type":"string"},{"type":"integer"}]},"requester":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"category":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"subcategory":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"due_at":{"type":"string"},"add_to_tag_list":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"incidents":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"changes":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"problems":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"releases":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"configuration_item_ids":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}}},"example":{"description":"shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719","xml":"<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"}}}},"responses":{"200":{"description":"Object was updated correctly","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}},"example":{"incident":{"id":"78912","number":"234","name":"Incident Name","description":"description","state":"New","site":{"id":"1","name":"Austin TX, USA","location":"AUS","description":"","time_zone":""},"department":{"id":"1","name":"Support","description":"","default_assignee_id":"1"},"category":{"id":"12","name":"Facilities","default_tags":"tagA, tagB","parent_id":"null","default_assignee_id":"1"},"subcategory":{"id":"13","name":"Equipment","default_tags":"","parent_id":"12","default_assignee_id":"1"},"priority":"High","assignee":{"group_id":"1","is_user":"true","id":"1","name":"Jogn Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"requester":{"group_id":"1","is_user":"true","id":"1","name":"John Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"custom_fields_values":[{"id":"1223","custom_field_id":"1","name":"field name","value":"content","options":"","type_name":"Text"}],"due_at":"2022-01-01T00:00:00.000+01:00","origin":"api","incidents":[{"id":"123","href":"https://mydomain.com/incidents/123"}],"problems":[{"id":"123","href":"https://mydomain.com/problems/123"}],"changes":[{"id":"123","href":"https://mydomain.com/changes/123"}],"solutions":[{"id":"123","href":"https://mydomain.com/solutions/123"}],"releases":[{"id":"123","href":"https://mydomain.com/releases/123"}],"configuration_items":[{"id":"123","href":"https://mydomain.com/configuration_items/123"}]}}},"application/xml":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}},"example":{"description":"shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719","xml":"<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"}}}},"400":{"description":"Bad request"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}}},"delete":{"operationId":"deleteIncidentById","description":"Delete incident","tags":["Incident"],"parameters":[{"name":"id","in":"path","schema":{"oneOf":[{"type":"string"},{"type":"integer"}]},"required":true,"description":"Numeric ID of the object to get or update"},{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"}],"responses":{"200":{"description":"Object was returned correctly","content":{"application/json":{"example":{"deleted_ids":["1"]}}}},"400":{"description":"Bad request"},"404":{"description":"Not found"},"500":{"description":"Internal Server Error"}}}},"/incidents":{"get":{"operationId":"getIncidents","description":"List of incidents","tags":["Incident"],"parameters":[{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"}],"responses":{"200":{"description":"Object was returned correctly","content":{"application/json":{"schema":{"description":"List of incidents","type":"array","items":{"allOf":[{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}}]}},"example":[{"incident":{"id":"78912","number":"234","name":"Incident Name","description":"description","state":"New","site":{"id":"1","name":"Austin TX, USA","location":"AUS","description":"","time_zone":""},"department":{"id":"1","name":"Support","description":"","default_assignee_id":"1"},"category":{"id":"12","name":"Facilities","default_tags":"tagA, tagB","parent_id":"null","default_assignee_id":"1"},"subcategory":{"id":"13","name":"Equipment","default_tags":"","parent_id":"12","default_assignee_id":"1"},"priority":"High","assignee":{"group_id":"1","is_user":"true","id":"1","name":"Jogn Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"requester":{"group_id":"1","is_user":"true","id":"1","name":"John Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"custom_fields_values":[{"id":"1223","custom_field_id":"1","name":"field name","value":"content","options":"","type_name":"Text"}],"due_at":"2022-01-01T00:00:00.000+01:00","origin":"api","incidents":[{"id":"123","href":"https://mydomain.com/incidents/123"}],"problems":[{"id":"123","href":"https://mydomain.com/problems/123"}],"changes":[{"id":"123","href":"https://mydomain.com/changes/123"}],"solutions":[{"id":"123","href":"https://mydomain.com/solutions/123"}],"releases":[{"id":"123","href":"https://mydomain.com/releases/123"}],"configuration_items":[{"id":"123","href":"https://mydomain.com/configuration_items/123"}]}}]},"application/xml":{"schema":{"description":"List of incidents","type":"array","items":{"allOf":[{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}}]}},"example":[{"description":"shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719","xml":"<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"}]}}},"400":{"description":"Bad request"},"404":{"description":"Not found"},"500":{"description":"Server error"}}},"post":{"operationId":"createIncident","description":"Create new incident","tags":["Incident"],"parameters":[{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"}],"requestBody":{"required":true,"description":"Incident fields to fill","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"name":{"type":"string"},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"priority":{"oneOf":[{"type":"string"},{"type":"integer"}]},"requester":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"category":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"subcategory":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"due_at":{"type":"string"},"add_to_tag_list":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"incidents":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"changes":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"problems":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"releases":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"configuration_item_ids":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}}},"example":{"incident":{"name":"Incident Name","site_id":1,"department_id":1,"description":"description","state_id":1,"assignee":{"email":"john.doe@email.com"},"requester":{"email":"john.doe@email.com"},"priority":"High","category":{"name":"Facilities"},"subcategory":{"name":"Equipment"},"due_at":"Jan 01,2022","add_to_tag_list":"tag1, tag2","custom_fields_values":{"custom_fields_value":[{"name":"field name","value":"content"}]},"incidents":[{"number":"123"}],"problems":[{"number":"123"}],"changes":[{"number":"123"}],"solutions":[{"number":"123"}],"releases":[{"number":"123"}],"configuration_item_ids":["123"]}}},"application/xml":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"name":{"type":"string"},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"priority":{"oneOf":[{"type":"string"},{"type":"integer"}]},"requester":{"type":"object","oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},{"enum":["nil","",null]}]},"category":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"subcategory":{"type":"object","oneOf":[{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},{"enum":["nil","",null]}]},"due_at":{"type":"string"},"add_to_tag_list":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"incidents":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"changes":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"problems":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"releases":{"type":"array","items":{"type":"object","properties":{"number":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}},"configuration_item_ids":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}}},"example":{"description":"shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719","xml":"<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"}}}},"responses":{"200":{"description":"Object created and returned correctly","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}},"example":{"incident":{"id":"78912","number":"234","name":"Incident Name","description":"description","state":"New","site":{"id":"1","name":"Austin TX, USA","location":"AUS","description":"","time_zone":""},"department":{"id":"1","name":"Support","description":"","default_assignee_id":"1"},"category":{"id":"12","name":"Facilities","default_tags":"tagA, tagB","parent_id":"null","default_assignee_id":"1"},"subcategory":{"id":"13","name":"Equipment","default_tags":"","parent_id":"12","default_assignee_id":"1"},"priority":"High","assignee":{"group_id":"1","is_user":"true","id":"1","name":"Jogn Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"requester":{"group_id":"1","is_user":"true","id":"1","name":"John Doe","email":"john.doe@email.com","avatar":{"type":"initials","color":"#fd4165","initials":"AA"}},"custom_fields_values":[{"id":"1223","custom_field_id":"1","name":"field name","value":"content","options":"","type_name":"Text"}],"due_at":"2022-01-01T00:00:00.000+01:00","origin":"api","incidents":[{"id":"123","href":"https://mydomain.com/incidents/123"}],"problems":[{"id":"123","href":"https://mydomain.com/problems/123"}],"changes":[{"id":"123","href":"https://mydomain.com/changes/123"}],"solutions":[{"id":"123","href":"https://mydomain.com/solutions/123"}],"releases":[{"id":"123","href":"https://mydomain.com/releases/123"}],"configuration_items":[{"id":"123","href":"https://mydomain.com/configuration_items/123"}]}}},"application/xml":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"site":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"timezone":{"type":"string"}}},"department":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"description":{"type":"string"},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"state":{"type":"string"},"priority":{"type":"string"},"assignee":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"requester":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"category":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"subcategory":{"type":"object","properties":{"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"default_tags":{"type":"string"},"parent_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"default_assignee_id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]}}},"due_at":{"type":"string"},"custom_field_values":{"type":"object","oneOf":[{"type":"object","required":["custom_field_value"],"properties":{"custom_field_value":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}]}]}}}}]},"created_by":{"type":"object","properties":{"group_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"is_user":{"oneOf":[{"type":"string"},{"type":"boolean"}]},"id":{"readOnly":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"name":{"type":"string"},"email":{"type":"string"},"avatar":{"type":"object","properties":{"type":{"type":"string"},"color":{"type":"string"},"initials":{"type":"string","minLength":2,"maxLength":2}}}}},"origin":{"type":"string"},"incidents":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"solutions":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"problems":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}},"configuration_item_ids":{"type":"array","items":{"type":"object","properties":{"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"href":{"type":"string"}}}}}}}},"example":{"description":"shouldn't work due to bug in openApi - https://github.com/springdoc/springdoc-openapi/issues/719","xml":"<incident><site><name>NAME</name></site><department_id>0</department_id><description>DESCRIPTION</description><state>NAME</state><assignee><email>EMAIL</email></assignee></incident>"}}}},"400":{"description":"Bad request"},"500":{"description":"Server error"}}}}},"tags":[{"name":"Incident","description":"Incident operations"}]}
@@ -1,18 +1,20 @@
1
1
  require 'json'
2
+ require 'pathname'
2
3
 
3
4
  module Solarwinds
4
5
  module Itsm
5
6
  module Api
6
7
  module Definitions
7
- RESOLVED_DIR = 'lib/resolved_schema'
8
+ LIB_DIR = Pathname.new(File.join(__dir__, '../../..')).cleanpath.to_s
9
+ RESOLVED_DIR = File.join(LIB_DIR, 'resolved_schema')
8
10
 
9
11
  def self.base_schema
10
- path = 'lib/definitions/openapi.json'
12
+ path = File.join(LIB_DIR, 'definitions/openapi.json')
11
13
  JSON.parse(File.open(path).read)
12
14
  end
13
15
 
14
16
  def self.resolved_schema
15
- recursive_resolve(base_schema, 'lib/definitions')
17
+ recursive_resolve(base_schema, File.join(LIB_DIR, 'definitions'))
16
18
  end
17
19
 
18
20
  def self.resolved_schema_path
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solarwinds-itsm-api-definitions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Goldstein
8
8
  - Darth Vader
9
- autorequire:
9
+ - Sagi Gold
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2020-05-26 00:00:00.000000000 Z
13
+ date: 2020-12-03 00:00:00.000000000 Z
13
14
  dependencies: []
14
15
  description: SolarWinds ITSM OpenAPI definitions gem
15
16
  email: jonsgold@gmail.com
@@ -18,17 +19,18 @@ extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/definitions/common/components.json
21
- - lib/definitions/common/sites_and_departments.json
22
+ - lib/definitions/common/examples/incident.json
23
+ - lib/definitions/common/schemas/incident.json
22
24
  - lib/definitions/openapi.json
23
- - lib/definitions/paths/content/incidents.json
24
- - lib/definitions/paths/paths.json
25
+ - lib/definitions/paths/incidents/incident_by_id.json
26
+ - lib/definitions/paths/incidents/incidents.json
25
27
  - lib/resolved_schema/resolved_schema.json
26
28
  - lib/solarwinds/itsm/api/definitions.rb
27
29
  homepage: https://rubygems.org/gems/solarwinds-itsm-api-definitions
28
30
  licenses:
29
31
  - MIT
30
32
  metadata: {}
31
- post_install_message:
33
+ post_install_message:
32
34
  rdoc_options: []
33
35
  require_paths:
34
36
  - lib
@@ -43,8 +45,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
45
  - !ruby/object:Gem::Version
44
46
  version: '0'
45
47
  requirements: []
46
- rubygems_version: 3.0.6
47
- signing_key:
48
+ rubygems_version: 3.0.8
49
+ signing_key:
48
50
  specification_version: 4
49
51
  summary: OpenAPI definitions
50
52
  test_files: []
@@ -1,6 +0,0 @@
1
- {
2
- "site": { "$ref": "components.json#/components/schemas/association_by_name" },
3
- "site_id": { "$ref": "components.json#/components/schemas/association_by_id" },
4
- "department": { "$ref": "components.json#/components/schemas/association_by_name" },
5
- "department_id": { "$ref": "components.json#/components/schemas/association_by_id" }
6
- }
@@ -1,58 +0,0 @@
1
- {
2
- "/incidents/{id}": {
3
- "put": {
4
- "operationId": "updateIncidentById",
5
- "description": "The update API for incidents in JSON",
6
- "parameters": [
7
- { "$ref": "../../common/components.json#/components/parameters/token_param" },
8
- { "$ref": "../../common/components.json#/components/parameters/id_param" }
9
- ],
10
- "requestBody": {
11
- "content": {
12
- "application/json": {
13
- "schema": {
14
- "type": "object",
15
- "properties": {
16
- "incident": {
17
- "type": "object",
18
- "properties": {
19
- "$ref": [
20
- "../../common/sites_and_departments.json"
21
- ],
22
- "description": { "type": "string" },
23
- "state": { "$ref": "../../common/components.json#/components/schemas/association_by_id" },
24
- "assignee": {
25
- "type": "object",
26
- "oneOf": [{
27
- "type": "object",
28
- "properties": {
29
- "email": {
30
- "type": "string",
31
- "required": true
32
- }
33
- }
34
- },
35
- {
36
- "enum": ["nil", "", null]
37
- }]
38
- },
39
- "assignee_id": { "$ref": "../../common/components.json#/components/schemas/association_by_id" }
40
- }
41
- }
42
- }
43
- },
44
- "examples": {
45
- "0": {
46
- "value": "{\"incident\":{\"site\":{\"name\":\"SITE-NAME\"},\"department\":{\"name\":\"DEPARTMENT-NAME\"},\"site_id\":SITE-ID,\"department_id\":DEPARTMENT-ID,\"description\":\"SOMEDESCRIPTION\",\"state\":\"SITE-NAME\",\"assignee\":{\"email\":\"EMAIL\"}}}"
47
- }
48
- }
49
- }
50
- }
51
- },
52
- "responses": {
53
- "200": { "description": "Object was updated correctly" },
54
- "404": { "description": "Not found" }
55
- }
56
- }
57
- }
58
- }
@@ -1,5 +0,0 @@
1
- {
2
- "$ref": [
3
- "content/incidents.json"
4
- ]
5
- }