propertyGroups

Following are the REST API operations for the propertyGroups:

GET /propertyGroups
POST /propertyGroups
POST /propertyGroups/properties
DELETE /propertyGroups/properties
GET /propertyGroups/properties/sorted
GET /propertyGroups/sorted
GET /propertyGroups/{groupName}
PUT /propertyGroups/{groupName}
DELETE /propertyGroups/{groupName}
GET /propertyGroups/{groupName}/associations
POST /propertyGroups/{groupName}/associations
DELETE /propertyGroups/{groupName}/associations/{association}
GET /propertyGroups/{groupName}/properties
GET /propertyGroups/{groupName}/properties/sorted
GET /propertyGroups/{groupName}/properties/{propertyName}
PUT /propertyGroups/{groupName}/properties/{propertyName}
DELETE /propertyGroups/{groupName}/properties/{propertyName}
GET /propertyGroups/{groupName}/properties/{propertyName}/resources
POST /propertyGroups/{groupName}/properties/{propertyName}/resources
DELETE /propertyGroups/{groupName}/properties/{propertyName}/ resources/{resourceType}/{resourcePath}
PUT /propertyGroups/{groupName}/properties/{propertyName}/ {propertyOrder}
GET /propertyGroups/{groupName}/resources
PUT /propertyGroups/{groupName}/{groupOrder}

GET /propertyGroups

This API is used to fetch all property groups.

Parameters

None

Example to list all property groups

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups"

Example to list all property groups as ldap user

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups"

Example to get count all property groups

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups?count"

POST /propertyGroups

This API is used to create a new custom property group or groups.

Parameters

None

Request Body

[
  {
    "name": "string",
    "annotation": "string",
    "associations": [
      "string"
    ],
    "location": "PROPERTIES_TAB"
  }
]

