@manyos/smileconnect-api 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/nodejs.yml +26 -0
- package/CHANGELOG.md +75 -0
- package/Dockerfile +21 -0
- package/README.md +1 -0
- package/app.js +316 -0
- package/conf/clients.json +2491 -0
- package/conf/mapping.json +1048 -0
- package/conf/scripts/p1.js +11 -0
- package/conf/scripts/p2.js +1 -0
- package/conf/scripts/p3.js +1 -0
- package/conf/scripts/p4.js +2 -0
- package/conf/scripts/script1.js +2 -0
- package/conf/scripts/script2.js +2 -0
- package/conf/scripts/script3.js +2 -0
- package/controller/cmdbobjectController.js +291 -0
- package/controller/eventLogController.js +78 -0
- package/controller/orgdataController.js +440 -0
- package/controller/relatedObjectsController.js +194 -0
- package/controller/scriptController.js +213 -0
- package/controller/taskController.js +368 -0
- package/controller/templateController.js +97 -0
- package/controller/ticketCIRelationController.js +522 -0
- package/controller/ticketController.js +329 -0
- package/controller/ticketWorkLogController.js +195 -0
- package/docs/.gitattributes +48 -0
- package/docs/404.html +13 -0
- package/docs/CNAME +1 -0
- package/docs/Gemfile +7 -0
- package/docs/Gemfile.lock +249 -0
- package/docs/_config.yml +257 -0
- package/docs/_data/SocialNetworks.yml +92 -0
- package/docs/_data/ui-text.yml +494 -0
- package/docs/_includes/disqus.html +17 -0
- package/docs/_includes/ext-css.html +7 -0
- package/docs/_includes/ext-js.html +7 -0
- package/docs/_includes/fb-comment.html +14 -0
- package/docs/_includes/footer-minimal.html +16 -0
- package/docs/_includes/footer-scripts.html +32 -0
- package/docs/_includes/footer.html +51 -0
- package/docs/_includes/google_analytics.html +14 -0
- package/docs/_includes/gtag.html +11 -0
- package/docs/_includes/gtm_body.html +6 -0
- package/docs/_includes/gtm_head.html +9 -0
- package/docs/_includes/head.html +131 -0
- package/docs/_includes/header.html +76 -0
- package/docs/_includes/just_comments.html +4 -0
- package/docs/_includes/matomo.html +17 -0
- package/docs/_includes/nav.html +57 -0
- package/docs/_includes/social-share.html +42 -0
- package/docs/_includes/staticman-comment.html +22 -0
- package/docs/_includes/staticman-comments.html +81 -0
- package/docs/_layouts/base.html +35 -0
- package/docs/_layouts/default.html +9 -0
- package/docs/_layouts/minimal.html +26 -0
- package/docs/_layouts/page.html +26 -0
- package/docs/_layouts/post.html +82 -0
- package/docs/_posts/2015-02-28-test-markdown.md +77 -0
- package/docs/aboutme.md +18 -0
- package/docs/css/bootstrap-social.css +147 -0
- package/docs/css/bootstrap-theme.css +476 -0
- package/docs/css/bootstrap-theme.css.map +1 -0
- package/docs/css/bootstrap-theme.min.css +5 -0
- package/docs/css/bootstrap.css +6566 -0
- package/docs/css/bootstrap.css.map +1 -0
- package/docs/css/bootstrap.min.css +5 -0
- package/docs/css/main-minimal.css +13 -0
- package/docs/css/main.css +788 -0
- package/docs/css/normalize.css +427 -0
- package/docs/css/pygment_highlights.css +61 -0
- package/docs/css/staticman.css +180 -0
- package/docs/eventlog/events.md +65 -0
- package/docs/feed.xml +24 -0
- package/docs/general/architecture.md +10 -0
- package/docs/general/config.md +192 -0
- package/docs/general/field-management.md +119 -0
- package/docs/general/release-notes.md +9 -0
- package/docs/getting-started.md +19 -0
- package/docs/howto/cmdbobjects.md +339 -0
- package/docs/howto/incident-worklogs.md +186 -0
- package/docs/howto/incidents.md +244 -0
- package/docs/howto/sample-config.md +518 -0
- package/docs/howto/token.md +71 -0
- package/docs/howto/worklog-attachment.md +113 -0
- package/docs/img/404-southpark.jpg +0 -0
- package/docs/img/architecture.jpeg +0 -0
- package/docs/img/attachment-upload.png +0 -0
- package/docs/img/avatar-icon.png +0 -0
- package/docs/img/bgimage.png +0 -0
- package/docs/img/gb-isapi.jpg +0 -0
- package/docs/img/install-steps.gif +0 -0
- package/docs/img/workflow.png +0 -0
- package/docs/index.md +41 -0
- package/docs/installation.md +123 -0
- package/docs/js/bootstrap.js +2306 -0
- package/docs/js/bootstrap.min.js +7 -0
- package/docs/js/jquery-1.11.2.min.js +4 -0
- package/docs/js/main.js +140 -0
- package/docs/js/staticman.js +54 -0
- package/docs/openapi.json +15097 -0
- package/docs/postinstall.md +169 -0
- package/docs/preinstall.md +19 -0
- package/docs/spec/index.html +24 -0
- package/docs/staticman.yml +110 -0
- package/docs/tags.html +34 -0
- package/docs/workflow.md +127 -0
- package/nodemon.json +3 -0
- package/package.json +46 -0
- package/routes/appConfigRoutes.js +352 -0
- package/routes/ciRelationRoutes.js +38 -0
- package/routes/cmdbObjectRoutes.js +154 -0
- package/routes/organisationRoutes.js +121 -0
- package/routes/peopleRelationRoutes.js +38 -0
- package/routes/personRoutes.js +131 -0
- package/routes/supportgroupRoutes.js +122 -0
- package/routes/taskRoutes.js +306 -0
- package/routes/templateRoutes.js +67 -0
- package/routes/ticketRoutes.js +181 -0
- package/routes/ticketWorkLogRoutes.js +185 -0
- package/screwdriver.yaml +52 -0
- package/test/appTest.js +3 -0
- package/test/changeTest.js +541 -0
- package/test/cmdbobjectTest.js +167 -0
- package/test/files/logo.png +0 -0
- package/test/incidentTest.js +539 -0
- package/test/orgdataTest.js +156 -0
- package/test/problemTest.js +512 -0
- package/test/templateTest.js +80 -0
- package/test/testUtils.js +21 -0
- package/test/workorderTest.js +544 -0
- package/util/arquery.js +416 -0
- package/util/auth.js +37 -0
- package/util/cache.service.js +52 -0
- package/util/config.js +361 -0
- package/util/constants.js +73 -0
- package/util/mappingUtil.js +96 -0
- package/util/paramHelper.js +43 -0
- package/util/relationUtil.js +63 -0
- package/util/responsehandler.js +92 -0
- package/util/schemas/clientConfigSchema.js +180 -0
- package/util/schemas/fieldMappingSchema.js +211 -0
- package/util/searchUtil.js +148 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Incident handling
|
|
4
|
+
subtitle: In this guide you will learn to do the basic operations with an incident.
|
|
5
|
+
use-site-title: true
|
|
6
|
+
gh-badge: [star, fork, follow]
|
|
7
|
+
gh-repo: daattali/beautiful-jekyll
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
In this guide we model the full lifecylce of a simple inbound API that delivers Incidents into your system. First we'll create one. We will then read it again and later resolve it.
|
|
11
|
+
|
|
12
|
+
# Create an Incident
|
|
13
|
+
|
|
14
|
+
Let's assume we're an external system and we want to create incidents in the ITSM Suite.
|
|
15
|
+
|
|
16
|
+
## Request Definition
|
|
17
|
+
|
|
18
|
+
To create an incident you need to do a POST to the /v1/incidents endpoint of your API
|
|
19
|
+
|
|
20
|
+
### URL
|
|
21
|
+
|
|
22
|
+
*URL*: https://*api-fqdn*/v1/incidents
|
|
23
|
+
|
|
24
|
+
*api-fqdn*: The hostname of your API Server
|
|
25
|
+
|
|
26
|
+
### Headers
|
|
27
|
+
|
|
28
|
+
*Content-Type*: application/json
|
|
29
|
+
|
|
30
|
+
### Authorization
|
|
31
|
+
|
|
32
|
+
*Type*: Bearer
|
|
33
|
+
|
|
34
|
+
Use your [API Token](token.md)
|
|
35
|
+
|
|
36
|
+
### Body
|
|
37
|
+
|
|
38
|
+
Provide all your needed incident data (see mapping -> new Incident) within the *data* attribute.
|
|
39
|
+
|
|
40
|
+
### Sample Request
|
|
41
|
+
|
|
42
|
+
POST:https://*api-fqdn*/v1/incidents
|
|
43
|
+
|
|
44
|
+
{% highlight json linenos %}
|
|
45
|
+
{
|
|
46
|
+
"data": {
|
|
47
|
+
"summary": "New Incident",
|
|
48
|
+
"detailedDescription": "Here are the details"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
{% endhighlight %}
|
|
52
|
+
|
|
53
|
+
### Sample Response
|
|
54
|
+
|
|
55
|
+
{% highlight json linenos %}
|
|
56
|
+
{
|
|
57
|
+
"data": {
|
|
58
|
+
"id": "INC000000000217",
|
|
59
|
+
"opsCat1": null,
|
|
60
|
+
"opsCat2": null,
|
|
61
|
+
"opsCat3": null,
|
|
62
|
+
"resolutionCat1": null,
|
|
63
|
+
"resolutionCat2": null,
|
|
64
|
+
"resolutionCat3": null,
|
|
65
|
+
"prodCat1": null,
|
|
66
|
+
"prodCat2": null,
|
|
67
|
+
"prodCat3": null,
|
|
68
|
+
"productName": null,
|
|
69
|
+
"manufacturer": null,
|
|
70
|
+
"detailedDescription": "Here are the details",
|
|
71
|
+
"summary": "New Incident",
|
|
72
|
+
"statusReason": null,
|
|
73
|
+
"status": "Assigned",
|
|
74
|
+
"assignedGroup": "SGP000000000011",
|
|
75
|
+
"ownerGroup": "SGP000000000011",
|
|
76
|
+
"vendorGroup": null,
|
|
77
|
+
"customerId": "PPL000000000013",
|
|
78
|
+
"contactId": null,
|
|
79
|
+
"impact": "4-Minor/Localized",
|
|
80
|
+
"urgency": "4-Low",
|
|
81
|
+
"priority": "Low",
|
|
82
|
+
"vendorTicketId": null
|
|
83
|
+
},
|
|
84
|
+
"included": {
|
|
85
|
+
"persons": [
|
|
86
|
+
"PPL000000000013"
|
|
87
|
+
],
|
|
88
|
+
"organisations": [],
|
|
89
|
+
"supportgroups": [
|
|
90
|
+
"SGP000000000011"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
{% endhighlight %}
|
|
95
|
+
|
|
96
|
+
# Read an Incident
|
|
97
|
+
|
|
98
|
+
We can query every incident we have access to with a simple get request.
|
|
99
|
+
|
|
100
|
+
## Request Definition
|
|
101
|
+
|
|
102
|
+
To read an incident you need to do a GET request to the /v1/incidents/*incidentId* endpoint of your API
|
|
103
|
+
|
|
104
|
+
### URL
|
|
105
|
+
|
|
106
|
+
*URL*: https://*api-fqdn*/v1/incidents/*incidentId*
|
|
107
|
+
|
|
108
|
+
*api-fqdn*: The hostname of your API Server
|
|
109
|
+
|
|
110
|
+
*incidentId*: The id of the incident you want to read.
|
|
111
|
+
|
|
112
|
+
### Headers
|
|
113
|
+
|
|
114
|
+
*Content-Type*: application/json
|
|
115
|
+
|
|
116
|
+
### Authorization
|
|
117
|
+
|
|
118
|
+
*Type*: Bearer
|
|
119
|
+
|
|
120
|
+
Use your [API Token](token.md)
|
|
121
|
+
|
|
122
|
+
### Sample Response
|
|
123
|
+
|
|
124
|
+
GET:https://*api-fqdn*/v1/incidents/INC000000000217
|
|
125
|
+
|
|
126
|
+
{% highlight json linenos %}
|
|
127
|
+
{
|
|
128
|
+
"data": {
|
|
129
|
+
"id": "INC000000000217",
|
|
130
|
+
"opsCat1": null,
|
|
131
|
+
"opsCat2": null,
|
|
132
|
+
"opsCat3": null,
|
|
133
|
+
"resolutionCat1": null,
|
|
134
|
+
"resolutionCat2": null,
|
|
135
|
+
"resolutionCat3": null,
|
|
136
|
+
"prodCat1": null,
|
|
137
|
+
"prodCat2": null,
|
|
138
|
+
"prodCat3": null,
|
|
139
|
+
"productName": null,
|
|
140
|
+
"manufacturer": null,
|
|
141
|
+
"detailedDescription": "Here are the details",
|
|
142
|
+
"summary": "New Incident",
|
|
143
|
+
"statusReason": null,
|
|
144
|
+
"status": "Assigned",
|
|
145
|
+
"assignedGroup": "SGP000000000011",
|
|
146
|
+
"ownerGroup": "SGP000000000011",
|
|
147
|
+
"vendorGroup": null,
|
|
148
|
+
"customerId": "PPL000000000013",
|
|
149
|
+
"contactId": null,
|
|
150
|
+
"impact": "4-Minor/Localized",
|
|
151
|
+
"urgency": "4-Low",
|
|
152
|
+
"priority": "Low",
|
|
153
|
+
"vendorTicketId": null
|
|
154
|
+
},
|
|
155
|
+
"included": {
|
|
156
|
+
"persons": [
|
|
157
|
+
"PPL000000000013"
|
|
158
|
+
],
|
|
159
|
+
"organisations": [],
|
|
160
|
+
"supportgroups": [
|
|
161
|
+
"SGP000000000011"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
{% endhighlight %}
|
|
166
|
+
|
|
167
|
+
# Update an Incident
|
|
168
|
+
|
|
169
|
+
You can update an Incident by sending a PUT request. Let's assume you want to resolve the incident that we created earlier. We need to set the status to "Resolved", provide a valid status reason and a Resolution.
|
|
170
|
+
|
|
171
|
+
## Request Definition
|
|
172
|
+
|
|
173
|
+
To up an incident you need to do a PUT to the /v1/incidents/*incidentId* endpoint of your API
|
|
174
|
+
|
|
175
|
+
### URL
|
|
176
|
+
|
|
177
|
+
*URL*: https://*api-fqdn*/v1/incidents/*incidentId*
|
|
178
|
+
|
|
179
|
+
*api-fqdn*: The hostname of your API Server
|
|
180
|
+
|
|
181
|
+
*incidentId*: Id of the incident that you want to update
|
|
182
|
+
|
|
183
|
+
### Headers
|
|
184
|
+
|
|
185
|
+
*Content-Type*: application/json
|
|
186
|
+
|
|
187
|
+
### Authorization
|
|
188
|
+
|
|
189
|
+
*Type*: Bearer
|
|
190
|
+
|
|
191
|
+
Use your [API Token](token.md)
|
|
192
|
+
|
|
193
|
+
### Body
|
|
194
|
+
|
|
195
|
+
Provide all the attributes you want to update.
|
|
196
|
+
|
|
197
|
+
### Sample Request
|
|
198
|
+
|
|
199
|
+
PUT:https://*api-fqdn*/v1/incidents/INC000000000217
|
|
200
|
+
|
|
201
|
+
{% highlight json linenos %}
|
|
202
|
+
{
|
|
203
|
+
"data": {
|
|
204
|
+
"status": "Resolved",
|
|
205
|
+
"statusReason" : "No Further Action Required",
|
|
206
|
+
"resolution": "Please restart your computer."
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
{% endhighlight %}
|
|
210
|
+
|
|
211
|
+
### Sample Response
|
|
212
|
+
|
|
213
|
+
{% highlight json linenos %}
|
|
214
|
+
{
|
|
215
|
+
"data": {
|
|
216
|
+
"id": "INC000000000217",
|
|
217
|
+
"opsCat1": null,
|
|
218
|
+
"opsCat2": null,
|
|
219
|
+
"opsCat3": null,
|
|
220
|
+
"resolutionCat1": null,
|
|
221
|
+
"resolutionCat2": null,
|
|
222
|
+
"resolutionCat3": null,
|
|
223
|
+
"prodCat1": null,
|
|
224
|
+
"prodCat2": null,
|
|
225
|
+
"prodCat3": null,
|
|
226
|
+
"productName": null,
|
|
227
|
+
"manufacturer": null,
|
|
228
|
+
"detailedDescription": "Here are the details",
|
|
229
|
+
"summary": "New Incident",
|
|
230
|
+
"statusReason": "No Further Action Required",
|
|
231
|
+
"status": "Resolved",
|
|
232
|
+
"assignedGroup": "SGP000000000011",
|
|
233
|
+
"ownerGroup": "SGP000000000011",
|
|
234
|
+
"vendorGroup": null,
|
|
235
|
+
"customerId": "PPL000000000013",
|
|
236
|
+
"contactId": null,
|
|
237
|
+
"impact": "4-Minor/Localized",
|
|
238
|
+
"urgency": "4-Low",
|
|
239
|
+
"priority": "Low",
|
|
240
|
+
"vendorTicketId": null
|
|
241
|
+
},
|
|
242
|
+
"included": {}
|
|
243
|
+
}
|
|
244
|
+
{% endhighlight %}
|