Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: '2.0'
- info:
- title: Heimdall Alert Sending API
- description: |
- Service for sending alerts over multiple different channels.
- All phone numbers used in the service needs to be in MSISDN
- (https://en.wikipedia.org/wiki/MSISDN) format. This is the same as the international E.164
- format (https://en.wikipedia.org/wiki/E.164), but without the leading +. So only digits. Trunk
- prefixes should also be omitted after the country code.
- version: "17.06.0-SNAPSHOT"
- # Start: base/common.yaml
- schemes:
- - http
- - https
- security:
- - heimdallAuth: []
- - umsTokenAuth: []
- securityDefinitions:
- heimdallAuth:
- type: basic
- description: |
- Basic HTTP authentication. This requires the admin username, and the password that is placed
- in the logs
- umsTokenAuth:
- type: apiKey
- name: X-UMS-Token
- in: header
- description: |
- Authentication using a UMS JWT authentication token.
- # will be prefixed to all paths
- basePath: /alert/v1
- produces:
- - application/json
- # End: base/common.yaml
- paths:
- # Start: alert/create/paths.yaml
- /createAlert:
- post:
- summary: Create a new aler
- description: |
- This creates a new alert in the system. The alert will be in created
- state, and will have to be scheduled or sent. After creation, it will
- also be possible to add channels and targets. At least 1 channel
- must be present before sending. And if there is any ItemChannels, at
- least 1 target. ItemChannels are channels such as voice, sms and
- email, where we expect there to be a known person recieving the alert,
- as opposed to bulk/broadcast channels that don't really have a target.
- The TEMPLATE types are intended for storing templates of a full alert, just the
- message, or the channels for an alert.
- operationId: alertService.createAlert
- parameters:
- - name: name
- in: query
- type: string
- required: true
- default: New Alert
- - name: mainMessage
- in: query
- type: string
- description: |
- This is a description for the alert, and can be left empty. It does not affect the alert
- content, but can be used as a tool to display details in UI.
- required: true
- - name: mode
- in: query
- required: true
- description: |
- The mode for the alert. DISABLED alerts cannot be sent. LIVE basically means that
- customers will be called/contacted. While SIMULATE means that as much as possible of the
- send process will be simulated, while not actually contacting anyone. Usefull for
- training and testing.
- type: string
- - name: alertCategory
- in: query
- required: false
- description: |
- An optional category for the alert, to group alerts by purpose. This can be usefull for
- creating alerts that should be hidden from normal view.
- type: string
- tags:
- - CreateAlert
- responses:
- 200:
- description: Refno of the new alert. This can be used to fetch status
- schema:
- type: integer
- format: int32
- /resendAlert:
- post:
- summary: Create a resend alert based on an existing alert
- description: |
- This copies an existing alert, and all it's targets and channels. The new alert will
- have a filter applied to each target, to limit the recipients based on the item
- state provided.
- operationId: alertService.resendAlert
- parameters:
- - name: refno
- description: The refno of the alert to resend
- in: query
- type: integer
- format: int32
- required: true
- - name: name
- in: query
- type: string
- required: true
- default: New Alert
- description: The name of the new alert.
- - name: state
- in: query
- type: string
- required: false
- default: FAILED
- description: |
- Optional state to filter recipients on. If provided, all targets in the existing alert
- will be included in the new alert, but it's recipient will be from the old alert, and
- filtered by those in the given state only. This allows the resend of an alert to all
- those that failed on the last sending.
- tags:
- - CreateAlert
- responses:
- 200:
- description: Refno of the new alert
- schema:
- type: integer
- format: int32
- /send/validate:
- post:
- summary: Validate an alert object
- description: |
- This can be used to validate alert details before sending.
- operationId: validateAlert
- parameters:
- - name: alert
- in: body
- schema:
- $ref: '#/definitions/AlertDetails'
- required: true
- description: |
- The full details for the alert. The refno in the details will be ignored, and instead the
- server will generate a refno that will be used and returned.
- tags:
- - CreateAlert
- responses:
- 200:
- description: Validation result after applying validation to the alert details.
- schema:
- $ref: "#/definitions/ValidationResult"
- /send/submit:
- post:
- summary: Fully create and schedule/send an alert in a single request.
- description: |
- This can be used to create and schedule/submit an alert in a single request. You must provide
- the full alert details, and optionally a schedule time if the alert is to be scheduled for a
- later time.
- operationId: submitAlert
- parameters:
- - name: alert
- in: body
- schema:
- $ref: '#/definitions/AlertDetails'
- required: true
- description: |
- The full details for the alert. The refno in the details will be ignored, and instead the
- server will generate a refno that will be used and returned.
- - name: scheduleTime
- in: query
- type: string
- format: date-time
- required: false
- description: |
- The time to schedule the alert for. If missing or in the past, the alert will be sent
- immediatly. Otherwise the alert is scheduled for sending at the provided time.
- tags:
- - CreateAlert
- responses:
- 200:
- description: The full alert details, with the refno filled in.
- schema:
- $ref: '#/definitions/AlertDetails'
- 400:
- description: Validation of request failed
- schema:
- $ref: "#/definitions/ValidationResult"
- # End: alert/create/paths.yaml
- # Start: alert/test/paths.yaml
- /testChannel/voice:
- post:
- operationId: testVoiceChannel
- description: |
- Perform a voice sending to a single test number. This will create a new alert in the mode
- TEST.
- parameters:
- - name: number
- in: query
- type: string
- required: true
- description: The number to call, in MSISDN format.
- - name: channel
- in: body
- description: A full description of the voice channel to use for the sending.
- schema:
- $ref: "#/definitions/VoiceChannel"
- tags:
- - TestSend
- responses:
- 200:
- description: Refno of the test alert
- schema:
- type: integer
- format: int32
- /testChannel/sms:
- post:
- operationId: testSmsChannel
- description: |
- Perform an SMS sending to a single test number. This will create a new alert in the mode
- TEST.
- parameters:
- - name: number
- in: query
- type: string
- required: true
- description: The number to send SMS to, in MSISDN format.
- - name: channel
- in: body
- description: A full description of the sms channel to use for the sending.
- schema:
- $ref: "#/definitions/SmsChannel"
- tags:
- - TestSend
- responses:
- 200:
- description: Refno of the new alert
- schema:
- type: integer
- format: int32
- /testChannel/email:
- post:
- operationId: testEmailChannel
- description: |
- Perform an Email sending to a single test number. This will create a new alert in the mode
- TEST.
- parameters:
- - name: email
- in: query
- type: string
- required: true
- description: The email to send to
- - name: channel
- in: body
- description: A full description of the sms channel to use for the sending.
- schema:
- $ref: "#/definitions/EmailChannel"
- tags:
- - TestSend
- responses:
- 200:
- description: Refno of the new alert
- schema:
- type: integer
- format: int32
- /testChannel/sds:
- post:
- operationId: testSdsChannel
- description: |
- Perform an SDS sending to a single test number. This will create a new alert in the mode
- TEST.
- parameters:
- - name: number
- in: query
- type: string
- description: The number to send the SDS message to.
- - name: channel
- in: body
- description: A full description of the sds channel to use for the sending.
- schema:
- $ref: "#/definitions/SdsChannel"
- tags:
- - TestSend
- responses:
- 200:
- description: Refno of the new alert
- schema:
- type: integer
- format: int32
- # End: alert/test/paths.yaml
- # Start: alert/compose/paths.yaml
- /{refno}/addVoiceChannel:
- post:
- operationId: addVoiceChannel
- description: Add a voice channel to the alert, so that people will be called.
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- description: The alert to add the voice channel to.
- - name: channel
- in: body
- description: A full description of the voice channel to use for the sending.
- schema:
- $ref: "#/definitions/VoiceChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addSmsChannel:
- post:
- operationId: addSmsChannel
- description: |
- Add an sms channel to a sending.
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- description: The alert to add the sms channel to.
- - name: channel
- in: body
- description: A full description of the sms channel to use for the sending.
- schema:
- $ref: "#/definitions/SmsChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addSdsChannel:
- post:
- operationId: addSdsChannel
- description: |
- Add an sds channel to a sending.
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- description: The alert to add the sds channel to.
- - name: channel
- in: body
- description: A full description of the sds channel to use for the sending.
- schema:
- $ref: "#/definitions/SdsChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addEmailChannel:
- post:
- operationId: addEmailChannel
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- description: The alert to add the sds channel to.
- - name: channel
- in: body
- description: A full description of the email channel to use for the sending.
- schema:
- $ref: "#/definitions/EmailChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addLbasChannel:
- post:
- operationId: addLbasChannel
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channel
- in: body
- schema:
- $ref: "#/definitions/LbasChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addWebChannel:
- post:
- operationId: addWebChannel
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channel
- in: body
- schema:
- $ref: "#/definitions/WebChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addSmartphoneChannel:
- post:
- operationId: addSmartphoneChannel
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channel
- in: body
- schema:
- $ref: "#/definitions/SmartphoneChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addTwitterChannel:
- post:
- operationId: addTwitterChannel
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channel
- in: body
- schema:
- $ref: "#/definitions/TwitterChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addFacebookChannel:
- post:
- operationId: addFacebookChannel
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channel
- in: body
- schema:
- $ref: "#/definitions/FacebookChannel"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addAreaTarget:
- post:
- operationId: addAreaTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: target
- in: body
- schema:
- $ref: "#/definitions/AreaTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addMatrikkelTarget:
- post:
- operationId: addMatrikkelTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: target
- in: body
- schema:
- $ref: "#/definitions/MatrikkelTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Target successfully added
- /{refno}/addStreetTarget:
- post:
- operationId: addStreetTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: target
- in: body
- schema:
- $ref: "#/definitions/StreetTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Target successfully added
- /{refno}/addAddressSearchTarget:
- post:
- operationId: addAddressSearchTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: target
- in: body
- schema:
- $ref: "#/definitions/AddressSearchTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Target successfully added
- /{refno}/addDirectoryTarget:
- post:
- operationId: addDirectoryTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: directoryTarget
- in: body
- schema:
- $ref: "#/definitions/DirectoryTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addDirectTarget:
- post:
- operationId: addDirectTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: id
- in: formData
- type: string
- required: true
- default: "1"
- description: |
- Unique id for the target. If the same id is used, it will replace existing
- direct target recipient.
- - name: name
- in: formData
- type: string
- required: true
- default: Alert Person
- description: The name of the person being added
- - name: address
- in: formData
- type: string
- required: false
- default: Some street 111, XX-99 Nowhere
- description: Postal address for the person
- - name: language
- in: formData
- type: string
- default: en
- required: false
- description: iso language code for the language that the recipient speaks
- - name: longitude
- in: formData
- type: number
- format: double
- required: false
- description: Longitude position
- - name: latitude
- in: formData
- type: number
- format: double
- required: false
- description: Latitude position
- - name: voice
- in: formData
- type: string
- required: false
- description: Fixed line number for the recipient
- - name: sms
- in: formData
- type: string
- required: false
- description: Sms mobile number for the recipient
- - name: email
- in: formData
- type: string
- required: false
- description: Email address for the recipient
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addFullDirectTarget:
- post:
- operationId: addFullDirectTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: directTarget
- in: body
- schema:
- $ref: "#/definitions/DirectTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Target successfully added
- /{refno}/addGroupTarget:
- post:
- operationId: addGroupTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: groupTarget
- in: body
- schema:
- $ref: "#/definitions/GroupTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addPersonTarget:
- post:
- operationId: addPersonTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: personTarget
- in: body
- schema:
- $ref: "#/definitions/PersonTarget"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/addRandomTarget:
- post:
- operationId: addRandomTarget
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: id
- type: string
- in: query
- description: The id to use for this target
- default: "r99"
- - name: name
- type: string
- in: query
- description: The name to use for this target
- default: "Random target"
- - name: total
- type: integer
- in: query
- format: int32
- default: 100
- - name: voiceCount
- type: integer
- in: query
- format: int32
- default: 40
- - name: smsCount
- type: integer
- in: query
- format: int32
- default: 80
- - name: sdsCount
- type: integer
- in: query
- format: int32
- default: 80
- - name: emailCount
- type: integer
- in: query
- format: int32
- default: 80
- tags:
- - ComposeAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/setChannelOptions:
- post:
- operationId: setChannelOptions
- description: |
- This only updates the channel options for an alert.
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channelOptions
- in: body
- schema:
- $ref: "#/definitions/ChannelOptions"
- tags:
- - ComposeAlert
- responses:
- 200:
- description: ChannelOptions successfully changed
- # End: alert/compose/paths.yaml
- # Start: alert/manage/paths.yaml
- /{refno}/sendAlert:
- post:
- operationId: sendAlert
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- tags:
- - ManageAlert
- responses:
- 200:
- description: Alert sent
- /{refno}/updateAlert:
- post:
- operationId: updateAlert
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: alertDetails
- in: body
- schema:
- $ref: "#/definitions/AlertDetails"
- tags:
- - ManageAlert
- responses:
- 200:
- description: Channel successfully added
- /{refno}/scheduleAlert:
- post:
- operationId: scheduleAlert
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: scheduleDate
- type: string
- format: date-time
- description: |
- When to schedule the sending for, format: yyyy-MM-ddThh:mm:ss.SSSZ. Example
- date: 2016-05-27T12:24:05.899+0200 (T is a literal T, and Z is the timezone offset).
- in: query
- required: true
- tags:
- - ManageAlert
- responses:
- 200:
- description: Alert scheduled
- /{refno}/cancelAlert:
- post:
- operationId: cancelAlert
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- tags:
- - ManageAlert
- responses:
- 200:
- description: Alert sent
- /{refno}/{channelId}/addResponse:
- post:
- operationId: addResponse
- description: Add am option response for the given channel and address
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channelId
- type: string
- in: path
- description: The id of the channel that the response is to be added to (voice/sms/etc.)
- required: true
- - name: responseDetail
- in: body
- schema:
- $ref: "#/definitions/ResponseDetail"
- tags:
- - ManageAlert
- responses:
- 200:
- description: Response added
- # End: alert/manage/paths.yaml
- # Start: alert/status/paths.yaml
- /status/count/{refno}:
- get:
- operationId: getAlertStatusCount
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- tags:
- - AlertStatus
- responses:
- 200:
- description: Count for the given alert.
- schema:
- $ref: '#/definitions/AlertStatusCount'
- /status/summary/{refno}:
- get:
- operationId: getAlertSummary
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- tags:
- - AlertStatus
- responses:
- 200:
- description: Summary for the given alert.
- schema:
- $ref: '#/definitions/AlertSummary'
- /status/details/{refno}:
- get:
- operationId: getAlertDetails
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- tags:
- - AlertStatus
- responses:
- 200:
- description: Summary for the given alert.
- schema:
- $ref: '#/definitions/AlertDetails'
- /status/targets/{refno}:
- get:
- operationId: getAlertTargets
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- tags:
- - AlertStatus
- responses:
- 200:
- description: Targets for the given alert.
- schema:
- $ref: '#/definitions/TargetSelection'
- /status/items/{refno}:
- get:
- operationId: getItemDetails
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: alertItemStates
- type: array
- required: false
- items:
- type: string
- in: query
- - name: channelIds
- type: array
- required: false
- items:
- type: string
- in: query
- - name: targetFullIds
- description: List of full target ids (type:id) to limit the search to.
- type: array
- required: false
- items:
- type: string
- in: query
- - name: geoHashes
- description: List of geohashes to filter by
- type: array
- required: false
- items:
- type: string
- in: query
- - name: search
- description: Search text to be applied to name, address and channel address.
- type: string
- required: false
- in: query
- - name: startPage
- type: integer
- format: int32
- in: query
- required: true
- default: 1
- - name: pageSize
- type: integer
- format: int32
- in: query
- required: true
- default: 25
- - name: sort
- type: string
- default: NAME
- in: query
- required: true
- - name: reverse
- type: boolean
- default: false
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Matching alerts.
- schema:
- $ref: '#/definitions/AlertItemDetails'
- /status/geoStatus/{refno}:
- get:
- operationId: getGeoStatus
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: alertItemStates
- type: array
- required: false
- items:
- type: string
- in: query
- - name: channelIds
- type: array
- required: false
- items:
- type: string
- in: query
- - name: targetFullIds
- description: List of full target ids (type:id) to limit the search to.
- type: array
- required: false
- items:
- type: string
- in: query
- - name: point1Longitude
- description: Longitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -180.0
- in: query
- - name: point1Latitude
- description: Latitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -90.0
- in: query
- - name: point2Longitude
- description: Longitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 180.0
- in: query
- - name: point2Latitude
- description: Latitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 90.0
- in: query
- - name: geohashSize
- type: integer
- format: int32
- default: 9
- description: Size of geo hash points.
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Matching alerts.
- schema:
- type: array
- items:
- $ref: '#/definitions/AlertGeoPointStatus'
- /status/response/{refno}:
- get:
- operationId: getResponseDetails
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channelIds
- type: array
- required: false
- items:
- type: string
- in: query
- - name: targetFullIds
- description: List of full target ids (type:id) to limit the search to.
- type: array
- required: false
- items:
- type: string
- in: query
- - name: responseOptions
- description: |
- List of responseIds to include. This can either be FREEFORM, or
- ALTERNATIVE:option:value
- type: array
- required: false
- items:
- type: string
- in: query
- - name: geoHashes
- description: List of geohashes to filter by
- type: array
- required: false
- items:
- type: string
- in: query
- - name: search
- description: Search text to be applied to name, address, response and channel address.
- type: string
- required: false
- in: query
- - name: startPage
- type: integer
- format: int32
- in: query
- required: true
- default: 1
- - name: pageSize
- type: integer
- format: int32
- in: query
- required: true
- default: 25
- - name: sort
- type: string
- default: NAME
- in: query
- required: true
- - name: ascending
- type: boolean
- default: false
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Matching alerts.
- schema:
- $ref: '#/definitions/AlertResponseDetails'
- /status/geoResponse/{refno}:
- get:
- operationId: getGeoResponse
- parameters:
- - name: refno
- type: integer
- in: path
- format: int32
- required: true
- - name: channelIds
- type: array
- required: false
- items:
- type: string
- in: query
- - name: targetFullIds
- description: List of full target ids (type:id) to limit the search to.
- type: array
- required: false
- items:
- type: string
- in: query
- - name: point1Longitude
- description: Longitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -180.0
- in: query
- - name: point1Latitude
- description: Latitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -90.0
- in: query
- - name: point2Longitude
- description: Longitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 180.0
- in: query
- - name: point2Latitude
- description: Latitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 90.0
- in: query
- - name: geohashSize
- type: integer
- format: int32
- default: 9
- description: Size of geo hash points.
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Matching alerts.
- schema:
- type: array
- items:
- $ref: '#/definitions/AlertGeoPointResponse'
- /status/summaries:
- get:
- operationId: getAlertSummaries
- parameters:
- - name: ownerIds
- type: array
- items:
- type: integer
- format: int64
- in: query
- - name: sendingModes
- type: array
- default: "LIVE"
- items:
- type: string
- in: query
- - name: alertCategories
- type: array
- required: false
- description: |
- List of categories to query. By default, alerts don't have a category, but one can be
- added. If no categories are set, or an empty category is included, then alerts without
- a category will be in the result.
- items:
- type: string
- in: query
- - name: search
- type: string
- description: Search text for alerts.
- in: query
- - name: createdAfter
- type: string
- format: date-time
- in: query
- default: "2016-01-01T00:00:00.000Z"
- - name: sendingAfter
- type: string
- format: date-time
- in: query
- default: "2016-01-01T00:00:00.000Z"
- - name: sendingBefore
- type: string
- format: date-time
- in: query
- default: "2100-01-01T00:00:00.000Z"
- - name: scheduledAfter
- type: string
- format: date-time
- in: query
- default: "2016-01-01T00:00:00.000Z"
- - name: scheduledBefore
- type: string
- format: date-time
- in: query
- default: "2100-01-01T00:00:00.000Z"
- - name: startPage
- type: integer
- format: int32
- in: query
- default: 1
- - name: pageSize
- type: integer
- format: int32
- in: query
- default: 25
- - name: sort
- type: string
- default: CREATED
- in: query
- - name: ascending
- type: boolean
- default: false
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Matching alerts.
- schema:
- $ref: '#/definitions/AlertListSummaryReport'
- /status/lastSmartphoneSendings:
- get:
- operationId: getLastSmartphoneSendings
- parameters:
- - name: maxAgeDays
- type: integer
- description: Number of days to look back for sendings.
- default: 1
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Latest smartphone sendings.
- schema:
- type: array
- items:
- $ref: '#/definitions/SmartphoneSendingSummary'
- /status/reports:
- get:
- operationId: getAlertReports
- parameters:
- - name: ownerIds
- type: array
- items:
- type: integer
- format: int64
- in: query
- - name: sendingModes
- type: array
- default: "LIVE"
- items:
- type: string
- in: query
- - name: alertCategories
- type: array
- required: false
- description: |
- List of categories to query. By default, alerts don't have a category, but one can be
- added. If no categories are set, or an empty category is included, then alerts without
- a category will be in the result.
- items:
- type: string
- in: query
- - name: search
- type: string
- description: Search text for alerts.
- in: query
- - name: composedBy
- type: string
- description: User id of the composer
- in: query
- - name: createdAfter
- type: string
- format: date-time
- in: query
- default: "2016-01-01T00:00:00.000Z"
- - name: sendingAfter
- type: string
- format: date-time
- in: query
- default: "2016-01-01T00:00:00.000Z"
- - name: sendingBefore
- type: string
- format: date-time
- in: query
- default: "2100-01-01T00:00:00.000Z"
- - name: sort
- type: string
- default: CREATED
- in: query
- - name: ascending
- type: boolean
- default: false
- in: query
- tags:
- - AlertStatus
- responses:
- 200:
- description: Matching alerts.
- schema:
- type: array
- items:
- $ref: '#/definitions/AlertReport'
- # End: alert/status/paths.yaml
- # Start: alert/response/paths.yaml
- /response/addSms:
- post:
- operationId: addSmsResponse
- description: Add sms response, with identical contract to the current version in heimdall.
- parameters:
- - name: smsResponse
- in: body
- schema:
- $ref: '#/definitions/SmsResponse'
- tags:
- - AlertResponse
- responses:
- 200:
- description: Response accepted
- schema:
- $ref: '#/definitions/SmsRegistration'
- /response/registerSmartphoneDelivery:
- post:
- operationId: addSmartphoneResponse
- description: Add smartphone response. This is also used to register counts and/or delivered
- parameters:
- - name: refno
- in: query
- type: integer
- format: int32
- description: Refno to register smartphone count for.
- - name: state
- in: query
- type: string
- description: If this is a delivery or failure registration.
- - name: reason
- in: query
- type: string
- description: If the state is failed, this should be the reason for the failure.
- tags:
- - AlertResponse
- responses:
- 200:
- description: Smartphone count accepted
- # End: alert/response/paths.yaml
- # Start: target/paths.yaml
- /target/count:
- post:
- operationId: countTargets
- parameters:
- - name: countRequest
- in: body
- schema:
- $ref: "#/definitions/TargetSelection"
- tags:
- - Target
- responses:
- 200:
- description: Target counts
- schema:
- type: array
- items:
- $ref: "#/definitions/TargetCountReport"
- /target/countSummary:
- post:
- operationId: countTargetSummary
- parameters:
- - name: countRequest
- in: body
- schema:
- $ref: "#/definitions/TargetSelection"
- tags:
- - Target
- responses:
- 200:
- description: Target counts
- schema:
- type: array
- items:
- $ref: "#/definitions/TargetCountSummary"
- /target/items:
- post:
- description: |
- Searches all the provided targets for recipients, and returns them in a list.
- This is a very expensive operations for large queries, as everything happens
- in the search thread. Be cautious to use this. You can set the maximum items
- you want to return, this was done for import to just get one target in return.
- operationId: getItems
- parameters:
- - name: countRequest
- in: body
- schema:
- $ref: "#/definitions/TargetSelection"
- - name: maxItems
- in: query
- type: integer
- format: int64
- description: Maximum number of returned results.
- - name: point1Longitude
- description: Longitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -180.0
- in: query
- - name: point1Latitude
- description: Latitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -90.0
- in: query
- - name: point2Longitude
- description: Longitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 180.0
- in: query
- - name: point2Latitude
- description: Latitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 90.0
- in: query
- tags:
- - Target
- responses:
- 200:
- description: List of items found for the area
- schema:
- type: array
- items:
- $ref: "#/definitions/TargetRecipient"
- /target/items/{geohash}:
- post:
- description: |
- Finds all items within a given geohash.
- operationId: getGeohashItems
- parameters:
- - name: geohash
- description: |
- The geohash to search. The geohash should be at least 7 characters long, to avoid
- too large a query.
- in: path
- type: string
- required: true
- - name: targetSelection
- in: body
- required: false
- description: |
- The selection of items. This is used to determine which items are selected
- schema:
- $ref: "#/definitions/TargetSelection"
- tags:
- - Target
- responses:
- 200:
- description: All items within the geohash
- schema:
- title: TargetSelectionItems
- description: |
- A list of holder objects, that contains the target recipient, and if it was amongst
- one of the items selected from the given target selection.
- type: array
- items:
- type: object
- title: TargetSelectionItem
- description: |
- A single item from a target selection, with details about if it was selected or not,
- and which targets matched the given item.
- properties:
- recipient:
- $ref: "#/definitions/TargetRecipient"
- selected:
- type: boolean
- description: If the target was a part of the TargetSelection
- targetIds:
- type: array
- description: List of all targetIds that had the recipient
- items:
- type: string
- /target/geohashes:
- post:
- description: |
- Searches all the provided targets for recipients, and returns the geohash aggregation for
- the provided points.
- operationId: getGeohashList
- parameters:
- - name: geohashSize
- in: query
- type: integer
- format: int32
- default: 9
- - name: point1Longitude
- description: Longitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -180.0
- in: query
- - name: point1Latitude
- description: Latitude of the first point for the bounding box to show.
- type: number
- format: double
- default: -90.0
- in: query
- - name: point2Longitude
- description: Longitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 180.0
- in: query
- - name: point2Latitude
- description: Latitude of the second point for the bounding box to show.
- type: number
- format: double
- default: 90.0
- in: query
- - name: countRequest
- in: body
- schema:
- $ref: "#/definitions/TargetSelection"
- tags:
- - Target
- responses:
- 200:
- description: Target geohashehs
- schema:
- type: array
- items:
- $ref: "#/definitions/TargetGeoHash"
- # Start: importPaths.yaml
- /target/importMeta:
- get:
- description: Return the metaData about which file and target types are supported by the system.
- tags:
- - TargetImport
- operationId: getImportTargetTypeDescriptions
- security:
- - heimdallAuth: []
- responses:
- 200:
- description: List of all supported import target and file types
- schema:
- $ref: "#/definitions/ImportTargetDescriptions"
- /target/import:
- get:
- description: Return the list of available import definitions.
- tags:
- - TargetImport
- operationId: getPredefinedImports
- security:
- - heimdallAuth: []
- parameters:
- - name: filter
- type: array
- items:
- type: string
- description: |
- List of filter options. Each filter is in the format <fieldName name>:<op>(<arg>).
- Operations:
- * eq: field value equals arg
- * gt/lt: field has value greater/less than arg
- * gte/lte: field has value greater/less than or equal to arg
- * in: field value is in list of args, separated by
- * like: field value is SQL like the arg
- It is also possible to add search:searchText to search for records matching the search
- text. This will search in most of the values available in the database records.
- in: query
- - name: startPage
- type: integer
- format: int32
- in: query
- default: 1
- - name: pageSize
- type: integer
- format: int32
- in: query
- default: 25
- - name: sort
- type: string
- default: created:DESC
- in: query
- description: |
- Field to sort by, optionally postfixed with :DESC or :ASC for descending/ascending.
- responses:
- 200:
- description: List of all supported import target and file types
- schema:
- $ref: "#/definitions/PredefinedImportResult"
- post:
- summary: Create a new PredefinedImport
- security:
- - heimdallAuth: []
- description: |
- Creates a new PredefinedImport in the system.
- operationId: createPredefinedImport
- tags:
- - TargetImport
- parameters:
- - name: predefinedImport
- in: body
- required: true
- schema:
- $ref: '#/definitions/PredefinedImport'
- responses:
- 200:
- description: The PredefinedImport was successfully created
- schema:
- name: predefinedImportId
- type: integer
- 400:
- description: Validation failed for the PredefinedImport
- schema:
- $ref: '#/definitions/ValidationResult'
- 403:
- description: The user is not allowed to create PredefinedImports
- /target/importParser:
- post:
- summary: Parse a predefined import, to produce settings
- security:
- - heimdallAuth: []
- description: |
- This will accept a PredefinedImport, and then parse it, to produce a new predefined import
- where the settings are defined. This can help in converting a predefined import to settings
- for ad-hoc imports.
- operationId: parsePredefinedImport
- tags:
- - TargetImport
- parameters:
- - name: predefinedImport
- in: body
- required: true
- schema:
- $ref: '#/definitions/PredefinedImport'
- responses:
- 200:
- description: The PredefinedImport as parsed
- schema:
- $ref: '#/definitions/PredefinedImport'
- 400:
- description: Validation failed for the PredefinedImport
- schema:
- $ref: '#/definitions/ValidationResult'
- /target/import/{predefinedImportId}:
- parameters:
- - name: predefinedImportId
- in: path
- type: integer
- format: int32
- required: true
- description: The id of the predefined import to access
- get:
- summary: Get a single PredefinedImport
- security:
- - heimdallAuth: []
- description: |
- Returns the associated PredefinedImport
- operationId: getPredefinedImport
- tags:
- - TargetImport
- responses:
- 200:
- description: The associated PredefinedImport
- schema:
- $ref: '#/definitions/PredefinedImport'
- 404:
- description: The PredefinedImport was not found.
- put:
- summary: Updates a PredefinedImport
- security:
- - heimdallAuth: []
- description: |
- Creates a new PredefinedImport in the system.
- operationId: updatePredefinedImport
- tags:
- - TargetImport
- parameters:
- - name: predefinedImport
- in: body
- required: true
- schema:
- $ref: '#/definitions/PredefinedImport'
- responses:
- 200:
- description: The PredefinedImport was successfully updated
- 400:
- description: Validation failed for the PredefinedImport
- schema:
- $ref: '#/definitions/ValidationResult'
- 403:
- description: The user is not allowed to update PredefinedImport
- 404:
- description: The PredefinedImport was not found.
- delete:
- summary: Delete a PredefinedImport
- security:
- - heimdallAuth: []
- description: |
- Deletes an PredefinedImport from the database
- operationId: deletePredefinedImport
- tags:
- - TargetImport
- responses:
- 200:
- description: The PredefinedImport was successfully deleted
- 404:
- description: The PredefinedImport was not found.
- # End: importPaths.yaml
- # End: target/paths.yaml
- # Start: target/template/paths.yaml
- /target/template/store:
- post:
- summary: Store a new target template
- consumes:
- - multipart/form-data
- operationId: uploadTargetTemplate
- tags:
- - Target
- parameters:
- - name: type
- in: query
- type: string
- - name: settings
- description: Refer to parseTargetFile for details about settings
- in: query
- type: array
- items:
- type: string
- - name: file
- in: formData
- type: file
- responses:
- 200:
- description: Template id and parse result
- schema:
- $ref: "#/definitions/TargetStoreResult"
- 400:
- description: The provided settings where not valid
- schema:
- $ref: "#/definitions/ValidationResult"
- /target/template/generate:
- post:
- summary: Generate a target from a csv file
- consumes:
- - multipart/form-data
- operationId: parseTargetFile
- tags:
- - Target
- parameters:
- - name: type
- in: query
- type: string
- - name: settings
- description: |
- The input here is multiple key:value pairs
- **Common settings:**
- * header:true/false defines if the file contains header row or not (skips first row) if
- header is true then the mapping needs to be done with by column header if false then it requires
- specifying the column index
- * columnSeparator: for example \t for tab
- * encoding: java.nio.charset.StandardCharsets Default is UTF-8
- * fileType: csv
- For column mapping you can either have the column header name or index (depending on header
- is true or false), for example
- **municipalityCode:0** or **municipalityCode:columnHeaderName**
- ---
- **For type Street**
- * municipalityCode:MunicipalityCodeHeaderOrIndex
- * streetId:StreetIdHeaderOrIndex
- * houseNumber:HouseNumberHeaderOrIndex
- * houseLetter:HouseLetterHeaderOrIndex
- * apartmentId:ApartmentIdHeaderOrIndex
- ---
- **For type Matrikkel, this is a mapping of key:value which defines the following**
- * municipalityCode:MunicipalityCodeHeaderOrIndex
- * gnr:GnrHeaderOrIndex
- * bnr:BnrHeaderOrIndex
- * fnr:FnrHeaderOrIndex
- * snr:SnrHeaderOrIndex
- ---
- **For type Fastighetsnyckel, this is a mapping of key:value which defines the following**
- * municipalityCode:MunicipalityCodeHeaderOrIndex
- * metaData.snr:SnrHeaderOrIndex
- * metaData.houseno:HouseNumberHeaderOrIndex
- * metaData.letter:HouseLetterHeaderOrIndex
- * metaData.apartmentId:ApartmentIdHeaderOrIndex
- ---
- **For type Riksnyckel, this is a mapping of key:value which defines the following**
- * metaData.unr:UnrHeaderOrIndex
- ---
- **For type Direct, this is a mapping of key:value which defines the following**
- * name:NameHeaderOrIndex
- * firstName:firstNameHeaderOrIndex
- * lastName:lastNameHeaderOrIndex
- * address:addressHeaderOrIndex
- * country:countryHeaderOrIndex
- * language:languageHeaderOrIndex
- You need to have at least one number/mail here to have a valid record
- (you can have 0 or more numbers here separated by comma)
- * sms[]:smsHeaderOrIndex,smsHeaderOrIndex
- * voice[]:voiceHeaderOrIndex,voiceHeaderOrIndex
- * mail[]:mailHeaderOrIndex,mailHeaderOrIndex
- * sds[]:sdsHeaderOrIndex,sdsHeaderOrIndex
- * dynamic[]:dynamicHeaderOrIndex,dynamicHeaderOrIndex
- * longitude:longitudeHeaderOrIndex
- * latitude:latitudeHeaderOrIndex
- in: query
- type: array
- items:
- type: string
- - name: file
- in: formData
- type: file
- responses:
- 200:
- description: Generated target
- schema:
- $ref: "#/definitions/TargetParseResult"
- 400:
- description: Validation of request failed
- schema:
- $ref: "#/definitions/ValidationResult"
- /target/template:
- get:
- description: Returns the uploaded target template based on id
- security: []
- tags:
- - Target
- parameters:
- - name: templateId
- description: id of the template to retreive, this would be the one you get back from the store method
- type: string
- required: false
- in: query
- responses:
- 200:
- description: The associated template target selection
- schema:
- $ref: "#/definitions/TargetSelection"
- # End: target/template/paths.yaml
- # Start: config/paths.yaml
- /lbas/operators:
- get:
- operationId: getLbasOperators
- tags:
- - LBAS
- responses:
- 200:
- description: Return all registered operators
- schema:
- type: array
- items:
- $ref: "#/definitions/LbasOperator"
- /lbas/operator/{operatorId}:
- post:
- operationId: addLbasOperator
- description: Add or replace the operator with the same id.
- tags:
- - LBAS
- parameters:
- - name: operatorId
- in: path
- type: integer
- format: int32
- required: true
- description: The unique id for the operator.
- - name: name
- in: formData
- required: true
- type: string
- description: |
- The name for the operator. This is the name that we can show in the ui to describe this
- operator.
- defaultValue: LBAS Connection
- - name: operatorName
- in: formData
- required: true
- type: string
- description: |
- Name of the operator who backs this connection. This is a description field, and does not
- control any business logic. As such, all values are accepted.
- defaultValue: Some Operator
- - name: operatorCountry
- in: formData
- required: true
- type: string
- defaultValue: no
- description: |
- ISO country for this operator.
- - name: mode
- in: formData
- required: true
- type: string
- defaultValue: SIMULATE_ONLY
- description:
- The mode that we want for this operator. If set to SIMULATE_ONLY, we will simulate all
- request, including live ones.
- - name: url
- in: formData
- required: true
- type: string
- description: The url to the alertix service, typically http://host:port/ax/alertapi
- - name: username
- in: formData
- required: true
- type: string
- defaultValue: username
- description: The username to use when connecting to alertix
- - name: password
- in: formData
- required: true
- type: string
- defaultValue: password
- description: |
- The password to use when connectiong to alertix. This field is write only,
- and will not provide the password back when it's read back from the api.
- - name: additionalSubscribers
- in: formData
- required: false
- type: array
- description: |
- A list of additional subscribers to include in each alert. Each number must be a valid
- msisdn
- items:
- type: string
- - name: subscriberIncludeList
- in: formData
- required: false
- type: array
- description: |
- A list of subscribers to include, which will limit the alert to those subscribers, if they
- are within the area. This will also affect counts.
- items:
- type: string
- responses:
- 200:
- description: Operator added
- delete:
- operationId: deleteLbasOperator
- description: Delete an lbas operator
- tags:
- - LBAS
- parameters:
- - name: operatorId
- in: path
- type: integer
- format: int32
- required: true
- responses:
- 200:
- description: Operator deleted
- /sds/providers:
- get:
- description: Return the list of available SDS Channels
- operationId: getSdsProviders
- tags:
- - SDS
- responses:
- 200:
- description: List of all email servers
- schema:
- type: array
- items:
- $ref: '#/definitions/SdsServerInfo'
- /sds/callback:
- post:
- description: Callback for the SDS channel
- operationId: updateSdsJobState
- tags:
- - SDS
- parameters:
- - name: sdsStatuses
- in: body
- schema:
- type: array
- items:
- $ref: "#/definitions/SdsStatus"
- responses:
- 200:
- description: Response accepted
- /email/servers:
- get:
- description: Return the list of available Email Servers
- operationId: getEmailServers
- tags:
- - EmailServer
- responses:
- 200:
- description: List of all email servers
- schema:
- type: array
- items:
- $ref: '#/definitions/EmailServerInfo'
- post:
- description: Add a single email server
- operationId: addEmailServer
- parameters:
- - name: emailServer
- in: body
- schema:
- $ref: "#/definitions/EmailServerInfo"
- tags:
- - EmailServer
- responses:
- 200:
- description: Email Server created
- /email/servers/{serverId}:
- get:
- description: Return a single email server
- operationId: getEmailServer
- tags:
- - EmailServer
- parameters:
- - name: serverId
- in: path
- type: string
- required: true
- responses:
- 200:
- description: Matching server
- schema:
- $ref: '#/definitions/EmailServerInfo'
- put:
- description: Updatge a single email server
- operationId: updateEmailServer
- parameters:
- - name: serverId
- in: path
- type: string
- required: true
- - name: emailServer
- in: body
- schema:
- $ref: "#/definitions/EmailServerInfo"
- tags:
- - EmailServer
- responses:
- 200:
- description: Email Server updated
- delete:
- description: Delete a single email server
- operationId: deleteEmailServer
- parameters:
- - name: serverId
- in: path
- type: string
- required: true
- tags:
- - EmailServer
- responses:
- 200:
- description: Email Server deleted
- /sms/servers:
- get:
- description: Return the list of available Sms Servers
- operationId: getSmsServers
- tags:
- - SmsServer
- responses:
- 200:
- description: List of all email servers
- schema:
- type: array
- items:
- $ref: "#/definitions/SmsServerInfo"
- post:
- description: Refresh the list of servers
- operationId: refreshServers
- tags:
- - SmsServer
- responses:
- 200:
- description: Refresh request sent
- /sms/keywords:
- get:
- operationId: getKeywords
- tags:
- - SmsInbound
- responses:
- 200:
- description: List of available origin numbers and keywords
- schema:
- type: array
- items:
- $ref: '#/definitions/SmsAvailableNumber'
- /sms/inbound:
- get:
- operationId: getSmsInboundNumbers
- tags:
- - SmsInbound
- parameters:
- - name: ownerIds
- type: array
- items:
- type: integer
- format: int64
- in: query
- - name: search
- description: Search text to be applied to name, address, response and channel address.
- type: string
- required: false
- in: query
- - name: startPage
- type: integer
- format: int32
- in: query
- required: true
- default: 1
- - name: pageSize
- type: integer
- format: int32
- in: query
- required: true
- default: 25
- - name: sort
- type: string
- default: ORG_NAME
- in: query
- required: true
- - name: ascending
- type: boolean
- default: true
- in: query
- responses:
- 200:
- description: List of inbound configurations
- schema:
- $ref: '#/definitions/SmsInboundNumberResult'
- post:
- operationId: createSmsInboundNumber
- tags:
- - SmsInbound
- parameters:
- - name: smsInbonund
- schema:
- $ref: '#/definitions/SmsInboundRecord'
- in: body
- responses:
- 200:
- description: Inbound number created
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- 400:
- description: Validation errors for the record
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- 406:
- description: Inbound number already exists.
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- /sms/inbound/{number}:
- parameters:
- - name: number
- in: path
- required: true
- type: string
- put:
- operationId: addNumber
- tags:
- - SmsInbound
- parameters:
- - name: organization
- in: body
- schema:
- $ref: '#/definitions/SmsInboundOrganization'
- responses:
- 200:
- description: Inbound number created
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- 400:
- description: Validation errors for the record
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- 406:
- description: Inbound number already exists.
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- /sms/inbound/{number}/{keyword}:
- parameters:
- - name: number
- in: path
- required: true
- type: string
- - name: keyword
- in: path
- required: true
- type: string
- put:
- operationId: addKeywordNumber
- tags:
- - SmsInbound
- parameters:
- - name: organization
- in: body
- schema:
- $ref: '#/definitions/SmsInboundOrganization'
- responses:
- 200:
- description: Inbound number created
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- 400:
- description: Validation errors for the record
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- 406:
- description: Inbound number already exists.
- schema:
- $ref: '#/definitions/SmsInboundRecordSaveResult'
- delete:
- operationId: removeNumber
- tags:
- - SmsInbound
- responses:
- 200:
- description: Organization association removed if it existed.
- /sms/inbound/{number}/{keyword}/{organizationId}:
- parameters:
- - name: number
- in: path
- required: true
- type: string
- - name: keyword
- in: path
- required: true
- type: string
- - name: organizationId
- in: path
- required: true
- type: string
- delete:
- operationId: removeKeywordNumber
- tags:
- - SmsInbound
- responses:
- 200:
- description: Organization association removed if it existed.
- /channelOptions:
- parameters:
- - name: organizationId
- description: >
- Which organization to get the channel options for. If omitted, it will return the current
- organizations channel options
- in: query
- required: false
- type: string
- get:
- description: >
- Read the channel options that are currently configured for the provided organization/
- the user organization. If there is no channel configuration for the given organization, an
- empty ChannelOptions will be returned
- operationId: getChannelOptions
- tags:
- - ChannelOptions
- responses:
- 200:
- description: The current channel options for the organization
- schema:
- $ref: "#/definitions/ChannelOptions"
- 403:
- description: The current user does not have access to the given organization id.
- put:
- description: >
- Update the current organizations channel options. This will replace the current channel
- options for the organization.
- operationId: setChannelOptions
- tags:
- - ChannelOptions
- parameters:
- - name: channelOptions
- description: >
- The new channel options to set for the organization
- in: body
- required: true
- schema:
- $ref: "#/definitions/ChannelOptions"
- responses:
- 200:
- description: The current channel options for the organization
- schema:
- $ref: "#/definitions/ChannelOptions"
- 403:
- description: The current user does not have access to the given organization id.
- delete:
- description: >
- Clears the channel options for the organization, returning them to the empty default.
- operationId: clearChannelOptions
- tags:
- - ChannelOptions
- responses:
- 200:
- description: The current channel options for the organization
- schema:
- $ref: "#/definitions/ChannelOptions"
- 403:
- description: The current user does not have access to the given organization id.
- # End: config/paths.yaml
- definitions:
- # Start: common/definitions.yaml
- PropertyMap:
- type: object
- additionalProperties:
- type: string
- # Start: validation.yaml
- Validation:
- type: object
- properties:
- description:
- type: string
- value:
- type: string
- result:
- type: string
- enum:
- - ILLEGAL_VALUE
- - MISSING_REQUIRED
- - INVALID_FORMAT
- - DUPLICATE_VALUE
- # End: validation.yaml
- ValidationResult:
- type: object
- additionalProperties:
- $ref: '#/definitions/Validation'
- ParseResult:
- type: object
- properties:
- fileName:
- type: string
- settings:
- type: array
- items:
- type: string
- type:
- type: string
- warnings:
- type: array
- items:
- $ref: '#/definitions/ParseWarning'
- ParseWarning:
- type: object
- properties:
- sourceRef:
- type: string
- warning:
- type: string
- sourceData:
- type: string
- additionalProperties:
- type: string
- # End: common/definitions.yaml
- # Start: target/definitions.yaml
- # Start: TargetSelection.yaml
- # Start: types/AreaTarget.yaml
- # Start: AddressTarget.yaml
- AddressTarget:
- type: object
- discriminator: type
- properties:
- id:
- type: string
- description: Id for this area
- default: "1"
- type:
- type: string
- description: Discriminator used to distinguish AddressTarget types.
- name:
- type: string
- description: A name for this area
- default: "Area 1"
- propertyMatchers:
- type: array
- description: list of property matchers that must match for the area search.
- items:
- type: object
- properties:
- name:
- type: string
- description: name of property to match against
- value:
- type: string
- description: Value to match the property against
- exclusions:
- type: array
- description: List of source ids to exclude from the sending
- items:
- type: string
- selections:
- type: array
- description: Database selections for this area
- items:
- type: object
- properties:
- database:
- type: string
- description: The database for this selection
- regions:
- type: array
- description: regions to limit this database too, can be empty for entire database
- items:
- type: object
- properties:
- regionId:
- type: string
- regionType:
- type: string
- default: MUNICIPALITY
- extensions:
- type: array
- description: Extensions enabled for this selection
- items:
- type: object
- properties:
- extension:
- type: string
- description: name of this extension
- settings:
- type: object
- additionalProperties:
- type: string
- propertyMatchers:
- type: array
- description: list of property matchers that must match for the selection.
- items:
- type: object
- properties:
- name:
- type: string
- description: name of property to match against
- value:
- type: string
- description: Value to match the property against
- # End: AddressTarget.yaml
- AreaTarget:
- type: object
- allOf:
- - $ref: '#/definitions/AddressTarget'
- - properties:
- polygons:
- type: array
- description: Polgyons to add for this area
- items:
- $ref: '#/definitions/AreaPolygon'
- AreaPolygon:
- type: object
- properties:
- points:
- type: array
- items:
- type: object
- properties:
- latitude:
- type: number
- format: double
- longitude:
- type: number
- format: double
- # End: types/AreaTarget.yaml
- # Start: types/MatrikkelTarget.yaml
- MatrikkelTarget:
- type: object
- allOf:
- - $ref: '#/definitions/AddressTarget'
- - properties:
- matrikkelAddresses:
- type: array
- description: Matrikkel addresses to search
- items:
- $ref: '#/definitions/MatrikkelAddress'
- MatrikkelAddress:
- type: object
- properties:
- municipalityCode:
- type: integer
- format: int32
- gnr:
- type: integer
- format: int32
- bnr:
- type: integer
- format: int32
- fnr:
- type: integer
- format: int32
- snr:
- type: integer
- format: int32
- # End: types/MatrikkelTarget.yaml
- # Start: types/StreetTarget.yaml
- StreetTarget:
- type: object
- allOf:
- - $ref: '#/definitions/AddressTarget'
- - properties:
- streetAddresses:
- type: array
- description: Street addresses to search
- items:
- $ref: '#/definitions/StreetAddress'
- StreetAddress:
- type: object
- properties:
- municipalityCode:
- type: integer
- format: int32
- streetId:
- type: integer
- format: int32
- houseNumber:
- type: integer
- format: int32
- houseLetter:
- type: string
- apartmentId:
- type: string
- # End: types/StreetTarget.yaml
- # Start: types/AddressSearchTarget.yaml
- AddressSearchTarget:
- type: object
- allOf:
- - $ref: '#/definitions/AddressTarget'
- - properties:
- searchEntries:
- type: array
- description: Street addresses to search
- items:
- $ref: '#/definitions/AddressSearchEntry'
- AddressSearchEntry:
- type: object
- properties:
- description:
- type: string
- description: Optional description about where this entry came from, is about
- matchers:
- type: array
- items:
- $ref: '#/definitions/AddressSearchMatcher'
- AddressSearchMatcher:
- type: object
- properties:
- name:
- type: string
- description: Displayname for this matcher, For example gnr or bnr
- key:
- type: string
- description: "The key that we should search for, example: metaData.gnr, metaData.bnr"
- value:
- type: string
- description: The value the key should be matched against.
- # End: types/AddressSearchTarget.yaml
- # Start: types/DirectoryTarget.yaml
- GroupTarget:
- type: object
- description: Model to add a single group
- properties:
- groupId:
- description: Id of the group
- type: string
- name:
- type: string
- description: The name of this group
- default: Group name
- PersonTarget:
- type: object
- description: Model to add a single person
- properties:
- personId:
- description: Id of the person
- type: string
- name:
- type: string
- description: The name of this person
- default: Firstname lastname
- DirectoryTarget:
- type: object
- description: Model to add groups and persons.
- properties:
- id:
- type: string
- description: Unique id for this directory target within the alert
- default: directory
- name:
- type: string
- description: The name of this directory target
- default: Directory target
- groupIds:
- type: array
- items:
- type: string
- personIds:
- type: array
- items:
- type: string
- # End: types/DirectoryTarget.yaml
- # Start: types/DirectTarget.yaml
- DirectTarget:
- type: object
- description: Model to add a direct target with multiple recipients
- properties:
- id:
- type: string
- description: Id for this area
- default: "1"
- name:
- type: string
- description: A name for this area
- default: "Area 1"
- recipients:
- type: array
- items:
- $ref: '#/definitions/DirectRecipient'
- DirectRecipient:
- type: object
- description: Single direct target
- discriminator: type
- properties:
- id:
- type: string
- description: |
- An unique id for this target within the array. If null will be the index in the array.
- type:
- type: string
- description: Discriminator used to distinguish DirectRecipient types.
- name:
- type: string
- description: Name for the recipient
- address:
- type: string
- description: Address for the recipient
- longitude:
- type: number
- format: double
- description: The longitude position for the sender
- latitude:
- type: number
- format: double
- description: The latitude position for the sender
- language:
- type: string
- description: optional iso 2 letter language code
- categories:
- type: array
- description: list of categories that the recipent is associated with, for example company/private
- items:
- type: string
- channelAddresses:
- type: array
- description: addresses for channels that the recipient can be reached at.
- items:
- $ref: '#/definitions/TargetChannelAddress'
- dynamicProperties:
- type: object
- description: Additional freeform dynamic propeties for this recipient.
- additionalProperties:
- type: string
- TargetChannelAddress:
- type: object
- properties:
- channelId:
- type: string
- description: The id of the channel that the address belongs to.
- channelAddress:
- type: string
- description: The channel address.
- # End: types/DirectTarget.yaml
- TargetSelection:
- type: object
- properties:
- areas:
- type: array
- items:
- $ref: "#/definitions/AreaTarget"
- matrikkels:
- type: array
- items:
- $ref: "#/definitions/MatrikkelTarget"
- streets:
- type: array
- items:
- $ref: "#/definitions/StreetTarget"
- addressSearchTargets:
- type: array
- items:
- $ref: "#/definitions/AddressSearchTarget"
- persons:
- type: array
- items:
- $ref: "#/definitions/PersonTarget"
- directories:
- type: array
- items:
- $ref: "#/definitions/DirectoryTarget"
- groups:
- type: array
- items:
- $ref: "#/definitions/GroupTarget"
- direct:
- type: array
- items:
- $ref: "#/definitions/DirectTarget"
- channelIds:
- type: array
- description: which channel ids to count. Leave empty or null to count all channels.
- items:
- type: string
- channelOptions:
- description: |
- Optional options that describes how recipients should be addressed. If missing, all
- recipients will be sent on all their registered channels.
- $ref: "#/definitions/ChannelOptions"
- ChannelOptions:
- type: object
- description: |
- This describes how recipients should be addressed. This is a list of channels in the order they
- should be selected. Each channel may also have a list of prefix and postfix channels, which
- can be used to translate numbers from one channel to another. This is really only usefull for
- voice. By adding sms channel as a prefix or postfix to a voice priority, sms numbers will be
- attempted before or after voice numbers.
- If a recipient does not have any of the prioritized channels, we will send to all other channels
- for that recipient. For example, if we only set **voice** as prioritized, but also include an
- sms and email channel for a sending, recipients that don't have voice, will receive both sms and
- email alerts. If a person has voice, sms and email and this case, he will only get the voice
- message.
- This means that if the list of priorities is null or empty, then all channels will be included.
- properties:
- priorities:
- type: array
- description: |
- Entries of channels in the order they should be prioritized. The first found channel on a
- recipient is used ahead of the other options.
- items:
- $ref: "#/definitions/ChannelPriority"
- ChannelPriority:
- type: object
- description: |
- Single priority, which describes a channel that should be prioritized.
- properties:
- channelId:
- description: The channel id for this priority
- type: string
- prefixAddresses:
- description: |
- List of channel ids that we should match this priority for, and add their channel address
- before the address associated with the channel id for this priority. This can be used to
- add sms number before voice numbers when calling.
- type: array
- items:
- type: string
- postFixAddresses:
- description: |
- List of channel ids that we should match this priority for, and add their channel address
- after the address associated with the channel id for this priority. This can be used to
- add sms number after voice numbers when calling.
- type: array
- items:
- type: string
- # End: TargetSelection.yaml
- # Start: TargetResponses.yaml
- TargetRecipient:
- type: object
- description: Single recipient found for a count detail request
- allOf:
- - $ref: '#/definitions/DirectRecipient'
- - properties:
- targetType:
- type: string
- description: Type of target that was the source for this recipiebnt
- targetId:
- type: string
- description: Id of target that was the source for this recipiebnt
- targetFullId:
- type: string
- description: Full id of the target, with type.
- sourceId:
- type: string
- description: The source id for this recipient
- geohash:
- type: string
- description: The geohash string for the recipients position
- TargetGeoHash:
- type: object
- description: Single geohash entry
- properties:
- longitude:
- type: number
- format: double
- description: The longitude position for this recipient
- latitude:
- type: number
- format: double
- description: The latitude position for this recipient
- geohash:
- type: string
- description: The geohash string for the recipients position
- polygon:
- $ref: '#/definitions/AreaPolygon'
- count:
- type: array
- items:
- $ref: '#/definitions/TargetCount'
- # End: TargetResponses.yaml
- # Start: importDefinitions.yaml
- ImportTargetDescriptions:
- type: object
- description: |
- The **ImportTargetTypeDescription** describes the various target types that are supported, and
- which file types are supported for each of those targets.
- **FileTypeDescription**
- This describes the settings for a given filetype, and will also guide the application in how to
- parse the uploaded file. Each file type description has an id, and a ImportTargetDescription
- will reference which filetypes are supported.
- **ImportTargetDescrption**
- There is an ImportTargetDescrption for each supported Target that can be uploaded.
- properties:
- fileTypes:
- description: List of filetypes that the system supports
- type: array
- items:
- $ref: '#/definitions/FileTypeDescription'
- importTargets:
- type: array
- description: List of import targets that the system supports
- items:
- $ref: '#/definitions/ImportTargetDescription'
- FileTypeDescription:
- type: object
- description: |
- This describes a file type, and the settings required for that filetype.
- properties:
- id:
- description: unique id for this file type.
- type: string
- settingFields:
- type: array
- description: The list of fields that applies to this file type.
- items:
- $ref: '#/definitions/ImportSettingField'
- ImportTargetDescription:
- type: object
- description: |
- This describes the settings that exists for an import target.
- properties:
- type:
- description: The type for this target
- type: string
- supportedFileTypes:
- description: |
- List of supported files types for this import target. This is linked to FileTypeDescription
- ids. So the type represented here will refer to one of the FileTypeDescriptions.
- type: array
- items:
- type: string
- settingFields:
- type: array
- description: The list of fields that applies to this file type.
- items:
- $ref: '#/definitions/ImportSettingField'
- ImportSettingField:
- type: object
- description: |
- A single setting that can be provided for import of the given target. Each setting has a a type
- described by *ImportSettingFieldType*. The different setting types have different properties
- that are required.
- **FIELD_MAPPING**
- This is used for settings that refer to mapping fields from the source file into a specific
- field. This will be used in the settings array as <settingsKey>:<sourceField>. Where
- sourceField refers to a column header or index in the source data file.
- **ARRAY_FIELD_MAPPING**
- This is the same as FIELD_MAPPING, except the setting can occur multiple times, and must have
- the format <settingsKey>[]:<sourceField>. This is for example to support multiple sms fields
- in an import.
- **MAP_FIELD_MAPPING**
- This is used for adding multiple field mappings that are dynamic. This can be used to map fields
- that don't exist in the system into the system. The resulting setting formats are of the kind
- <settingsKey>:<targetField>:<sourceField>. Here targetField refers to the dynamic propety that
- should be written in the final import, while sourceField is the field to read from.
- **FLAG**
- This is just for a boolean flag that is enabled or disabled.
- **SETTING**
- A setting that applies to the import as a whole, and is not specific to the data imported.
- Examples include encoding, field separator, country code and so on.
- **OPTION**
- A setting that has to be picked from a set of available options. If this is set, then the
- options array will also be present, and contain valid values.
- properties:
- settingsKey:
- type: string
- description: The key that this setting will hold in the settings array
- type:
- description: The type for this ImportSettingField
- $ref: '#/definitions/ImportSettingFieldType'
- options:
- description: The options for the OPTION type setting.
- type: array
- items:
- type: string
- ImportSettingFieldType:
- type: string
- description: This is an enum of the various settings that exists
- enum:
- - SETTING
- - FIELD_MAPPING
- - ARRAY_FIELD_MAPPING
- - MAP_FIELD_MAPPING
- - FLAG
- - OPTION
- PredefinedImportResult:
- type: object
- description: Result for fetching a page of predefined imports.
- properties:
- total:
- description: Total number of predefined imports matching the query.
- type: integer
- format: int32
- items:
- type: array
- description: List of the predefined imports that was found.
- items:
- $ref: '#/definitions/PredefinedImport'
- PredefinedImport:
- type: object
- description: A Predefined import
- properties:
- id:
- type: integer
- format: int32
- description: The unique id for this predefined import.
- name:
- type: string
- description: The name for the predefined import
- description:
- type: string
- description: The description for the predefined import
- properties:
- type: object
- description: A set of free form properties for the predefined import.
- additionalProperties:
- type: string
- ownerId:
- type: string
- description: The owner organization of the import. This will be set server side automatically.
- ownerName:
- type: string
- description: The name of the owning organization
- visibleToChildren:
- type: boolean
- description: Is visible only to owner if false
- created:
- type: string
- format: date-time
- description: When this PredefinedImport was created
- modified:
- type: string
- format: date-time
- description: When this PredefinedImport was last modified
- type:
- description: This is the type of target that this import supports
- type: string
- settings:
- description: |
- This is the list of settings to pass on to the parser when importing a file. This will
- be generated server side based on the setting values.
- type: array
- items:
- type: string
- targetSettings:
- type: object
- description: Map of settings that apply to the target.
- additionalProperties:
- $ref: '#/definitions/PredefinedImportSetting'
- fileSettings:
- type: object
- description: Map of settings that apply to the file
- additionalProperties:
- $ref: '#/definitions/PredefinedImportSetting'
- PredefinedImportSetting:
- type: object
- description: |
- A single predefined seting for a Predefined import. These need to refer to an ImportSettingField
- from a ImportTargetDescription or FileTypeDescription. Depending on the type of field, one of
- the value fields will be set.
- properties:
- flagValue:
- type: boolean
- description: If this is a FLAG, then this will contain the flag value
- arrayValue:
- type: array
- description: |
- If this is a ARRAY_FIELD_MAPPING, then this will contain the list of columns to map
- items:
- type: string
- mapValue:
- type: object
- description: |
- If this is a MAP_FIELD_MAPPING, then this will contain the map of settings
- additionalProperties:
- type: string
- stringValue:
- type: string
- description: |
- If this is a SETTING or FIELD_MAPPING, this will contain the string value to use.
- type:
- description: |
- The type for this ImportSettingField. This will be provided by the server, but is
- ignored when sent from the client.
- $ref: '#/definitions/ImportSettingFieldType'
- # End: importDefinitions.yaml
- # Start: template/definitions.yaml
- TargetParseResult:
- type: object
- properties:
- target:
- $ref: "#/definitions/TargetSelection"
- parseResult:
- $ref: '#/definitions/ParseResult'
- TargetStoreResult:
- type: object
- properties:
- templateId:
- type: string
- parseResult:
- $ref: '#/definitions/ParseResult'
- # End: template/definitions.yaml
- # End: target/definitions.yaml
- # Start: target/counts.yaml
- TargetCountReport:
- type: object
- properties:
- targetId:
- type: string
- targetType:
- type: string
- targetFullId:
- type: string
- count:
- type: array
- items:
- $ref: '#/definitions/TargetCount'
- TargetCount:
- type: object
- properties:
- channelId:
- type: string
- qualifier:
- type: string
- count:
- type: integer
- format: int32
- TargetCountSummary:
- type: object
- properties:
- targetType:
- type: string
- count:
- type: array
- items:
- $ref: '#/definitions/TargetCount'
- # End: target/counts.yaml
- # Start: alert/channels.yaml
- VoiceChannel:
- type: object
- properties:
- config:
- type: object
- properties:
- locationId:
- type: integer
- format: int32
- priority:
- type: integer
- format: int32
- default: 5
- outboundLines:
- type: integer
- format: int32
- default: 50
- retryIntervalMinutes:
- type: integer
- format: int32
- default: 30
- retries:
- type: integer
- format: int32
- default: 3
- cancelAfterHours:
- type: integer
- format: int32
- default: 72
- pauseFrom:
- type: string
- description: "When pauses should start, in the format HH:mm (24hr)"
- default: "22:00"
- pauseDurationMinutes:
- description: "Duration of pauses from pauseFrom, in minutes. 480 is 8 hours."
- type: integer
- format: int32
- default: 480
- origin:
- type: string
- description: "What number to call from."
- validHours:
- type: integer
- format: int32
- default: 24
- message:
- $ref: '#/definitions/VoiceMessage'
- categories:
- type: array
- description: |
- List of categories to limit the recipients to, or
- null/empty to allow all categories
- items:
- type: string
- VoiceMessage:
- type: object
- properties:
- callFlowYaml:
- type: string
- description: The Callflow as a YAML string.
- audioReferences:
- type: array
- items:
- $ref: '#/definitions/AudioReference'
- AudioReference:
- type: object
- properties:
- url:
- type: string
- description: Location for where the corresponding audio file could be found
- name:
- type: string
- description: Name for the audio, either filename, or other descriptive name.
- parameter:
- type: string
- description: Which parameter slot in the callflow this should fill.
- SmsChannel:
- type: object
- properties:
- config:
- type: object
- properties:
- smsServerId:
- type: integer
- format: int32
- default: -1
- priority:
- type: integer
- format: int32
- default: 7
- description: Priority for this sending, lower values means higher priority
- validHours:
- type: integer
- format: int32
- default: 48
- description: How many hours should the sending be valid, up to a max of 1 week
- keywordValidHours:
- type: integer
- format: int32
- default: 48
- description: How many hours should the keyword be valid for, defaults to validHours.
- messages:
- type: array
- items:
- $ref: '#/definitions/SmsMessage'
- categories:
- type: array
- description: |
- List of categories to limit the recipients to, or
- null/empty to allow all categories
- items:
- type: string
- SmsKeyword:
- type: object
- properties:
- alternatives:
- type: array
- items:
- type: string
- errorsAllowed:
- type: integer
- format: int32
- SmsReply:
- type: object
- properties:
- replyType:
- type: string
- enum:
- - FREEFORM
- - OPTION
- keyword:
- $ref: '#/definitions/SmsKeyword'
- options:
- type: array
- items:
- type: object
- properties:
- keyword:
- $ref: '#/definitions/SmsKeyword'
- response:
- $ref: '#/definitions/PropertyMap'
- SmsMessage:
- type: object
- properties:
- message:
- type: string
- default: Sample SMS Message
- language:
- type: string
- description: iso language for the message
- default: en
- origin:
- type: string
- description: origin number/alphanumeric to use in the sms
- default: UMS
- reply:
- $ref: '#/definitions/SmsReply'
- SdsChannel:
- type: object
- properties:
- sdsServerId:
- type: string
- messages:
- type: array
- items:
- $ref: '#/definitions/SdsMessage'
- categories:
- type: array
- description: |
- List of categories to limit the recipients to, or
- null/empty to allow all categories
- items:
- type: string
- SdsMessage:
- type: object
- properties:
- message:
- type: string
- default: Sample SMS Message
- language:
- type: string
- description: iso language for the message
- default: en
- displayMode:
- type: string
- enum:
- - NORMAL
- - SILENT
- - FLASH
- EmailChannel:
- type: object
- properties:
- emailServerId:
- type: string
- description: The email server id to use. Prefer this over connection
- emailConnection:
- $ref: '#/definitions/EmailConnection'
- fromName:
- type: string
- description: The name of the sender
- default: Heimdall Alert
- fromEmail:
- type: string
- description: The email address to mark this mail as sent from
- default: alert@ums.no
- messages:
- type: array
- items:
- $ref: '#/definitions/EmailMessage'
- categories:
- type: array
- description: |
- List of categories to limit the recipients to, or
- null/empty to allow all categories
- items:
- type: string
- # Start: emailConnection.yaml
- EmailConnection:
- type: object
- properties:
- host:
- type: string
- description: The host server to connect to for email sending
- port:
- type: integer
- format: int32
- description: The port to connect to on the server
- default: 25
- username:
- type: string
- description: The username to connect to the SMTP server
- password:
- type: string
- description: The password for the SMTP server to connect to
- ssl:
- type: boolean
- description: If an ssl connection should be used
- default: false
- # End: emailConnection.yaml
- EmailMessage:
- type: object
- properties:
- subject:
- type: string
- default: Message from UMS
- description: The subject to use for the email
- body:
- type: string
- default: Hello from UMS Alert
- description: The complete email body to use for the email
- bodyOnly:
- type: string
- default: Message body only
- description: |
- The body separate from header and footer to use for the email,
- combine this with bodyHeader and bodyFooter to get the complete e-mail
- bodyHeader:
- type: string
- default: Message body header
- description: Gets prepended to the body message
- bodyFooter:
- type: string
- default: Message body footer
- description: Gets apended to the body message
- language:
- type: string
- default: en
- description: |
- The language for this email message, in case multiple messages are provided in
- different languages. Based on the preferred language of the recipient, the
- corresponding email message will be used. If there is no match, the first message
- for an EmailChannel will be used.
- LbasChannel:
- type: object
- properties:
- lbasOperatorId:
- type: integer
- format: int32
- default: -1
- description: |
- Legacy property, ignored. This used to store the lbas operator id used for sending, but
- this has been moved to the organization configuration. As such, this property will be
- ignored, and will always return -1 from the server. The actual lbas operator id is looked
- up from the organization of the alert composer.
- defaultMessage:
- $ref: '#/definitions/SmsMessage'
- durationHours:
- type: integer
- format: int32
- default: 72
- description: Number of hours the sending should be valid.
- priority:
- type: integer
- format: int32
- default: 7
- description: Priority for this sending, lower values means higher priority
- countryCodeMessages:
- type: array
- description: Additional messages specific to the subscribers country
- items:
- type: object
- properties:
- countryCode:
- type: string
- default: no
- description: 2 letter iso country code.
- message:
- $ref: '#/definitions/SmsMessage'
- WebChannel:
- type: object
- discriminator: type
- properties:
- type:
- type: string
- description: Discriminator used to distinguish web channel types.
- targets:
- type: array
- description: Url that the CAP alert should be POSTed to
- items:
- type: string
- default: http://requestb.in/wgsl5fwg
- message:
- type: object
- properties:
- headline:
- type: string
- default: "Cap Alert"
- message:
- type: string
- default: "Cap Message"
- capConfig:
- type: object
- description: Sets the various properties on the cap alert.
- properties:
- status:
- type: string
- description: "Value for the cap field status"
- default: "Actual"
- msgType:
- type: string
- description: "Value for the cap field msgType"
- default: "Alert"
- scope:
- type: string
- description: "Value for the cap field scope"
- default: "Public"
- category:
- type: string
- description: "Value for the cap field category"
- default: "Other"
- urgency:
- type: string
- description: "Value for the cap field urgency"
- default: "Unknown"
- certainty:
- type: string
- description: "Value for the cap field certainty"
- default: "Observed"
- severity:
- type: string
- description: "Value for the cap field severity"
- default: "Unknown"
- language:
- type: string
- description: "Value for the cap field language"
- default: "en-US"
- expiryHours:
- type: integer
- format: int32
- description: How long after the send time should the expiry be set
- default: 72
- WebChannelStatus:
- type: object
- allOf:
- - $ref: '#/definitions/WebChannel'
- - properties:
- capXml:
- type: string
- SmartphoneSendingSummary:
- type: object
- allOf:
- - $ref: "#/definitions/SmartphoneChannel"
- - properties:
- refno:
- type: integer
- submittedTime:
- type: string
- format: date-time
- SmartphoneChannel:
- type: object
- discriminator: type
- properties:
- type:
- type: string
- description: Discriminator used to distinguish SmartphoneChannel types.
- deliveryMode:
- type: string
- description: How this message should be delivered.
- enum:
- - FORCE
- - LOCATION
- - COUNT
- expireAfterHours:
- type: integer
- format: int32
- default: 72
- description: How long after sending should the alert expire.
- locationBased:
- type: boolean
- description: If this should be a location based sending
- default: true
- addressBased:
- type: boolean
- description: If this should be a location based sending
- default: false
- appId:
- type: string
- description: The app id to use.
- message:
- type: object
- properties:
- subject:
- type: string
- default: Smartphone message subject
- body:
- type: string
- default: Smartphone message body
- attachments:
- type: array
- description: list of urls to provide as attachments.
- items:
- $ref: '#/definitions/Attachment'
- responseConfig:
- type: object
- description: configures how responses should be handled.
- properties:
- responseUrl:
- type: string
- description: The url that responses should be posted to.
- responseType:
- type: string
- enum:
- - NONE
- - FREE
- - ALTERNATIVES
- responseOptions:
- type: array
- description: list of options that the user can pick for alternatives options.
- items:
- type: object
- properties:
- key:
- type: string
- description: The key to report back when this option is selected
- name:
- type: string
- description: The display name to show to the recipient for this option.
- TwitterChannel:
- type: object
- properties:
- consumerKey:
- type: string
- consumerSecret:
- type: string
- accessToken:
- type: string
- accessTokenSecret:
- type: string
- status:
- type: string
- attachment:
- $ref: '#/definitions/Attachment'
- FacebookChannel:
- type: object
- properties:
- appId:
- type: string
- default: appId
- description: The ID of the facebook app
- appSecret:
- type: string
- default: appSecret
- description: The app secret key from Facebook
- accessToken:
- type: string
- default: accessToken
- description: The facebook user's access token
- pageId:
- type: string
- default: pageId
- description: The ID of the page we will post to on Facebook
- post:
- type: string
- default: Facebook post
- description: The message to post to facebook
- attachment:
- type: object
- description: Optional attachment for the post
- properties:
- link:
- type: string
- picture:
- type: string
- description: Optional url for a picture for this attachment.
- name:
- type: string
- description: Optional name for this link
- caption:
- type: string
- description: Optional caption for the link
- description:
- type: string
- description: Optional description for the link
- Attachment:
- type: object
- properties:
- name:
- type: string
- url:
- type: string
- mediaType:
- type: string
- AlertItemState:
- type: string
- enum:
- - DELIVERED
- - IN_PROGRESS
- - FAILED
- - NOT_CONFIRMED
- - DUPLICATE
- - IGNORED
- - CANCELLED
- # Start: ChannelId.yaml
- ChannelId:
- type: string
- enum:
- - VOICE
- - SMS
- - LBAS
- - EMAIL
- - FACEBOOK
- - TWITTER
- - SMARTPHONE
- - WEB
- - SDS
- # End: ChannelId.yaml
- # End: alert/channels.yaml
- # Start: alert/response/definitions.yaml
- SmsResponse:
- type: object
- properties:
- fromNumber:
- type: string
- toNumber:
- type: string
- message:
- type: string
- timeStamp:
- type: integer
- format: int64
- messageId:
- type: integer
- format: int64
- opeartor:
- type: string
- operatorReference:
- type: string
- SmsRegistration:
- type: object
- properties:
- refno:
- type: integer
- itemId:
- type: integer
- format: int64
- SmartphoneDeliveryValues:
- type: string
- enum:
- - DELIVERED
- - FAILED
- # End: alert/response/definitions.yaml
- # Start: config/definitions.yaml
- SmsServerInfo:
- type: object
- properties:
- serverId:
- type: integer
- format: int32
- description:
- type: string
- unicodeSupported:
- type: boolean
- flashSupported:
- type: boolean
- created:
- type: string
- format: date-time
- SmsInboundNumberResult:
- type: object
- properties:
- count:
- type: integer
- format: int32
- items:
- type: array
- items:
- $ref: '#/definitions/SmsInboundNumber'
- SmsInboundNumber:
- type: object
- properties:
- number:
- type: string
- keyword:
- type: string
- organizations:
- type: array
- items:
- $ref: '#/definitions/SmsInboundOrganization'
- lastModified:
- type: string
- format: date-time
- created:
- type: string
- format: date-time
- SmsInboundNumberSort:
- type: string
- enum:
- - ORG_NAME
- - NUMBER
- - LAST_MODIFIED
- SmsInboundOrganization:
- type: object
- discriminator: type
- properties:
- organizationId:
- type: string
- organizationName:
- type: string
- organizationPath:
- type: array
- items:
- type: string
- type:
- type: string
- description: Discriminator used to distinguish SmsInbountOrganization types.
- SmsInboundRecord:
- allOf:
- - $ref: "#/definitions/SmsInboundOrganization"
- - properties:
- number:
- type: string
- keyword:
- type: string
- SmsInboundRecordSaveResult:
- type: object
- properties:
- saved:
- type: boolean
- errors:
- $ref: '#/definitions/SmsInboundRecordValidationResult'
- SmsInboundRecordValidationResult:
- type: object
- properties:
- number:
- $ref: '#/definitions/Validation'
- keyword:
- $ref: '#/definitions/Validation'
- organizationId:
- $ref: '#/definitions/Validation'
- SmsAvailableNumber:
- type: object
- properties:
- number:
- type: string
- keywords:
- type: array
- items:
- $ref: "#/definitions/SmsAvailableKeyword"
- SmsAvailableKeyword:
- type: object
- description: |
- When a keyword has been reserved, instead of reusing that keyword, the sender will have to
- use a different keyword. The keyword returned here in the keyword attribute, is the keyword
- that should be used. The aliasFor describes the keyword that is originally stored. If the
- keyword was not reserved, the keyword and aliasFor are the same.
- properties:
- keyword:
- type: string
- aliasFor:
- type: string
- lastRefno:
- description: The alert where this keyword was used
- type: integer
- format: int32
- lastName:
- description: The name of the alert where this keyword was used
- type: string
- reservation:
- description: When the keyword was last reserved
- type: string
- format: date-time
- expire:
- description: When the keyword reservation will end
- type: string
- format: date-time
- SdsServerInfo:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- country:
- type: string
- numberFormats:
- type: array
- items:
- type: string
- SdsStatus:
- type: object
- properties:
- jobId:
- type: object
- properties:
- value:
- type: string
- subscriberAddress:
- type: object
- properties:
- addressType:
- type: string
- value:
- type: string
- timestamp:
- type: string
- format: date-time
- subscriberStatus:
- type: string
- EmailServerInfo:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- bodyHeader:
- type: string
- bodyFooter:
- type: string
- emailConnection:
- $ref: '#/definitions/EmailConnection'
- LbasOperator:
- type: object
- description: |
- The configuration for a single lbas operator. An operator can be set in a simulate only mode
- to force all sendings sent with that operator to be only simulation sendings. There is also
- an option to add additional subscribers, which will always be alerted for all alerts sent using
- this operator. Finally, it is possible to configure a subscribeIncludeList, which will filter
- all sendings to only send to those given numbers. This can help in live testing by limiting who
- we actually send to.
- properties:
- id:
- type: integer
- format: int32
- description: The unique id for the operator.
- name:
- type: string
- description: |
- The name for the operator. This is the name that we can show in the ui to describe this
- operator.
- operatorName:
- type: string
- description: |
- Name of the operator who backs this connection. This is a description field, and does not
- control any business logic. As such, all values are accepted.
- operatorCountry:
- type: string
- description: |
- ISO country for this operator.
- mode:
- $ref: '#/definitions/LbasOperatorMode'
- description:
- The mode that we want for this operator. If set to SIMULATE_ONLY, we will simulate all
- request, including live ones.
- url:
- type: string
- description: The url to the alertix service, typically http://host:port/ax/alertapi
- username:
- type: string
- description: The username to use when connecting to alertix
- password:
- type: string
- description: |
- The password to use when connectiong to alertix. This field is write only,
- and will not provide the password back when it's read back from the api.
- additionalSubscribers:
- type: array
- description: |
- A list of additional subscribers to include in each alert. Each number must be a valid
- msisdn
- items:
- type: string
- subscriberIncludeList:
- type: array
- description: |
- A list of subscribers to include, which will limit the alert to those subscribers, if they
- are within the area. This will also affect counts.
- items:
- type: string
- LbasOperatorMode:
- type: string
- description: |
- Mode for lbas operator.
- * __PASSTHROUGH__ Means that the mode will be passed on to Alertix, Live sendings will go live
- * __SIMULATE_ONLY__ All sendings will be simulated, including live sendings.
- enum:
- - PASSTHROUGH
- - SIMULATE_ONLY
- # End: config/definitions.yaml
- # Start: alert/definitions.yaml
- ResponseDetail:
- type: object
- description: details about an alert response
- properties:
- responseId:
- type: string
- description: Unique id for the response.
- receivedFrom:
- type: string
- description: The address that we received the response on.
- receivedOn:
- type: string
- description: The address that we received the response on.
- sender:
- type: object
- description: The person that sent the alert, if details exist
- properties:
- name:
- type: string
- address:
- description: postal address for the sender
- type: string
- longitude:
- type: number
- format: double
- description: The longitude position for the sender
- latitude:
- type: number
- format: double
- description: The latitude position for the sender
- response:
- type: object
- properties:
- type:
- type: string
- enum:
- - FREEFORM
- - ALTERNATIVE
- body:
- type: string
- description: For freeform only, the body text for the sending
- attachments:
- type: array
- description: For freeform only, optional list of attachments
- items:
- $ref: '#/definitions/Attachment'
- responseAlternatives:
- type: array
- description: For alternative only, the various options selected
- items:
- type: object
- properties:
- name:
- description: the name of the property
- type: string
- value:
- description: the value for the response.
- type: string
- AlertStatusCount:
- type: object
- description: Status counts for a single alert
- properties:
- counts:
- type: array
- items:
- type: object
- properties:
- channelId:
- type: string
- reason:
- type: string
- description: |
- For certain item states, there is also an attached reason, which explains why an
- item was ignored/failed/cancelled.
- itemState:
- type: string
- enum:
- - IGNORED
- - DUPLICATE
- - IN_PROGRESS
- - NOT_CONFIRMED
- - CANCELLED
- - FAILED
- - DELIVERED
- count:
- type: integer
- format: int32
- durationMs:
- type: integer
- format: int64
- AlertResponseCount:
- type: object
- description: Response counts for a single alert
- properties:
- total:
- type: integer
- format: int32
- description: Total response count for the alert.
- counts:
- type: array
- items:
- type: object
- properties:
- channelId:
- type: string
- description: The channel that the response count is for.
- responseType:
- type: string
- description: |
- Type of response. If freeform, response option and value will be null,
- otherwise there will be a response option and value, and the count for that.
- enum:
- - FREEFORM
- - ALTERNATIVE
- responseOption:
- type: string
- description: For ALTERNATIVE response type, this is the option we are counting.
- responseValue:
- type: string
- description: For ALTERNATIVE response type, this is the value we are counting.
- count:
- type: integer
- format: int32
- AlertDetails:
- type: object
- description: Details for an alert
- properties:
- refno:
- type: integer
- format: int32
- name:
- type: string
- mainMessage:
- type: string
- alertMode:
- type: string
- description: |
- The mode for this alert.
- alertCategory:
- type: string
- description: The category assigned to this alert.
- additionalProperties:
- $ref: '#/definitions/PropertyMap'
- channels:
- $ref: '#/definitions/AlertChannels'
- targets:
- $ref: '#/definitions/TargetSelection'
- AlertChannels:
- type: object
- properties:
- voice:
- $ref: '#/definitions/VoiceChannel'
- sms:
- $ref: '#/definitions/SmsChannel'
- email:
- $ref: '#/definitions/EmailChannel'
- lbas:
- $ref: '#/definitions/LbasChannel'
- smartphone:
- $ref: '#/definitions/SmartphoneChannel'
- web:
- $ref: '#/definitions/WebChannelStatus'
- facebook:
- $ref: '#/definitions/FacebookChannel'
- twitter:
- $ref: '#/definitions/TwitterChannel'
- sds:
- $ref: '#/definitions/SdsChannel'
- AlertSummary:
- type: object
- description: Summary for a single alert
- properties:
- refno:
- type: integer
- format: int32
- name:
- type: string
- mainMessage:
- type: string
- additionalProperties:
- $ref: '#/definitions/PropertyMap'
- composer:
- $ref: '#/definitions/AlertComposer'
- alertState:
- $ref: '#/definitions/AlertState'
- mode:
- description: The mode for this alert.
- $ref: '#/definitions/AlertMode'
- alertCategory:
- type: string
- description: The category assigned to this alert.
- channelIds:
- type: array
- description: List of channel ids present in this summary, in channel id order.
- items:
- type: string
- channels:
- $ref: '#/definitions/AlertChannels'
- targets:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- type:
- type: string
- id:
- type: string
- fullId:
- type: string
- statusCount:
- $ref: '#/definitions/AlertStatusCount'
- responseCount:
- $ref: '#/definitions/AlertResponseCount'
- areas:
- type: array
- items:
- $ref: '#/definitions/AreaTarget'
- groups:
- type: array
- items:
- $ref: '#/definitions/GroupTarget'
- persons:
- type: array
- items:
- $ref: '#/definitions/PersonTarget'
- matrikkel:
- type: array
- items:
- $ref: '#/definitions/MatrikkelTarget'
- addressSearch:
- type: array
- items:
- $ref: '#/definitions/AddressSearchTarget'
- street:
- type: array
- items:
- $ref: '#/definitions/StreetTarget'
- direct:
- type: array
- items:
- $ref: "#/definitions/DirectTarget"
- directory:
- type: array
- items:
- $ref: "#/definitions/DirectoryTarget"
- AlertComposer:
- type: object
- description: Details about the composer for the alert.
- properties:
- ownerId:
- type: string
- description: |
- Numeric ownerId. This has to be a number, but a string is used so that it does not break
- JavaScript with regards to numeric precission.
- userId:
- type: string
- description: |
- Numeric userId. This has to be a number, but a string is used so that it does not break
- JavaScript with regards to numeric precission.
- ownerName:
- type: string
- userName:
- type: string
- name:
- type: string
- AlertState:
- type: object
- properties:
- created:
- type: string
- format: date-time
- scheduled:
- type: string
- format: date-time
- submittedTime:
- type: string
- format: date-time
- sentTime:
- type: string
- format: date-time
- cancelTime:
- type: string
- format: date-time
- doneTime:
- type: string
- format: date-time
- state:
- type: string
- enum:
- - CREATED
- - SCHEDULED
- - SUBMITTED
- - SENT
- - DONE
- - CANCELLED
- AlertListSummaryReport:
- type: object
- description: Report of alert summaries
- properties:
- total:
- description: Total number of alerts matching the query.
- type: integer
- format: int32
- alerts:
- type: array
- items:
- $ref: '#/definitions/AlertListSummary'
- AlertMode:
- type: string
- description: |
- The mode for an alert.
- * LIVE - The alert is live, and will be delivered to devices
- * SIMULATE - The alert will be simulated, as close as possible to live, without delivery
- * DISABLED - The alert cannot be sent. Usefull for creating templates.
- enum:
- - LIVE
- - SIMULATE
- - DISABLED
- AlertListSummary:
- type: object
- description: List summary for a single alert
- discriminator: type
- properties:
- refno:
- type: integer
- format: int32
- type:
- type: string
- description: Discriminator used to distinguish AlertListSummary types.
- name:
- type: string
- mainMessage:
- type: string
- additionalProperties:
- $ref: '#/definitions/PropertyMap'
- composer:
- $ref: '#/definitions/AlertComposer'
- alertState:
- $ref: '#/definitions/AlertState'
- mode:
- $ref: '#/definitions/AlertMode'
- alertCategory:
- type: string
- description: The category assigned to this alert.
- channels:
- type: array
- description: list of channel ids included
- items:
- type: string
- statusCount:
- $ref: '#/definitions/AlertStatusCount'
- response:
- type: integer
- format: int32
- AlertReport:
- type: object
- description: List summary for a single alert
- allOf:
- - $ref: '#/definitions/AlertListSummary'
- - properties:
- voiceChannel:
- $ref: '#/definitions/VoiceChannel'
- smsChannel:
- $ref: '#/definitions/SmsChannel'
- targets:
- type: array
- items:
- $ref: '#/definitions/AlertReportTarget'
- AlertReportTarget:
- type: object
- properties:
- name:
- type: string
- type:
- type: string
- id:
- type: string
- fullId:
- type: string
- AlertItemDetails:
- type: object
- properties:
- total:
- type: integer
- format: int32
- items:
- type: array
- items:
- $ref: '#/definitions/AlertItemDetail'
- AlertItemDetail:
- type: object
- description: Single item detail for an alert.
- properties:
- alertRecipientId:
- type: string
- description: The id for the recipient that this detail belongs to.
- targetType:
- type: string
- description: Type of target that was the source for this recipiebnt
- targetId:
- type: string
- description: Id of target that was the source for this recipiebnt
- targetFullId:
- type: string
- description: Full id of the target, with type.
- sourceId:
- type: string
- description: Hello
- name:
- type: string
- description: The name of the recipient
- address:
- type: string
- description: The postal address of the recipient
- language:
- type: string
- description: The language spoken by the recipient
- longitude:
- type: number
- format: double
- description: The longitude position for this recipient
- latitude:
- type: number
- format: double
- description: The latitude position for this recipient
- geohash:
- type: string
- description: The geohash string for the recipients position
- lastModified:
- type: string
- format: date-time
- description: When this record was last modified.
- channelId:
- type: string
- description: The id of the channel used.
- channelAddress:
- type: string
- description: The address on the channel used to send.
- categories:
- type: array
- description: List of categories set for this recipient
- items:
- type: string
- dynamicProperties:
- type: object
- description: Additional freeform dynamic propeties for this recipient.
- additionalProperties:
- type: string
- reason:
- type: string
- description: |
- For certain item states, there is also an attached reason, which explains why an
- item was ignored/failed/cancelled.
- itemState:
- type: string
- enum:
- - IGNORED
- - DUPLICATE
- - IN_PROGRESS
- - NOT_CONFIRMED
- - CANCELLED
- - FAILED
- - DELIVERED
- durationMs:
- type: integer
- format: int64
- description: |
- Total number of milliseconds a communication has been open for this item. This only
- applies to voice sendings currently.
- AlertResponseDetails:
- type: object
- properties:
- total:
- type: integer
- format: int32
- items:
- type: array
- items:
- $ref: '#/definitions/AlertResponseDetail'
- AlertGeoPointStatus:
- type: object
- description: Single point of status
- properties:
- latitude:
- type: number
- format: double
- longitude:
- type: number
- format: double
- hash:
- type: string
- description: Geohash used for this point
- targetType:
- type: string
- description: Type of target that was the source for this recipiebnt
- targetId:
- type: string
- description: Id of target that was the source for this recipiebnt
- targetFullId:
- type: string
- description: Full id of the target, with type.
- totalCount:
- $ref: '#/definitions/AlertStatusCount'
- AlertGeoPointResponse:
- type: object
- description: Single point of status
- properties:
- latitude:
- type: number
- format: double
- longitude:
- type: number
- format: double
- hash:
- type: string
- description: Geohash used for this point
- totalCount:
- $ref: '#/definitions/AlertResponseCount'
- AlertResponseDetail:
- type: object
- description: Single response detail for an alert.
- properties:
- alertRecipientId:
- type: string
- description: The id for the recipient that this detail belongs to.
- targetType:
- type: string
- description: Type of target that was the source for this recipiebnt
- targetId:
- type: string
- description: Id of target that was the source for this recipiebnt
- targetFullId:
- type: string
- description: Full id of the target, with type.
- name:
- type: string
- description: The name of the recipient
- address:
- type: string
- description: The postal address of the recipient
- longitude:
- type: number
- format: double
- description: The longitude position for this recipient
- latitude:
- type: number
- format: double
- description: The latitude position for this recipient
- geohash:
- type: string
- description: The geohash string for the recipients position
- responseTime:
- type: string
- format: date-time
- description: When this response was received
- receivedOn:
- type: string
- description: Our address that we received the reponse on
- receivedFrom:
- type: string
- description: What the senders address was.
- channelId:
- type: string
- description: The id of the channel used.
- response:
- type: object
- properties:
- id:
- type: string
- description: Unique id for this response
- text:
- type: string
- description: Textual presentation of this response
- attachments:
- type: array
- description: For freeform only, optional list of attachments
- items:
- $ref: '#/definitions/Attachment'
- responseOption:
- $ref: '#/definitions/PropertyMap'
- AlertItemDetailSort:
- type: string
- enum:
- - NAME
- - STATE
- - CHANNEL_ADDRESS
- - LAST_MODIFIED
- AlertResponseDetailSort:
- type: string
- enum:
- - NAME
- - RESPONSE
- - CHANNEL_ADDRESS
- - LAST_MODIFIED
- AlertSummarySort:
- type: string
- enum:
- - CREATED
- - SENDING
- - OWNER
- # End: alert/definitions.yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement