POST /reference_data/sets

Create a new reference set.

Create a new reference set.

Table 1. POST /reference_data/sets resource details
MIME Type

application/json

Table 2. POST /reference_data/sets request parameter details
Parameter Type Optionality Data Type MIME Type Description

name

query

Required

String

text/plain

Required - The name of the reference set being created

element_type

query

Required

String

text/plain

Required - The element type for the values allowed in the reference set. The allowed values are: ALN (alphanumeric), ALNIC (alphanumeric ignore case), IP (IP address), NUM (numeric), PORT (port number) or DATE. Note that date values need to be represented in milliseconds since the Unix Epoch January 1st 1970.

timeout_type

query

Optional

String

text/plain

Optional - The allowed values are "FIRST_SEEN", "LAST_SEEN" and "UNKNOWN". The default value is "UNKNOWN". This indicates if the time_to_live interval is based on when the data was first seen or last seen.

time_to_live

query

Optional

String

text/plain

Optional - The time to live interval, for example: "1 month" or "5 minutes"

fields

query

Optional

String

text/plain

Optional - Use this parameter to specify which fields you would like to get back in the response. Fields that are not named are excluded. Specify subfields in brackets and multiple fields in the same object are separated by commas.

Table 3. POST /reference_data/sets response codes
HTTP Response Code Unique Code Description

201

A new reference set was successfully created

409

1004

The reference set could not be created, the name provided is already in use. Please change the name and try again.

422

1005

A request parameter is not valid

500

1020

An error occurred while attempting to create the reference set

Response Description

Information about the newly created reference set.

Response Sample


{
    "collection_id": 42,
    "creation_time": 42,
    "element_type": "String <one of: ALN, NUM, IP, PORT, ALNIC, DATE>",
    "name": "String",
    "namespace": "String <one of: PRIVATE, SHARED, TENANT>",
    "number_of_elements": 42,
    "time_to_live": "String",
    "timeout_type": "String <one of: UNKNOWN, FIRST_SEEN, LAST_SEEN>"
}