QBOS REST API documentation (alert)

(return to Main Document)

Introduction

The alert API allows client applications to maintain alert data including any part of its demographic record sets.

Audience

This developer's guide is intended for software developers needing a technical reference for using the QBOS REST API. The information you find in this guide is written by software engineering, and is authoritative on how the API behaves.

Additional resources, information about this guide

Occasionally, we make a mistake in this documentation, or unknowingly break a feature that you depend on. If this has happened to you, we apologize! You can help us fix the issue by contacting us. We appreciate your help.

Getting Started

To place any request in QBOS API application from third party application you need to authenticate user account and set/calculate values for the following request headers: x-qbos-id, x-qbos-nonce, x-qbos-date-utc, x-qbos-hash-version, x-qbos-auth

See details in Authentication Documentation.

alert properties

Properties prefixed with '_' (underscore) are read-only properties. i.e. POST and PUT processing will ignore these properties.

Name Type Max length Numeric Required
For POST
Filterable Description

id

bigint

 

 

 

Required for GET(by id),PUT,DELETE

parent_id

bigint

 

yes

 

parent_type

nvarchar

50

 

yes

 

type

nvarchar

50

 

 

 

Value is "alert"

href

varchar

22

 

 

 

assigned_to_id

bigint

 

 

 

urgent_sw

bit

 

 

 

add_to_body

nvarchar

 

yes

 

pass_fail_sw

varchar

1

 

 

 

" "=just UNFLAG; "P"=PASS; "F"=FAIL

sender_id

bigint

 

 

 

_full_body

nvarchar

 

 

 

_sender_name

nvarchar

100

 

 

 

_create_datetime

char

20

 

 

 

unflagged_by_user_id

bigint

 

 

 

_unflagged_datetime

char

20

 

 

 

_unflagged_by_name

nvarchar

100

 

 

 

_flag_datetime

char

20

 

 

 

_assignee_name

nvarchar

100

 

 

 

_assignee_first

nvarchar

100

 

 

 

Read alert by id:

GET https:/.../v1/o/alert/{id}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

Response data: GET https:/.../v1/o/alert/934763
{ "parent_type" : "document", "parent_id" : 223850, "type" : "alert", "id" : 934763, "sub_type" : "", "href" : "\/v1\/o\/alert\/934763", "assigned_to_id" : 518531, "urgent_sw" : 0, "add_to_body" : "", "pass_fail_sw" : " ", "sender_id" : 507528, "_full_body" : "Laura 11\/12\/12<\/span>:<\/b> .<\/span>", "_sender_name" : "Laura Buxton", "_create_datetime" : "2012-11-12T16:00:34Z", "unflagged_by_user_id" : 0, "_unflagged_datetime" : "2024-05-04T03:37:06Z", "_unflagged_by_name" : "", "_flag_datetime" : "2012-11-12T00:00:00Z", "_assignee_name" : "Craig Mertens", "_assignee_first" : "C.Mertens" }

Read alert from parent:

GET https:/.../v1/o/{parent_type}/{parent_id}/links/alert[?{filter}]

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 404 - Not found or user does not have permission to access resources of this type.
  • 200 - OK

GET https:/.../v1/o/document/223850/links/alert
Response example is shown in XML format here even though REST API returns JSON format:
<alert><alert parent_type="document" parent_id="223850" type="alert" id="934763" sub_type="" _title="<span style='color:black'><b>Laura&nbsp;<span title='11/12/12 4:01:02 PM' style='font-size:xx-small'>11/12/12</span>:</b> .</span>" href="/v1/o/alert/934763"/></alert>

Create alert:

POST https:/.../v1/o/document/223850/alert

Request data [See properties]:

{"alert": [ { "parent_type" : "document", "parent_id" : 223850, "property_a" : "value-a", "property" : "See alert properties", "property_z" : "value-z" } ] }

Response codes:

Update alert:

PUT https:/.../v1/o/alert/{id}

Request data [See properties]:

{"alert": [ { "id" : 934763, "property_a" : "value-a", "property" : "See alert properties", "property_z" : "value-z" } ] }

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 200 - OK Content returned [See response data]
  • 204 - OK No content
  • 404 - Not found

Delete alert:

DELETE https:/.../v1/o/alert/{id}

The "id" in JSON payload is required to match the {id} in the URI to ensure that deletion requests are intended and safe

{"alert": [{"id":934763}]}

Response codes:

  • 400 - Client error
  • 500 - Server error
  • 204 - OK
  • 404 - Not found

Response data:
{}