/
REST Rules Data Set API

REST Rules Data Set API

5.0.0

The Data Set REST APIs provide the capability to manage data sets for ServiceBroker tenants.

A tenant's data sets can be referenced in their Configuration > Modules > ApptSearch object, allowing common sets of data to be re-used in the rules which define how ServiceBroker should search for appointment offerings from the configured Providers, for that tenant.    

On this page:

Related pages:

Resource URL Summary

Retrieve a Tenant's Data Set IDs

GET /up/v5/rule/dataSet 

Retrieve a Tenant's specific Data Set

GET /up/v5/rule/dataSet/${id}

Create/Update a Tenant's specific Data Set

PUT /up/v5/rule/dataSet/${id}

Delete a Tenant's specific Data Set

DELETE /up/v5/rule/dataSet/${id}

HTTP Headers

This API uses the standard ServiceBroker HTTP Headers.

API Specific Parameters

ParameterTypeRequired?Description

${id}

string

Yes

A string ID value for the data set.

Data set ID values need to be unique within each Tenant - different Tenants can use the same ID values without issue.


API Specifics

Retrieve a Tenant's Data Set IDs

This REST API will return all of the defined Data Set IDs belonging to the authenticated Tenant.

URL

GET /up/v5/rule/dataSet

HTTP Request Body

This request does not require a request body. 

HTTP Response

Success

On success, an HTTP response code of 200 will be returned, and the response body will contain a JSON array of strings, each being the ID of data sets that have been defined for the Tenant.

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Retrieve a Tenant's specific Data Set

This REST API will return the specified Data Set belonging to the authenticated Tenant.

URL

GET /up/v5/rule/dataSet/${id}

HTTP Request Body

This request does not require a request body. 

HTTP Response

Success

On success, an HTTP response code of 200 will be returned, and the response body will contain a JSON array, containing the data set that requested for the Tenant.

If the data set has not been defined for the Tenant, an empty JSON array will be returned.

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Create/Update a Tenant's specific Data Set

This REST API will create or update the specified Data Set belonging to the authenticated Tenant with the data set values in the request body.

This API requires that the Content-Type header be set to text/plain, not application/json.

When updating an existing Data Set, data set values supplied in the request body that are not already present in the Data Set will be added to the existing Data Set. Any data set values already in the Data Set which are not present in the update will not be removed.

URL

PUT /up/v5/rule/dataSet/${id}

HTTP Request Body

This request requires a new-line separated list of data set items. Data items do not need to be quoted.

For example, supplying the body of:

test1
test2
test3

to a new Data Set ID would result in the following Data Set being created:

[
	"test1",
	"test2",
	"test3"
]

HTTP Response

Success

On success, an HTTP response code of 200 will be returned.

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Delete a Tenant's specific Data Set

This REST API will delete the specified Data Set belonging to the authenticated Tenant.

URL

GET /up/v5/rule/dataSet/${id}

HTTP Request Body

This request does not require a request body. 

HTTP Response

Success

On success, an HTTP response code of 200 will be returned.

Error

Otherwise, on error, the API will:

  • Return an HTTP response code of 400, if the request was invalid;
  • Return an HTTP response code of 401, if the request was not authorized; or
  • Return an HTTP response code of 500, if something else went wrong.

Both HTTP 400 and 500 responses will contain a REST Integration Standard Response Object with appropriate values for the Code and/or Message fields, describing the error, in the response body.

Related content

REST Work Item Appointment Search
REST Work Item Appointment Search
More like this
REST Objects Tenant
REST Objects Tenant
More like this
REST Objects Appointment Offer
REST Objects Appointment Offer
More like this