NAV Navigation
Shell HTTP JavaScript Node.JS Ruby Python Java Go

Notifications v0.1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Notifications API manages the creation, organization, ../publishing and delivery of events or messages. This allows the Apiture system to inform loosely coupled recipients about events, changes, and actions.

Terminology

Behavior

When an event occurs, a service will POST a new message to a topic. The Notification service matches all active subscriptions on that topic and creates a notification for each subscription. The service stores pull notifications to be pulled later, or queues push notifications to a delivery queue.

By default, push notifications will persist in the /deliveryQueue for four days. During that time, the notifications service will attempt to call the external endpoint to deliver the message. Upon success, the notification is removed from the queue and moved to the /receivedNotifications collection. Received notifications can be retrieved at a later date for historical or audit logging purposes. If delivery fails after 4 days, the notification is moved to the /failedNotifications collection, which represents "dead letter queue".

Pull notifications skip the queueing process and are stored by the service. They can be fetched via a filtered GET query to /pullNotifications (operation getPullNotifications) or by GET to /topics/{topicId}/notifications (operation getNotificationsForTopic) or /subscriptions/{subscriptionId}/notifications (operation getNotificationsSubscription). After the client has processed the pull notification, it must acknowledge the notification by performing a POST operation to the href in the notification's _links.acknowledge link; this removes the notification from the active notifications collections. Pulled notifications that have not been acknowledged remain in the /pullNotifications collection and are considered by the service to be unacknowledged, which may result in duplicate processing of the notification.

The service ../publishes notifications to pre-existing topics, each of which may have any number of associated subscriptions. When a message is ../published to a topic, it notifies all active subscriptions and passes the notification body to them.

For example, a topic "LoanPaymentApplied" could be triggered any time a payment to a loan account has been applied. The topic is triggered by a POST to /notifications, where the request body has a _link to the topic. The topic could have two subscribers. The first subscription is a push subscription, which makes a callout to an authenticated endpoint. The server is configured to receive the request and send an SMS text message to the end user; the SMS number is in the subscription. A push subscription will be considered received by the endpoint server when a 200-level status code is received (including retries after 3xx status codes). The second subscription is a pull subscription. When pull subscriptions are triggered, the notification is added to a collection, where it waits until the client retrieves it.

Download OpenAPI Definition (YAML)

Base URLs:

Email: Apiture Web: Apiture

API

Endpoints which describe this API.

getApiDoc

Code samples

# You can also use wget
curl -X GET /notifications/apiDoc \
  -H 'Accept: application/json'

GET /notifications/apiDoc HTTP/1.1

Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: '/notifications/apiDoc',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('/notifications/apiDoc',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/notifications/apiDoc',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/notifications/apiDoc', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/apiDoc");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/apiDoc", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return API definition document

GET /apiDoc

Return the OpenAPI document that describes this API.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{}

Responses

StatusDescription
200 OK
OK
Schema: Inline

Response Schema

getApi

Code samples

# You can also use wget
curl -X GET /notifications/ \
  -H 'Accept: application/hal+json'

GET /notifications/ HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Top-level resources and operations in this API

GET /

Return links to the top-level resources and operations in this API.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "id": "apiName",
  "name": "API name",
  "apiVersion": "0.0.1-SNAPSHOT",
  "_profile": "https://api.apiture.com/schemas/root/v1.0.0/profile.json",
  "_links": {}
}

Responses

StatusDescription
200 OK
OK
Schema: root

Published Messages

Messages ../published to topics

../publishMessage

Code samples

# You can also use wget
curl -X POST /notifications/messages \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json'

POST /notifications/messages HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/messages',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "body": {
    "any": "valid",
    "json": "object"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

fetch('/notifications/messages',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/notifications/messages',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json'
}