Example to create a new custom property group named custom_propert_group1

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups" -H "Content-Type:application/json" -d "[{ \"name\" : \"custom_property_group1\" }]"

Example to create a new custom property group named custom_propert_group1 as ldap user

curl -X POST -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups" -H "Content-Type:application/json" -d "[{ \"name\" : \"custom_property_group1\" }]"

Example to create a new custom property group named custom_property_group2 with an association to /test_site/services/databases/ds & /test_site/services/databases/examples.

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups" -H "Content-Type:application/json" -d "[{ \"name\" : \"custom_property_group2\", \"associations\" : [ \"/test_site/services/databases/ds\", \"/test_site/services/databases/examples\"] }]"

POST /propertyGroups/properties

This API is used to create a new custom property by specifying its name, type, extended type, and default value(s).

Parameters

None

Request Body

[
  {
    "Property Name": "string",
    "Property Type": "STRING_TYPE",
    "Property Extended Type": [
      "string"
    ],
    "Property Group": "string",
    "Property Default Value": [
      "string"
    ]
  }
]

Example to create a new property for property group foo

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/properties" -H "Content-Type:application/json" -d "[{\"name\" : \"custom1\", \"propertyGroup\" : \"foo\", \"type\" : \"STRING_TYPE\" }]"

Example to create a new SINGLE_ENUMERATION_TYPE property

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/properties" -H "Content-Type:application/json" -d "[{\"name\" : \"custom2\", \"propertyGroup\" : \"foo\", \"type\" : \"SINGLE_ENUMERATION_TYPE\", \"extendedType\" : [ \"a\", \"b\", \"b2\" ], \"defaultValue\" : [ \"b2\" ] }]"

Example to create a new MULTI_ENUMERATION_TYPE property with multiple default values

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/properties" -H "Content-Type:application/json" -d "[{\"name\" : \"custom3\", \"propertyGroup\" : \"foo\", \"type\" : \"MULTI_ENUMERATION_TYPE\", \"extendedType\" : [ \"a\", \"b\", \"b2\" ], \"defaultValue\" : [ \"b\", \"b2\" ] }]"

Example to retrieve custom properties

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/data/typed" -H "Content-Type:application/json" -d "{ \"query\" : \"SELECT CUSTOM_PROPERTY_ID, CUSTOM_PROPERTY_NAME, CUSTOM_PROPERTY_TYPE, CUSTOM_PROPERTY_EXTENDED_TYPE, CUSTOM_PROPERTY_GROUP, CUSTOM_PROPERTY_DEFAULT_VALUE FROM /services/databases/system/all_custom_properties\" }"

Example to retrieve custom properties as ldap user

curl -X POST -u user@ldapDomain:password "https://localhost:9502/rest/v2/data/typed" -H "Content-Type:application/json" -d "{ \"query\" : \"SELECT CUSTOM_PROPERTY_ID, CUSTOM_PROPERTY_NAME, CUSTOM_PROPERTY_TYPE, CUSTOM_PROPERTY_EXTENDED_TYPE, CUSTOM_PROPERTY_GROUP, CUSTOM_PROPERTY_DEFAULT_VALUE FROM /services/databases/system/all_custom_properties\" }"

DELETE /propertyGroups/properties

This API is used to delete custom properties from the Business Directory.

Parameters

None

Request Body

[
  {
    "Property Name": "string",
    "Property Type": "STRING_TYPE",
    "Property Extended Type": [
      "string"
    ],
    "Property Group": "string",
    "Property Default Value": [
      "string"
    ]
  }
]

Example to delete a custom property named 'custom1' in custom property group 'foo'; also delete property named 'custom2' in group 'bar'

curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/properties" -H "Content-Type:application/json" -d "[{ \"name\" : \"custom1\", \"propertyGroup\" : \"foo\" }, { \"name\" : \"custom2\", \"propertyGroup\" : \"bar\" }]"

Example to delete a custom property named 'custom1' in custom property group 'foo'; also delete property named 'custom2' in group 'bar' (as ldap user)

curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/properties" -H "Content-Type:application/json" -d "[{ \"name\" : \"custom1\", \"propertyGroup\" : \"foo\" }, { \"name\" : \"custom2\", \"propertyGroup\" : \"bar\" }]"

GET /propertyGroups/properties/sorted

This API is used to get all sorted property ids.

Parameters

None

Example to get all sorted property ids in all groups

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/properties/sorted"

GET /propertyGroups/sorted

This API is used to get all sorted group ids.

Parameters

None

Example to get all sorted group ids

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/sorted"

GET /propertyGroups/{groupName}

This API is used to fetch a single property group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

Example to fetch 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1"

Example to Fetch 'custom_property_group1' property group (as ldap user)

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1"

PUT /propertyGroups/{groupName}

This API is used to update a group's annotation and associations.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

Request Body

{
  "name": "string",
  "annotation": "string",
  "associations": [
    "string"
  ],
  "location": "PROPERTIES_TAB"
}

Example to update a custom property group named custom_property_group2 with an association to /test_site/services/databases/ds & /test_site/services/databases/examples.

curl -X PUT -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2" -H "Content-Type:application/json" -d "{ \"name\" : \"custom_property_group2\", \"associations\" : [ \"/test_site/services/databases/ds\", \"/test_site/services/databases/examples\"] }"

Example to update a custom property group named custom_property_group2 with an association to /test_site/services/databases/ds & /test_site/services/databases/examples as ldap user

curl -X PUT -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2" -H "Content-Type:application/json" -d "{ \"name\" : \"custom_property_group2\", \"associations\" : [ \"/test_site/services/databases/ds\", \"/test_site/services/databases/examples\"] }"

DELETE /propertyGroups/{groupName}

This API is used to remove a custom property group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

Example to remove a custom property group named custom_propert_group1

curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1"

Example to remove a custom property group named custom_propert_group1 (as ldap user)

curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1"

GET /propertyGroups/{groupName}/associations

This API is used to fetch resource path associations for a single property group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

Example to fetch resource path associations for 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/associations"

Example to fetch resource path associations for 'custom_property_group1' property group (as ldap user)

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/associations"

POST /propertyGroups/{groupName}/associations

This API is used to add an association to a custom property group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The name of the property group to which to add an association

path

string

Request Body

[
  "string"
]

Example to update a custom property group named custom_property_group2 with an association to /test_site/services/databases/ds & /test_site/services/databases/examples.

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2/associations" -H "Content-Type:application/json" -d "[\"/test_site/services/databases/ds\", \"/test_site/services/databases/examples\" ]"

Example to update a custom property group named custom_property_group2 with an association to /test_site/services/databases/ds & /test_site/services/databases/examples as ldap user

curl -X POST -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2/associations" -H "Content-Type:application/json" -d "[\"/test_site/services/databases/ds\", \"/test_site/services/databases/examples\" ]"

ociations"

DELETE /propertyGroups/{groupName}/associations/{association}

This API is used to remove an association from a custom property group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The name of the property group from which to remove an association

path

string

association

The association to remove. URL encode the path

path

string

Example to update a custom property group named custom_property_group2 by removing its association with /test_site/services/databases/ds

curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2/associations/%2Ftest_site%2Fservices%2Fdatabases%2Fds"

Example to update a custom property group named custom_property_group2 by removing its association with /test_site/services/databases/ds as ldap user

curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2/associations/%2Ftest_site%2Fservices%2Fdatabases%2Fds"

GET /propertyGroups/{groupName}/properties

This API is used to fetch all properties for a single property group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

Example to fetch properties for 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties"

Example to fetch count of all properties for 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties?count"

Example to Fetch count of all properties for 'custom_property_group1' property group (as ldap user)

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties?count"

GET /propertyGroups/{groupName}/properties/sorted

This API is used to get all sorted property ids in a group.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

Example to get all sorted property ids in custom_property_group1

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties/sorted"

GET /propertyGroups/{groupName}/properties/{propertyName}

This API is used to fetch a single custom property.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property Group

path

string

propertyName

The Property Name

path

string

Example to fetch property 'custom1' for the 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties/custom1"

Example to Fetch property 'custom1' for the 'custom_property_group1' property group (as ldap user)

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties/custom1"

PUT /propertyGroups/{groupName}/properties/{propertyName}

This API is used to update a custom property's type, extended type, and default value.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

propertyName

Name of the custom property to be updated.

path

string

Example to update custom property 'custom1' type, rename to 'custom1alpha', update enumeration, and set default value

curl -X PUT -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1" -H "Content-Type:application/json" -d "{\"name\" : \"custom1alpha\", \"propertyGroup\" : \"foo\", \"type\" : \"MULTI_ENUMERATION_TYPE\", \"extendedType\" : [ \"a\", \"b\", \"b2\" ], \"defaultValue\" : [ \"b\", \"b2\" ] }"

Example to update custom property 'custom1' type, rename to 'custom1alpha', update enumeration, and set default value (as ldap user)

curl -X PUT -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1" -H "Content-Type:application/json" -d "{\"name\" : \"custom1alpha\", \"propertyGroup\" : \"foo\", \"type\" : \"MULTI_ENUMERATION_TYPE\", \"extendedType\" : [ \"a\", \"b\", \"b2\" ], \"defaultValue\" : [ \"b\", \"b2\" ] }"

DELETE /propertyGroups/{groupName}/properties/{propertyName}

This API is used to delete a single custom property from the Business Directory.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

propertyName

Name of the custom property to be removed.

path

string

Example to delete a custom property named 'custom1' from custom property group 'foo'

curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1"

Example to delete a custom property named 'custom1' from custom property group 'foo' as ldap user

curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1"

GET /propertyGroups/{groupName}/properties/{propertyName}/resources

This API is used to Fetch recorded classifications for a single custom property. Note resources classified with the default value for a property may or may not appear in the results.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

propertyName

Name of the property.

path

string

Example to fetch classifications for the 'custom1' property in the 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties/custom1/resources"

Example to fetch count of all classifications for the 'custom1' property in the 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties/custom1/resources?count"

Example to fetch count of all classifications for the 'custom1' property in the 'custom_property_group1' property group (as ldap user)

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/properties/custom1/resources?count"

POST /propertyGroups/{groupName}/properties/{propertyName}/resources

This API is used to apply a custom property onto a Business Directory Resource. Set the custom property value for a resource.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

propertyName

Name of the custom property to be applied.

path

string

Request Body

{
  "resourceBeans": [
    {
      "resourcePath": "string",
      "resourceType": "string"
    }
  ],
  "propertyValue": [
    "string"
  ]
}

Example to set custom property 'custom1' to resource 'orders'

curl -X POST -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1/resources" -H "Content-Type:application/json" -d "{ \"resourceBeans\" : [ { \"resourcePath\" : \"/test_site/services/databases/tutorial/orders\", \"resourceType\" : \"TABLE\" }], \"propertyValue\" : [ \"One\", \"Two\" ] }"

Example to set custom property 'custom1' to resource 'orders' as ldap user

curl -X POST -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1/resources" -H "Content-Type:application/json" -d "{ \"resourceBeans\" : [ { \"resourcePath\" : \"/test_site/services/databases/tutorial/orders\", \"resourceType\" : \"TABLE\" }], \"propertyValue\" : [ \"One\", \"Two\" ] }"

DELETE /propertyGroups/{groupName}/properties/{propertyName}/ resources/{resourceType}/{resourcePath}

This API is used to remove a custom property value from a Business Directory Resource.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

propertyName

Name of the custom property to be removed.

path

string

resourceType

The resource type for the resource from which to remove the classification.

path

string

resourcePath

The resource path for the resource from which to remove the classification.

path

string

Example to clear custom property 'custom1' from resource 'orders'

curl -X DELETE -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1/resources/TABLE/%2Ftest_site%2Fservices%2Fdatabases%2Ftutorial%2Forders"

Example to clear custom property 'custom1' from resource 'orders' (as ldap user)

curl -X DELETE -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1/resources/TABLE/%2Ftest_site%2Fservices%2Fdatabases%2Ftutorial%2Forders"

PUT /propertyGroups/{groupName}/properties/{propertyName}/ {propertyOrder}

This API is used to update a custom property's order within the group. The order numbers of properties start from 0.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

propertyName

Name of the custom property to be updated.

path

string

propertyOrder

A new order number for the existing custom property in the group.

path

integer

Example to update custom property 'custom1' within group 'foo', to set its ordinal number to 5.

curl -X PUT -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/foo/properties/custom1/5" -H "Content-Type:application/json"

GET /propertyGroups/{groupName}/resources

This API is used to fetch recorded classifications for a single custom property group. Please note resources classified with the default value for a property may or may not appear in the results.

Parameters

Name

Description

Parameter Type

Data Type

groupName

The Property group

path

string

Example to fetch classifications for the 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/resources"

Example to fetch count of all classifications for the 'custom_property_group1' property group

curl -X GET -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/resources?count"

Example to fetch count of all classifications for the 'custom_property_group1' property group (as ldap user)

curl -X GET -u user@ldapDomain:password "https://localhost:9502/rest/v2/propertyGroups/custom_property_group1/resources?count"

PUT /propertyGroups/{groupName}/{groupOrder}

This API is used to update a group's ordinal number.

Parameters

Name

Description

Parameter Type

Data Type

groupName

group that contains the property

path

string

groupOrder

A new order number for the existing custom property group.

path

integer

Example to update a custom property group named custom_property_group2 with a new order number

curl -X PUT -u admin:admin "https://localhost:9502/rest/v2/propertyGroups/custom_property_group2/4" -H "Content-Type:application/json"