@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,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: Attachments
|
|
4
|
+
subtitle: In this guide we'll show you how to save and read attachments from worklogs.
|
|
5
|
+
use-site-title: true
|
|
6
|
+
gh-badge: [star, fork, follow]
|
|
7
|
+
gh-repo: daattali/beautiful-jekyll
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
In this guide we'll show you how to save and read attachments from worklogs.
|
|
11
|
+
|
|
12
|
+
{: .box-note}
|
|
13
|
+
**Note:** Each worklog can store one attachment. For multiple attachment you need multiple worklogs. The maximum size of the attachments is configured in BMC Remedy.
|
|
14
|
+
|
|
15
|
+
To store an attachment you first need to create a worklog. The worklog contains an attachment url:
|
|
16
|
+
|
|
17
|
+
{% highlight json linenos %}
|
|
18
|
+
{
|
|
19
|
+
"data": {
|
|
20
|
+
"summary": "Implementation update",
|
|
21
|
+
"text": "The implementation will be completed soon. Please stand by.",
|
|
22
|
+
"id": "WLG000000001239"
|
|
23
|
+
},
|
|
24
|
+
"urls": [
|
|
25
|
+
{
|
|
26
|
+
"attachmentUrl": "/v1/incidents/INC000000000217/worklogs/WLG000000001239/attachment"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"self": "/v1/incidents/INC000000000217/worklogs/WLG000000001239"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
{% endhighlight %}
|
|
34
|
+
|
|
35
|
+
This URL will be used to upload or download the attachment.
|
|
36
|
+
|
|
37
|
+
# Add an attachment
|
|
38
|
+
|
|
39
|
+
You will upload an attachment to the worklog.
|
|
40
|
+
|
|
41
|
+
## Request Definition
|
|
42
|
+
|
|
43
|
+
You need to do a POST request to the /v1/incidents/*incidentId*/worklogs/*worklogId*/attachment endpoint of your API
|
|
44
|
+
|
|
45
|
+
### URL
|
|
46
|
+
|
|
47
|
+
*URL*: https://*api-fqdn*/v1/incidents/*incidentId*/worklogs/*worklogId*/attachment
|
|
48
|
+
|
|
49
|
+
*api-fqdn*: The hostname of your API Server
|
|
50
|
+
|
|
51
|
+
*incidentId*: The id of the incident the worklog belongs to
|
|
52
|
+
*worklogId*: The id of the worklog the attachment belongs to
|
|
53
|
+
|
|
54
|
+
### Headers
|
|
55
|
+
|
|
56
|
+
*Content-Type*: application/x-www-form-urlencoded
|
|
57
|
+
|
|
58
|
+
### Authorization
|
|
59
|
+
|
|
60
|
+
*Type*: Bearer
|
|
61
|
+
|
|
62
|
+
Use your [API Token](token.md)
|
|
63
|
+
|
|
64
|
+
### Body
|
|
65
|
+
|
|
66
|
+
Provide the attachment as application/x-www-form-urlencoded with the key "file".
|
|
67
|
+
|
|
68
|
+
{: .box-warning}
|
|
69
|
+
**Warning:** It is important to store the file in the key "file".
|
|
70
|
+
|
|
71
|
+
### Sample Response
|
|
72
|
+
|
|
73
|
+
POST:https://*api-fqdn*/v1/incidents/INC000000000217/worklogs/WLG000000001240/attachment
|
|
74
|
+
|
|
75
|
+
{% highlight json linenos %}
|
|
76
|
+
"['WLG000000001240':'success']"
|
|
77
|
+
{% endhighlight %}
|
|
78
|
+
|
|
79
|
+
### Postman Sample Request / Response
|
|
80
|
+

|
|
81
|
+
|
|
82
|
+
# Read an attachment
|
|
83
|
+
|
|
84
|
+
You will receive the attachment from the worklog.
|
|
85
|
+
|
|
86
|
+
## Request Definition
|
|
87
|
+
|
|
88
|
+
You need to do a GET request to the /v1/incidents/*incidentId*/worklogs/*worklogId*/attachment endpoint of your API
|
|
89
|
+
|
|
90
|
+
### URL
|
|
91
|
+
|
|
92
|
+
*URL*: https://*api-fqdn*/v1/incidents/*incidentId*/worklogs/*worklogId*/attachment
|
|
93
|
+
|
|
94
|
+
*api-fqdn*: The hostname of your API Server
|
|
95
|
+
|
|
96
|
+
*incidentId*: The id of the incident the worklog belongs to
|
|
97
|
+
*worklogid*: The id of the worklog the attachment belongs to
|
|
98
|
+
|
|
99
|
+
### Headers
|
|
100
|
+
|
|
101
|
+
*Content-Type*: application/json
|
|
102
|
+
|
|
103
|
+
### Authorization
|
|
104
|
+
|
|
105
|
+
*Type*: Bearer
|
|
106
|
+
|
|
107
|
+
Use your [API Token](token.md)
|
|
108
|
+
|
|
109
|
+
### Sample Response
|
|
110
|
+
|
|
111
|
+
GET:https://*api-fqdn*/v1/incidents/INC000000000217/worklogs/WLG000000000533/attachment
|
|
112
|
+
|
|
113
|
+
The file will be returned as application/octet-stream. The filename will be returned in the header Content-disposition. e.g. attachment; filename=90502081_l.jpg
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
title: SMILEconnect documention
|
|
4
|
+
subtitle: Learn all about manyos ITSM API on these pages
|
|
5
|
+
use-site-title: true
|
|
6
|
+
bigimg: /img/gb-isapi.jpg
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Our ITSM API creates a RESTful layer on-top of BMCs ITSM Suite. It allows you to expose all of your services with an easy and powerful REST-API. You can perform create, read and update operations on Incidents, Changes, Problems, Work Orders, Tasks and Assets. With no need for customization.
|
|
10
|
+
|
|
11
|
+
[Get our API Framework here](https://manyos.it/isapi)
|
|
12
|
+
|
|
13
|
+
# General
|
|
14
|
+
|
|
15
|
+
If you're new to our API visit our [Getting Started Guide](getting-started.md)
|
|
16
|
+
|
|
17
|
+
# Config Options
|
|
18
|
+
|
|
19
|
+
All config options can be set as Environment Variables.
|
|
20
|
+
|
|
21
|
+
[See all config options here](general/config.md)
|
|
22
|
+
|
|
23
|
+
# Architecture
|
|
24
|
+
|
|
25
|
+
Learn how the different parts work together in out [Architecture Overview](general/architecture.md)
|
|
26
|
+
|
|
27
|
+
# Access to Objects and Fields
|
|
28
|
+
|
|
29
|
+
Access to Objects (e.g. Incidents, Changes, ...) and Fields (e.g. Summary, ...) is granted per User.
|
|
30
|
+
|
|
31
|
+
A global mapping is applied to all fields before they are returned.
|
|
32
|
+
|
|
33
|
+
[Learn more about clients and fields](general/field-management.md)
|
|
34
|
+
|
|
35
|
+
# Events
|
|
36
|
+
|
|
37
|
+
[See all events here](eventlog/events.md)
|
|
38
|
+
|
|
39
|
+
# Workflow
|
|
40
|
+
|
|
41
|
+
[Learn more about the Remedy Workflow](workflow.md)
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
|
|
2
|
+
# Install SMILEconnect
|
|
3
|
+
|
|
4
|
+
The complete the installation of SMILEconnect you need to complete the following 4 steps:
|
|
5
|
+
|
|
6
|
+
1. Import Deployment Package
|
|
7
|
+
2. Create Remedy User for SMILEconnect
|
|
8
|
+
3. Setup Docker Container
|
|
9
|
+
4. Import AI Jobs
|
|
10
|
+
|
|
11
|
+
The following sections will guide you through those steps.
|
|
12
|
+
|
|
13
|
+
## Import Deployment Package
|
|
14
|
+
|
|
15
|
+
Import the deployment zip file to the RDA (Remedy Deployment) Console and deploy the file, using your Midtier
|
|
16
|
+
It will import the Workflow Objects and Remedy Group needed.
|
|
17
|
+
|
|
18
|
+
Steps:
|
|
19
|
+
|
|
20
|
+
1. Login to Midtier as an Administrator
|
|
21
|
+
2. Open Remedy Deployment Console (Applications -> AR System Administration -> AR System Deployment Management Console)
|
|
22
|
+
3. Import the zip file (Transfer Package -> Import)
|
|
23
|
+
4. Deploy the Package (Operations -> Deploy)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Create User
|
|
28
|
+
|
|
29
|
+
- Open "CTM:People" Form and create a new user with the name "SMILEconnect" with administrative permissions, fixed license for all needed modules, and "Master"-permissions for each.
|
|
30
|
+
- Open "User" Form, search for the user "SMILEconnect" and add the group "MYSTicketBroker" to the permissions.
|
|
31
|
+
|
|
32
|
+
## Setup Docker Container
|
|
33
|
+
Create Folder smileconnect and create the file docker-compose.yml in the newly created folder.
|
|
34
|
+
Create a new subfolder conf and place your client.json and mapping.json to this folder
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Example file:
|
|
39
|
+
|
|
40
|
+
version: '3.4'
|
|
41
|
+
services:
|
|
42
|
+
api:
|
|
43
|
+
image: manyos/smileconnect-api
|
|
44
|
+
restart: always
|
|
45
|
+
environment:
|
|
46
|
+
- LOGLEVEL=DEBUG
|
|
47
|
+
- BASEURL=http://rapi:8080
|
|
48
|
+
- AR_SERVER=<AR Server>
|
|
49
|
+
- AR_PORT=<AR PORT>
|
|
50
|
+
- AR_USER=<YOUR SMILECONNECT USER>
|
|
51
|
+
- AR_PASSWORD=<THE PASSWORD FOR THE SMILECONNECT USER>
|
|
52
|
+
- CACHETLL_CMDB=166
|
|
53
|
+
- CACHETTL_ORGDATA=719
|
|
54
|
+
- CACHETTL_CHANGE=1
|
|
55
|
+
- CACHETTL_INCIDENT=1
|
|
56
|
+
- CACHETTL_TASK=5
|
|
57
|
+
- EVENTLOG_ENABLE=true
|
|
58
|
+
- FEDERATED_BASE_URI=<URL TO SMARTIT>
|
|
59
|
+
- SSO_PUBLIC_KEY=<YOUR SSO PUBLIC KEY>
|
|
60
|
+
- ADMIN_USERS=<COMMASEPERATED LIST OF ADMIN USERS (GUI Users)>
|
|
61
|
+
volumes:
|
|
62
|
+
- conf:/home/node/app/conf
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
eventmanager:
|
|
66
|
+
image: manyos/smileconnect-eventmanager
|
|
67
|
+
restart: always
|
|
68
|
+
environment:
|
|
69
|
+
- LOGLEVEL=DEBUG
|
|
70
|
+
- MQ_CONNECTION=amqp://rabbitmq:8sj238sk2nsu82@pier1
|
|
71
|
+
- MQ_QUEUE=test
|
|
72
|
+
- ISAPI_CLIENT_ID=<SSO USER FOR EVENTMANAGER>
|
|
73
|
+
- ISAPI_CLIENT_SECRET=<SECRET FOR THE EVENTMANAGER>
|
|
74
|
+
- ISAPI_URI=<URL TO YOUR SMILECONNECT REST API; Example: https://isapi.port.manyos.io >
|
|
75
|
+
- ISAPI_SSO=<URL TO YOUR SSO REALM; Example: https://sso.manyos.it/auth/realms/itsmproxy >
|
|
76
|
+
- BASEURL=http://rapi:8080
|
|
77
|
+
- AR_SERVER=<AR Server>
|
|
78
|
+
- AR_PORT=<AR PORT>
|
|
79
|
+
- AR_USER=<YOUR SMILECONNECT USER>
|
|
80
|
+
- AR_PASSWORD=<THE PASSWORD FOR THE SMILECONNECT USER>
|
|
81
|
+
- SSO_PUBLIC_KEY=<YOUR SSO PUBLIC KEY>
|
|
82
|
+
volumes:
|
|
83
|
+
- conf:/home/node/app/conf
|
|
84
|
+
|
|
85
|
+
rapi:
|
|
86
|
+
image: manyos/rapi
|
|
87
|
+
restart: always
|
|
88
|
+
environment:
|
|
89
|
+
- GRAILS_OPTS=-XX:MaxPermSize=1024m -Xmx4096M -server
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
gui:
|
|
93
|
+
image: manyos/smileconnect-gui
|
|
94
|
+
restart: always
|
|
95
|
+
environment:
|
|
96
|
+
- REACT_APP_API_URL=<URL TO YOUR SMILECONNECT REST API; Example: https://isapi.port.manyos.io/ >
|
|
97
|
+
- REACT_APP_SSO_URL=<URL TO YOUR SSO REALM; Example: https://sso.manyos.it/auth/realms/itsmproxy >
|
|
98
|
+
- REACT_APP_GUI_URL=<URL TO YOUR GUI; Example: https://isapi-gui-1808.port.manyos.io/ >
|
|
99
|
+
- REACT_APP_WIZZARD_URL=<URL TO YOUR MIDTIER; Example: https://midtier.port.manyos.io/arsys/forms/arserver/MYS:SMILEconnect_NewVendor >
|
|
100
|
+
- REACT_APP_TOKEN_REFRESHTIME=30
|
|
101
|
+
ports:
|
|
102
|
+
- 3003:80
|
|
103
|
+
volumes:
|
|
104
|
+
- conf:/home/node/app/conf
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
Save the file and start the stack using with docker-compose up -d
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## Import AI Jobs
|
|
112
|
+
|
|
113
|
+
Import the AI Job/Tranfsformation Templates for each module.
|
|
114
|
+
After importing change the connection parameter to your AR Server.
|
|
115
|
+
|
|
116
|
+
TIP: In kettle options (Tools->Opions) disable the option:
|
|
117
|
+
Replace existing objects on open/import.
|
|
118
|
+
Your connection will not be replaced on future imports
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|