Skip to main content

1E 8.1 (on-premises)

CustomProperties

Entity - Custom property

Verb

Request

Notes

Permissions required

GET - for property type by id

/Consumer/CustomProperties/TypeId/{typeId}

Gets list of all available custom properties for a type by its id

Following product pack related permissions

  • Questioner

  • Actioner

Following custom property related permission

  • Read

Returns Unauthorized (401) if user does not have the required permissions.

GET - for property type by name

/Consumer/CustomProperties/TypeName/{typeName}

Gets list of all available custom properties for a type by its name

Following product pack related permissions

  • Questioner

  • Actioner

Following custom property related permission

  • Read

Returns Unauthorized (401) if user does not have the required permissions.

GET - individual property by its id

/Consumer/CustomProperties/Id/{Id}

Gets an individual custom property by id

Following product pack related permissions

  • Questioner

  • Actioner

Following custom property related permission

  • Read

Returns Unauthorized (401) if user does not have the required permissions.

POST

/Consumer/CustomProperties/Search

Minimum API version 4.0

Returns custom properties that fulfil parameters passed in the request body:

  • filter - filter expression.To learn about how to define filter checkUsing scope and filter expressionspage.

  • sort - sort expression. To learn about how to define sort criteria checkSort Definitionpage.

  • start - starting index to support pagination. It begins from 1.

  • pagesize - number of results to fetch

Allowed filter columns:

  • Name

Allowed sort columns:

  • Name

Following custom property related permission

  • Read

POST

/Consumer/CustomProperties

Creates a custom property.

Payload should include custom property type id or name. Using both causes ambiguity in the Consumer API which will not try to set any priority over which one to use and return a Bad Request (400) HTTP status.

Example Request - custom property type id

{
    "Name":"Business Unit",
    "TypeId":1
}

Example Request - custom property type name

{
    "Name":"Business Unit",
    "TypeName":"ScopableTag"
}

From API version 4.0 onwards, you can add a collection of values that should be added for the property being created:

Example Request - custom property type name

{
    "Name":"Business Unit",
    "TypeName":"ScopableTag",
    "Values":[{
        "Value":"First"
    },
    {
        "Value":"Second"
    }]
}
  • Write

Returns Unauthorized (401) if user does not have the required permissions.

PUT

/Consumer/CustomProperties

Updates a custom property. Only name can be updated.

Update Payload

{
  "Id":7,
  "Name": "Building"
}

From API version 4.0 you can provide values that should replace any values the custom property had before the update. This is done via "Values" property in the payload as seen below:

Example Request - custom property type name

{
    "Id":"1",
    "Name":"Business Unit",
    "TypeName":"ScopableTag",
    "Values":[{
        "Value":"First"
    },
    {
        "Value":"Second"
    }]
}
  • If "Values" property is omitted or set to null, custom property values will not be modified

  • If "Values" property is set to an empty array (so [] is JSON), all custom property values belonging to this custom property will be removed.

  • If "Values" property contains a collection of values, they will replace any values that the custom property being updated had before the update.

  • Write

Returns Unauthorized (401) if user does not have the required permissions.

DELETE

/Consumer/CustomProperties/{id}

Deletes a custom property by id

  • Write

Returns Unauthorized (401) if user does not have the required permissions.

DELETE

/Consumer/CustomProperties

Minimum API version 4.0

Deletes multiple custom properties.

Body of the request should contain an array of custom property Ids for properties that should be deleted.

  • Write

Returns Unauthorized (401) if user does not have the required permissions.