Leonard Seymore
2020-03-28 a651c082fa7d49a77f225b26e042a95fdd818339
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
swagger: "2.0"
info:
  version: "v1"
  title: "MTN Service Order API"
  contact:
    name: "MTN API Support"
    email: "api.support@mtn.com"
  description: The Service Order API manages the synchronization of Service Request data between the orgin and target ITSM systems.
host: "api.mtn.com"
basePath: "/ticketManagement/v1"
schemes:
  - "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
  '/serviceOrder':
    post:
      operationId: "createServiceOrder"
      summary: "Creates a 'Service Order'"
      description: "Creates a 'Service Order' from the orginating ITSM System to the target ITSM System."
      tags:
        - "serviceOrder"
      parameters:
        - name: "transactionId"
          description: "Transaction ID"
          in: "header"
          required: true
          type: "string"
        - name: "body"
          description: "Request Body"
          in: "body"
          required: true
          schema:
            $ref: "#/definitions/ServiceOrder"
      responses:
        '201':
          description: "Created"
          schema:
            $ref: "#/definitions/ServiceOrder_Created"
        '400':
          description: "Bad Request"
          schema:
            $ref: "#/definitions/Error"
        '401':
          description: "Unauthorized"
          schema:
            $ref: "#/definitions/Error"
        '403':
          description: "Forbidden"
          schema:
            $ref: "#/definitions/Error"
        '405':
          description: "Method No Allowed"
          schema:
            $ref: "#/definitions/Error"
        '407':
          description: "Proxy system not authenticated"
          schema:
            $ref: "#/definitions/Error"
        '409':
          description: "Conflict"
          schema:
            $ref: "#/definitions/Error"
        '500':
          description: "Internal Server Error"
          schema:
            $ref: "#/definitions/Error"
  '/serviceOrder/{id}':
    put:
      operationId: "updateServiceOrder"
      summary: "Update a 'Service Order'"
      description: "This operation updates a ServiceOrder entity entirely by Id from the orginating ITSM System to the target ITSM System in order to keep the two ITSM Systems in sync."
      tags:
        - "serviceOrder"
      parameters:
        - name: "transactionId"
          description: "Transaction ID"
          in: "path"
          required: true
          type: "string"
        - name: "id"
          type: "string"
          in: "path"
          description: "Identifier of the Service Order"
          required: true
        - name: "serviceOrder"
          in: "body"
          description: "The Service Order to be updated"
          schema:
            $ref: "#/definitions/ServiceOrder"
      responses:   
        '200':
          description: "Updated"
          schema:
            $ref: "#/definitions/ServiceOrder_Updated"
        '400':
          description: "Bad Request"
          schema:
            $ref: "#/definitions/Error"
        '401':
          description: "Unauthorized"
          schema:
            $ref: "#/definitions/Error"
        '403':
          description: "Forbidden"
          schema:
            $ref: "#/definitions/Error"
        '404':
          description: "Not Found"
          schema:
            $ref: "#/definitions/Error"
        '405':
          description: "Method No Allowed"
          schema:
            $ref: "#/definitions/Error"
        '407':
          description: "Proxy system not authenticated"
          schema:
            $ref: "#/definitions/Error"
        '409':
          description: "Conflict"
          schema:
            $ref: "#/definitions/Error"
        '500':
          description: "Internal Server Error"
          schema:
            $ref: "#/definitions/Error"
definitions:
  ServiceOrder:
    type: "object"
    description: "Contains the core service order information."
    properties:
      category:
        type: "string"
        description: "Used to categorize the order, useful for the OM system, such as: APN, Static_IP."
      description:
        type: "string"
        description: "A free-text description of the service order."
      priority:
        type: "string"
        description: "Can be used by consumers to prioritize orders in a Service Order Management system."
      originSystem:
        type: "string"
        description: "System originating the request."
      note:
        type: "array"
        description: "Extra-information about the order; e.g. useful to add extra delivery information that could be useful for a human process."
        items:
          $ref: "#/definitions/Note"
      attachment:
        type: "array"
        description: "Complements the description of an element (for instance a product) through video, pictures."
        items:
          $ref: "#/definitions/Attachment"
      orderItem:
        type: "array"
        description: "A list of service order items to be processed by this order."
        items:
          $ref: "#/definitions/OrderItem"
  Note:
    required:
      - "type"
    type: "object"
    description: "Extra information about a given entity."
    properties:
      type:
        type: "string"
        description: "Type of the note."
        example: "comment"
        enum:
          - "comment"
          - "workNote"
      text:
        type: "string"
        description: "The text of the note."
        example: "This is a comment and viewable by the customer."
  Attachment:
    type: "object"
    description: "Complements the description of an element (for instance a product) through video, pictures."
    properties:
      name:
        type: "string"
        description: "Name of the attachment."
        example: "Screenshot.jpg"
      description:
        type: "string"
        description: "The description of the attachment."
        example: "Screenshot of the service request."
      attachment:
        type: "string"
        description: "The attachment codified in Base64."
  OrderItem:
    type: "object"
    properties:
      type:
        type: "string"
        description: "Type of key value pairs for the variables."
        example: "targetSystem"
      text:
        type: "string"
        description: "the key value of the variable type."
        example: "ServiceNow"
  Error:
    type: "object"
    required:
     - code
     - reason
    description: "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)."
    properties:
      timeStamp:
        type: "string"
        format: "date-time"
        description: "Timestamp when the error occured."
        example: "2018-05-01T00:00"
      status:
        type: "integer"
        description: "HTTP Error code extension."
      error:
        type: "string"
        description: "Details the error."
      message:
        type: "string"
        description: "More details and corrective actions related to the error which can be shown to a client user."
      path:
        type: "string"
        description: "The path of the error."
  ServiceOrder_Created:
    type: "object"
    required:
     - id
     - href
    description: "Used when a new Service Order is created."
    properties:
      id:
        type: "integer"
        description: "ID created on repository side."
        example: "12345"
      data:
        type: "object"
        description: "The related information generated as received by the target system."
        properties:
          statusCode:
            type: "string"
            description: "Status Code from target system to indicate transaction status of Service Order creation."
            example: "0"
          message:
            type: "string"
            description: "Additional information to the status response of creation of the Service Order."
            example: "Action succesfully processed."
      _links:
        type: "object"
        description: "Relevant links to the service order."
        properties:
          self:
            type: "object"
            properties:
              href:
                type: "string"
                description: "Hyperlink to access the order."
                example: "https://host:port/ticketManagement/v1/serviceOrder/12345"
  ServiceOrder_Updated:
    type: "object"
    required:
     - id
     - href
    description: "Used when a Service Order is updated."
    properties:
      id:
        type: "integer"
        description: "ID updated on repository side."
        example: "12345"
      data:
        type: "object"
        description: "The related information generated as received by the target system."
        properties:
          statusCode:
            type: "string"
            description: "Status Code from target system to indicate transaction status of Service Order update."
            example: "0"
          message:
            type: "string"
            description: "Additional information to the status response of updating of the Service Order."
            example: "Action succesfully processed."
      _links:
        type: "object"
        description: "Relevant links to the service order."
        properties:
          self:
            type: "object"
            properties:
              href:
                type: "string"
                description: "Hyperlink to access the order."
                example: "https://host:port/ticketManagement/v1/serviceOrder/12345"