r = requests.post('/notifications/messages', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/messages");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/notifications/messages", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Publish a notification message on a topic

POST /messages

Publish a message on a topic, creating zero or more notifications that are delivered according to each subscription on the topic. The message topic is specified with the link apiture:topic in the message request body. Subscription delivery passes the message body to each of its subscriptions. By default, a message body can contain up to 256 kb of text data, including JSON and unformatted text.

A response with status code 202 from this endpoint confirms that the service has successfully queued notifications for delivery.

A response with status code 413 indicates that the payload body exceeds the 256 kb size limit.

If the eventual delivery of the notification fails (for example, if the destination endpoint of a push subscription is unauthorized), errors will be recorded in the notification's _error object. A message may include an apiture:entity link containing the URI of any related entity. This denotes the primary resource that the message pertains to and is used for filtering notification to only recipients which are entitled to access the entity. If the topic referenced by the apiture:topic link does not exist, the request to create the notification will fail.

Body parameter

{
  "body": {
    "any": "valid",
    "json": "object"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Parameters

Parameter Description
body
(body)
createMessage (required)
The data necessary to create a new message.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

400 Response

{
  "_profile": "http://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.864Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
202 Accepted
Accepted
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
413 Payload Too Large
Payload to large. The request entity is larger than the limits defined by the server.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

Notification

Endpoints which facilitate the delivery of notifications.

getPullNotifications

Code samples

# You can also use wget
curl -X GET /notifications/pullNotifications \
  -H 'Accept: application/hal+json'

GET /notifications/pullNotifications HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/pullNotifications',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/pullNotifications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/pullNotifications',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/pullNotifications', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/pullNotifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/pullNotifications", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Returns a collection of pull notification resources

GET /pullNotifications

Return a paginated sortable filterable searchable collection of notifications. These are pull notifications which have been created based on a topic and a pull subscrioption and are available for delivery polling. The links in the response include pagination links.

Parameters

Parameter Description
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.
subscriptionUri
(query)
string
The unique resource identifier of this subscription. This parameter is deprecated. Use the ?subscription= query parameter instead.
topic
(query)
string
A string which identifies a specific topic The value may be a {topicId} or a topic URI.
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

subscription

subscriptionUri

topic

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        }
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notifications
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getPullNotification

Code samples

# You can also use wget
curl -X GET /notifications/pullNotifications/{notificationId} \
  -H 'Accept: application/hal+json'

GET /notifications/pullNotifications/{notificationId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/pullNotifications/{notificationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/pullNotifications/{notificationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/pullNotifications/{notificationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/pullNotifications/{notificationId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/pullNotifications/{notificationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/pullNotifications/{notificationId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of this pull notification

GET /pullNotifications/{notificationId}

Return a HAL representation of this notification resource.

Parameters

Parameter Description
notificationId
(path)
string (required)
The unique identifier of this notification. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* notificationId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscription": {
      "href": "https://api.apiture.com/notifications/subscriptions/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/users/user/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:acknowledge": {
      "href": "https://api.apiture.com/notifications/receivedNotifications?notification=https://api.apiture.com/notifications/pullNotifications/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notification
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such notification resource at the specified {notificationId} The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

deleteNotification

Code samples

# You can also use wget
curl -X DELETE /notifications/pullNotifications/{notificationId} \
  -H 'Accept: application/hal+json'

DELETE /notifications/pullNotifications/{notificationId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/pullNotifications/{notificationId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/pullNotifications/{notificationId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.delete '/notifications/pullNotifications/{notificationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.delete('/notifications/pullNotifications/{notificationId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/pullNotifications/{notificationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/notifications/pullNotifications/{notificationId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete this notification resource

DELETE /pullNotifications/{notificationId}

Delete this notification resource. Note that deleting a notification does not cancel in-flight delivery to subscribers.

Parameters

Parameter Description
notificationId
(path)
string (required)
The unique identifier of this notification. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* notificationId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

400 Response

{
  "_profile": "http://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.864Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such notification resource at the specified {notificationId} The _error field in the response will contain details about the request error.
Schema: errorResponse

getDeliveryQueue

Code samples

# You can also use wget
curl -X GET /notifications/deliveryQueue \
  -H 'Accept: application/hal+json'

GET /notifications/deliveryQueue HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/deliveryQueue',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/deliveryQueue',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/deliveryQueue',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/deliveryQueue', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/deliveryQueue");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/deliveryQueue", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Returns a collection of push notifications that are queued for delivery

GET /deliveryQueue

Return a paginated sortable filterable searchable collection of notifications. These are notifications which have been created and are available for delivery. The links in the response include pagination links.

Parameters

Parameter Description
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.
subscriptionUri
(query)
string
The unique resource identifier of this subscription. This parameter is deprecated. Use the ?subscription= query parameter instead.
topic
(query)
string
A string which identifies a specific topic The value may be a {topicId} or a topic URI.
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

subscription

subscriptionUri

topic

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        }
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notifications
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getPushNotification

Code samples

# You can also use wget
curl -X GET /notifications/deliveryQueue/{notificationId} \
  -H 'Accept: application/hal+json'

GET /notifications/deliveryQueue/{notificationId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/deliveryQueue/{notificationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/deliveryQueue/{notificationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/deliveryQueue/{notificationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/deliveryQueue/{notificationId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/deliveryQueue/{notificationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/deliveryQueue/{notificationId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of a queued push notification

GET /deliveryQueue/{notificationId}

Return a HAL representation of this notification resource.

Parameters

Parameter Description
notificationId
(path)
string (required)
The unique identifier of this notification. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* notificationId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscription": {
      "href": "https://api.apiture.com/notifications/subscriptions/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/users/user/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:acknowledge": {
      "href": "https://api.apiture.com/notifications/receivedNotifications?notification=https://api.apiture.com/notifications/pullNotifications/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notification
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such notification resource at the specified {notificationId} The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

deletePushNotification

Code samples

# You can also use wget
curl -X DELETE /notifications/deliveryQueue/{notificationId} \
  -H 'Accept: application/hal+json'

DELETE /notifications/deliveryQueue/{notificationId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/deliveryQueue/{notificationId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/deliveryQueue/{notificationId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.delete '/notifications/deliveryQueue/{notificationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.delete('/notifications/deliveryQueue/{notificationId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/deliveryQueue/{notificationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/notifications/deliveryQueue/{notificationId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete this notification resource

DELETE /deliveryQueue/{notificationId}

Delete this notification resource. Note that deleting a notification does not cancel delivery to subscribers. Notifications are typically already queued by the time they are available for deletion from storage.

Parameters

Parameter Description
notificationId
(path)
string (required)
The unique identifier of this notification. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* notificationId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

400 Response

{
  "_profile": "http://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.864Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such notification resource at the specified {notificationId} The _error field in the response will contain details about the request error.
Schema: errorResponse

getFailedNotifications

Code samples

# You can also use wget
curl -X GET /notifications/failedNotifications \
  -H 'Accept: application/hal+json'

GET /notifications/failedNotifications HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/failedNotifications',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/failedNotifications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/failedNotifications',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/failedNotifications', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/failedNotifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/failedNotifications", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Returns a collection of failed notifications

GET /failedNotifications

Return a paginated sortable filterable searchable collection of notifications. These are notifications which have been created and are available for delivery and polling. The links in the response include pagination links.

Parameters

Parameter Description
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.
topic
(query)
string
A string which identifies a specific topic The value may be a {topicId} or a topic URI.
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

subscription

topic

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        }
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notifications
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getFailedNotification

Code samples

# You can also use wget
curl -X GET /notifications/failedNotifications/{notificationId} \
  -H 'Accept: application/hal+json'

GET /notifications/failedNotifications/{notificationId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/failedNotifications/{notificationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/failedNotifications/{notificationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/failedNotifications/{notificationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/failedNotifications/{notificationId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/failedNotifications/{notificationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/failedNotifications/{notificationId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of this failed notification

GET /failedNotifications/{notificationId}

Return a paginated sortable filterable searchable collection of notifications. These are notifications which have been created and are available for delivery and polling. The links in the response include pagination links.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.
notificationId
(path)
string (required)
The unique identifier of this notification. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

* notificationId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscription": {
      "href": "https://api.apiture.com/notifications/subscriptions/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/users/user/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:acknowledge": {
      "href": "https://api.apiture.com/notifications/receivedNotifications?notification=https://api.apiture.com/notifications/pullNotifications/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notification
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getReceivedNotifications

Code samples

# You can also use wget
curl -X GET /notifications/receivedNotifications \
  -H 'Accept: application/hal+json'

GET /notifications/receivedNotifications HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/receivedNotifications',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/receivedNotifications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/receivedNotifications',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/receivedNotifications', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/receivedNotifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/receivedNotifications", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Returns a collection of notifications which have been received

GET /receivedNotifications

Return a paginated sortable filterable searchable collection of notifications. These are notifications which have been delivered through either push or pull. The links in the response include pagination links.

Parameters

Parameter Description
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.
topic
(query)
string
A string which identifies a specific topic The value may be a {topicId} or a topic URI.
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

subscription

topic

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        }
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notifications
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

acknowledgeNotification

Code samples

# You can also use wget
curl -X POST /notifications/receivedNotifications \
  -H 'Accept: application/hal+json'

POST /notifications/receivedNotifications HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/receivedNotifications',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/receivedNotifications',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/notifications/receivedNotifications',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.post('/notifications/receivedNotifications', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/receivedNotifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/notifications/receivedNotifications", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Acknowledges a notification as received

POST /receivedNotifications

This operation Primarily for pull notifications. This changes the state of a notification to received, and removes the notification from the active collections and moves it to the /receivedNotifications collection.

This operation is invoked via a POST to the href in a pull notifcation's apiture:acknowledge link.

Parameters

Parameter Description
notification
(query)
string
A string which identifies a specific notification. The value may be a {notificationId} or a notification URI.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

notification

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscription": {
      "href": "https://api.apiture.com/notifications/subscriptions/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/users/user/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:acknowledge": {
      "href": "https://api.apiture.com/notifications/receivedNotifications?notification=https://api.apiture.com/notifications/pullNotifications/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notification
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getReceivedNotification

Code samples

# You can also use wget
curl -X GET /notifications/receivedNotifications/{notificationId} \
  -H 'Accept: application/hal+json'

GET /notifications/receivedNotifications/{notificationId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/receivedNotifications/{notificationId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/receivedNotifications/{notificationId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/receivedNotifications/{notificationId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/receivedNotifications/{notificationId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/receivedNotifications/{notificationId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/receivedNotifications/{notificationId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of this received notification

GET /receivedNotifications/{notificationId}

Return a paginated sortable filterable searchable collection of notifications. These are notifications which have been created and are available for delivery and polling. The links in the response include pagination links.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.
notificationId
(path)
string (required)
The unique identifier of this notification. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

* notificationId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscription": {
      "href": "https://api.apiture.com/notifications/subscriptions/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/users/user/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:acknowledge": {
      "href": "https://api.apiture.com/notifications/receivedNotifications?notification=https://api.apiture.com/notifications/pullNotifications/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notification
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getNotificationsSubscription

Code samples

# You can also use wget
curl -X GET /notifications/subscriptions/{subscriptionId}/notifications \
  -H 'Accept: application/hal+json'

GET /notifications/subscriptions/{subscriptionId}/notifications HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/subscriptions/{subscriptionId}/notifications',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/subscriptions/{subscriptionId}/notifications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/subscriptions/{subscriptionId}/notifications',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/subscriptions/{subscriptionId}/notifications', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions/{subscriptionId}/notifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/subscriptions/{subscriptionId}/notifications", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch notifications associated with this subscription

GET /subscriptions/{subscriptionId}/notifications

Return a paginated sortable filterable searchable collection of notifications. The links in the response include pagination links.

Parameters

Parameter Description
subscriptionId
(path)
string (required)
The unique identifier of the subscription. This is an opaque string.
topic
(query)
string
A string which identifies a specific topic The value may be a {topicId} or a topic URI.
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* subscriptionId

topic

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        }
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: notifications
404 Not Found
Not Found. There is no such subscription resource at the specified {subscriptionId} The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getNotificationsForTopic

Code samples

# You can also use wget
curl -X GET /notifications/topics/{topicId}/notifications \
  -H 'Accept: application/hal+json'

GET /notifications/topics/{topicId}/notifications HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/topics/{topicId}/notifications',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/topics/{topicId}/notifications',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/topics/{topicId}/notifications',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/topics/{topicId}/notifications', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics/{topicId}/notifications");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/topics/{topicId}/notifications", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch notifications associated with this topic

GET /topics/{topicId}/notifications

Return a paginated sortable filterable searchable collection of subscriptions. The links in the response include pagination links.

Parameters

Parameter Description
topicId
(path)
string (required)
The unique identifier of the topic. This is an opaque string.
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.
start
(query)
integer(int64)
The zero-based index of the first notification item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of notification representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* topicId

subscription

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        },
        "deliveryChannel": "web",
        "deliveryMethod": "pull"
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        },
        "deliveryChannel": "sms",
        "deliveryMethod": "push"
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: topicNotifications
404 Not Found
Not Found. There is no such topic resource at the specified {topicId} The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

Subscription

Endpoints which facilitate the creation and modification of notification subscriptions.

getSubscriptions

Code samples

# You can also use wget
curl -X GET /notifications/subscriptions \
  -H 'Accept: application/hal+json'

GET /notifications/subscriptions HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/subscriptions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/subscriptions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/subscriptions', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return a collection of subscriptions

GET /subscriptions

Return a paginated sortable filterable searchable collection of subscriptions. The links in the response include pagination links.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first subscription in this page. The default, 0, represents the first page of the collection.
limit
(query)
integer(int32)
The maximum number of subscription representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "count": 0,
  "start": 0,
  "limit": 0,
  "name": "string",
  "_embedded": {
    "items": [
      {
        "deliveryChannel": "string",
        "deliveryMethod": "push",
        "endpoint": {
          "token": "string",
          "recipientUrl": "string"
        },
        "state": "inactive",
        "subscriberContent": {
          "email": "beto@apiture.com",
          "subject": "Hello Apiture"
        },
        "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
        "_links": {
          "self": {
            "href": "{uri of current resource}"
          }
        },
        "_id": "string",
        "authenticationState": "authenticated"
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: subscriptions
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

createSubscription

Code samples

# You can also use wget
curl -X POST /notifications/subscriptions \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json'

POST /notifications/subscriptions HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/subscriptions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

fetch('/notifications/subscriptions',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/notifications/subscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json'
}

r = requests.post('/notifications/subscriptions', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/notifications/subscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Create a new subscription

POST /subscriptions

Create a new subscription associated with a topic. The endpoint field is not required, even if the deliveryMethod field is set to push. A push subscription with no endpoint field cannot be activated until it has an authenticated endpoint. Attempts to activate a push subscription with no valid endpoint will return an error. A subscription may include additional subscriber information (subscriberContent) such as an email address or a phone number if required by the delivery channel. A push subscription can be created with an endpoint property that is missing a value for its token property. The push subscription will remain unauthenticated and unusable until an authorization token is provided. The notifications API attempts an authentication request at the location specified in the endpoint property at the time of subscription creation. If the authentication attempt fails, creation of the subscription fails. A subscription must have a link named apiture:topic which contains the href of a valid topic instance, as well as an apiture:subscriber link containing a reference to the subscriber entity.

Body parameter

{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Parameters

Parameter Description
body
(body)
createSubscription (required)
The data necessary to create a new subscription.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

201 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Responses

StatusDescription
201 Created
Created
Schema: subscription
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
201 Location string uri
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with scheme://host
201 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource.

activateSubscription

Code samples

# You can also use wget
curl -X POST /notifications/activeSubscriptions \
  -H 'Accept: application/hal+json'

POST /notifications/activeSubscriptions HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/activeSubscriptions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/activeSubscriptions',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/notifications/activeSubscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.post('/notifications/activeSubscriptions', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/activeSubscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/notifications/activeSubscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Activate a subscription

POST /activeSubscriptions

Changes the state of a subscription to active

Parameters

Parameter Description
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

subscription

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: subscription
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

deactivateSubscription

Code samples

# You can also use wget
curl -X POST /notifications/inactiveSubscriptions \
  -H 'Accept: application/hal+json'

POST /notifications/inactiveSubscriptions HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/inactiveSubscriptions',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/inactiveSubscriptions',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/notifications/inactiveSubscriptions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.post('/notifications/inactiveSubscriptions', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/inactiveSubscriptions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/notifications/inactiveSubscriptions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Deactivate a subscription

POST /inactiveSubscriptions

Changes the state of a subscription to inactive

Parameters

Parameter Description
subscription
(query)
string
A string which identifies a specific subscription. The value may be a {subscriptionId} or a subscription URI.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

subscription

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: subscription
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

getSubscription

Code samples

# You can also use wget
curl -X GET /notifications/subscriptions/{subscriptionId} \
  -H 'Accept: application/hal+json' \
  -H 'If-None-Match: string'

GET /notifications/subscriptions/{subscriptionId} HTTP/1.1

Accept: application/hal+json
If-None-Match: string

var headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

$.ajax({
  url: '/notifications/subscriptions/{subscriptionId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

fetch('/notifications/subscriptions/{subscriptionId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json',
  'If-None-Match' => 'string'
}

result = RestClient.get '/notifications/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json',
  'If-None-Match': 'string'
}

r = requests.get('/notifications/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        "If-None-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/subscriptions/{subscriptionId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of this subscription

GET /subscriptions/{subscriptionId}

Return a HAL representation of this subscription resource.

Parameters

Parameter Description
subscriptionId
(path)
string (required)
The unique identifier of the subscription. This is an opaque string.
If-None-Match
(header)
string
The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* subscriptionId

If-None-Match

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: subscription
304 Not Modified
Not Modified. The resource has not been modified since it was last fetched.
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such subscription resource at the specified {subscriptionId} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this subscription resource.

updateSubscription

Code samples

# You can also use wget
curl -X PUT /notifications/subscriptions/{subscriptionId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PUT /notifications/subscriptions/{subscriptionId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/notifications/subscriptions/{subscriptionId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/notifications/subscriptions/{subscriptionId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.put '/notifications/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.put('/notifications/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/notifications/subscriptions/{subscriptionId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this subscription

PUT /subscriptions/{subscriptionId}

Perform a complete replacement of the subscription. Modifying the contents of the endpoint property will trigger the notification service to re-validate the subscription with the new endpoint attributes. This may cause the authenticationState of the subscription to change. For example, if the modified authentication token is invalid, the authenticationState will transition to "unauthenticated".

Updating the subscription may not alter existing in-process deliveries.

Body parameter

{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Parameters

Parameter Description
subscriptionId
(path)
string (required)
The unique identifier of the subscription. This is an opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateSubscription (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPUT
* URL
* API Key
* Access Token

* subscriptionId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: subscription
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such subscription resource at the specified {subscriptionId} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this subscription resource.

patchSubscription

Code samples

# You can also use wget
curl -X PATCH /notifications/subscriptions/{subscriptionId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PATCH /notifications/subscriptions/{subscriptionId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/notifications/subscriptions/{subscriptionId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/notifications/subscriptions/{subscriptionId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.patch '/notifications/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.patch('/notifications/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "/notifications/subscriptions/{subscriptionId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this subscription

PATCH /subscriptions/{subscriptionId}

Perform a partial update of this subscription. Fields which are omitted notification service to re-validate the subscription with the new endpoint attributes. This may cause the authenticationState of the subscription to change. For example, if the modified authentication token is invalid, the authenticationState will transition to "unauthenticated".

Updating the subscription may not alter existing in-process deliveries.

Body parameter

{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Parameters

Parameter Description
subscriptionId
(path)
string (required)
The unique identifier of the subscription. This is an opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateSubscription (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPATCH
* URL
* API Key
* Access Token

* subscriptionId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: subscription
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such subscription resource at the specified {subscriptionId} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this subscription resource.

deleteSubscription

Code samples

# You can also use wget
curl -X DELETE /notifications/subscriptions/{subscriptionId} \
  -H 'Accept: application/hal+json'

DELETE /notifications/subscriptions/{subscriptionId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/subscriptions/{subscriptionId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/subscriptions/{subscriptionId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.delete '/notifications/subscriptions/{subscriptionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.delete('/notifications/subscriptions/{subscriptionId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/subscriptions/{subscriptionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/notifications/subscriptions/{subscriptionId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete a subscription

DELETE /subscriptions/{subscriptionId}

Delete a subscription resource. Note that deleting a subscription may not cancel any associated notifications that the notifications service is actively processing. Active subscriptions can be deleted. There is no need to deactivate a subscription before deleting it.

Parameters

Parameter Description
subscriptionId
(path)
string (required)
The unique identifier of the subscription. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* subscriptionId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

400 Response

{
  "_profile": "http://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.864Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such subscription resource at the specified {subscriptionId} The _error field in the response will contain details about the request error.
Schema: errorResponse

Topic

Endpoints which facilitate the creation and modification of notification topics.

getTopics

Code samples

# You can also use wget
curl -X GET /notifications/topics \
  -H 'Accept: application/hal+json'

GET /notifications/topics HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/topics',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/topics',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/notifications/topics',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/notifications/topics', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/topics", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Retrieve a collection of topics

GET /topics

Return a paginated sortable filterable searchable collection of topics. The links in the response include pagination links.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first subscription in this page. The default, 0, represents the first page of the collection.
limit
(query)
integer(int32)
The maximum number of subscription representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "count": 0,
  "start": 0,
  "limit": 0,
  "name": "string",
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
        "createdAt": "2018-04-17T10:04:46.375Z",
        "updatedAt": "2018-04-17T10:12:58.375Z",
        "name": "AccountCreated",
        "domain": "Accounts"
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: topics
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

createTopic

Code samples

# You can also use wget
curl -X POST /notifications/topics \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json'

POST /notifications/topics HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/topics',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "AccountCreated",
  "domain": "Accounts"
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

fetch('/notifications/topics',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/notifications/topics',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json'
}

r = requests.post('/notifications/topics', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/notifications/topics", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Create a new topic

POST /topics

Create a new topic in the topics collection. A topic can be created without any associated subscriptions. However, any subscriptions that do not already exist must be created first via a POST to /subscriptions.

Body parameter

{
  "name": "AccountCreated",
  "domain": "Accounts"
}

Parameters

Parameter Description
body
(body)
createTopic (required)
The data necessary to create a new topic.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

201 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "name": "AccountCreated",
  "domain": "Accounts"
}

Responses

StatusDescription
201 Created
Created
Schema: topic
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
201 Location string uri
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with scheme://host
201 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource.

getTopic

Code samples

# You can also use wget
curl -X GET /notifications/topics/{topicId} \
  -H 'Accept: application/hal+json' \
  -H 'If-None-Match: string'

GET /notifications/topics/{topicId} HTTP/1.1

Accept: application/hal+json
If-None-Match: string

var headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

$.ajax({
  url: '/notifications/topics/{topicId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

fetch('/notifications/topics/{topicId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json',
  'If-None-Match' => 'string'
}

result = RestClient.get '/notifications/topics/{topicId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json',
  'If-None-Match': 'string'
}

r = requests.get('/notifications/topics/{topicId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics/{topicId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        "If-None-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/notifications/topics/{topicId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of a topic

GET /topics/{topicId}

Return a HAL representation of this topic resource.

Parameters

Parameter Description
topicId
(path)
string (required)
The unique identifier of the topic. This is an opaque string.
If-None-Match
(header)
string
The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* topicId

If-None-Match

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "name": "AccountCreated",
  "domain": "Accounts"
}

Responses

StatusDescription
200 OK
OK
Schema: topic
304 Not Modified
Not Modified. The resource has not been modified since it was last fetched.
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this topic resource.

updateTopic

Code samples

# You can also use wget
curl -X PUT /notifications/topics/{topicId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PUT /notifications/topics/{topicId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/notifications/topics/{topicId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "Document Approval",
  "domain": "apiture",
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string"
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/notifications/topics/{topicId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.put '/notifications/topics/{topicId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.put('/notifications/topics/{topicId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics/{topicId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/notifications/topics/{topicId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this topic

PUT /topics/{topicId}

Perform a complete replacement of this topic.

Body parameter

{
  "name": "Document Approval",
  "domain": "apiture",
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string"
}

Parameters

Parameter Description
topicId
(path)
string (required)
The unique identifier of the topic. This is an opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateTopic (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPUT
* URL
* API Key
* Access Token

* topicId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "name": "AccountCreated",
  "domain": "Accounts"
}

Responses

StatusDescription
200 OK
OK
Schema: topic
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such topic resource at the specified {topicId} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this topic resource.

patchTopic

Code samples

# You can also use wget
curl -X PATCH /notifications/topics/{topicId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PATCH /notifications/topics/{topicId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/notifications/topics/{topicId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "name": "Document Approval",
  "domain": "apiture",
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string"
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/notifications/topics/{topicId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.patch '/notifications/topics/{topicId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.patch('/notifications/topics/{topicId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics/{topicId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "/notifications/topics/{topicId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this topic

PATCH /topics/{topicId}

Perform a partial update of this topic. Fields which are omitted are not updated. Nested _embedded and _links are ignored if included.

Body parameter

{
  "name": "Document Approval",
  "domain": "apiture",
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string"
}

Parameters

Parameter Description
topicId
(path)
string (required)
The unique identifier of the topic. This is an opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateTopic (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPATCH
* URL
* API Key
* Access Token

* topicId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "name": "AccountCreated",
  "domain": "Accounts"
}

Responses

StatusDescription
200 OK
OK
Schema: topic
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such topic resource at the specified {topicId} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this topic resource.

deleteTopic

Code samples

# You can also use wget
curl -X DELETE /notifications/topics/{topicId} \
  -H 'Accept: application/hal+json'

DELETE /notifications/topics/{topicId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/notifications/topics/{topicId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/notifications/topics/{topicId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.delete '/notifications/topics/{topicId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.delete('/notifications/topics/{topicId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/notifications/topics/{topicId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/notifications/topics/{topicId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete this topic

DELETE /topics/{topicId}

Delete this topic resource. Deleting a topic will also remove any associated subscription resources, but may not cancel notifications already posted to the topic.

Parameters

Parameter Description
topicId
(path)
string (required)
The unique identifier of the topic. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* topicId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

400 Response

{
  "_profile": "http://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.864Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such topic resource at the specified {topicId} The _error field in the response will contain details about the request error.
Schema: errorResponse

Schemas

topicFields

{
  "name": "Document Approval",
  "domain": "apiture"
}

Topic Fields

Properties

Schema NameDescription
name string
The name of the topic.
domain string
The domain, or namespace, of the topic. To avoid conflicts with other topics, the domain should be a URI.

createTopic

{
  "name": "AccountCreated",
  "domain": "Accounts"
}

Create Topic

Properties

Schema NameDescription
Create Topic any
Representation used to create a new notification topic. The combination of name and domain fields must be unique.

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous topicFields
Common fields of the topic resource.

summaryTopic

{
  "name": "Document Approval",
  "domain": "apiture",
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string"
}

Summary Topic

Properties

Schema NameDescription
Summary Topic any
Summary representation of a topic resource in topics collections. This representation normally does not contain any _embedded objects. If needed, call the GET operations on the item's self link to get _embedded objects.

allOf

Schema NameDescription
anonymous topicFields
Common fields of the topic resource.

and

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined
_id string
The unique identifier for this topic resource. This is an opaque string.

updateTopic

{
  "name": "Document Approval",
  "domain": "apiture",
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string"
}

Update Topic

Properties

Schema NameDescription
Update Topic summaryTopic
Representation used to update or patch a topic. The combination of name and domain fields must be unique.

topic

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "name": "AccountCreated",
  "domain": "Accounts"
}

Topic

Properties

Schema NameDescription
Topic any
Topics are the resource used to group notifications and subscriptions around a specific notification subject. A topic can have any number of associated subscriptions. When a notification is ../published to a topic, the topic then notifies all of its active subscribers and passes the body of the notification to them.

allOf

Schema NameDescription
anonymous summaryTopic
Summary representation of a topic resource in topics collections. This representation normally does not contain any _embedded objects. If needed, call the GET operations on the item's self link to get _embedded objects.

and

Schema NameDescription
anonymous object
undefined
createdAt string(datetime)
Date and time the resource was created
updatedAt string(datetime)
Date and time the resource was updated
_embedded object
Embedded resources for this topic representation. May contain summary representations of the subscription resources associated with a topic, where applicable.
items [summarySubscription]
An array of subscription representations associated with this topic.

topics

{
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "count": 0,
  "start": 0,
  "limit": 0,
  "name": "string",
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/topic/v0.1.0/profile.json",
        "createdAt": "2018-04-17T10:04:46.375Z",
        "updatedAt": "2018-04-17T10:12:58.375Z",
        "name": "AccountCreated",
        "domain": "Accounts"
      }
    ]
  }
}

Topics collection

Properties

Schema NameDescription
Topics collection any
Collection of topics. The items in the collection are ordered in the _embedded object with name items. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources. This is an abstract model schema which is extended to define specific resource collections.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [topic]
[Topics are the resource used to group notifications and subscriptions around a specific notification subject. A topic can have any number of associated subscriptions. When a notification is ../published to a topic, the topic then notifies all of its active subscribers and passes the body of the notification to them.]

deliveryMethod

"push"

Delivery Method

Properties

Schema NameDescription
Delivery Method string
Enumeration of possible methods for delivering a notification.

Enumerated Values

Property Value
Delivery Method push
Delivery Method pull

subscriberContent

{
  "email": "beto@apiture.com",
  "subject": "Hello Apiture"
}

Subscriber Content

Properties

No properties

subscriptionFields

{
  "deliveryChannel": "string",
  "deliveryMethod": "push",
  "endpoint": {
    "token": "string",
    "recipientUrl": "string"
  },
  "state": "inactive",
  "subscriberContent": {
    "email": "beto@apiture.com",
    "subject": "Hello Apiture"
  }
}

Subscription Fields

Properties

Schema NameDescription
deliveryChannel string (required)
Delivery channel for the subscription.
deliveryMethod deliveryMethod (required)
Enumeration of possible methods for delivering a notification.
endpoint endpoint
Representation of the recipient of a push notification. If a subscription's ../publishMethod is push, endpoint is a required field on the subscription resource. # TODO: Document that this uses POST (or, add a method field). Also document what the schema of the body is.
state string
State of the subscription. Inactive subscriptions are not notified when a notification is ../published to a topic.
subscriberContent subscriberContent
Subscriber information required by the channel to process the notficiation.

Enumerated Values

Property Value
state active
state inactive

subscription

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/subscription/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "active",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Subscription

Properties

Schema NameDescription
Subscription any

Representation of a subscription resource. The _links in a subscription must contain the following:

  • apiture:topic - The URI of the topic resource the subscription is associated with. Each subscription must be associated with one topic. Multiple subscriptions can be associated with the same topic.

allOf

Schema NameDescription
anonymous summarySubscription
Summary representation of an subscription resource in subscriptions collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.

and

Schema NameDescription
anonymous subscriptionFields
Common fields of the subscription resource.

and

Schema NameDescription
anonymous object
undefined
subscriberContent subscriberContent
Subscriber information required by the channel to process the notficiation.
createdAt string(date-time)
Date and time the resource was created.
updatedAt string(date-time)
Date and time the resource was updated.

subscriptions

{
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "count": 0,
  "start": 0,
  "limit": 0,
  "name": "string",
  "_embedded": {
    "items": [
      {
        "deliveryChannel": "string",
        "deliveryMethod": "push",
        "endpoint": {
          "token": "string",
          "recipientUrl": "string"
        },
        "state": "inactive",
        "subscriberContent": {
          "email": "beto@apiture.com",
          "subject": "Hello Apiture"
        },
        "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
        "_links": {
          "self": {
            "href": "{uri of current resource}"
          }
        },
        "_id": "string",
        "authenticationState": "authenticated"
      }
    ]
  }
}

Subscriptions collection

Properties

Schema NameDescription
Subscriptions collection any
Collection of subscriptions. The items in the collection are ordered in the _embedded.items array; the name is subscriptions. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources. This is an abstract model schema which is extended to define specific resource collections.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [summarySubscription]
[Summary representation of an subscription resource in subscriptions collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.]

createSubscription

{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Create Subscription

Properties

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous subscriptionFields
Common fields of the subscription resource.

summarySubscription

{
  "deliveryChannel": "string",
  "deliveryMethod": "push",
  "endpoint": {
    "token": "string",
    "recipientUrl": "string"
  },
  "state": "inactive",
  "subscriberContent": {
    "email": "beto@apiture.com",
    "subject": "Hello Apiture"
  },
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "_id": "string",
  "authenticationState": "authenticated"
}

Summary Subscription

Properties

allOf

Schema NameDescription
anonymous subscriptionFields
Common fields of the subscription resource.

and

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined
_id string
The unique identifier for this subscription resource. This is an opaque string.
authenticationState string
State of the subscription's authorization with the subscriber endpoint. This field is derived from the state of the endpoint property and is thus immutable via PATCH or PUT operations. The notifications API attempts an authentication request at the Location specified in the endpoint property at the time of subscription creation. If the authentication attempt fails, creation of the subscription fails. Consequently, new push subscriptions with valid endpoint data are always initialized as authenticated. authenticationState can transition to unauthenticated when the notifications service attempts to send the push request and receives a 401 Unauthorized or 403 Forbidden HTTP status code.

Enumerated Values

Property Value
authenticationState authenticated
authenticationState unauthenticated

updateSubscription

{
  "deliveryMethod": "pull",
  "deliveryChannel": "SMS",
  "state": "inactive",
  "endpoint": {
    "token": "8BE74E2B956A9532D3534A835EB66",
    "recipientUrl": "http://somedomain.com/an/external/endpoint"
  },
  "subscriberContent": {
    "smsNumber": "555-555-5555"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscriber": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Update Subscription

Properties

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous subscriptionFields
Common fields of the subscription resource.

endpoint

{
  "token": "string",
  "recipientUrl": "string"
}

Endpoint

Properties

Schema NameDescription
token string
Authentication token received by the endpoint server.
recipientUrl string (required)
The URL to which the push notification will be sent.

collection

{
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "count": 0,
  "start": 0,
  "limit": 0,
  "name": "string"
}

Collection

Properties

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined
count integer
The number of items in the full collection.
start integer
The start index of this page of items.
limit integer
The maximum number of items per page.
name string
The name of the collection.

body

{
  "body": {}
}

Body

Properties

Schema NameDescription
body object
The JSON body of the notification. Any valid JSON object.

createMessage

{
  "body": {
    "any": "valid",
    "json": "object"
  },
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/accounts/account/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    }
  }
}

Create Message

Properties

Schema NameDescription
body body
Message body attached to a notification
_links links
An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.

notificationFields

{
  "body": {
    "body": {}
  }
}

Notification Fields

Properties

Schema NameDescription
body body
Message body attached to a notification

summaryNotification

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "state": "expired",
  "body": {
    "any": "valid",
    "json": "object"
  }
}

Summary Notification

Properties

Schema NameDescription
_id string
The unique identifier for this notification resource. This is an opaque string.
state string

The state of the notification. failed means the notification was successfully queued for processing by the topic, but there was a failure in communicating the notification to one or more of the topic's subscribers. This field is a derived field and thus is immutable via PATCH or PUT operations.

  • pending - Subscribers are in process of being notified. The subscriber is responsible to update the state of a pull notification to received once retrieved. A push notification will update its state automatically once the subscriber endpoint responds successfully.
  • received - The subscriber has been notified. After retrieving pull notifications, the API consumer must update the state to received by POST to the apiture:acknowledge link's href. Pulled notifications that have not been set to received are considered by the service to be new and pending, which may cause unexpected behaviors in your application.
  • expired - Primarily associated with push notifications. By default, push notifications will persist in the queue for 4 days. If during that time the notification cannot successfully be delivered, it is set to expired and moved to a dead letter queue. expired notifications will be stored with an _embedded.errors array to identify the cause of expiration.
  • failed - If the notifications service experiences any errors or unforeseen circumstances that would cause a failure of notification delivery, the state is set to failed and the notification will be stored with an _embedded.errors array containing causes of failure.

allOf

Schema NameDescription
anonymous notificationFields
Common fields of the notification resource.

and

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined

Enumerated Values

Property Value
state received
state expired
state failed
state pending

summaryTopicNotification

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "state": "expired",
  "deliveryChannel": "email",
  "deliveryMethod": "push",
  "body": {
    "any": "valid",
    "json": "object"
  }
}

Summary Topic Notification

Properties

Schema NameDescription
_id string
The unique identifier for this notification resource. This is an opaque string.
state string

The state of the notification. failed means the notification was successfully queued for processing by the topic, but there was a failure in communicating the notification to one or more of the topic's subscribers. This field is a derived field and thus is immutable via PATCH or PUT operations.

  • pending - Subscribers are in process of being notified. The subscriber is responsible to update the state of a pull notification to received once retrieved. A push notification will update its state automatically once the subscriber endpoint responds successfully.
  • received - The subscriber has been notified. After retrieving pull notifications, the API consumer must update the state to received by POST to the apiture:acknowledge link's href. Pulled notifications that have not been set to received are considered by the service to be new and pending, which may cause unexpected behaviors in your application.
  • expired - Primarily associated with push notifications. By default, push notifications will persist in the queue for 4 days. If during that time the notification cannot successfully be delivered, it is set to expired and moved to a dead letter queue. expired notifications will be stored with an _embedded.errors array to identify the cause of expiration.
  • failed - If the notifications service experiences any errors or unforeseen circumstances that would cause a failure of notification delivery, the state is set to failed and the notification will be stored with an _embedded.errors array containing causes of failure.
deliveryChannel string
Delivery channel for the subscription.
deliveryMethod deliveryMethod
Enumeration of possible methods for delivering a notification.

allOf

Schema NameDescription
anonymous notificationFields
Common fields of the notification resource.

and

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined

Enumerated Values

Property Value
state received
state expired
state failed
state pending

notification

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
  "createdAt": "2018-04-17T10:04:46.375Z",
  "updatedAt": "2018-04-17T10:12:58.375Z",
  "_links": {
    "apiture:topic": {
      "href": "https://api.apiture.com/notifications/topics/ef967d9f-8bf5-412e-ba31-7d9047cb96b4"
    },
    "apiture:subscription": {
      "href": "https://api.apiture.com/notifications/subscriptions/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:entity": {
      "href": "https://api.apiture.com/users/user/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    },
    "apiture:acknowledge": {
      "href": "https://api.apiture.com/notifications/receivedNotifications?notification=https://api.apiture.com/notifications/pullNotifications/ff968d9f-8bf7-412e-ba31-7d9047cb96b3"
    }
  }
}

Notification

Properties

Schema NameDescription
Notification any

Representation of notification resource. A notification resource is a resource which matches a message, the topic it was ../published to, and the subscription instance that it is delivered to. In addition to the normal self link, the links for a notification include:

  • apiture:topic - The topic with which the notification is associated.
  • apiture:subscription - The subscription with which the notification is associated.
  • apiture:acknowledge - A link that a client must POST to after it has read and processed the notification.
  • apiture:entity - A link to the resource that is primary subject of the notification

allOf

Schema NameDescription
anonymous summaryNotification
Summary representation of a notification resource in the notifications collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.

and

Schema NameDescription
anonymous object
undefined
createdAt string(date-time)
Date and time the resource was created
updatedAt string(date-time)
Date and time the resource was updated

notifications

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        }
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        }
      }
    ]
  }
}

Notification Collection

Properties

Schema NameDescription
Notification Collection any
Collection of notifications. The items in the collection are ordered in the _embedded object with name items. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources. This is an abstract model schema which is extended to define specific resource collections.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [summaryNotification]
An array containing a page of notification items.

topicNotifications

{
  "_profile": "http://api.apiture.com/schemas/collection/notification/v0.1.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 67,
  "name": "notifications",
  "_links": {
    "self": {
      "href": "/basePath/notifications?start=10&limit=10"
    },
    "first": {
      "href": "/basePath/notifications?start=0&limit=10"
    },
    "next": {
      "href": "/basePath/notifications?start=20&limit=10"
    },
    "collection": {
      "href": "/basePath/notifications"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/0399abed-fd3d-4830-a88b-30f38b8a365c"
          }
        },
        "deliveryChannel": "web",
        "deliveryMethod": "pull"
      },
      {
        "_id": "d62c0701-0d74-4836-83f9-ebf3709442ea",
        "_profile": "http://api.apiture.com/schemas/notifications/notification/v0.1.0/profile.json",
        "_links": {
          "self": {
            "href": "/basePath/notifications/d62c0701-0d74-4836-83f9-ebf3709442ea"
          }
        },
        "deliveryChannel": "sms",
        "deliveryMethod": "push"
      }
    ]
  }
}

Topic Notifications Collection

Properties

Schema NameDescription
Topic Notifications Collection any
Collection of notifications. The items in the collection are ordered in the _embedded object with name items. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources. This is an abstract model schema which is extended to define specific resource collections.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [summaryTopicNotification]
An array containing a page of notification items.

abstractResource

{
  "_profile": "http://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  }
}

Abstract Resource

Properties

Schema NameDescription
_links links
An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
_embedded object
An optional map of nested resources, mapping each nested resource name to a nested resource representation.
_profile string(uri)
The URI of a resource profile which describes the representation.
_error error
An object which describes an error. This value is omitted if the operation succeeded without error.

root

{
  "id": "apiName",
  "name": "API name",
  "apiVersion": "0.0.1-SNAPSHOT",
  "_profile": "https://api.apiture.com/schemas/root/v1.0.0/profile.json",
  "_links": {}
}

API Root

Properties

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined
_id string
This API's unique ID.
name string
This API's name.
apiVersion string
This API's version.

errorResponse

{
  "_profile": "http://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.864Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Error Response

Properties

Schema NameDescription
Error Response abstractResource
Describes an error response, typically returned on 4xx or 5xx errors from API operations. The _error object contains the error details.

error

{
  "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "message": "The value for deposit must be greater than 0.",
  "statusCode": 422,
  "type": "positiveNumberRequired",
  "attributes": {
    "value": -125.5
  },
  "remediation": "Provide a value which is greater than 0",
  "occurredAt": "2018-01-25T05:50:52.375Z",
  "_links": {
    "describedby": {
      "href": "http://doc.apiture.com/errors/positiveNumberRequired"
    }
  },
  "_embedded": {
    "errors": []
  }
}

Error

Properties

Schema NameDescription
message string (required)
A localized message string describing the error condition.
_id string
A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at the source of the error). This is is an opaque string.
statusCode integer
The HTTP status code associate with this error.
minimum: 100
maximum: 599
type string
An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to render an appropriate message or hint. This provides a finer level of granularity than the statusCode. For example, instead of just 400 Bad Request, the type may be much more specific. such as integerValueNotInAllowedRange or numericValueExceedsMaximum or stringValueNotInAllowedSet.
occurredAt string(date-time)
An ISO 8601 UTC time stamp indicating when the error occurred.
attributes attributes
Data attribute associated with the error, such as values or constraints.
remediation string
An optional localized string which provides hints for how the user or client can resolve the error.
_embedded object
Optional embedded array of errors. This field may not exist if the error does not have nested errors.
items [errorResponse]
An array of error objects.

attributes

{}

Attributes

Properties

No properties

{
  "property1": {
    "href": "http://example.com",
    "type": "string",
    "templated": true,
    "title": "string",
    "deprecation": "http://example.com",
    "profile": "http://example.com"
  },
  "property2": {
    "href": "http://example.com",
    "type": "string",
    "templated": true,
    "title": "string",
    "deprecation": "http://example.com",
    "profile": "http://example.com"
  }
}

Links

Properties

Schema NameDescription
additionalProperties link
Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.

{
  "href": "http://example.com",
  "type": "string",
  "templated": true,
  "title": "string",
  "deprecation": "http://example.com",
  "profile": "http://example.com"
}

Link

Properties

Schema NameDescription
href string(uri) (required)
The URI or URI template for the resource/operation this link refers to.
type string
The media type for the resource.
templated boolean
If true, the link's href is a URI template.
title string
An optional human-readable localized title for the link.
deprecation string(uri)
If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation.
profile string(uri)
The URI of a profile document, a JSON document which describes the target resource/operation.