Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 135.30 KB | None | 0 0
  1. swagger: '2.0'
  2. info:
  3.   title: Heimdall Alert Sending API
  4.   description: |
  5.    Service for sending alerts over multiple different channels.
  6.  
  7.     All phone numbers used in the service needs to be in MSISDN
  8.     (https://en.wikipedia.org/wiki/MSISDN) format. This is the same as the international E.164
  9.     format (https://en.wikipedia.org/wiki/E.164), but without the leading +. So only digits. Trunk
  10.     prefixes should also be omitted after the country code.
  11.   version: "17.06.0-SNAPSHOT"
  12. # Start: base/common.yaml
  13. schemes:
  14.  - http
  15.   - https
  16.  
  17. security:
  18.   - heimdallAuth: []
  19.   - umsTokenAuth: []
  20.  
  21. securityDefinitions:
  22.   heimdallAuth:
  23.     type: basic
  24.     description: |
  25.      Basic HTTP authentication. This requires the admin username, and the password that is placed
  26.       in the logs
  27.   umsTokenAuth:
  28.     type: apiKey
  29.     name: X-UMS-Token
  30.     in: header
  31.     description: |
  32.      Authentication using a UMS JWT authentication token.
  33.  
  34. # will be prefixed to all paths
  35. basePath: /alert/v1
  36. produces:
  37.  - application/json
  38.  
  39. # End: base/common.yaml
  40.  
  41. paths:
  42. # Start: alert/create/paths.yaml
  43.   /createAlert:
  44.     post:
  45.       summary: Create a new aler
  46.       description: |
  47.        This creates a new alert in the system. The alert will be in created
  48.         state, and will have to be scheduled or sent. After creation, it will
  49.         also be possible to add channels and targets. At least 1 channel
  50.         must be present before sending. And if there is any ItemChannels, at
  51.         least 1 target. ItemChannels are channels such as voice, sms and
  52.         email, where we expect there to be a known person recieving the alert,
  53.         as opposed to bulk/broadcast channels that don't really have a target.
  54.  
  55.         The TEMPLATE types are intended for storing templates of a full alert, just the
  56.         message, or the channels for an alert.
  57.       operationId: alertService.createAlert
  58.       parameters:
  59.         - name: name
  60.           in: query
  61.           type: string
  62.           required: true
  63.           default: New Alert
  64.         - name: mainMessage
  65.           in: query
  66.           type: string
  67.           description: |
  68.            This is a description for the alert, and can be left empty. It does not affect the alert
  69.             content, but can be used as a tool to display details in UI.
  70.           required: true
  71.         - name: mode
  72.           in: query
  73.           required: true
  74.           description: |
  75.            The mode for the alert. DISABLED alerts cannot be sent. LIVE basically means that
  76.             customers will be called/contacted. While SIMULATE means that as much as possible of the
  77.             send process will be simulated, while not actually contacting anyone. Usefull for
  78.             training and testing.
  79.           type: string
  80.         - name: alertCategory
  81.           in: query
  82.           required: false
  83.           description: |
  84.            An optional category for the alert, to group alerts by purpose. This can be usefull for
  85.             creating alerts that should be hidden from normal view.
  86.           type: string
  87.       tags:
  88.        - CreateAlert
  89.       responses:
  90.         200:
  91.           description: Refno of the new alert. This can be used to fetch status
  92.           schema:
  93.             type: integer
  94.             format: int32
  95.   /resendAlert:
  96.       post:
  97.         summary: Create a resend alert based on an existing alert
  98.         description: |
  99.          This copies an existing alert, and all it's targets and channels. The new alert will
  100.           have a filter applied to each target, to limit the recipients based on the item
  101.           state provided.
  102.         operationId: alertService.resendAlert
  103.         parameters:
  104.           - name: refno
  105.             description: The refno of the alert to resend
  106.             in: query
  107.             type: integer
  108.             format: int32
  109.             required: true
  110.           - name: name
  111.             in: query
  112.             type: string
  113.             required: true
  114.             default: New Alert
  115.             description: The name of the new alert.
  116.           - name: state
  117.             in: query
  118.             type: string
  119.             required: false
  120.             default: FAILED
  121.             description: |
  122.              Optional state to filter recipients on. If provided, all targets in the existing alert
  123.               will be included in the new alert, but it's recipient will be from the old alert, and
  124.               filtered by those in the given state only. This allows the resend of an alert to all
  125.               those that failed on the last sending.
  126.         tags:
  127.          - CreateAlert
  128.         responses:
  129.           200:
  130.             description: Refno of the new alert
  131.             schema:
  132.               type: integer
  133.               format: int32
  134.  
  135.  
  136.   /send/validate:
  137.     post:
  138.       summary: Validate an alert object
  139.       description: |
  140.        This can be used to validate alert details before sending.
  141.       operationId: validateAlert
  142.       parameters:
  143.         - name: alert
  144.           in: body
  145.           schema:
  146.             $ref: '#/definitions/AlertDetails'
  147.           required: true
  148.           description: |
  149.            The full details for the alert. The refno in the details will be ignored, and instead the
  150.             server will generate a refno that will be used and returned.
  151.       tags:
  152.        - CreateAlert
  153.       responses:
  154.         200:
  155.           description: Validation result after applying validation to the alert details.
  156.           schema:
  157.             $ref: "#/definitions/ValidationResult"
  158.  
  159.   /send/submit:
  160.     post:
  161.       summary: Fully create and schedule/send an alert in a single request.
  162.       description: |
  163.        This can be used to create and schedule/submit an alert in a single request. You must provide
  164.         the full alert details, and optionally a schedule time if the alert is to be scheduled for a
  165.         later time.
  166.       operationId: submitAlert
  167.       parameters:
  168.         - name: alert
  169.           in: body
  170.           schema:
  171.             $ref: '#/definitions/AlertDetails'
  172.           required: true
  173.           description: |
  174.            The full details for the alert. The refno in the details will be ignored, and instead the
  175.             server will generate a refno that will be used and returned.
  176.         - name: scheduleTime
  177.           in: query
  178.           type: string
  179.           format: date-time
  180.           required: false
  181.           description: |
  182.            The time to schedule the alert for. If missing or in the past, the alert will be sent
  183.             immediatly. Otherwise the alert is scheduled for sending at the provided time.
  184.       tags:
  185.        - CreateAlert
  186.       responses:
  187.         200:
  188.           description: The full alert details, with the refno filled in.
  189.           schema:
  190.             $ref: '#/definitions/AlertDetails'
  191.         400:
  192.           description: Validation of request failed
  193.           schema:
  194.             $ref: "#/definitions/ValidationResult"
  195.  
  196. # End: alert/create/paths.yaml
  197. # Start: alert/test/paths.yaml
  198.   /testChannel/voice:
  199.     post:
  200.       operationId: testVoiceChannel
  201.       description: |
  202.        Perform a voice sending to a single test number. This will create a new alert in the mode
  203.         TEST.
  204.       parameters:
  205.         - name: number
  206.           in: query
  207.           type: string
  208.           required: true
  209.           description: The number to call, in MSISDN format.
  210.         - name: channel
  211.           in: body
  212.           description: A full description of the voice channel to use for the sending.
  213.           schema:
  214.             $ref: "#/definitions/VoiceChannel"
  215.       tags:
  216.        - TestSend
  217.       responses:
  218.         200:
  219.           description: Refno of the test alert
  220.           schema:
  221.             type: integer
  222.             format: int32
  223.   /testChannel/sms:
  224.     post:
  225.       operationId: testSmsChannel
  226.       description: |
  227.        Perform an SMS sending to a single test number. This will create a new alert in the mode
  228.         TEST.
  229.       parameters:
  230.         - name: number
  231.           in: query
  232.           type: string
  233.           required: true
  234.           description: The number to send SMS to, in MSISDN format.
  235.         - name: channel
  236.           in: body
  237.           description: A full description of the sms channel to use for the sending.
  238.           schema:
  239.             $ref: "#/definitions/SmsChannel"
  240.       tags:
  241.        - TestSend
  242.       responses:
  243.         200:
  244.           description: Refno of the new alert
  245.           schema:
  246.             type: integer
  247.             format: int32
  248.   /testChannel/email:
  249.     post:
  250.       operationId: testEmailChannel
  251.       description: |
  252.        Perform an Email sending to a single test number. This will create a new alert in the mode
  253.         TEST.
  254.       parameters:
  255.         - name: email
  256.           in: query
  257.           type: string
  258.           required: true
  259.           description: The email to send to
  260.         - name: channel
  261.           in: body
  262.           description: A full description of the sms channel to use for the sending.
  263.           schema:
  264.             $ref: "#/definitions/EmailChannel"
  265.       tags:
  266.        - TestSend
  267.       responses:
  268.         200:
  269.           description: Refno of the new alert
  270.           schema:
  271.             type: integer
  272.             format: int32
  273.   /testChannel/sds:
  274.     post:
  275.       operationId: testSdsChannel
  276.       description: |
  277.        Perform an SDS sending to a single test number. This will create a new alert in the mode
  278.         TEST.
  279.       parameters:
  280.         - name: number
  281.           in: query
  282.           type: string
  283.           description: The number to send the SDS message to.
  284.         - name: channel
  285.           in: body
  286.           description: A full description of the sds channel to use for the sending.
  287.           schema:
  288.             $ref: "#/definitions/SdsChannel"
  289.       tags:
  290.        - TestSend
  291.       responses:
  292.         200:
  293.           description: Refno of the new alert
  294.           schema:
  295.             type: integer
  296.             format: int32
  297.  
  298. # End: alert/test/paths.yaml
  299. # Start: alert/compose/paths.yaml
  300.   /{refno}/addVoiceChannel:
  301.     post:
  302.       operationId: addVoiceChannel
  303.       description: Add a voice channel to the alert, so that people will be called.
  304.       parameters:
  305.         - name: refno
  306.           type: integer
  307.           in: path
  308.           format: int32
  309.           required: true
  310.           description: The alert to add the voice channel to.
  311.         - name: channel
  312.           in: body
  313.           description: A full description of the voice channel to use for the sending.
  314.           schema:
  315.             $ref: "#/definitions/VoiceChannel"
  316.       tags:
  317.        - ComposeAlert
  318.       responses:
  319.         200:
  320.           description: Channel successfully added
  321.   /{refno}/addSmsChannel:
  322.     post:
  323.       operationId: addSmsChannel
  324.       description: |
  325.        Add an sms channel to a sending.
  326.       parameters:
  327.         - name: refno
  328.           type: integer
  329.           in: path
  330.           format: int32
  331.           required: true
  332.           description: The alert to add the sms channel to.
  333.         - name: channel
  334.           in: body
  335.           description: A full description of the sms channel to use for the sending.
  336.           schema:
  337.             $ref: "#/definitions/SmsChannel"
  338.       tags:
  339.        - ComposeAlert
  340.       responses:
  341.         200:
  342.           description: Channel successfully added
  343.   /{refno}/addSdsChannel:
  344.       post:
  345.         operationId: addSdsChannel
  346.         description: |
  347.          Add an sds channel to a sending.
  348.         parameters:
  349.           - name: refno
  350.             type: integer
  351.             in: path
  352.             format: int32
  353.             required: true
  354.             description: The alert to add the sds channel to.
  355.           - name: channel
  356.             in: body
  357.             description: A full description of the sds channel to use for the sending.
  358.             schema:
  359.               $ref: "#/definitions/SdsChannel"
  360.         tags:
  361.          - ComposeAlert
  362.         responses:
  363.           200:
  364.             description: Channel successfully added
  365.   /{refno}/addEmailChannel:
  366.     post:
  367.       operationId: addEmailChannel
  368.       parameters:
  369.         - name: refno
  370.           type: integer
  371.           in: path
  372.           format: int32
  373.           required: true
  374.           description: The alert to add the sds channel to.
  375.         - name: channel
  376.           in: body
  377.           description: A full description of the email channel to use for the sending.
  378.           schema:
  379.             $ref: "#/definitions/EmailChannel"
  380.       tags:
  381.        - ComposeAlert
  382.       responses:
  383.         200:
  384.           description: Channel successfully added
  385.   /{refno}/addLbasChannel:
  386.     post:
  387.       operationId: addLbasChannel
  388.       parameters:
  389.         - name: refno
  390.           type: integer
  391.           in: path
  392.           format: int32
  393.           required: true
  394.         - name: channel
  395.           in: body
  396.           schema:
  397.             $ref: "#/definitions/LbasChannel"
  398.       tags:
  399.        - ComposeAlert
  400.       responses:
  401.         200:
  402.           description: Channel successfully added
  403.   /{refno}/addWebChannel:
  404.     post:
  405.       operationId: addWebChannel
  406.       parameters:
  407.         - name: refno
  408.           type: integer
  409.           in: path
  410.           format: int32
  411.           required: true
  412.         - name: channel
  413.           in: body
  414.           schema:
  415.             $ref: "#/definitions/WebChannel"
  416.       tags:
  417.        - ComposeAlert
  418.       responses:
  419.         200:
  420.           description: Channel successfully added
  421.   /{refno}/addSmartphoneChannel:
  422.     post:
  423.       operationId: addSmartphoneChannel
  424.       parameters:
  425.         - name: refno
  426.           type: integer
  427.           in: path
  428.           format: int32
  429.           required: true
  430.         - name: channel
  431.           in: body
  432.           schema:
  433.             $ref: "#/definitions/SmartphoneChannel"
  434.       tags:
  435.        - ComposeAlert
  436.       responses:
  437.         200:
  438.           description: Channel successfully added
  439.   /{refno}/addTwitterChannel:
  440.     post:
  441.       operationId: addTwitterChannel
  442.       parameters:
  443.         - name: refno
  444.           type: integer
  445.           in: path
  446.           format: int32
  447.           required: true
  448.         - name: channel
  449.           in: body
  450.           schema:
  451.             $ref: "#/definitions/TwitterChannel"
  452.       tags:
  453.        - ComposeAlert
  454.       responses:
  455.         200:
  456.           description: Channel successfully added
  457.   /{refno}/addFacebookChannel:
  458.     post:
  459.       operationId: addFacebookChannel
  460.       parameters:
  461.         - name: refno
  462.           type: integer
  463.           in: path
  464.           format: int32
  465.           required: true
  466.         - name: channel
  467.           in: body
  468.           schema:
  469.             $ref: "#/definitions/FacebookChannel"
  470.       tags:
  471.        - ComposeAlert
  472.       responses:
  473.         200:
  474.           description: Channel successfully added
  475.  
  476.   /{refno}/addAreaTarget:
  477.     post:
  478.       operationId: addAreaTarget
  479.       parameters:
  480.         - name: refno
  481.           type: integer
  482.           in: path
  483.           format: int32
  484.           required: true
  485.         - name: target
  486.           in: body
  487.           schema:
  488.             $ref: "#/definitions/AreaTarget"
  489.       tags:
  490.        - ComposeAlert
  491.       responses:
  492.         200:
  493.           description: Channel successfully added
  494.  
  495.   /{refno}/addMatrikkelTarget:
  496.     post:
  497.       operationId: addMatrikkelTarget
  498.       parameters:
  499.         - name: refno
  500.           type: integer
  501.           in: path
  502.           format: int32
  503.           required: true
  504.         - name: target
  505.           in: body
  506.           schema:
  507.             $ref: "#/definitions/MatrikkelTarget"
  508.       tags:
  509.        - ComposeAlert
  510.       responses:
  511.         200:
  512.           description: Target successfully added
  513.  
  514.   /{refno}/addStreetTarget:
  515.     post:
  516.       operationId: addStreetTarget
  517.       parameters:
  518.         - name: refno
  519.           type: integer
  520.           in: path
  521.           format: int32
  522.           required: true
  523.         - name: target
  524.           in: body
  525.           schema:
  526.             $ref: "#/definitions/StreetTarget"
  527.       tags:
  528.        - ComposeAlert
  529.       responses:
  530.         200:
  531.           description: Target successfully added
  532.  
  533.   /{refno}/addAddressSearchTarget:
  534.     post:
  535.       operationId: addAddressSearchTarget
  536.       parameters:
  537.         - name: refno
  538.           type: integer
  539.           in: path
  540.           format: int32
  541.           required: true
  542.         - name: target
  543.           in: body
  544.           schema:
  545.             $ref: "#/definitions/AddressSearchTarget"
  546.       tags:
  547.        - ComposeAlert
  548.       responses:
  549.         200:
  550.           description: Target successfully added
  551.  
  552.   /{refno}/addDirectoryTarget:
  553.     post:
  554.       operationId: addDirectoryTarget
  555.       parameters:
  556.         - name: refno
  557.           type: integer
  558.           in: path
  559.           format: int32
  560.           required: true
  561.         - name: directoryTarget
  562.           in: body
  563.           schema:
  564.             $ref: "#/definitions/DirectoryTarget"
  565.       tags:
  566.        - ComposeAlert
  567.       responses:
  568.         200:
  569.           description: Channel successfully added
  570.   /{refno}/addDirectTarget:
  571.     post:
  572.       operationId: addDirectTarget
  573.       parameters:
  574.         - name: refno
  575.           type: integer
  576.           in: path
  577.           format: int32
  578.           required: true
  579.         - name: id
  580.           in: formData
  581.           type: string
  582.           required: true
  583.           default: "1"
  584.           description: |
  585.            Unique id for the target. If the same id is used, it will replace existing
  586.             direct target recipient.
  587.         - name: name
  588.           in: formData
  589.           type: string
  590.           required: true
  591.           default: Alert Person
  592.           description: The name of the person being added
  593.         - name: address
  594.           in: formData
  595.           type: string
  596.           required: false
  597.           default: Some street 111, XX-99 Nowhere
  598.           description: Postal address for the person
  599.         - name: language
  600.           in: formData
  601.           type: string
  602.           default: en
  603.           required: false
  604.           description: iso language code for the language that the recipient speaks
  605.         - name: longitude
  606.           in: formData
  607.           type: number
  608.           format: double
  609.           required: false
  610.           description: Longitude position
  611.         - name: latitude
  612.           in: formData
  613.           type: number
  614.           format: double
  615.           required: false
  616.           description: Latitude position
  617.         - name: voice
  618.           in: formData
  619.           type: string
  620.           required: false
  621.           description: Fixed line number for the recipient
  622.         - name: sms
  623.           in: formData
  624.           type: string
  625.           required: false
  626.           description: Sms mobile number for the recipient
  627.         - name: email
  628.           in: formData
  629.           type: string
  630.           required: false
  631.           description: Email address for the recipient
  632.       tags:
  633.        - ComposeAlert
  634.       responses:
  635.         200:
  636.           description: Channel successfully added
  637.   /{refno}/addFullDirectTarget:
  638.     post:
  639.       operationId: addFullDirectTarget
  640.       parameters:
  641.         - name: refno
  642.           type: integer
  643.           in: path
  644.           format: int32
  645.           required: true
  646.         - name: directTarget
  647.           in: body
  648.           schema:
  649.             $ref: "#/definitions/DirectTarget"
  650.       tags:
  651.        - ComposeAlert
  652.       responses:
  653.         200:
  654.           description: Target successfully added
  655.   /{refno}/addGroupTarget:
  656.     post:
  657.       operationId: addGroupTarget
  658.       parameters:
  659.         - name: refno
  660.           type: integer
  661.           in: path
  662.           format: int32
  663.           required: true
  664.         - name: groupTarget
  665.           in: body
  666.           schema:
  667.             $ref: "#/definitions/GroupTarget"
  668.       tags:
  669.        - ComposeAlert
  670.       responses:
  671.         200:
  672.           description: Channel successfully added
  673.   /{refno}/addPersonTarget:
  674.     post:
  675.       operationId: addPersonTarget
  676.       parameters:
  677.         - name: refno
  678.           type: integer
  679.           in: path
  680.           format: int32
  681.           required: true
  682.         - name: personTarget
  683.           in: body
  684.           schema:
  685.             $ref: "#/definitions/PersonTarget"
  686.       tags:
  687.        - ComposeAlert
  688.       responses:
  689.         200:
  690.           description: Channel successfully added
  691.   /{refno}/addRandomTarget:
  692.     post:
  693.       operationId: addRandomTarget
  694.       parameters:
  695.         - name: refno
  696.           type: integer
  697.           in: path
  698.           format: int32
  699.           required: true
  700.         - name: id
  701.           type: string
  702.           in: query
  703.           description: The id to use for this target
  704.           default: "r99"
  705.         - name: name
  706.           type: string
  707.           in: query
  708.           description: The name to use for this target
  709.           default: "Random target"
  710.         - name: total
  711.           type: integer
  712.           in: query
  713.           format: int32
  714.           default: 100
  715.         - name: voiceCount
  716.           type: integer
  717.           in: query
  718.           format: int32
  719.           default: 40
  720.         - name: smsCount
  721.           type: integer
  722.           in: query
  723.           format: int32
  724.           default: 80
  725.         - name: sdsCount
  726.           type: integer
  727.           in: query
  728.           format: int32
  729.           default: 80
  730.         - name: emailCount
  731.           type: integer
  732.           in: query
  733.           format: int32
  734.           default: 80
  735.       tags:
  736.        - ComposeAlert
  737.       responses:
  738.         200:
  739.           description: Channel successfully added
  740.  
  741.   /{refno}/setChannelOptions:
  742.     post:
  743.       operationId: setChannelOptions
  744.       description: |
  745.        This only updates the channel options for an alert.
  746.       parameters:
  747.         - name: refno
  748.           type: integer
  749.           in: path
  750.           format: int32
  751.           required: true
  752.         - name: channelOptions
  753.           in: body
  754.           schema:
  755.             $ref: "#/definitions/ChannelOptions"
  756.       tags:
  757.        - ComposeAlert
  758.       responses:
  759.         200:
  760.           description: ChannelOptions successfully changed
  761.  
  762. # End: alert/compose/paths.yaml
  763. # Start: alert/manage/paths.yaml
  764.   /{refno}/sendAlert:
  765.     post:
  766.       operationId: sendAlert
  767.       parameters:
  768.         - name: refno
  769.           type: integer
  770.           in: path
  771.           format: int32
  772.           required: true
  773.       tags:
  774.        - ManageAlert
  775.       responses:
  776.         200:
  777.           description: Alert sent
  778.   /{refno}/updateAlert:
  779.     post:
  780.       operationId: updateAlert
  781.       parameters:
  782.         - name: refno
  783.           type: integer
  784.           in: path
  785.           format: int32
  786.           required: true
  787.         - name: alertDetails
  788.           in: body
  789.           schema:
  790.             $ref: "#/definitions/AlertDetails"
  791.       tags:
  792.        - ManageAlert
  793.       responses:
  794.         200:
  795.           description: Channel successfully added
  796.  
  797.   /{refno}/scheduleAlert:
  798.     post:
  799.       operationId: scheduleAlert
  800.       parameters:
  801.         - name: refno
  802.           type: integer
  803.           in: path
  804.           format: int32
  805.           required: true
  806.         - name: scheduleDate
  807.           type: string
  808.           format: date-time
  809.           description: |
  810.             When to schedule the sending for, format: yyyy-MM-ddThh:mm:ss.SSSZ. Example
  811.             date: 2016-05-27T12:24:05.899+0200 (T is a literal T, and Z is the timezone offset).
  812.           in: query
  813.           required: true
  814.       tags:
  815.        - ManageAlert
  816.       responses:
  817.         200:
  818.           description: Alert scheduled
  819.   /{refno}/cancelAlert:
  820.     post:
  821.       operationId: cancelAlert
  822.       parameters:
  823.         - name: refno
  824.           type: integer
  825.           in: path
  826.           format: int32
  827.           required: true
  828.       tags:
  829.        - ManageAlert
  830.       responses:
  831.         200:
  832.           description: Alert sent
  833.   /{refno}/{channelId}/addResponse:
  834.     post:
  835.       operationId: addResponse
  836.       description: Add am option response for the given channel and address
  837.       parameters:
  838.         - name: refno
  839.           type: integer
  840.           in: path
  841.           format: int32
  842.           required: true
  843.         - name: channelId
  844.           type: string
  845.           in: path
  846.           description: The id of the channel that the response is to be added to (voice/sms/etc.)
  847.           required: true
  848.         - name: responseDetail
  849.           in: body
  850.           schema:
  851.             $ref: "#/definitions/ResponseDetail"
  852.       tags:
  853.        - ManageAlert
  854.       responses:
  855.         200:
  856.           description: Response added
  857.  
  858. # End: alert/manage/paths.yaml
  859. # Start: alert/status/paths.yaml
  860.   /status/count/{refno}:
  861.     get:
  862.       operationId: getAlertStatusCount
  863.       parameters:
  864.         - name: refno
  865.           type: integer
  866.           in: path
  867.           format: int32
  868.           required: true
  869.       tags:
  870.        - AlertStatus
  871.       responses:
  872.         200:
  873.           description: Count for the given alert.
  874.           schema:
  875.             $ref: '#/definitions/AlertStatusCount'
  876.   /status/summary/{refno}:
  877.     get:
  878.       operationId: getAlertSummary
  879.       parameters:
  880.         - name: refno
  881.           type: integer
  882.           in: path
  883.           format: int32
  884.           required: true
  885.       tags:
  886.        - AlertStatus
  887.       responses:
  888.         200:
  889.           description: Summary for the given alert.
  890.           schema:
  891.             $ref: '#/definitions/AlertSummary'
  892.   /status/details/{refno}:
  893.     get:
  894.       operationId: getAlertDetails
  895.       parameters:
  896.         - name: refno
  897.           type: integer
  898.           in: path
  899.           format: int32
  900.           required: true
  901.       tags:
  902.        - AlertStatus
  903.       responses:
  904.         200:
  905.           description: Summary for the given alert.
  906.           schema:
  907.             $ref: '#/definitions/AlertDetails'
  908.   /status/targets/{refno}:
  909.     get:
  910.       operationId: getAlertTargets
  911.       parameters:
  912.         - name: refno
  913.           type: integer
  914.           in: path
  915.           format: int32
  916.           required: true
  917.       tags:
  918.        - AlertStatus
  919.       responses:
  920.         200:
  921.           description: Targets for the given alert.
  922.           schema:
  923.             $ref: '#/definitions/TargetSelection'
  924.  
  925.   /status/items/{refno}:
  926.     get:
  927.       operationId: getItemDetails
  928.       parameters:
  929.         - name: refno
  930.           type: integer
  931.           in: path
  932.           format: int32
  933.           required: true
  934.         - name: alertItemStates
  935.           type: array
  936.           required: false
  937.           items:
  938.             type: string
  939.           in: query
  940.         - name: channelIds
  941.           type: array
  942.           required: false
  943.           items:
  944.             type: string
  945.           in: query
  946.         - name: targetFullIds
  947.           description: List of full target ids (type:id) to limit the search to.
  948.           type: array
  949.           required: false
  950.           items:
  951.             type: string
  952.           in: query
  953.         - name: geoHashes
  954.           description: List of geohashes to filter by
  955.           type: array
  956.           required: false
  957.           items:
  958.             type: string
  959.           in: query
  960.         - name: search
  961.           description: Search text to be applied to name, address and channel address.
  962.           type: string
  963.           required: false
  964.           in: query
  965.         - name: startPage
  966.           type: integer
  967.           format: int32
  968.           in: query
  969.           required: true
  970.           default: 1
  971.         - name: pageSize
  972.           type: integer
  973.           format: int32
  974.           in: query
  975.           required: true
  976.           default: 25
  977.         - name: sort
  978.           type: string
  979.           default: NAME
  980.           in: query
  981.           required: true
  982.         - name: reverse
  983.           type: boolean
  984.           default: false
  985.           in: query
  986.       tags:
  987.        - AlertStatus
  988.       responses:
  989.         200:
  990.           description: Matching alerts.
  991.           schema:
  992.             $ref: '#/definitions/AlertItemDetails'
  993.   /status/geoStatus/{refno}:
  994.     get:
  995.       operationId: getGeoStatus
  996.       parameters:
  997.         - name: refno
  998.           type: integer
  999.           in: path
  1000.           format: int32
  1001.           required: true
  1002.         - name: alertItemStates
  1003.           type: array
  1004.           required: false
  1005.           items:
  1006.             type: string
  1007.           in: query
  1008.         - name: channelIds
  1009.           type: array
  1010.           required: false
  1011.           items:
  1012.             type: string
  1013.           in: query
  1014.         - name: targetFullIds
  1015.           description: List of full target ids (type:id) to limit the search to.
  1016.           type: array
  1017.           required: false
  1018.           items:
  1019.             type: string
  1020.           in: query
  1021.         - name: point1Longitude
  1022.           description: Longitude of the first point for the bounding box to show.
  1023.           type: number
  1024.           format: double
  1025.           default: -180.0
  1026.           in: query
  1027.         - name: point1Latitude
  1028.           description: Latitude of the first point for the bounding box to show.
  1029.           type: number
  1030.           format: double
  1031.           default: -90.0
  1032.           in: query
  1033.         - name: point2Longitude
  1034.           description: Longitude of the second point for the bounding box to show.
  1035.           type: number
  1036.           format: double
  1037.           default: 180.0
  1038.           in: query
  1039.         - name: point2Latitude
  1040.           description: Latitude of the second point for the bounding box to show.
  1041.           type: number
  1042.           format: double
  1043.           default: 90.0
  1044.           in: query
  1045.         - name: geohashSize
  1046.           type: integer
  1047.           format: int32
  1048.           default: 9
  1049.           description: Size of geo hash points.
  1050.           in: query
  1051.       tags:
  1052.        - AlertStatus
  1053.       responses:
  1054.         200:
  1055.           description: Matching alerts.
  1056.           schema:
  1057.             type: array
  1058.             items:
  1059.               $ref: '#/definitions/AlertGeoPointStatus'
  1060.  
  1061.   /status/response/{refno}:
  1062.     get:
  1063.       operationId: getResponseDetails
  1064.       parameters:
  1065.         - name: refno
  1066.           type: integer
  1067.           in: path
  1068.           format: int32
  1069.           required: true
  1070.         - name: channelIds
  1071.           type: array
  1072.           required: false
  1073.           items:
  1074.             type: string
  1075.           in: query
  1076.         - name: targetFullIds
  1077.           description: List of full target ids (type:id) to limit the search to.
  1078.           type: array
  1079.           required: false
  1080.           items:
  1081.             type: string
  1082.           in: query
  1083.         - name: responseOptions
  1084.           description: |
  1085.            List of responseIds to include. This can either be FREEFORM, or
  1086.             ALTERNATIVE:option:value
  1087.           type: array
  1088.           required: false
  1089.           items:
  1090.             type: string
  1091.           in: query
  1092.         - name: geoHashes
  1093.           description: List of geohashes to filter by
  1094.           type: array
  1095.           required: false
  1096.           items:
  1097.             type: string
  1098.           in: query
  1099.         - name: search
  1100.           description: Search text to be applied to name, address, response and channel address.
  1101.           type: string
  1102.           required: false
  1103.           in: query
  1104.         - name: startPage
  1105.           type: integer
  1106.           format: int32
  1107.           in: query
  1108.           required: true
  1109.           default: 1
  1110.         - name: pageSize
  1111.           type: integer
  1112.           format: int32
  1113.           in: query
  1114.           required: true
  1115.           default: 25
  1116.         - name: sort
  1117.           type: string
  1118.           default: NAME
  1119.           in: query
  1120.           required: true
  1121.         - name: ascending
  1122.           type: boolean
  1123.           default: false
  1124.           in: query
  1125.       tags:
  1126.        - AlertStatus
  1127.       responses:
  1128.         200:
  1129.           description: Matching alerts.
  1130.           schema:
  1131.             $ref: '#/definitions/AlertResponseDetails'
  1132.   /status/geoResponse/{refno}:
  1133.     get:
  1134.       operationId: getGeoResponse
  1135.       parameters:
  1136.         - name: refno
  1137.           type: integer
  1138.           in: path
  1139.           format: int32
  1140.           required: true
  1141.         - name: channelIds
  1142.           type: array
  1143.           required: false
  1144.           items:
  1145.             type: string
  1146.           in: query
  1147.         - name: targetFullIds
  1148.           description: List of full target ids (type:id) to limit the search to.
  1149.           type: array
  1150.           required: false
  1151.           items:
  1152.             type: string
  1153.           in: query
  1154.         - name: point1Longitude
  1155.           description: Longitude of the first point for the bounding box to show.
  1156.           type: number
  1157.           format: double
  1158.           default: -180.0
  1159.           in: query
  1160.         - name: point1Latitude
  1161.           description: Latitude of the first point for the bounding box to show.
  1162.           type: number
  1163.           format: double
  1164.           default: -90.0
  1165.           in: query
  1166.         - name: point2Longitude
  1167.           description: Longitude of the second point for the bounding box to show.
  1168.           type: number
  1169.           format: double
  1170.           default: 180.0
  1171.           in: query
  1172.         - name: point2Latitude
  1173.           description: Latitude of the second point for the bounding box to show.
  1174.           type: number
  1175.           format: double
  1176.           default: 90.0
  1177.           in: query
  1178.         - name: geohashSize
  1179.           type: integer
  1180.           format: int32
  1181.           default: 9
  1182.           description: Size of geo hash points.
  1183.           in: query
  1184.       tags:
  1185.        - AlertStatus
  1186.       responses:
  1187.         200:
  1188.           description: Matching alerts.
  1189.           schema:
  1190.             type: array
  1191.             items:
  1192.               $ref: '#/definitions/AlertGeoPointResponse'
  1193.  
  1194.  
  1195.   /status/summaries:
  1196.     get:
  1197.       operationId: getAlertSummaries
  1198.       parameters:
  1199.         - name: ownerIds
  1200.           type: array
  1201.           items:
  1202.             type: integer
  1203.             format: int64
  1204.           in: query
  1205.         - name: sendingModes
  1206.           type: array
  1207.           default: "LIVE"
  1208.           items:
  1209.             type: string
  1210.           in: query
  1211.         - name: alertCategories
  1212.           type: array
  1213.           required: false
  1214.           description: |
  1215.            List of categories to query. By default, alerts don't have a category, but one can be
  1216.             added. If no categories are set, or an empty category is included, then alerts without
  1217.             a category will be in the result.
  1218.           items:
  1219.             type: string
  1220.           in: query
  1221.         - name: search
  1222.           type: string
  1223.           description: Search text for alerts.
  1224.           in: query
  1225.         - name: createdAfter
  1226.           type: string
  1227.           format: date-time
  1228.           in: query
  1229.           default: "2016-01-01T00:00:00.000Z"
  1230.         - name: sendingAfter
  1231.           type: string
  1232.           format: date-time
  1233.           in: query
  1234.           default: "2016-01-01T00:00:00.000Z"
  1235.         - name: sendingBefore
  1236.           type: string
  1237.           format: date-time
  1238.           in: query
  1239.           default: "2100-01-01T00:00:00.000Z"
  1240.         - name: scheduledAfter
  1241.           type: string
  1242.           format: date-time
  1243.           in: query
  1244.           default: "2016-01-01T00:00:00.000Z"
  1245.         - name: scheduledBefore
  1246.           type: string
  1247.           format: date-time
  1248.           in: query
  1249.           default: "2100-01-01T00:00:00.000Z"
  1250.         - name: startPage
  1251.           type: integer
  1252.           format: int32
  1253.           in: query
  1254.           default: 1
  1255.         - name: pageSize
  1256.           type: integer
  1257.           format: int32
  1258.           in: query
  1259.           default: 25
  1260.         - name: sort
  1261.           type: string
  1262.           default: CREATED
  1263.           in: query
  1264.         - name: ascending
  1265.           type: boolean
  1266.           default: false
  1267.           in: query
  1268.       tags:
  1269.        - AlertStatus
  1270.       responses:
  1271.         200:
  1272.           description: Matching alerts.
  1273.           schema:
  1274.             $ref: '#/definitions/AlertListSummaryReport'
  1275.  
  1276.   /status/lastSmartphoneSendings:
  1277.     get:
  1278.       operationId: getLastSmartphoneSendings
  1279.       parameters:
  1280.         - name: maxAgeDays
  1281.           type: integer
  1282.           description: Number of days to look back for sendings.
  1283.           default: 1
  1284.           in: query
  1285.       tags:
  1286.        - AlertStatus
  1287.       responses:
  1288.         200:
  1289.           description: Latest smartphone sendings.
  1290.           schema:
  1291.             type: array
  1292.             items:
  1293.               $ref: '#/definitions/SmartphoneSendingSummary'
  1294.  
  1295.   /status/reports:
  1296.     get:
  1297.       operationId: getAlertReports
  1298.       parameters:
  1299.         - name: ownerIds
  1300.           type: array
  1301.           items:
  1302.             type: integer
  1303.             format: int64
  1304.           in: query
  1305.         - name: sendingModes
  1306.           type: array
  1307.           default: "LIVE"
  1308.           items:
  1309.             type: string
  1310.           in: query
  1311.         - name: alertCategories
  1312.           type: array
  1313.           required: false
  1314.           description: |
  1315.            List of categories to query. By default, alerts don't have a category, but one can be
  1316.             added. If no categories are set, or an empty category is included, then alerts without
  1317.             a category will be in the result.
  1318.           items:
  1319.             type: string
  1320.           in: query
  1321.         - name: search
  1322.           type: string
  1323.           description: Search text for alerts.
  1324.           in: query
  1325.         - name: composedBy
  1326.           type: string
  1327.           description: User id of the composer
  1328.           in: query
  1329.         - name: createdAfter
  1330.           type: string
  1331.           format: date-time
  1332.           in: query
  1333.           default: "2016-01-01T00:00:00.000Z"
  1334.         - name: sendingAfter
  1335.           type: string
  1336.           format: date-time
  1337.           in: query
  1338.           default: "2016-01-01T00:00:00.000Z"
  1339.         - name: sendingBefore
  1340.           type: string
  1341.           format: date-time
  1342.           in: query
  1343.           default: "2100-01-01T00:00:00.000Z"
  1344.         - name: sort
  1345.           type: string
  1346.           default: CREATED
  1347.           in: query
  1348.         - name: ascending
  1349.           type: boolean
  1350.           default: false
  1351.           in: query
  1352.       tags:
  1353.        - AlertStatus
  1354.       responses:
  1355.         200:
  1356.           description: Matching alerts.
  1357.           schema:
  1358.             type: array
  1359.             items:
  1360.               $ref: '#/definitions/AlertReport'
  1361.  
  1362. # End: alert/status/paths.yaml
  1363. # Start: alert/response/paths.yaml
  1364.   /response/addSms:
  1365.     post:
  1366.       operationId: addSmsResponse
  1367.       description: Add sms response, with identical contract to the current version in heimdall.
  1368.       parameters:
  1369.         - name: smsResponse
  1370.           in: body
  1371.           schema:
  1372.             $ref: '#/definitions/SmsResponse'
  1373.       tags:
  1374.        - AlertResponse
  1375.       responses:
  1376.         200:
  1377.           description: Response accepted
  1378.           schema:
  1379.             $ref: '#/definitions/SmsRegistration'
  1380.  
  1381.   /response/registerSmartphoneDelivery:
  1382.       post:
  1383.         operationId: addSmartphoneResponse
  1384.         description: Add smartphone response. This is also used to register counts and/or delivered
  1385.         parameters:
  1386.           - name: refno
  1387.             in: query
  1388.             type: integer
  1389.             format: int32
  1390.             description: Refno to register smartphone count for.
  1391.           - name: state
  1392.             in: query
  1393.             type: string
  1394.             description: If this is a delivery or failure registration.
  1395.           - name: reason
  1396.             in: query
  1397.             type: string
  1398.             description: If the state is failed, this should be the reason for the failure.
  1399.         tags:
  1400.          - AlertResponse
  1401.         responses:
  1402.           200:
  1403.             description: Smartphone count accepted
  1404.  
  1405. # End: alert/response/paths.yaml
  1406.  
  1407. # Start: target/paths.yaml
  1408.   /target/count:
  1409.     post:
  1410.       operationId: countTargets
  1411.       parameters:
  1412.         - name: countRequest
  1413.           in: body
  1414.           schema:
  1415.             $ref: "#/definitions/TargetSelection"
  1416.       tags:
  1417.        - Target
  1418.       responses:
  1419.         200:
  1420.           description: Target counts
  1421.           schema:
  1422.             type: array
  1423.             items:
  1424.               $ref: "#/definitions/TargetCountReport"
  1425.  
  1426.   /target/countSummary:
  1427.       post:
  1428.         operationId: countTargetSummary
  1429.         parameters:
  1430.           - name: countRequest
  1431.             in: body
  1432.             schema:
  1433.               $ref: "#/definitions/TargetSelection"
  1434.         tags:
  1435.          - Target
  1436.         responses:
  1437.           200:
  1438.             description: Target counts
  1439.             schema:
  1440.               type: array
  1441.               items:
  1442.                 $ref: "#/definitions/TargetCountSummary"
  1443.  
  1444.   /target/items:
  1445.       post:
  1446.         description: |
  1447.          Searches all the provided targets for recipients, and returns them in a list.
  1448.           This is a very expensive operations for large queries, as everything happens
  1449.           in the search thread. Be cautious to use this. You can set the maximum items
  1450.           you want to return, this was done for import to just get one target in return.
  1451.         operationId: getItems
  1452.         parameters:
  1453.           - name: countRequest
  1454.             in: body
  1455.             schema:
  1456.               $ref: "#/definitions/TargetSelection"
  1457.           - name: maxItems
  1458.             in: query
  1459.             type: integer
  1460.             format: int64
  1461.             description: Maximum number of returned results.
  1462.           - name: point1Longitude
  1463.             description: Longitude of the first point for the bounding box to show.
  1464.             type: number
  1465.             format: double
  1466.             default: -180.0
  1467.             in: query
  1468.           - name: point1Latitude
  1469.             description: Latitude of the first point for the bounding box to show.
  1470.             type: number
  1471.             format: double
  1472.             default: -90.0
  1473.             in: query
  1474.           - name: point2Longitude
  1475.             description: Longitude of the second point for the bounding box to show.
  1476.             type: number
  1477.             format: double
  1478.             default: 180.0
  1479.             in: query
  1480.           - name: point2Latitude
  1481.             description: Latitude of the second point for the bounding box to show.
  1482.             type: number
  1483.             format: double
  1484.             default: 90.0
  1485.             in: query
  1486.         tags:
  1487.          - Target
  1488.         responses:
  1489.           200:
  1490.             description: List of items found for the area
  1491.             schema:
  1492.               type: array
  1493.               items:
  1494.                 $ref: "#/definitions/TargetRecipient"
  1495.  
  1496.   /target/items/{geohash}:
  1497.       post:
  1498.         description: |
  1499.          Finds all items within a given geohash.
  1500.         operationId: getGeohashItems
  1501.         parameters:
  1502.           - name: geohash
  1503.             description: |
  1504.              The geohash to search. The geohash should be at least 7 characters long, to avoid
  1505.               too large a query.
  1506.             in: path
  1507.             type: string
  1508.             required: true
  1509.           - name: targetSelection
  1510.             in: body
  1511.             required: false
  1512.             description: |
  1513.              The selection of items. This is used to determine which items are selected
  1514.             schema:
  1515.               $ref: "#/definitions/TargetSelection"
  1516.         tags:
  1517.          - Target
  1518.         responses:
  1519.           200:
  1520.             description: All items within the geohash
  1521.             schema:
  1522.               title: TargetSelectionItems
  1523.               description: |
  1524.                A list of holder objects, that contains the target recipient, and if it was amongst
  1525.                 one of the items selected from the given target selection.
  1526.               type: array
  1527.               items:
  1528.                 type: object
  1529.                 title: TargetSelectionItem
  1530.                 description: |
  1531.                  A single item from a target selection, with details about if it was selected or not,
  1532.                   and which targets matched the given item.
  1533.                 properties:
  1534.                   recipient:
  1535.                     $ref: "#/definitions/TargetRecipient"
  1536.                   selected:
  1537.                     type: boolean
  1538.                     description: If the target was a part of the TargetSelection
  1539.                   targetIds:
  1540.                     type: array
  1541.                     description: List of all targetIds that had the recipient
  1542.                     items:
  1543.                       type: string
  1544.  
  1545.   /target/geohashes:
  1546.     post:
  1547.       description: |
  1548.        Searches all the provided targets for recipients, and returns the geohash aggregation for
  1549.         the provided points.
  1550.       operationId: getGeohashList
  1551.       parameters:
  1552.         - name: geohashSize
  1553.           in: query
  1554.           type: integer
  1555.           format: int32
  1556.           default: 9
  1557.         - name: point1Longitude
  1558.           description: Longitude of the first point for the bounding box to show.
  1559.           type: number
  1560.           format: double
  1561.           default: -180.0
  1562.           in: query
  1563.         - name: point1Latitude
  1564.           description: Latitude of the first point for the bounding box to show.
  1565.           type: number
  1566.           format: double
  1567.           default: -90.0
  1568.           in: query
  1569.         - name: point2Longitude
  1570.           description: Longitude of the second point for the bounding box to show.
  1571.           type: number
  1572.           format: double
  1573.           default: 180.0
  1574.           in: query
  1575.         - name: point2Latitude
  1576.           description: Latitude of the second point for the bounding box to show.
  1577.           type: number
  1578.           format: double
  1579.           default: 90.0
  1580.           in: query
  1581.         - name: countRequest
  1582.           in: body
  1583.           schema:
  1584.             $ref: "#/definitions/TargetSelection"
  1585.       tags:
  1586.        - Target
  1587.       responses:
  1588.         200:
  1589.           description: Target geohashehs
  1590.           schema:
  1591.             type: array
  1592.             items:
  1593.               $ref: "#/definitions/TargetGeoHash"
  1594.  
  1595.   # Start: importPaths.yaml
  1596.   /target/importMeta:
  1597.     get:
  1598.       description: Return the metaData about which file and target types are supported by the system.
  1599.       tags:
  1600.        - TargetImport
  1601.       operationId: getImportTargetTypeDescriptions
  1602.       security:
  1603.         - heimdallAuth: []
  1604.       responses:
  1605.         200:
  1606.           description: List of all supported import target and file types
  1607.           schema:
  1608.             $ref: "#/definitions/ImportTargetDescriptions"
  1609.  
  1610.   /target/import:
  1611.     get:
  1612.       description: Return the list of available import definitions.
  1613.       tags:
  1614.        - TargetImport
  1615.       operationId: getPredefinedImports
  1616.       security:
  1617.         - heimdallAuth: []
  1618.       parameters:
  1619.         - name: filter
  1620.           type: array
  1621.           items:
  1622.             type: string
  1623.           description: |
  1624.            List of filter options. Each filter is in the format <fieldName name>:<op>(<arg>).
  1625.  
  1626.             Operations:
  1627.             * eq: field value equals arg
  1628.             * gt/lt: field has value greater/less than arg
  1629.             * gte/lte: field has value greater/less than or equal to arg
  1630.             * in: field value is in list of args, separated by
  1631.             * like: field value is SQL like the arg
  1632.  
  1633.             It is also possible to add search:searchText to search for records matching the search
  1634.             text. This will search in most of the values available in the database records.
  1635.           in: query
  1636.         - name: startPage
  1637.           type: integer
  1638.           format: int32
  1639.           in: query
  1640.           default: 1
  1641.         - name: pageSize
  1642.           type: integer
  1643.           format: int32
  1644.           in: query
  1645.           default: 25
  1646.         - name: sort
  1647.           type: string
  1648.           default: created:DESC
  1649.           in: query
  1650.           description: |
  1651.            Field to sort by, optionally postfixed with :DESC or :ASC for descending/ascending.
  1652.       responses:
  1653.         200:
  1654.           description: List of all supported import target and file types
  1655.           schema:
  1656.             $ref: "#/definitions/PredefinedImportResult"
  1657.  
  1658.     post:
  1659.       summary: Create a new PredefinedImport
  1660.       security:
  1661.         - heimdallAuth: []
  1662.       description: |
  1663.        Creates a new PredefinedImport in the system.
  1664.       operationId: createPredefinedImport
  1665.       tags:
  1666.        - TargetImport
  1667.       parameters:
  1668.         - name: predefinedImport
  1669.           in: body
  1670.           required: true
  1671.           schema:
  1672.             $ref: '#/definitions/PredefinedImport'
  1673.       responses:
  1674.         200:
  1675.           description: The PredefinedImport was successfully created
  1676.           schema:
  1677.             name: predefinedImportId
  1678.             type: integer
  1679.         400:
  1680.           description: Validation failed for the PredefinedImport
  1681.           schema:
  1682.             $ref: '#/definitions/ValidationResult'
  1683.         403:
  1684.           description: The user is not allowed to create PredefinedImports
  1685.  
  1686.   /target/importParser:
  1687.     post:
  1688.       summary: Parse a predefined import, to produce settings
  1689.       security:
  1690.         - heimdallAuth: []
  1691.       description: |
  1692.        This will accept a PredefinedImport, and then parse it, to produce a new predefined import
  1693.         where the settings are defined. This can help in converting a predefined import to settings
  1694.         for ad-hoc imports.
  1695.       operationId: parsePredefinedImport
  1696.       tags:
  1697.        - TargetImport
  1698.       parameters:
  1699.         - name: predefinedImport
  1700.           in: body
  1701.           required: true
  1702.           schema:
  1703.             $ref: '#/definitions/PredefinedImport'
  1704.       responses:
  1705.         200:
  1706.           description: The PredefinedImport as parsed
  1707.           schema:
  1708.             $ref: '#/definitions/PredefinedImport'
  1709.         400:
  1710.           description: Validation failed for the PredefinedImport
  1711.           schema:
  1712.             $ref: '#/definitions/ValidationResult'
  1713.  
  1714.   /target/import/{predefinedImportId}:
  1715.     parameters:
  1716.       - name: predefinedImportId
  1717.         in: path
  1718.         type: integer
  1719.         format: int32
  1720.         required: true
  1721.         description: The id of the predefined import to access
  1722.     get:
  1723.       summary: Get a single PredefinedImport
  1724.       security:
  1725.         - heimdallAuth: []
  1726.       description: |
  1727.        Returns the associated PredefinedImport
  1728.       operationId: getPredefinedImport
  1729.       tags:
  1730.        - TargetImport
  1731.       responses:
  1732.         200:
  1733.           description: The associated PredefinedImport
  1734.           schema:
  1735.             $ref: '#/definitions/PredefinedImport'
  1736.         404:
  1737.           description: The PredefinedImport was not found.
  1738.  
  1739.     put:
  1740.       summary: Updates a PredefinedImport
  1741.       security:
  1742.         - heimdallAuth: []
  1743.       description: |
  1744.        Creates a new PredefinedImport in the system.
  1745.       operationId: updatePredefinedImport
  1746.       tags:
  1747.        - TargetImport
  1748.       parameters:
  1749.         - name: predefinedImport
  1750.           in: body
  1751.           required: true
  1752.           schema:
  1753.             $ref: '#/definitions/PredefinedImport'
  1754.       responses:
  1755.         200:
  1756.           description: The PredefinedImport was successfully updated
  1757.         400:
  1758.           description: Validation failed for the PredefinedImport
  1759.           schema:
  1760.             $ref: '#/definitions/ValidationResult'
  1761.         403:
  1762.           description: The user is not allowed to update PredefinedImport
  1763.         404:
  1764.           description: The PredefinedImport was not found.
  1765.  
  1766.     delete:
  1767.       summary: Delete a PredefinedImport
  1768.       security:
  1769.         - heimdallAuth: []
  1770.       description: |
  1771.        Deletes an PredefinedImport from the database
  1772.       operationId: deletePredefinedImport
  1773.       tags:
  1774.        - TargetImport
  1775.       responses:
  1776.         200:
  1777.           description: The PredefinedImport was successfully deleted
  1778.         404:
  1779.           description: The PredefinedImport was not found.
  1780.  
  1781.   # End: importPaths.yaml
  1782.  
  1783. # End: target/paths.yaml
  1784. # Start: target/template/paths.yaml
  1785.   /target/template/store:
  1786.     post:
  1787.       summary: Store a new target template
  1788.       consumes:
  1789.        - multipart/form-data
  1790.       operationId: uploadTargetTemplate
  1791.       tags:
  1792.        - Target
  1793.       parameters:
  1794.         - name: type
  1795.           in: query
  1796.           type: string
  1797.         - name: settings
  1798.           description: Refer to parseTargetFile for details about settings
  1799.           in: query
  1800.           type: array
  1801.           items:
  1802.             type: string
  1803.         - name: file
  1804.           in: formData
  1805.           type: file
  1806.       responses:
  1807.         200:
  1808.           description: Template id and parse result
  1809.           schema:
  1810.             $ref: "#/definitions/TargetStoreResult"
  1811.         400:
  1812.           description: The provided settings where not valid
  1813.           schema:
  1814.             $ref: "#/definitions/ValidationResult"
  1815.  
  1816.   /target/template/generate:
  1817.     post:
  1818.       summary: Generate a target from a csv file
  1819.       consumes:
  1820.        - multipart/form-data
  1821.       operationId: parseTargetFile
  1822.       tags:
  1823.        - Target
  1824.       parameters:
  1825.         - name: type
  1826.           in: query
  1827.           type: string
  1828.         - name: settings
  1829.           description: |
  1830.            The input here is multiple key:value pairs
  1831.  
  1832.             **Common settings:**
  1833.  
  1834.             * header:true/false defines if the file contains header row or not (skips first row) if
  1835.             header is true then the mapping needs to be done with by column header if false then it requires
  1836.             specifying the column index
  1837.             * columnSeparator: for example \t for tab
  1838.             * encoding: java.nio.charset.StandardCharsets Default is UTF-8
  1839.             * fileType: csv
  1840.  
  1841.             For column mapping you can either have the column header name or index (depending on header
  1842.             is true or false), for example
  1843.             **municipalityCode:0** or **municipalityCode:columnHeaderName**
  1844.  
  1845.             ---
  1846.             **For type Street**
  1847.  
  1848.             * municipalityCode:MunicipalityCodeHeaderOrIndex
  1849.             * streetId:StreetIdHeaderOrIndex
  1850.             * houseNumber:HouseNumberHeaderOrIndex
  1851.             * houseLetter:HouseLetterHeaderOrIndex
  1852.             * apartmentId:ApartmentIdHeaderOrIndex
  1853.             ---
  1854.             **For type Matrikkel, this is a mapping of key:value which defines the following**
  1855.  
  1856.             * municipalityCode:MunicipalityCodeHeaderOrIndex
  1857.             * gnr:GnrHeaderOrIndex
  1858.             * bnr:BnrHeaderOrIndex
  1859.             * fnr:FnrHeaderOrIndex
  1860.             * snr:SnrHeaderOrIndex
  1861.             ---
  1862.             **For type Fastighetsnyckel, this is a mapping of key:value which defines the following**
  1863.  
  1864.             * municipalityCode:MunicipalityCodeHeaderOrIndex
  1865.             * metaData.snr:SnrHeaderOrIndex
  1866.             * metaData.houseno:HouseNumberHeaderOrIndex
  1867.             * metaData.letter:HouseLetterHeaderOrIndex
  1868.             * metaData.apartmentId:ApartmentIdHeaderOrIndex
  1869.             ---
  1870.             **For type Riksnyckel, this is a mapping of key:value which defines the following**
  1871.  
  1872.             * metaData.unr:UnrHeaderOrIndex
  1873.             ---
  1874.             **For type Direct, this is a mapping of key:value which defines the following**
  1875.  
  1876.             * name:NameHeaderOrIndex
  1877.             * firstName:firstNameHeaderOrIndex
  1878.             * lastName:lastNameHeaderOrIndex
  1879.             * address:addressHeaderOrIndex
  1880.             * country:countryHeaderOrIndex
  1881.             * language:languageHeaderOrIndex
  1882.  
  1883.             You need to have at least one number/mail here to have a valid record
  1884.             (you can have 0 or more numbers here separated by comma)
  1885.             * sms[]:smsHeaderOrIndex,smsHeaderOrIndex
  1886.             * voice[]:voiceHeaderOrIndex,voiceHeaderOrIndex
  1887.             * mail[]:mailHeaderOrIndex,mailHeaderOrIndex
  1888.             * sds[]:sdsHeaderOrIndex,sdsHeaderOrIndex
  1889.             * dynamic[]:dynamicHeaderOrIndex,dynamicHeaderOrIndex
  1890.             * longitude:longitudeHeaderOrIndex
  1891.             * latitude:latitudeHeaderOrIndex
  1892.           in: query
  1893.           type: array
  1894.           items:
  1895.             type: string
  1896.         - name: file
  1897.           in: formData
  1898.           type: file
  1899.       responses:
  1900.         200:
  1901.           description: Generated target
  1902.           schema:
  1903.             $ref: "#/definitions/TargetParseResult"
  1904.         400:
  1905.           description: Validation of request failed
  1906.           schema:
  1907.             $ref: "#/definitions/ValidationResult"
  1908.  
  1909.   /target/template:
  1910.     get:
  1911.       description: Returns the uploaded target template based on id
  1912.       security: []
  1913.       tags:
  1914.        - Target
  1915.       parameters:
  1916.       - name: templateId
  1917.         description: id of the template to retreive, this would be the one you get back from the store method
  1918.         type: string
  1919.         required: false
  1920.         in: query
  1921.       responses:
  1922.         200:
  1923.           description: The associated template target selection
  1924.           schema:
  1925.             $ref: "#/definitions/TargetSelection"
  1926.  
  1927. # End: target/template/paths.yaml
  1928.  
  1929. # Start: config/paths.yaml
  1930.   /lbas/operators:
  1931.     get:
  1932.       operationId: getLbasOperators
  1933.       tags:
  1934.        - LBAS
  1935.       responses:
  1936.         200:
  1937.           description: Return all registered operators
  1938.           schema:
  1939.             type: array
  1940.             items:
  1941.               $ref: "#/definitions/LbasOperator"
  1942.  
  1943.   /lbas/operator/{operatorId}:
  1944.     post:
  1945.       operationId: addLbasOperator
  1946.       description: Add or replace the operator with the same id.
  1947.       tags:
  1948.        - LBAS
  1949.       parameters:
  1950.         - name: operatorId
  1951.           in: path
  1952.           type: integer
  1953.           format: int32
  1954.           required: true
  1955.           description: The unique id for the operator.
  1956.         - name: name
  1957.           in: formData
  1958.           required: true
  1959.           type: string
  1960.           description: |
  1961.            The name for the operator. This is the name that we can show in the ui to describe this
  1962.             operator.
  1963.           defaultValue: LBAS Connection
  1964.         - name: operatorName
  1965.           in: formData
  1966.           required: true
  1967.           type: string
  1968.           description: |
  1969.            Name of the operator who backs this connection. This is a description field, and does not
  1970.             control any business logic. As such, all values are accepted.
  1971.           defaultValue: Some Operator
  1972.         - name: operatorCountry
  1973.           in: formData
  1974.           required: true
  1975.           type: string
  1976.           defaultValue: no
  1977.           description: |
  1978.                  ISO country for this operator.
  1979.         - name: mode
  1980.           in: formData
  1981.           required: true
  1982.           type: string
  1983.           defaultValue: SIMULATE_ONLY
  1984.           description:
  1985.            The mode that we want for this operator. If set to SIMULATE_ONLY, we will simulate all
  1986.             request, including live ones.
  1987.         - name: url
  1988.           in: formData
  1989.           required: true
  1990.           type: string
  1991.           description: The url to the alertix service, typically http://host:port/ax/alertapi
  1992.         - name: username
  1993.           in: formData
  1994.           required: true
  1995.           type: string
  1996.           defaultValue: username
  1997.           description: The username to use when connecting to alertix
  1998.         - name: password
  1999.           in: formData
  2000.           required: true
  2001.           type: string
  2002.           defaultValue: password
  2003.           description: |
  2004.            The password to use when connectiong to alertix. This field is write only,
  2005.             and will not provide the password back when it's read back from the api.
  2006.         - name: additionalSubscribers
  2007.           in: formData
  2008.           required: false
  2009.           type: array
  2010.           description: |
  2011.            A list of additional subscribers to include in each alert. Each number must be a valid
  2012.             msisdn
  2013.           items:
  2014.             type: string
  2015.         - name: subscriberIncludeList
  2016.           in: formData
  2017.           required: false
  2018.           type: array
  2019.           description: |
  2020.            A list of subscribers to include, which will limit the alert to those subscribers, if they
  2021.             are within the area. This will also affect counts.
  2022.           items:
  2023.             type: string
  2024.       responses:
  2025.         200:
  2026.           description: Operator added
  2027.     delete:
  2028.       operationId: deleteLbasOperator
  2029.       description: Delete an lbas operator
  2030.       tags:
  2031.        - LBAS
  2032.       parameters:
  2033.         - name: operatorId
  2034.           in: path
  2035.           type: integer
  2036.           format: int32
  2037.           required: true
  2038.       responses:
  2039.         200:
  2040.           description: Operator deleted
  2041.   /sds/providers:
  2042.     get:
  2043.       description: Return the list of available SDS Channels
  2044.       operationId: getSdsProviders
  2045.       tags:
  2046.        - SDS
  2047.       responses:
  2048.         200:
  2049.           description: List of all email servers
  2050.           schema:
  2051.             type: array
  2052.             items:
  2053.               $ref: '#/definitions/SdsServerInfo'
  2054.   /sds/callback:
  2055.     post:
  2056.       description: Callback for the SDS channel
  2057.       operationId: updateSdsJobState
  2058.       tags:
  2059.        - SDS
  2060.       parameters:
  2061.         - name: sdsStatuses
  2062.           in: body
  2063.           schema:
  2064.             type: array
  2065.             items:
  2066.               $ref: "#/definitions/SdsStatus"
  2067.       responses:
  2068.         200:
  2069.           description: Response accepted
  2070.  
  2071.   /email/servers:
  2072.     get:
  2073.       description: Return the list of available Email Servers
  2074.       operationId: getEmailServers
  2075.       tags:
  2076.        - EmailServer
  2077.       responses:
  2078.         200:
  2079.           description: List of all email servers
  2080.           schema:
  2081.             type: array
  2082.             items:
  2083.               $ref: '#/definitions/EmailServerInfo'
  2084.     post:
  2085.       description: Add a single email server
  2086.       operationId: addEmailServer
  2087.       parameters:
  2088.         - name: emailServer
  2089.           in: body
  2090.           schema:
  2091.             $ref: "#/definitions/EmailServerInfo"
  2092.       tags:
  2093.        - EmailServer
  2094.       responses:
  2095.         200:
  2096.           description: Email Server created
  2097.  
  2098.   /email/servers/{serverId}:
  2099.     get:
  2100.       description: Return a single email server
  2101.       operationId: getEmailServer
  2102.       tags:
  2103.        - EmailServer
  2104.       parameters:
  2105.         - name: serverId
  2106.           in: path
  2107.           type: string
  2108.           required: true
  2109.  
  2110.       responses:
  2111.         200:
  2112.           description: Matching server
  2113.           schema:
  2114.             $ref: '#/definitions/EmailServerInfo'
  2115.     put:
  2116.       description: Updatge a single email server
  2117.       operationId: updateEmailServer
  2118.       parameters:
  2119.         - name: serverId
  2120.           in: path
  2121.           type: string
  2122.           required: true
  2123.         - name: emailServer
  2124.           in: body
  2125.           schema:
  2126.             $ref: "#/definitions/EmailServerInfo"
  2127.       tags:
  2128.        - EmailServer
  2129.       responses:
  2130.         200:
  2131.           description: Email Server updated
  2132.  
  2133.     delete:
  2134.       description: Delete a single email server
  2135.       operationId: deleteEmailServer
  2136.       parameters:
  2137.         - name: serverId
  2138.           in: path
  2139.           type: string
  2140.           required: true
  2141.       tags:
  2142.        - EmailServer
  2143.       responses:
  2144.         200:
  2145.           description: Email Server deleted
  2146.   /sms/servers:
  2147.     get:
  2148.       description: Return the list of available Sms Servers
  2149.       operationId: getSmsServers
  2150.       tags:
  2151.        - SmsServer
  2152.       responses:
  2153.         200:
  2154.           description: List of all email servers
  2155.           schema:
  2156.             type: array
  2157.             items:
  2158.               $ref: "#/definitions/SmsServerInfo"
  2159.  
  2160.     post:
  2161.       description: Refresh the list of servers
  2162.       operationId: refreshServers
  2163.       tags:
  2164.        - SmsServer
  2165.       responses:
  2166.         200:
  2167.           description: Refresh request sent
  2168.  
  2169.   /sms/keywords:
  2170.     get:
  2171.       operationId: getKeywords
  2172.       tags:
  2173.        - SmsInbound
  2174.       responses:
  2175.         200:
  2176.           description: List of available origin numbers and keywords
  2177.           schema:
  2178.             type: array
  2179.             items:
  2180.               $ref: '#/definitions/SmsAvailableNumber'
  2181.  
  2182.   /sms/inbound:
  2183.     get:
  2184.       operationId: getSmsInboundNumbers
  2185.       tags:
  2186.        - SmsInbound
  2187.       parameters:
  2188.         - name: ownerIds
  2189.           type: array
  2190.           items:
  2191.             type: integer
  2192.             format: int64
  2193.           in: query
  2194.         - name: search
  2195.           description: Search text to be applied to name, address, response and channel address.
  2196.           type: string
  2197.           required: false
  2198.           in: query
  2199.         - name: startPage
  2200.           type: integer
  2201.           format: int32
  2202.           in: query
  2203.           required: true
  2204.           default: 1
  2205.         - name: pageSize
  2206.           type: integer
  2207.           format: int32
  2208.           in: query
  2209.           required: true
  2210.           default: 25
  2211.         - name: sort
  2212.           type: string
  2213.           default: ORG_NAME
  2214.           in: query
  2215.           required: true
  2216.         - name: ascending
  2217.           type: boolean
  2218.           default: true
  2219.           in: query
  2220.       responses:
  2221.         200:
  2222.           description: List of inbound configurations
  2223.           schema:
  2224.             $ref: '#/definitions/SmsInboundNumberResult'
  2225.     post:
  2226.       operationId: createSmsInboundNumber
  2227.       tags:
  2228.        - SmsInbound
  2229.       parameters:
  2230.         - name: smsInbonund
  2231.           schema:
  2232.             $ref: '#/definitions/SmsInboundRecord'
  2233.           in: body
  2234.       responses:
  2235.         200:
  2236.           description: Inbound number created
  2237.           schema:
  2238.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2239.         400:
  2240.           description: Validation errors for the record
  2241.           schema:
  2242.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2243.         406:
  2244.           description: Inbound number already exists.
  2245.           schema:
  2246.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2247.  
  2248.   /sms/inbound/{number}:
  2249.     parameters:
  2250.       - name: number
  2251.         in: path
  2252.         required: true
  2253.         type: string
  2254.     put:
  2255.       operationId: addNumber
  2256.       tags:
  2257.        - SmsInbound
  2258.       parameters:
  2259.         - name: organization
  2260.           in: body
  2261.           schema:
  2262.             $ref: '#/definitions/SmsInboundOrganization'
  2263.       responses:
  2264.         200:
  2265.           description: Inbound number created
  2266.           schema:
  2267.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2268.         400:
  2269.           description: Validation errors for the record
  2270.           schema:
  2271.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2272.         406:
  2273.           description: Inbound number already exists.
  2274.           schema:
  2275.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2276.   /sms/inbound/{number}/{keyword}:
  2277.     parameters:
  2278.       - name: number
  2279.         in: path
  2280.         required: true
  2281.         type: string
  2282.       - name: keyword
  2283.         in: path
  2284.         required: true
  2285.         type: string
  2286.     put:
  2287.       operationId: addKeywordNumber
  2288.       tags:
  2289.        - SmsInbound
  2290.       parameters:
  2291.         - name: organization
  2292.           in: body
  2293.           schema:
  2294.             $ref: '#/definitions/SmsInboundOrganization'
  2295.       responses:
  2296.         200:
  2297.           description: Inbound number created
  2298.           schema:
  2299.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2300.         400:
  2301.           description: Validation errors for the record
  2302.           schema:
  2303.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2304.         406:
  2305.           description: Inbound number already exists.
  2306.           schema:
  2307.             $ref: '#/definitions/SmsInboundRecordSaveResult'
  2308.     delete:
  2309.       operationId: removeNumber
  2310.       tags:
  2311.        - SmsInbound
  2312.       responses:
  2313.         200:
  2314.           description: Organization association removed if it existed.
  2315.   /sms/inbound/{number}/{keyword}/{organizationId}:
  2316.     parameters:
  2317.       - name: number
  2318.         in: path
  2319.         required: true
  2320.         type: string
  2321.       - name: keyword
  2322.         in: path
  2323.         required: true
  2324.         type: string
  2325.       - name: organizationId
  2326.         in: path
  2327.         required: true
  2328.         type: string
  2329.     delete:
  2330.       operationId: removeKeywordNumber
  2331.       tags:
  2332.        - SmsInbound
  2333.       responses:
  2334.         200:
  2335.           description: Organization association removed if it existed.
  2336.  
  2337.   /channelOptions:
  2338.     parameters:
  2339.       - name: organizationId
  2340.         description: >
  2341.          Which organization to get the channel options for. If omitted, it will return the current
  2342.           organizations channel options
  2343.         in: query
  2344.         required: false
  2345.         type: string
  2346.     get:
  2347.       description: >
  2348.        Read the channel options that are currently configured for the provided organization/
  2349.         the user organization. If there is no channel configuration for the given organization, an
  2350.         empty ChannelOptions will be returned
  2351.       operationId: getChannelOptions
  2352.       tags:
  2353.        - ChannelOptions
  2354.       responses:
  2355.         200:
  2356.           description: The current channel options for the organization
  2357.           schema:
  2358.             $ref: "#/definitions/ChannelOptions"
  2359.         403:
  2360.           description: The current user does not have access to the given organization id.
  2361.     put:
  2362.       description: >
  2363.        Update the current organizations channel options. This will replace the current channel
  2364.         options for the organization.
  2365.       operationId: setChannelOptions
  2366.       tags:
  2367.        - ChannelOptions
  2368.       parameters:
  2369.         - name: channelOptions
  2370.           description: >
  2371.            The new channel options to set for the organization
  2372.           in: body
  2373.           required: true
  2374.           schema:
  2375.             $ref: "#/definitions/ChannelOptions"
  2376.       responses:
  2377.         200:
  2378.           description: The current channel options for the organization
  2379.           schema:
  2380.             $ref: "#/definitions/ChannelOptions"
  2381.         403:
  2382.           description: The current user does not have access to the given organization id.
  2383.  
  2384.     delete:
  2385.       description: >
  2386.        Clears the channel options for the organization, returning them to the empty default.
  2387.       operationId: clearChannelOptions
  2388.       tags:
  2389.        - ChannelOptions
  2390.       responses:
  2391.         200:
  2392.           description: The current channel options for the organization
  2393.           schema:
  2394.             $ref: "#/definitions/ChannelOptions"
  2395.         403:
  2396.           description: The current user does not have access to the given organization id.
  2397.  
  2398. # End: config/paths.yaml
  2399.  
  2400. definitions:
  2401. # Start: common/definitions.yaml
  2402.   PropertyMap:
  2403.     type: object
  2404.     additionalProperties:
  2405.       type: string
  2406.  
  2407.   # Start: validation.yaml
  2408.   Validation:
  2409.     type: object
  2410.     properties:
  2411.       description:
  2412.         type: string
  2413.       value:
  2414.         type: string
  2415.       result:
  2416.         type: string
  2417.         enum:
  2418.           - ILLEGAL_VALUE
  2419.            - MISSING_REQUIRED
  2420.            - INVALID_FORMAT
  2421.            - DUPLICATE_VALUE
  2422.  
  2423.   # End: validation.yaml
  2424.  
  2425.   ValidationResult:
  2426.     type: object
  2427.     additionalProperties:
  2428.       $ref: '#/definitions/Validation'
  2429.  
  2430.   ParseResult:
  2431.     type: object
  2432.     properties:
  2433.       fileName:
  2434.         type: string
  2435.       settings:
  2436.         type: array
  2437.         items:
  2438.           type: string
  2439.       type:
  2440.         type: string
  2441.       warnings:
  2442.         type: array
  2443.         items:
  2444.           $ref: '#/definitions/ParseWarning'
  2445.  
  2446.   ParseWarning:
  2447.     type: object
  2448.     properties:
  2449.       sourceRef:
  2450.         type: string
  2451.       warning:
  2452.         type: string
  2453.       sourceData:
  2454.         type: string
  2455.       additionalProperties:
  2456.         type: string
  2457.  
  2458. # End: common/definitions.yaml
  2459. # Start: target/definitions.yaml
  2460.   # Start: TargetSelection.yaml
  2461.  
  2462.   # Start: types/AreaTarget.yaml
  2463.   # Start: AddressTarget.yaml
  2464.   AddressTarget:
  2465.     type: object
  2466.     discriminator: type
  2467.     properties:
  2468.       id:
  2469.         type: string
  2470.         description: Id for this area
  2471.         default: "1"
  2472.       type:
  2473.         type: string
  2474.         description: Discriminator used to distinguish AddressTarget types.
  2475.       name:
  2476.         type: string
  2477.         description: A name for this area
  2478.         default: "Area 1"
  2479.       propertyMatchers:
  2480.         type: array
  2481.         description: list of property matchers that must match for the area search.
  2482.         items:
  2483.           type: object
  2484.           properties:
  2485.             name:
  2486.               type: string
  2487.               description: name of property to match against
  2488.             value:
  2489.               type: string
  2490.               description: Value to match the property against
  2491.       exclusions:
  2492.         type: array
  2493.         description: List of source ids to exclude from the sending
  2494.         items:
  2495.           type: string
  2496.       selections:
  2497.         type: array
  2498.         description: Database selections for this area
  2499.         items:
  2500.           type: object
  2501.           properties:
  2502.             database:
  2503.               type: string
  2504.               description: The database for this selection
  2505.             regions:
  2506.               type: array
  2507.               description: regions to limit this database too, can be empty for entire database
  2508.               items:
  2509.                 type: object
  2510.                 properties:
  2511.                   regionId:
  2512.                     type: string
  2513.                   regionType:
  2514.                     type: string
  2515.                     default: MUNICIPALITY
  2516.             extensions:
  2517.               type: array
  2518.               description: Extensions enabled for this selection
  2519.               items:
  2520.                 type: object
  2521.                 properties:
  2522.                   extension:
  2523.                     type: string
  2524.                     description: name of this extension
  2525.                   settings:
  2526.                     type: object
  2527.                     additionalProperties:
  2528.                       type: string
  2529.             propertyMatchers:
  2530.                   type: array
  2531.                   description: list of property matchers that must match for the selection.
  2532.                   items:
  2533.                     type: object
  2534.                     properties:
  2535.                       name:
  2536.                         type: string
  2537.                         description: name of property to match against
  2538.                       value:
  2539.                         type: string
  2540.                         description: Value to match the property against
  2541.  
  2542.   # End: AddressTarget.yaml
  2543.  
  2544.   AreaTarget:
  2545.     type: object
  2546.     allOf:
  2547.       - $ref: '#/definitions/AddressTarget'
  2548.       - properties:
  2549.           polygons:
  2550.             type: array
  2551.             description: Polgyons to add for this area
  2552.             items:
  2553.               $ref: '#/definitions/AreaPolygon'
  2554.  
  2555.   AreaPolygon:
  2556.     type: object
  2557.     properties:
  2558.       points:
  2559.         type: array
  2560.         items:
  2561.           type: object
  2562.           properties:
  2563.             latitude:
  2564.               type: number
  2565.               format: double
  2566.             longitude:
  2567.               type: number
  2568.               format: double
  2569.  
  2570.   # End: types/AreaTarget.yaml
  2571.   # Start: types/MatrikkelTarget.yaml
  2572.  
  2573.   MatrikkelTarget:
  2574.     type: object
  2575.     allOf:
  2576.       - $ref: '#/definitions/AddressTarget'
  2577.       - properties:
  2578.           matrikkelAddresses:
  2579.             type: array
  2580.             description: Matrikkel addresses to search
  2581.             items:
  2582.               $ref: '#/definitions/MatrikkelAddress'
  2583.  
  2584.   MatrikkelAddress:
  2585.     type: object
  2586.     properties:
  2587.       municipalityCode:
  2588.         type: integer
  2589.         format: int32
  2590.       gnr:
  2591.         type: integer
  2592.         format: int32
  2593.       bnr:
  2594.         type: integer
  2595.         format: int32
  2596.       fnr:
  2597.         type: integer
  2598.         format: int32
  2599.       snr:
  2600.         type: integer
  2601.         format: int32
  2602.  
  2603.   # End: types/MatrikkelTarget.yaml
  2604.   # Start: types/StreetTarget.yaml
  2605.  
  2606.   StreetTarget:
  2607.     type: object
  2608.     allOf:
  2609.       - $ref: '#/definitions/AddressTarget'
  2610.       - properties:
  2611.           streetAddresses:
  2612.             type: array
  2613.             description: Street addresses to search
  2614.             items:
  2615.               $ref: '#/definitions/StreetAddress'
  2616.  
  2617.   StreetAddress:
  2618.     type: object
  2619.     properties:
  2620.       municipalityCode:
  2621.         type: integer
  2622.         format: int32
  2623.       streetId:
  2624.         type: integer
  2625.         format: int32
  2626.       houseNumber:
  2627.         type: integer
  2628.         format: int32
  2629.       houseLetter:
  2630.         type: string
  2631.       apartmentId:
  2632.         type: string
  2633.  
  2634.   # End: types/StreetTarget.yaml
  2635.   # Start: types/AddressSearchTarget.yaml
  2636.  
  2637.   AddressSearchTarget:
  2638.     type: object
  2639.     allOf:
  2640.       - $ref: '#/definitions/AddressTarget'
  2641.       - properties:
  2642.           searchEntries:
  2643.             type: array
  2644.             description: Street addresses to search
  2645.             items:
  2646.               $ref: '#/definitions/AddressSearchEntry'
  2647.  
  2648.   AddressSearchEntry:
  2649.     type: object
  2650.     properties:
  2651.       description:
  2652.         type: string
  2653.         description: Optional description about where this entry came from, is about
  2654.       matchers:
  2655.         type: array
  2656.         items:
  2657.           $ref: '#/definitions/AddressSearchMatcher'
  2658.  
  2659.   AddressSearchMatcher:
  2660.     type: object
  2661.     properties:
  2662.       name:
  2663.         type: string
  2664.         description: Displayname for this matcher, For example gnr or bnr
  2665.       key:
  2666.         type: string
  2667.         description: "The key that we should search for, example: metaData.gnr, metaData.bnr"
  2668.       value:
  2669.         type: string
  2670.         description: The value the key should be matched against.
  2671.  
  2672.  
  2673.   # End: types/AddressSearchTarget.yaml
  2674.   # Start: types/DirectoryTarget.yaml
  2675.   GroupTarget:
  2676.     type: object
  2677.     description: Model to add a single group
  2678.     properties:
  2679.       groupId:
  2680.         description: Id of the group
  2681.         type: string
  2682.       name:
  2683.         type: string
  2684.         description: The name of this group
  2685.         default: Group name
  2686.  
  2687.   PersonTarget:
  2688.     type: object
  2689.     description: Model to add a single person
  2690.     properties:
  2691.       personId:
  2692.         description: Id of the person
  2693.         type: string
  2694.       name:
  2695.         type: string
  2696.         description: The name of this person
  2697.         default: Firstname lastname
  2698.  
  2699.   DirectoryTarget:
  2700.     type: object
  2701.     description: Model to add groups and persons.
  2702.     properties:
  2703.       id:
  2704.         type: string
  2705.         description: Unique id for this directory target within the alert
  2706.         default: directory
  2707.       name:
  2708.         type: string
  2709.         description: The name of this directory target
  2710.         default: Directory target
  2711.       groupIds:
  2712.         type: array
  2713.         items:
  2714.           type: string
  2715.       personIds:
  2716.         type: array
  2717.         items:
  2718.           type: string
  2719.  
  2720.   # End: types/DirectoryTarget.yaml
  2721.   # Start: types/DirectTarget.yaml
  2722.   DirectTarget:
  2723.     type: object
  2724.     description: Model to add a direct target with multiple recipients
  2725.     properties:
  2726.       id:
  2727.         type: string
  2728.         description: Id for this area
  2729.         default: "1"
  2730.       name:
  2731.         type: string
  2732.         description: A name for this area
  2733.         default: "Area 1"
  2734.       recipients:
  2735.         type: array
  2736.         items:
  2737.           $ref: '#/definitions/DirectRecipient'
  2738.  
  2739.   DirectRecipient:
  2740.     type: object
  2741.     description: Single direct target
  2742.     discriminator: type
  2743.     properties:
  2744.       id:
  2745.         type: string
  2746.         description: |
  2747.          An unique id for this target within the array. If null will be the index in the array.
  2748.       type:
  2749.         type: string
  2750.         description: Discriminator used to distinguish DirectRecipient types.
  2751.       name:
  2752.         type: string
  2753.         description: Name for the recipient
  2754.       address:
  2755.         type: string
  2756.         description: Address for the recipient
  2757.       longitude:
  2758.         type: number
  2759.         format: double
  2760.         description: The longitude position for the sender
  2761.       latitude:
  2762.         type: number
  2763.         format: double
  2764.         description: The latitude position for the sender
  2765.       language:
  2766.         type: string
  2767.         description: optional iso 2 letter language code
  2768.       categories:
  2769.         type: array
  2770.         description: list of categories that the recipent is associated with, for example company/private
  2771.         items:
  2772.           type: string
  2773.       channelAddresses:
  2774.         type: array
  2775.         description: addresses for channels that the recipient can be reached at.
  2776.         items:
  2777.           $ref: '#/definitions/TargetChannelAddress'
  2778.       dynamicProperties:
  2779.         type: object
  2780.         description: Additional freeform dynamic propeties for this recipient.
  2781.         additionalProperties:
  2782.           type: string
  2783.  
  2784.   TargetChannelAddress:
  2785.     type: object
  2786.     properties:
  2787.       channelId:
  2788.         type: string
  2789.         description: The id of the channel that the address belongs to.
  2790.       channelAddress:
  2791.         type: string
  2792.         description: The channel address.
  2793.  
  2794.   # End: types/DirectTarget.yaml
  2795.  
  2796.   TargetSelection:
  2797.     type: object
  2798.     properties:
  2799.       areas:
  2800.         type: array
  2801.         items:
  2802.           $ref: "#/definitions/AreaTarget"
  2803.       matrikkels:
  2804.         type: array
  2805.         items:
  2806.           $ref: "#/definitions/MatrikkelTarget"
  2807.       streets:
  2808.         type: array
  2809.         items:
  2810.           $ref: "#/definitions/StreetTarget"
  2811.       addressSearchTargets:
  2812.         type: array
  2813.         items:
  2814.           $ref: "#/definitions/AddressSearchTarget"
  2815.       persons:
  2816.         type: array
  2817.         items:
  2818.           $ref: "#/definitions/PersonTarget"
  2819.       directories:
  2820.         type: array
  2821.         items:
  2822.           $ref: "#/definitions/DirectoryTarget"
  2823.       groups:
  2824.         type: array
  2825.         items:
  2826.           $ref: "#/definitions/GroupTarget"
  2827.       direct:
  2828.         type: array
  2829.         items:
  2830.           $ref: "#/definitions/DirectTarget"
  2831.       channelIds:
  2832.         type: array
  2833.         description: which channel ids to count. Leave empty or null to count all channels.
  2834.         items:
  2835.           type: string
  2836.       channelOptions:
  2837.         description: |
  2838.          Optional options that describes how recipients should be addressed. If missing, all
  2839.           recipients will be sent on all their registered channels.
  2840.         $ref: "#/definitions/ChannelOptions"
  2841.  
  2842.   ChannelOptions:
  2843.     type: object
  2844.     description: |
  2845.      This describes how recipients should be addressed. This is a list of channels in the order they
  2846.       should be selected. Each channel may also have a list of prefix and postfix channels, which
  2847.       can be used to translate numbers from one channel to another. This is really only usefull for
  2848.       voice. By adding sms channel as a prefix or postfix to a voice priority, sms numbers will be
  2849.       attempted before or after voice numbers.
  2850.  
  2851.       If a recipient does not have any of the prioritized channels, we will send to all other channels
  2852.       for that recipient. For example, if we only set **voice** as prioritized, but also include an
  2853.       sms and email channel for a sending, recipients that don't have voice, will receive both sms and
  2854.       email alerts. If a person has voice, sms and email and this case, he will only get the voice
  2855.       message.
  2856.  
  2857.       This means that if the list of priorities is null or empty, then all channels will be included.
  2858.     properties:
  2859.       priorities:
  2860.         type: array
  2861.         description: |
  2862.          Entries of channels in the order they should be prioritized. The first found channel on a
  2863.           recipient is used ahead of the other options.
  2864.         items:
  2865.           $ref: "#/definitions/ChannelPriority"
  2866.  
  2867.   ChannelPriority:
  2868.     type: object
  2869.     description: |
  2870.      Single priority, which describes a channel that should be prioritized.
  2871.     properties:
  2872.       channelId:
  2873.         description: The channel id for this priority
  2874.         type: string
  2875.       prefixAddresses:
  2876.         description: |
  2877.          List of channel ids that we should match this priority for, and add their channel address
  2878.           before the address associated with the channel id for this priority. This can be used to
  2879.           add sms number before voice numbers when calling.
  2880.         type: array
  2881.         items:
  2882.           type: string
  2883.       postFixAddresses:
  2884.         description: |
  2885.          List of channel ids that we should match this priority for, and add their channel address
  2886.           after the address associated with the channel id for this priority. This can be used to
  2887.           add sms number after voice numbers when calling.
  2888.         type: array
  2889.         items:
  2890.           type: string
  2891.  
  2892.   # End: TargetSelection.yaml
  2893.  
  2894.   # Start: TargetResponses.yaml
  2895.   TargetRecipient:
  2896.     type: object
  2897.     description: Single recipient found for a count detail request
  2898.     allOf:
  2899.       - $ref: '#/definitions/DirectRecipient'
  2900.       - properties:
  2901.           targetType:
  2902.             type: string
  2903.             description: Type of target that was the source for this recipiebnt
  2904.           targetId:
  2905.             type: string
  2906.             description: Id of target that was the source for this recipiebnt
  2907.           targetFullId:
  2908.             type: string
  2909.             description: Full id of the target, with type.
  2910.           sourceId:
  2911.             type: string
  2912.             description: The source id for this recipient
  2913.           geohash:
  2914.             type: string
  2915.             description: The geohash string for the recipients position
  2916.  
  2917.   TargetGeoHash:
  2918.     type: object
  2919.     description: Single geohash entry
  2920.     properties:
  2921.       longitude:
  2922.         type: number
  2923.         format: double
  2924.         description: The longitude position for this recipient
  2925.       latitude:
  2926.         type: number
  2927.         format: double
  2928.         description: The latitude position for this recipient
  2929.       geohash:
  2930.         type: string
  2931.         description: The geohash string for the recipients position
  2932.       polygon:
  2933.         $ref: '#/definitions/AreaPolygon'
  2934.       count:
  2935.         type: array
  2936.         items:
  2937.           $ref: '#/definitions/TargetCount'
  2938.  
  2939.   # End: TargetResponses.yaml
  2940.  
  2941.   # Start: importDefinitions.yaml
  2942.   ImportTargetDescriptions:
  2943.     type: object
  2944.     description: |
  2945.      The **ImportTargetTypeDescription** describes the various target types that are supported, and
  2946.       which file types are supported for each of those targets.
  2947.  
  2948.       **FileTypeDescription**
  2949.       This describes the settings for a given filetype, and will also guide the application in how to
  2950.       parse the uploaded file. Each file type description has an id, and a ImportTargetDescription
  2951.       will reference which filetypes are supported.
  2952.  
  2953.       **ImportTargetDescrption**
  2954.       There is an ImportTargetDescrption for each supported Target that can be uploaded.
  2955.     properties:
  2956.       fileTypes:
  2957.         description: List of filetypes that the system supports
  2958.         type: array
  2959.         items:
  2960.           $ref: '#/definitions/FileTypeDescription'
  2961.       importTargets:
  2962.         type: array
  2963.         description: List of import targets that the system supports
  2964.         items:
  2965.           $ref: '#/definitions/ImportTargetDescription'
  2966.  
  2967.   FileTypeDescription:
  2968.     type: object
  2969.     description: |
  2970.      This describes a file type, and the settings required for that filetype.
  2971.     properties:
  2972.       id:
  2973.         description: unique id for this file type.
  2974.         type: string
  2975.       settingFields:
  2976.         type: array
  2977.         description: The list of fields that applies to this file type.
  2978.         items:
  2979.           $ref: '#/definitions/ImportSettingField'
  2980.  
  2981.   ImportTargetDescription:
  2982.     type: object
  2983.     description: |
  2984.      This describes the settings that exists for an import target.
  2985.     properties:
  2986.       type:
  2987.         description: The type for this target
  2988.         type: string
  2989.       supportedFileTypes:
  2990.         description: |
  2991.          List of supported files types for this import target. This is linked to FileTypeDescription
  2992.           ids. So the type represented here will refer to one of the FileTypeDescriptions.
  2993.         type: array
  2994.         items:
  2995.           type: string
  2996.       settingFields:
  2997.         type: array
  2998.         description: The list of fields that applies to this file type.
  2999.         items:
  3000.           $ref: '#/definitions/ImportSettingField'
  3001.  
  3002.   ImportSettingField:
  3003.     type: object
  3004.     description: |
  3005.      A single setting that can be provided for import of the given target. Each setting has a a type
  3006.       described by *ImportSettingFieldType*. The different setting types have different properties
  3007.       that are required.
  3008.  
  3009.       **FIELD_MAPPING**
  3010.       This is used for settings that refer to mapping fields from the source file into a specific
  3011.       field. This will be used in the settings array as <settingsKey>:<sourceField>. Where
  3012.       sourceField refers to a column header or index in the source data file.
  3013.  
  3014.       **ARRAY_FIELD_MAPPING**
  3015.       This is the same as FIELD_MAPPING, except the setting can occur multiple times, and must have
  3016.       the format <settingsKey>[]:<sourceField>. This is for example to support multiple sms fields
  3017.       in an import.
  3018.  
  3019.       **MAP_FIELD_MAPPING**
  3020.       This is used for adding multiple field mappings that are dynamic. This can be used to map fields
  3021.       that don't exist in the system into the system. The resulting setting formats are of the kind
  3022.       <settingsKey>:<targetField>:<sourceField>. Here targetField refers to the dynamic propety that
  3023.       should be written in the final import, while sourceField is the field to read from.
  3024.  
  3025.       **FLAG**
  3026.       This is just for a boolean flag that is enabled or disabled.
  3027.  
  3028.       **SETTING**
  3029.       A setting that applies to the import as a whole, and is not specific to the data imported.
  3030.       Examples include encoding, field separator, country code and so on.
  3031.  
  3032.       **OPTION**
  3033.       A setting that has to be picked from a set of available options. If this is set, then the
  3034.       options array will also be present, and contain valid values.
  3035.     properties:
  3036.       settingsKey:
  3037.         type: string
  3038.         description: The key that this setting will hold in the settings array
  3039.       type:
  3040.         description: The type for this ImportSettingField
  3041.         $ref: '#/definitions/ImportSettingFieldType'
  3042.       options:
  3043.         description: The options for the OPTION type setting.
  3044.         type: array
  3045.         items:
  3046.           type: string
  3047.  
  3048.   ImportSettingFieldType:
  3049.     type: string
  3050.     description: This is an enum of the various settings that exists
  3051.     enum:
  3052.      - SETTING
  3053.       - FIELD_MAPPING
  3054.       - ARRAY_FIELD_MAPPING
  3055.       - MAP_FIELD_MAPPING
  3056.       - FLAG
  3057.       - OPTION
  3058.  
  3059.   PredefinedImportResult:
  3060.     type: object
  3061.     description: Result for fetching a page of predefined imports.
  3062.     properties:
  3063.       total:
  3064.         description: Total number of predefined imports matching the query.
  3065.         type: integer
  3066.         format: int32
  3067.       items:
  3068.         type: array
  3069.         description: List of the predefined imports that was found.
  3070.         items:
  3071.           $ref: '#/definitions/PredefinedImport'
  3072.  
  3073.   PredefinedImport:
  3074.     type: object
  3075.     description: A Predefined import
  3076.     properties:
  3077.       id:
  3078.         type: integer
  3079.         format: int32
  3080.         description: The unique id for this predefined import.
  3081.       name:
  3082.         type: string
  3083.         description: The name for the predefined import
  3084.       description:
  3085.         type: string
  3086.         description: The description for the predefined import
  3087.       properties:
  3088.         type: object
  3089.         description: A set of free form properties for the predefined import.
  3090.         additionalProperties:
  3091.           type: string
  3092.       ownerId:
  3093.         type: string
  3094.         description: The owner organization of the import. This will be set server side automatically.
  3095.       ownerName:
  3096.         type: string
  3097.         description: The name of the owning organization
  3098.       visibleToChildren:
  3099.         type: boolean
  3100.         description: Is visible only to owner if false
  3101.       created:
  3102.         type: string
  3103.         format: date-time
  3104.         description: When this PredefinedImport was created
  3105.       modified:
  3106.         type: string
  3107.         format: date-time
  3108.         description: When this PredefinedImport was last modified
  3109.       type:
  3110.         description: This is the type of target that this import supports
  3111.         type: string
  3112.       settings:
  3113.         description: |
  3114.          This is the list of settings to pass on to the parser when importing a file. This will
  3115.           be generated server side based on the setting values.
  3116.         type: array
  3117.         items:
  3118.           type: string
  3119.       targetSettings:
  3120.         type: object
  3121.         description: Map of settings that apply to the target.
  3122.         additionalProperties:
  3123.           $ref: '#/definitions/PredefinedImportSetting'
  3124.       fileSettings:
  3125.         type: object
  3126.         description: Map of settings that apply to the file
  3127.         additionalProperties:
  3128.           $ref: '#/definitions/PredefinedImportSetting'
  3129.  
  3130.   PredefinedImportSetting:
  3131.     type: object
  3132.     description: |
  3133.      A single predefined seting for a Predefined import. These need to refer to an ImportSettingField
  3134.       from a ImportTargetDescription or FileTypeDescription. Depending on the type of field, one of
  3135.       the value fields will be set.
  3136.     properties:
  3137.       flagValue:
  3138.         type: boolean
  3139.         description: If this is a FLAG, then this will contain the flag value
  3140.       arrayValue:
  3141.         type: array
  3142.         description: |
  3143.          If this is a ARRAY_FIELD_MAPPING, then this will contain the list of columns to map
  3144.         items:
  3145.           type: string
  3146.       mapValue:
  3147.         type: object
  3148.         description: |
  3149.          If this is a MAP_FIELD_MAPPING, then this will contain the map of settings
  3150.         additionalProperties:
  3151.           type: string
  3152.       stringValue:
  3153.         type: string
  3154.         description: |
  3155.          If this is a SETTING or FIELD_MAPPING, this will contain the string value to use.
  3156.       type:
  3157.         description: |
  3158.          The type for this ImportSettingField. This will be provided by the server, but is
  3159.           ignored when sent from the client.
  3160.         $ref: '#/definitions/ImportSettingFieldType'
  3161.  
  3162.  
  3163.  
  3164.   # End: importDefinitions.yaml
  3165.  
  3166.   # Start: template/definitions.yaml
  3167.   TargetParseResult:
  3168.     type: object
  3169.     properties:
  3170.       target:
  3171.         $ref: "#/definitions/TargetSelection"
  3172.       parseResult:
  3173.         $ref: '#/definitions/ParseResult'
  3174.  
  3175.   TargetStoreResult:
  3176.     type: object
  3177.     properties:
  3178.       templateId:
  3179.         type: string
  3180.       parseResult:
  3181.         $ref: '#/definitions/ParseResult'
  3182.  
  3183.   # End: template/definitions.yaml
  3184.  
  3185. # End: target/definitions.yaml
  3186. # Start: target/counts.yaml
  3187.   TargetCountReport:
  3188.     type: object
  3189.     properties:
  3190.       targetId:
  3191.         type: string
  3192.       targetType:
  3193.         type: string
  3194.       targetFullId:
  3195.         type: string
  3196.       count:
  3197.         type: array
  3198.         items:
  3199.           $ref: '#/definitions/TargetCount'
  3200.  
  3201.   TargetCount:
  3202.     type: object
  3203.     properties:
  3204.       channelId:
  3205.         type: string
  3206.       qualifier:
  3207.         type: string
  3208.       count:
  3209.         type: integer
  3210.         format: int32
  3211.  
  3212.  
  3213.   TargetCountSummary:
  3214.       type: object
  3215.       properties:
  3216.         targetType:
  3217.           type: string
  3218.         count:
  3219.           type: array
  3220.           items:
  3221.             $ref: '#/definitions/TargetCount'
  3222.  
  3223. # End: target/counts.yaml
  3224. # Start: alert/channels.yaml
  3225.   VoiceChannel:
  3226.     type: object
  3227.     properties:
  3228.       config:
  3229.         type: object
  3230.         properties:
  3231.           locationId:
  3232.             type: integer
  3233.             format: int32
  3234.           priority:
  3235.             type: integer
  3236.             format: int32
  3237.             default: 5
  3238.           outboundLines:
  3239.             type: integer
  3240.             format: int32
  3241.             default: 50
  3242.           retryIntervalMinutes:
  3243.             type: integer
  3244.             format: int32
  3245.             default: 30
  3246.           retries:
  3247.             type: integer
  3248.             format: int32
  3249.             default: 3
  3250.           cancelAfterHours:
  3251.             type: integer
  3252.             format: int32
  3253.             default: 72
  3254.           pauseFrom:
  3255.             type: string
  3256.             description: "When pauses should start, in the format HH:mm (24hr)"
  3257.             default: "22:00"
  3258.           pauseDurationMinutes:
  3259.             description: "Duration of pauses from pauseFrom, in minutes. 480 is 8 hours."
  3260.             type: integer
  3261.             format: int32
  3262.             default: 480
  3263.           origin:
  3264.             type: string
  3265.             description: "What number to call from."
  3266.           validHours:
  3267.             type: integer
  3268.             format: int32
  3269.             default: 24
  3270.       message:
  3271.         $ref: '#/definitions/VoiceMessage'
  3272.       categories:
  3273.         type: array
  3274.         description: |
  3275.          List of categories to limit the recipients to, or
  3276.           null/empty to allow all categories
  3277.         items:
  3278.           type: string
  3279.  
  3280.   VoiceMessage:
  3281.     type: object
  3282.     properties:
  3283.       callFlowYaml:
  3284.         type: string
  3285.         description: The Callflow as a YAML string.
  3286.       audioReferences:
  3287.         type: array
  3288.         items:
  3289.           $ref: '#/definitions/AudioReference'
  3290.  
  3291.   AudioReference:
  3292.     type: object
  3293.     properties:
  3294.       url:
  3295.         type: string
  3296.         description: Location for where the corresponding audio file could be found
  3297.       name:
  3298.         type: string
  3299.         description: Name for the audio, either filename, or other descriptive name.
  3300.       parameter:
  3301.         type: string
  3302.         description: Which parameter slot in the callflow this should fill.
  3303.  
  3304.   SmsChannel:
  3305.     type: object
  3306.     properties:
  3307.       config:
  3308.         type: object
  3309.         properties:
  3310.           smsServerId:
  3311.             type: integer
  3312.             format: int32
  3313.             default: -1
  3314.           priority:
  3315.             type: integer
  3316.             format: int32
  3317.             default: 7
  3318.             description: Priority for this sending, lower values means higher priority
  3319.           validHours:
  3320.             type: integer
  3321.             format: int32
  3322.             default: 48
  3323.             description: How many hours should the sending be valid, up to a max of 1 week
  3324.           keywordValidHours:
  3325.             type: integer
  3326.             format: int32
  3327.             default: 48
  3328.             description: How many hours should the keyword be valid for, defaults to validHours.
  3329.       messages:
  3330.         type: array
  3331.         items:
  3332.           $ref: '#/definitions/SmsMessage'
  3333.       categories:
  3334.         type: array
  3335.         description: |
  3336.          List of categories to limit the recipients to, or
  3337.           null/empty to allow all categories
  3338.         items:
  3339.           type: string
  3340.  
  3341.   SmsKeyword:
  3342.     type: object
  3343.     properties:
  3344.       alternatives:
  3345.         type: array
  3346.         items:
  3347.           type: string
  3348.       errorsAllowed:
  3349.         type: integer
  3350.         format: int32
  3351.   SmsReply:
  3352.     type: object
  3353.     properties:
  3354.       replyType:
  3355.         type: string
  3356.         enum:
  3357.          - FREEFORM
  3358.           - OPTION
  3359.       keyword:
  3360.         $ref: '#/definitions/SmsKeyword'
  3361.       options:
  3362.         type: array
  3363.         items:
  3364.           type: object
  3365.           properties:
  3366.             keyword:
  3367.               $ref: '#/definitions/SmsKeyword'
  3368.             response:
  3369.               $ref: '#/definitions/PropertyMap'
  3370.  
  3371.   SmsMessage:
  3372.     type: object
  3373.     properties:
  3374.       message:
  3375.         type: string
  3376.         default: Sample SMS Message
  3377.       language:
  3378.         type: string
  3379.         description: iso language for the message
  3380.         default: en
  3381.       origin:
  3382.         type: string
  3383.         description: origin number/alphanumeric to use in the sms
  3384.         default: UMS
  3385.       reply:
  3386.         $ref: '#/definitions/SmsReply'
  3387.  
  3388.   SdsChannel:
  3389.     type: object
  3390.     properties:
  3391.       sdsServerId:
  3392.         type: string
  3393.       messages:
  3394.         type: array
  3395.         items:
  3396.           $ref: '#/definitions/SdsMessage'
  3397.       categories:
  3398.         type: array
  3399.         description: |
  3400.          List of categories to limit the recipients to, or
  3401.           null/empty to allow all categories
  3402.         items:
  3403.           type: string
  3404.  
  3405.   SdsMessage:
  3406.     type: object
  3407.     properties:
  3408.       message:
  3409.         type: string
  3410.         default: Sample SMS Message
  3411.       language:
  3412.         type: string
  3413.         description: iso language for the message
  3414.         default: en
  3415.       displayMode:
  3416.         type: string
  3417.         enum:
  3418.         - NORMAL
  3419.          - SILENT
  3420.          - FLASH
  3421.  
  3422.   EmailChannel:
  3423.     type: object
  3424.     properties:
  3425.       emailServerId:
  3426.         type: string
  3427.         description: The email server id to use. Prefer this over connection
  3428.       emailConnection:
  3429.         $ref: '#/definitions/EmailConnection'
  3430.       fromName:
  3431.         type: string
  3432.         description: The name of the sender
  3433.         default: Heimdall Alert
  3434.       fromEmail:
  3435.         type: string
  3436.         description: The email address to mark this mail as sent from
  3437.         default: alert@ums.no
  3438.       messages:
  3439.         type: array
  3440.         items:
  3441.           $ref: '#/definitions/EmailMessage'
  3442.       categories:
  3443.         type: array
  3444.         description: |
  3445.          List of categories to limit the recipients to, or
  3446.           null/empty to allow all categories
  3447.         items:
  3448.           type: string
  3449.  
  3450.   # Start: emailConnection.yaml
  3451.   EmailConnection:
  3452.     type: object
  3453.     properties:
  3454.       host:
  3455.         type: string
  3456.         description: The host server to connect to for email sending
  3457.       port:
  3458.         type: integer
  3459.         format: int32
  3460.         description: The port to connect to on the server
  3461.         default: 25
  3462.       username:
  3463.         type: string
  3464.         description: The username to connect to the SMTP server
  3465.       password:
  3466.         type: string
  3467.         description: The password for the SMTP server to connect to
  3468.       ssl:
  3469.         type: boolean
  3470.         description: If an ssl connection should be used
  3471.         default: false
  3472.  
  3473.   # End: emailConnection.yaml
  3474.  
  3475.   EmailMessage:
  3476.     type: object
  3477.     properties:
  3478.       subject:
  3479.         type: string
  3480.         default: Message from UMS
  3481.         description: The subject to use for the email
  3482.       body:
  3483.         type: string
  3484.         default: Hello from UMS Alert
  3485.         description: The complete email body to use for the email
  3486.       bodyOnly:
  3487.         type: string
  3488.         default: Message body only
  3489.         description: |
  3490.          The body separate from header and footer to use for the email,
  3491.           combine this with bodyHeader and bodyFooter to get the complete e-mail
  3492.       bodyHeader:
  3493.         type: string
  3494.         default: Message body header
  3495.         description: Gets prepended to the body message
  3496.       bodyFooter:
  3497.         type: string
  3498.         default: Message body footer
  3499.         description: Gets apended to the body message
  3500.       language:
  3501.         type: string
  3502.         default: en
  3503.         description: |
  3504.          The language for this email message, in case multiple messages are provided in
  3505.           different languages. Based on the preferred language of the recipient, the
  3506.           corresponding email message will be used. If there is no match, the first message
  3507.           for an EmailChannel will be used.
  3508.  
  3509.  
  3510.   LbasChannel:
  3511.     type: object
  3512.     properties:
  3513.       lbasOperatorId:
  3514.         type: integer
  3515.         format: int32
  3516.         default: -1
  3517.         description: |
  3518.          Legacy property, ignored. This used to store the lbas operator id used for sending, but
  3519.           this has been moved to the organization configuration. As such, this property will be
  3520.           ignored, and will always return -1 from the server. The actual lbas operator id is looked
  3521.           up from the organization of the alert composer.
  3522.       defaultMessage:
  3523.         $ref: '#/definitions/SmsMessage'
  3524.       durationHours:
  3525.         type: integer
  3526.         format: int32
  3527.         default: 72
  3528.         description: Number of hours the sending should be valid.
  3529.       priority:
  3530.         type: integer
  3531.         format: int32
  3532.         default: 7
  3533.         description: Priority for this sending, lower values means higher priority
  3534.       countryCodeMessages:
  3535.         type: array
  3536.         description: Additional messages specific to the subscribers country
  3537.         items:
  3538.           type: object
  3539.           properties:
  3540.             countryCode:
  3541.               type: string
  3542.               default: no
  3543.               description: 2 letter iso country code.
  3544.             message:
  3545.               $ref: '#/definitions/SmsMessage'
  3546.  
  3547.   WebChannel:
  3548.     type: object
  3549.     discriminator: type
  3550.     properties:
  3551.       type:
  3552.         type: string
  3553.         description: Discriminator used to distinguish web channel types.
  3554.       targets:
  3555.         type: array
  3556.         description: Url that the CAP alert should be POSTed to
  3557.         items:
  3558.           type: string
  3559.           default: http://requestb.in/wgsl5fwg
  3560.       message:
  3561.         type: object
  3562.         properties:
  3563.           headline:
  3564.             type: string
  3565.             default: "Cap Alert"
  3566.           message:
  3567.             type: string
  3568.             default: "Cap Message"
  3569.       capConfig:
  3570.         type: object
  3571.         description: Sets the various properties on the cap alert.
  3572.         properties:
  3573.           status:
  3574.             type: string
  3575.             description: "Value for the cap field status"
  3576.             default: "Actual"
  3577.           msgType:
  3578.             type: string
  3579.             description: "Value for the cap field msgType"
  3580.             default: "Alert"
  3581.           scope:
  3582.             type: string
  3583.             description: "Value for the cap field scope"
  3584.             default: "Public"
  3585.           category:
  3586.             type: string
  3587.             description: "Value for the cap field category"
  3588.             default: "Other"
  3589.           urgency:
  3590.             type: string
  3591.             description: "Value for the cap field urgency"
  3592.             default: "Unknown"
  3593.           certainty:
  3594.             type: string
  3595.             description: "Value for the cap field certainty"
  3596.             default: "Observed"
  3597.           severity:
  3598.             type: string
  3599.             description: "Value for the cap field severity"
  3600.             default: "Unknown"
  3601.           language:
  3602.             type: string
  3603.             description: "Value for the cap field language"
  3604.             default: "en-US"
  3605.           expiryHours:
  3606.             type: integer
  3607.             format: int32
  3608.             description: How long after the send time should the expiry be set
  3609.             default: 72
  3610.  
  3611.   WebChannelStatus:
  3612.       type: object
  3613.       allOf:
  3614.         - $ref: '#/definitions/WebChannel'
  3615.         - properties:
  3616.             capXml:
  3617.               type: string
  3618.  
  3619.   SmartphoneSendingSummary:
  3620.     type: object
  3621.     allOf:
  3622.       - $ref: "#/definitions/SmartphoneChannel"
  3623.       - properties:
  3624.           refno:
  3625.             type: integer
  3626.           submittedTime:
  3627.             type: string
  3628.             format: date-time
  3629.  
  3630.   SmartphoneChannel:
  3631.     type: object
  3632.     discriminator: type
  3633.     properties:
  3634.       type:
  3635.         type: string
  3636.         description: Discriminator used to distinguish SmartphoneChannel types.
  3637.       deliveryMode:
  3638.         type: string
  3639.         description: How this message should be delivered.
  3640.         enum:
  3641.          - FORCE
  3642.           - LOCATION
  3643.           - COUNT
  3644.       expireAfterHours:
  3645.         type: integer
  3646.         format: int32
  3647.         default: 72
  3648.         description: How long after sending should the alert expire.
  3649.       locationBased:
  3650.         type: boolean
  3651.         description: If this should be a location based sending
  3652.         default: true
  3653.       addressBased:
  3654.         type: boolean
  3655.         description: If this should be a location based sending
  3656.         default: false
  3657.       appId:
  3658.         type: string
  3659.         description: The app id to use.
  3660.       message:
  3661.         type: object
  3662.         properties:
  3663.           subject:
  3664.             type: string
  3665.             default: Smartphone message subject
  3666.           body:
  3667.             type: string
  3668.             default: Smartphone message body
  3669.           attachments:
  3670.             type: array
  3671.             description: list of urls to provide as attachments.
  3672.             items:
  3673.               $ref: '#/definitions/Attachment'
  3674.       responseConfig:
  3675.         type: object
  3676.         description: configures how responses should be handled.
  3677.         properties:
  3678.           responseUrl:
  3679.             type: string
  3680.             description: The url that responses should be posted to.
  3681.           responseType:
  3682.             type: string
  3683.             enum:
  3684.              - NONE
  3685.               - FREE
  3686.               - ALTERNATIVES
  3687.           responseOptions:
  3688.             type: array
  3689.             description: list of options that the user can pick for alternatives options.
  3690.             items:
  3691.               type: object
  3692.               properties:
  3693.                 key:
  3694.                   type: string
  3695.                   description: The key to report back when this option is selected
  3696.                 name:
  3697.                   type: string
  3698.                   description: The display name to show to the recipient for this option.
  3699.  
  3700.   TwitterChannel:
  3701.     type: object
  3702.     properties:
  3703.       consumerKey:
  3704.         type: string
  3705.       consumerSecret:
  3706.         type: string
  3707.       accessToken:
  3708.         type: string
  3709.       accessTokenSecret:
  3710.         type: string
  3711.       status:
  3712.         type: string
  3713.       attachment:
  3714.         $ref: '#/definitions/Attachment'
  3715.  
  3716.   FacebookChannel:
  3717.     type: object
  3718.     properties:
  3719.       appId:
  3720.         type: string
  3721.         default: appId
  3722.         description: The ID of the facebook app
  3723.       appSecret:
  3724.         type: string
  3725.         default: appSecret
  3726.         description: The app secret key from Facebook
  3727.       accessToken:
  3728.         type: string
  3729.         default: accessToken
  3730.         description: The facebook user's access token
  3731.       pageId:
  3732.         type: string
  3733.         default: pageId
  3734.         description: The ID of the page we will post to on Facebook
  3735.       post:
  3736.         type: string
  3737.         default: Facebook post
  3738.         description: The message to post to facebook
  3739.       attachment:
  3740.         type: object
  3741.         description: Optional attachment for the post
  3742.         properties:
  3743.           link:
  3744.             type: string
  3745.           picture:
  3746.             type: string
  3747.             description: Optional url for a picture for this attachment.
  3748.           name:
  3749.             type: string
  3750.             description: Optional name for this link
  3751.           caption:
  3752.             type: string
  3753.             description: Optional caption for the link
  3754.           description:
  3755.             type: string
  3756.             description: Optional description for the link
  3757.  
  3758.   Attachment:
  3759.     type: object
  3760.     properties:
  3761.       name:
  3762.         type: string
  3763.       url:
  3764.         type: string
  3765.       mediaType:
  3766.         type: string
  3767.  
  3768.   AlertItemState:
  3769.     type: string
  3770.     enum:
  3771.      - DELIVERED
  3772.       - IN_PROGRESS
  3773.       - FAILED
  3774.       - NOT_CONFIRMED
  3775.       - DUPLICATE
  3776.       - IGNORED
  3777.       - CANCELLED
  3778.  
  3779.   # Start: ChannelId.yaml
  3780.   ChannelId:
  3781.     type: string
  3782.     enum:
  3783.      - VOICE
  3784.       - SMS
  3785.       - LBAS
  3786.       - EMAIL
  3787.       - FACEBOOK
  3788.       - TWITTER
  3789.       - SMARTPHONE
  3790.       - WEB
  3791.       - SDS
  3792.  
  3793.   # End: ChannelId.yaml
  3794.  
  3795. # End: alert/channels.yaml
  3796. # Start: alert/response/definitions.yaml
  3797.   SmsResponse:
  3798.     type: object
  3799.     properties:
  3800.       fromNumber:
  3801.         type: string
  3802.       toNumber:
  3803.         type: string
  3804.       message:
  3805.         type: string
  3806.       timeStamp:
  3807.         type: integer
  3808.         format: int64
  3809.       messageId:
  3810.         type: integer
  3811.         format: int64
  3812.       opeartor:
  3813.         type: string
  3814.       operatorReference:
  3815.         type: string
  3816.  
  3817.   SmsRegistration:
  3818.     type: object
  3819.     properties:
  3820.       refno:
  3821.         type: integer
  3822.       itemId:
  3823.         type: integer
  3824.         format: int64
  3825.  
  3826.   SmartphoneDeliveryValues:
  3827.     type: string
  3828.     enum:
  3829.      - DELIVERED
  3830.       - FAILED
  3831.  
  3832. # End: alert/response/definitions.yaml
  3833.  
  3834. # Start: config/definitions.yaml
  3835.   SmsServerInfo:
  3836.     type: object
  3837.     properties:
  3838.       serverId:
  3839.         type: integer
  3840.         format: int32
  3841.       description:
  3842.         type: string
  3843.       unicodeSupported:
  3844.         type: boolean
  3845.       flashSupported:
  3846.         type: boolean
  3847.       created:
  3848.         type: string
  3849.         format: date-time
  3850.  
  3851.   SmsInboundNumberResult:
  3852.     type: object
  3853.     properties:
  3854.       count:
  3855.         type: integer
  3856.         format: int32
  3857.       items:
  3858.         type: array
  3859.         items:
  3860.           $ref: '#/definitions/SmsInboundNumber'
  3861.  
  3862.   SmsInboundNumber:
  3863.     type: object
  3864.     properties:
  3865.       number:
  3866.         type: string
  3867.       keyword:
  3868.         type: string
  3869.       organizations:
  3870.         type: array
  3871.         items:
  3872.           $ref: '#/definitions/SmsInboundOrganization'
  3873.       lastModified:
  3874.         type: string
  3875.         format: date-time
  3876.       created:
  3877.         type: string
  3878.         format: date-time
  3879.  
  3880.   SmsInboundNumberSort:
  3881.     type: string
  3882.     enum:
  3883.      - ORG_NAME
  3884.       - NUMBER
  3885.       - LAST_MODIFIED
  3886.  
  3887.   SmsInboundOrganization:
  3888.     type: object
  3889.     discriminator: type
  3890.     properties:
  3891.       organizationId:
  3892.         type: string
  3893.       organizationName:
  3894.         type: string
  3895.       organizationPath:
  3896.         type: array
  3897.         items:
  3898.           type: string
  3899.       type:
  3900.         type: string
  3901.         description: Discriminator used to distinguish SmsInbountOrganization types.
  3902.  
  3903.  
  3904.   SmsInboundRecord:
  3905.     allOf:
  3906.       - $ref: "#/definitions/SmsInboundOrganization"
  3907.       - properties:
  3908.           number:
  3909.             type: string
  3910.           keyword:
  3911.             type: string
  3912.  
  3913.   SmsInboundRecordSaveResult:
  3914.     type: object
  3915.     properties:
  3916.       saved:
  3917.         type: boolean
  3918.       errors:
  3919.         $ref: '#/definitions/SmsInboundRecordValidationResult'
  3920.  
  3921.   SmsInboundRecordValidationResult:
  3922.     type: object
  3923.     properties:
  3924.       number:
  3925.         $ref: '#/definitions/Validation'
  3926.       keyword:
  3927.         $ref: '#/definitions/Validation'
  3928.       organizationId:
  3929.         $ref: '#/definitions/Validation'
  3930.  
  3931.   SmsAvailableNumber:
  3932.     type: object
  3933.     properties:
  3934.       number:
  3935.         type: string
  3936.       keywords:
  3937.         type: array
  3938.         items:
  3939.           $ref: "#/definitions/SmsAvailableKeyword"
  3940.  
  3941.   SmsAvailableKeyword:
  3942.     type: object
  3943.     description: |
  3944.      When a keyword has been reserved, instead of reusing that keyword, the sender will have to
  3945.       use a different keyword. The keyword returned here in the keyword attribute, is the keyword
  3946.       that should be used. The aliasFor describes the keyword that is originally stored. If the
  3947.       keyword was not reserved, the keyword and aliasFor are the same.
  3948.     properties:
  3949.       keyword:
  3950.         type: string
  3951.       aliasFor:
  3952.         type: string
  3953.       lastRefno:
  3954.         description: The alert where this keyword was used
  3955.         type: integer
  3956.         format: int32
  3957.       lastName:
  3958.         description: The name of the alert where this keyword was used
  3959.         type: string
  3960.       reservation:
  3961.         description: When the keyword was last reserved
  3962.         type: string
  3963.         format: date-time
  3964.       expire:
  3965.         description: When the keyword reservation will end
  3966.         type: string
  3967.         format: date-time
  3968.  
  3969.   SdsServerInfo:
  3970.     type: object
  3971.     properties:
  3972.       id:
  3973.         type: string
  3974.       name:
  3975.         type: string
  3976.       country:
  3977.         type: string
  3978.       numberFormats:
  3979.         type: array
  3980.         items:
  3981.           type: string
  3982.  
  3983.   SdsStatus:
  3984.     type: object
  3985.     properties:
  3986.       jobId:
  3987.         type: object
  3988.         properties:
  3989.           value:
  3990.             type: string
  3991.       subscriberAddress:
  3992.         type: object
  3993.         properties:
  3994.           addressType:
  3995.             type: string
  3996.           value:
  3997.             type: string
  3998.       timestamp:
  3999.         type: string
  4000.         format: date-time
  4001.       subscriberStatus:
  4002.         type: string
  4003.  
  4004.   EmailServerInfo:
  4005.     type: object
  4006.     properties:
  4007.       id:
  4008.         type: string
  4009.       name:
  4010.         type: string
  4011.       bodyHeader:
  4012.         type: string
  4013.       bodyFooter:
  4014.         type: string
  4015.       emailConnection:
  4016.         $ref: '#/definitions/EmailConnection'
  4017.  
  4018.   LbasOperator:
  4019.     type: object
  4020.     description: |
  4021.      The configuration for a single lbas operator. An operator can be set in a simulate only mode
  4022.       to force all sendings sent with that operator to be only simulation sendings. There is also
  4023.       an option to add additional subscribers, which will always be alerted for all alerts sent using
  4024.       this operator. Finally, it is possible to configure a subscribeIncludeList, which will filter
  4025.       all sendings to only send to those given numbers. This can help in live testing by limiting who
  4026.       we actually send to.
  4027.     properties:
  4028.       id:
  4029.         type: integer
  4030.         format: int32
  4031.         description: The unique id for the operator.
  4032.       name:
  4033.         type: string
  4034.         description: |
  4035.          The name for the operator. This is the name that we can show in the ui to describe this
  4036.           operator.
  4037.       operatorName:
  4038.         type: string
  4039.         description: |
  4040.          Name of the operator who backs this connection. This is a description field, and does not
  4041.           control any business logic. As such, all values are accepted.
  4042.       operatorCountry:
  4043.         type: string
  4044.         description: |
  4045.          ISO country for this operator.
  4046.       mode:
  4047.         $ref: '#/definitions/LbasOperatorMode'
  4048.         description:
  4049.          The mode that we want for this operator. If set to SIMULATE_ONLY, we will simulate all
  4050.           request, including live ones.
  4051.       url:
  4052.         type: string
  4053.         description: The url to the alertix service, typically http://host:port/ax/alertapi
  4054.       username:
  4055.         type: string
  4056.         description: The username to use when connecting to alertix
  4057.       password:
  4058.         type: string
  4059.         description: |
  4060.          The password to use when connectiong to alertix. This field is write only,
  4061.           and will not provide the password back when it's read back from the api.
  4062.       additionalSubscribers:
  4063.         type: array
  4064.         description: |
  4065.          A list of additional subscribers to include in each alert. Each number must be a valid
  4066.           msisdn
  4067.         items:
  4068.           type: string
  4069.       subscriberIncludeList:
  4070.         type: array
  4071.         description: |
  4072.          A list of subscribers to include, which will limit the alert to those subscribers, if they
  4073.           are within the area. This will also affect counts.
  4074.         items:
  4075.           type: string
  4076.  
  4077.   LbasOperatorMode:
  4078.     type: string
  4079.     description: |
  4080.      Mode for lbas operator.
  4081.  
  4082.       * __PASSTHROUGH__ Means that the mode will be passed on to Alertix, Live sendings will go live
  4083.       * __SIMULATE_ONLY__ All sendings will be simulated, including live sendings.
  4084.     enum:
  4085.      - PASSTHROUGH
  4086.       - SIMULATE_ONLY
  4087.  
  4088. # End: config/definitions.yaml
  4089. # Start: alert/definitions.yaml
  4090.   ResponseDetail:
  4091.     type: object
  4092.     description: details about an alert response
  4093.     properties:
  4094.       responseId:
  4095.         type: string
  4096.         description: Unique id for the response.
  4097.       receivedFrom:
  4098.         type: string
  4099.         description: The address that we received the response on.
  4100.       receivedOn:
  4101.         type: string
  4102.         description: The address that we received the response on.
  4103.       sender:
  4104.         type: object
  4105.         description: The person that sent the alert, if details exist
  4106.         properties:
  4107.           name:
  4108.             type: string
  4109.           address:
  4110.             description: postal address for the sender
  4111.             type: string
  4112.           longitude:
  4113.             type: number
  4114.             format: double
  4115.             description: The longitude position for the sender
  4116.           latitude:
  4117.             type: number
  4118.             format: double
  4119.             description: The latitude position for the sender
  4120.       response:
  4121.         type: object
  4122.         properties:
  4123.           type:
  4124.             type: string
  4125.             enum:
  4126.              - FREEFORM
  4127.               - ALTERNATIVE
  4128.           body:
  4129.             type: string
  4130.             description: For freeform only, the body text for the sending
  4131.           attachments:
  4132.             type: array
  4133.             description: For freeform only, optional list of attachments
  4134.             items:
  4135.               $ref: '#/definitions/Attachment'
  4136.           responseAlternatives:
  4137.             type: array
  4138.             description: For alternative only, the various options selected
  4139.             items:
  4140.               type: object
  4141.               properties:
  4142.                 name:
  4143.                   description: the name of the property
  4144.                   type: string
  4145.                 value:
  4146.                   description: the value for the response.
  4147.                   type: string
  4148.  
  4149.   AlertStatusCount:
  4150.     type: object
  4151.     description: Status counts for a single alert
  4152.     properties:
  4153.       counts:
  4154.         type: array
  4155.         items:
  4156.           type: object
  4157.           properties:
  4158.             channelId:
  4159.               type: string
  4160.             reason:
  4161.               type: string
  4162.               description: |
  4163.                For certain item states, there is also an attached reason, which explains why an
  4164.                 item was ignored/failed/cancelled.
  4165.             itemState:
  4166.               type: string
  4167.               enum:
  4168.                - IGNORED
  4169.                 - DUPLICATE
  4170.                 - IN_PROGRESS
  4171.                 - NOT_CONFIRMED
  4172.                 - CANCELLED
  4173.                 - FAILED
  4174.                 - DELIVERED
  4175.             count:
  4176.               type: integer
  4177.               format: int32
  4178.             durationMs:
  4179.               type: integer
  4180.               format: int64
  4181.  
  4182.   AlertResponseCount:
  4183.     type: object
  4184.     description: Response counts for a single alert
  4185.     properties:
  4186.       total:
  4187.         type: integer
  4188.         format: int32
  4189.         description: Total response count for the alert.
  4190.       counts:
  4191.         type: array
  4192.         items:
  4193.           type: object
  4194.           properties:
  4195.             channelId:
  4196.               type: string
  4197.               description: The channel that the response count is for.
  4198.             responseType:
  4199.               type: string
  4200.               description: |
  4201.                Type of response. If freeform, response option and value will be null,
  4202.                 otherwise there will be a response option and value, and the count for that.
  4203.               enum:
  4204.                - FREEFORM
  4205.                 - ALTERNATIVE
  4206.             responseOption:
  4207.               type: string
  4208.               description: For ALTERNATIVE response type, this is the option we are counting.
  4209.             responseValue:
  4210.               type: string
  4211.               description: For ALTERNATIVE response type, this is the value we are counting.
  4212.             count:
  4213.               type: integer
  4214.               format: int32
  4215.  
  4216.   AlertDetails:
  4217.     type: object
  4218.     description: Details for an alert
  4219.     properties:
  4220.       refno:
  4221.         type: integer
  4222.         format: int32
  4223.       name:
  4224.         type: string
  4225.       mainMessage:
  4226.         type: string
  4227.       alertMode:
  4228.         type: string
  4229.         description: |
  4230.          The mode for this alert.
  4231.       alertCategory:
  4232.         type: string
  4233.         description: The category assigned to this alert.
  4234.       additionalProperties:
  4235.         $ref: '#/definitions/PropertyMap'
  4236.       channels:
  4237.         $ref: '#/definitions/AlertChannels'
  4238.       targets:
  4239.         $ref: '#/definitions/TargetSelection'
  4240.  
  4241.   AlertChannels:
  4242.     type: object
  4243.     properties:
  4244.       voice:
  4245.         $ref: '#/definitions/VoiceChannel'
  4246.       sms:
  4247.         $ref: '#/definitions/SmsChannel'
  4248.       email:
  4249.         $ref: '#/definitions/EmailChannel'
  4250.       lbas:
  4251.         $ref: '#/definitions/LbasChannel'
  4252.       smartphone:
  4253.         $ref: '#/definitions/SmartphoneChannel'
  4254.       web:
  4255.         $ref: '#/definitions/WebChannelStatus'
  4256.       facebook:
  4257.         $ref: '#/definitions/FacebookChannel'
  4258.       twitter:
  4259.         $ref: '#/definitions/TwitterChannel'
  4260.       sds:
  4261.         $ref: '#/definitions/SdsChannel'
  4262.  
  4263.   AlertSummary:
  4264.     type: object
  4265.     description: Summary for a single alert
  4266.     properties:
  4267.       refno:
  4268.         type: integer
  4269.         format: int32
  4270.       name:
  4271.         type: string
  4272.       mainMessage:
  4273.         type: string
  4274.       additionalProperties:
  4275.         $ref: '#/definitions/PropertyMap'
  4276.       composer:
  4277.         $ref: '#/definitions/AlertComposer'
  4278.       alertState:
  4279.         $ref: '#/definitions/AlertState'
  4280.       mode:
  4281.         description: The mode for this alert.
  4282.         $ref: '#/definitions/AlertMode'
  4283.       alertCategory:
  4284.         type: string
  4285.         description: The category assigned to this alert.
  4286.       channelIds:
  4287.         type: array
  4288.         description: List of channel ids present in this summary, in channel id order.
  4289.         items:
  4290.           type: string
  4291.       channels:
  4292.         $ref: '#/definitions/AlertChannels'
  4293.       targets:
  4294.         type: array
  4295.         items:
  4296.           type: object
  4297.           properties:
  4298.             name:
  4299.               type: string
  4300.             type:
  4301.               type: string
  4302.             id:
  4303.               type: string
  4304.             fullId:
  4305.               type: string
  4306.             statusCount:
  4307.               $ref: '#/definitions/AlertStatusCount'
  4308.             responseCount:
  4309.               $ref: '#/definitions/AlertResponseCount'
  4310.       areas:
  4311.         type: array
  4312.         items:
  4313.           $ref: '#/definitions/AreaTarget'
  4314.       groups:
  4315.         type: array
  4316.         items:
  4317.           $ref: '#/definitions/GroupTarget'
  4318.       persons:
  4319.         type: array
  4320.         items:
  4321.           $ref: '#/definitions/PersonTarget'
  4322.       matrikkel:
  4323.         type: array
  4324.         items:
  4325.           $ref: '#/definitions/MatrikkelTarget'
  4326.       addressSearch:
  4327.         type: array
  4328.         items:
  4329.           $ref: '#/definitions/AddressSearchTarget'
  4330.       street:
  4331.         type: array
  4332.         items:
  4333.           $ref: '#/definitions/StreetTarget'
  4334.       direct:
  4335.         type: array
  4336.         items:
  4337.           $ref: "#/definitions/DirectTarget"
  4338.       directory:
  4339.         type: array
  4340.         items:
  4341.           $ref: "#/definitions/DirectoryTarget"
  4342.  
  4343.   AlertComposer:
  4344.     type: object
  4345.     description: Details about the composer for the alert.
  4346.     properties:
  4347.       ownerId:
  4348.         type: string
  4349.         description: |
  4350.           Numeric ownerId. This has to be a number, but a string is used so that it does not break
  4351.            JavaScript with regards to numeric precission.
  4352.       userId:
  4353.         type: string
  4354.         description: |
  4355.           Numeric userId. This has to be a number, but a string is used so that it does not break
  4356.            JavaScript with regards to numeric precission.
  4357.       ownerName:
  4358.         type: string
  4359.       userName:
  4360.         type: string
  4361.       name:
  4362.         type: string
  4363.  
  4364.   AlertState:
  4365.     type: object
  4366.     properties:
  4367.       created:
  4368.         type: string
  4369.         format: date-time
  4370.       scheduled:
  4371.         type: string
  4372.         format: date-time
  4373.       submittedTime:
  4374.         type: string
  4375.         format: date-time
  4376.       sentTime:
  4377.         type: string
  4378.         format: date-time
  4379.       cancelTime:
  4380.         type: string
  4381.         format: date-time
  4382.       doneTime:
  4383.         type: string
  4384.         format: date-time
  4385.       state:
  4386.         type: string
  4387.         enum:
  4388.          - CREATED
  4389.           - SCHEDULED
  4390.           - SUBMITTED
  4391.           - SENT
  4392.           - DONE
  4393.           - CANCELLED
  4394.  
  4395.   AlertListSummaryReport:
  4396.     type: object
  4397.     description: Report of alert summaries
  4398.     properties:
  4399.       total:
  4400.         description: Total number of alerts matching the query.
  4401.         type: integer
  4402.         format: int32
  4403.       alerts:
  4404.         type: array
  4405.         items:
  4406.           $ref: '#/definitions/AlertListSummary'
  4407.  
  4408.   AlertMode:
  4409.     type: string
  4410.     description: |
  4411.      The mode for an alert.
  4412.  
  4413.       * LIVE - The alert is live, and will be delivered to devices
  4414.       * SIMULATE - The alert will be simulated, as close as possible to live, without delivery
  4415.       * DISABLED - The alert cannot be sent. Usefull for creating templates.
  4416.     enum:
  4417.      - LIVE
  4418.       - SIMULATE
  4419.       - DISABLED
  4420.  
  4421.   AlertListSummary:
  4422.     type: object
  4423.     description: List summary for a single alert
  4424.     discriminator: type
  4425.     properties:
  4426.       refno:
  4427.         type: integer
  4428.         format: int32
  4429.       type:
  4430.         type: string
  4431.         description: Discriminator used to distinguish AlertListSummary types.
  4432.       name:
  4433.         type: string
  4434.       mainMessage:
  4435.         type: string
  4436.       additionalProperties:
  4437.         $ref: '#/definitions/PropertyMap'
  4438.       composer:
  4439.         $ref: '#/definitions/AlertComposer'
  4440.       alertState:
  4441.         $ref: '#/definitions/AlertState'
  4442.       mode:
  4443.         $ref: '#/definitions/AlertMode'
  4444.       alertCategory:
  4445.         type: string
  4446.         description: The category assigned to this alert.
  4447.       channels:
  4448.         type: array
  4449.         description: list of channel ids included
  4450.         items:
  4451.           type: string
  4452.       statusCount:
  4453.         $ref: '#/definitions/AlertStatusCount'
  4454.       response:
  4455.         type: integer
  4456.         format: int32
  4457.  
  4458.   AlertReport:
  4459.     type: object
  4460.     description: List summary for a single alert
  4461.     allOf:
  4462.       - $ref: '#/definitions/AlertListSummary'
  4463.       - properties:
  4464.           voiceChannel:
  4465.             $ref: '#/definitions/VoiceChannel'
  4466.           smsChannel:
  4467.             $ref: '#/definitions/SmsChannel'
  4468.           targets:
  4469.             type: array
  4470.             items:
  4471.               $ref: '#/definitions/AlertReportTarget'
  4472.  
  4473.   AlertReportTarget:
  4474.     type: object
  4475.     properties:
  4476.       name:
  4477.         type: string
  4478.       type:
  4479.         type: string
  4480.       id:
  4481.         type: string
  4482.       fullId:
  4483.         type: string
  4484.  
  4485.   AlertItemDetails:
  4486.     type: object
  4487.     properties:
  4488.       total:
  4489.         type: integer
  4490.         format: int32
  4491.       items:
  4492.         type: array
  4493.         items:
  4494.           $ref: '#/definitions/AlertItemDetail'
  4495.  
  4496.   AlertItemDetail:
  4497.     type: object
  4498.     description: Single item detail for an alert.
  4499.     properties:
  4500.       alertRecipientId:
  4501.         type: string
  4502.         description: The id for the recipient that this detail belongs to.
  4503.       targetType:
  4504.         type: string
  4505.         description: Type of target that was the source for this recipiebnt
  4506.       targetId:
  4507.         type: string
  4508.         description: Id of target that was the source for this recipiebnt
  4509.       targetFullId:
  4510.         type: string
  4511.         description: Full id of the target, with type.
  4512.       sourceId:
  4513.         type: string
  4514.         description: Hello
  4515.       name:
  4516.         type: string
  4517.         description: The name of the recipient
  4518.       address:
  4519.         type: string
  4520.         description: The postal address of the recipient
  4521.       language:
  4522.         type: string
  4523.         description: The language spoken by the recipient
  4524.       longitude:
  4525.         type: number
  4526.         format: double
  4527.         description: The longitude position for this recipient
  4528.       latitude:
  4529.         type: number
  4530.         format: double
  4531.         description: The latitude position for this recipient
  4532.       geohash:
  4533.         type: string
  4534.         description: The geohash string for the recipients position
  4535.       lastModified:
  4536.         type: string
  4537.         format: date-time
  4538.         description: When this record was last modified.
  4539.       channelId:
  4540.         type: string
  4541.         description: The id of the channel used.
  4542.       channelAddress:
  4543.         type: string
  4544.         description: The address on the channel used to send.
  4545.       categories:
  4546.         type: array
  4547.         description: List of categories set for this recipient
  4548.         items:
  4549.           type: string
  4550.       dynamicProperties:
  4551.         type: object
  4552.         description: Additional freeform dynamic propeties for this recipient.
  4553.         additionalProperties:
  4554.           type: string
  4555.       reason:
  4556.         type: string
  4557.         description: |
  4558.          For certain item states, there is also an attached reason, which explains why an
  4559.           item was ignored/failed/cancelled.
  4560.       itemState:
  4561.         type: string
  4562.         enum:
  4563.          - IGNORED
  4564.           - DUPLICATE
  4565.           - IN_PROGRESS
  4566.           - NOT_CONFIRMED
  4567.           - CANCELLED
  4568.           - FAILED
  4569.           - DELIVERED
  4570.       durationMs:
  4571.         type: integer
  4572.         format: int64
  4573.         description: |
  4574.          Total number of milliseconds a communication has been open for this item. This only
  4575.           applies to voice sendings currently.
  4576.  
  4577.  
  4578.  
  4579.   AlertResponseDetails:
  4580.       type: object
  4581.       properties:
  4582.         total:
  4583.           type: integer
  4584.           format: int32
  4585.         items:
  4586.           type: array
  4587.           items:
  4588.             $ref: '#/definitions/AlertResponseDetail'
  4589.  
  4590.   AlertGeoPointStatus:
  4591.     type: object
  4592.     description: Single point of status
  4593.     properties:
  4594.       latitude:
  4595.         type: number
  4596.         format: double
  4597.       longitude:
  4598.         type: number
  4599.         format: double
  4600.       hash:
  4601.         type: string
  4602.         description: Geohash used for this point
  4603.       targetType:
  4604.         type: string
  4605.         description: Type of target that was the source for this recipiebnt
  4606.       targetId:
  4607.         type: string
  4608.         description: Id of target that was the source for this recipiebnt
  4609.       targetFullId:
  4610.         type: string
  4611.         description: Full id of the target, with type.
  4612.       totalCount:
  4613.         $ref: '#/definitions/AlertStatusCount'
  4614.  
  4615.   AlertGeoPointResponse:
  4616.       type: object
  4617.       description: Single point of status
  4618.       properties:
  4619.         latitude:
  4620.           type: number
  4621.           format: double
  4622.         longitude:
  4623.           type: number
  4624.           format: double
  4625.         hash:
  4626.           type: string
  4627.           description: Geohash used for this point
  4628.         totalCount:
  4629.           $ref: '#/definitions/AlertResponseCount'
  4630.  
  4631.   AlertResponseDetail:
  4632.     type: object
  4633.     description: Single response detail for an alert.
  4634.     properties:
  4635.       alertRecipientId:
  4636.         type: string
  4637.         description: The id for the recipient that this detail belongs to.
  4638.       targetType:
  4639.         type: string
  4640.         description: Type of target that was the source for this recipiebnt
  4641.       targetId:
  4642.         type: string
  4643.         description: Id of target that was the source for this recipiebnt
  4644.       targetFullId:
  4645.         type: string
  4646.         description: Full id of the target, with type.
  4647.       name:
  4648.         type: string
  4649.         description: The name of the recipient
  4650.       address:
  4651.         type: string
  4652.         description: The postal address of the recipient
  4653.       longitude:
  4654.         type: number
  4655.         format: double
  4656.         description: The longitude position for this recipient
  4657.       latitude:
  4658.         type: number
  4659.         format: double
  4660.         description: The latitude position for this recipient
  4661.       geohash:
  4662.         type: string
  4663.         description: The geohash string for the recipients position
  4664.       responseTime:
  4665.         type: string
  4666.         format: date-time
  4667.         description: When this response was received
  4668.       receivedOn:
  4669.         type: string
  4670.         description: Our address that we received the reponse on
  4671.       receivedFrom:
  4672.         type: string
  4673.         description: What the senders address was.
  4674.       channelId:
  4675.         type: string
  4676.         description: The id of the channel used.
  4677.       response:
  4678.         type: object
  4679.         properties:
  4680.           id:
  4681.             type: string
  4682.             description: Unique id for this response
  4683.           text:
  4684.             type: string
  4685.             description: Textual presentation of this response
  4686.           attachments:
  4687.             type: array
  4688.             description: For freeform only, optional list of attachments
  4689.             items:
  4690.               $ref: '#/definitions/Attachment'
  4691.           responseOption:
  4692.             $ref: '#/definitions/PropertyMap'
  4693.  
  4694.   AlertItemDetailSort:
  4695.     type: string
  4696.     enum:
  4697.      - NAME
  4698.       - STATE
  4699.       - CHANNEL_ADDRESS
  4700.       - LAST_MODIFIED
  4701.  
  4702.   AlertResponseDetailSort:
  4703.     type: string
  4704.     enum:
  4705.      - NAME
  4706.       - RESPONSE
  4707.       - CHANNEL_ADDRESS
  4708.       - LAST_MODIFIED
  4709.  
  4710.  
  4711.   AlertSummarySort:
  4712.     type: string
  4713.     enum:
  4714.      - CREATED
  4715.       - SENDING
  4716.       - OWNER
  4717.  
  4718. # End: alert/definitions.yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement