Skip to content
Enrico edited this page Nov 17, 2022 · 6 revisions

Get list of item IDs that have a certain feature

Request:

GET /getItemsForEachValue/{feature}[/{filter}[/{location}[/{creation}[/{deleted}]]]]

Send this request to get a list of item IDs that have a certain feature. They will be grouped by feature value. If filter is specified it will show only IDs of items that have that particular feature of that particular value. If none exist it will return an empty array. Example response below.

  • feature Feature name to look for
  • filter The value you want the feature to be
  • location Only items that are in a location
  • limit Maximum number of results
  • creation creation date (starts from here)
  • deleted Also count deleted/lost items
GET /getItemsForEachValue/color

{
   "green": ["B100", "B200", "..." ],
   "red": ["C100", "C200", "..." ]
}

GET /getItemsForEachValue/color/green

{
   "green": ["B100", "B200", "..." ]
}

GET /getItemsForEachValue/color/teal

[]

Get item by not feature

Request:

GET /getItemByNotFeature/{filter}/{notFeature}[/{location}[/{limit}[/{creation}[/{deleted}]]]]

Send this request to get a list of items with the feature in filter and don't have a feature specified in notFeature

  • filter feature that should be there write as type=value
  • notFeature Feature that should not be present at all
  • location Only items that are in a location
  • limit Maximum number of results
  • creation creation date (starts from here)
  • deleted Also count deleted/lost items

Example: /getItemByNotFeature/type=cpu/brand will return the list of CPUs without a brand specified

Get recent audit by type

Request:

GET /getRecentAuditByType/{type}[/{howMany}]

Get all recent changes filtered by change type

  • type the change you want to filter. See the list below.
  • howMany how many changes you want to receive. Default is 100.

Change char list:

  • C: create
  • U: update, feature(s) are modified
  • M: move
  • D: delete
  • R: rename
  • L: lose

You will get a json with format "code": "time of the change" Example:

{
  "203": "1602753536.986703",
  "R87": "1602753562.273268",
  "B237": "1602753524.907019",
  "C254": "1602751601.707732",
  "D12": "1602491494.600757"
}

Get count by feature

Request:

GET /getCountByFeature/{feature}[/{filter}[/{location}[/{creation[/{deleted[/{cutoff}]]]]]

Return the count of items with a specific set of feature

  • feature The feature you want to count
  • filter Feature that must match, useful to select items by type
  • location Consider only in this location and subtree
  • creation Creation date
  • deleted Also count deleted/lost items, defaults to false (don't count them)
  • cutoff Report features only if count is greater than (or equal to) this number, useful for text features with lots of possible values