Methods
(static) findFundingTags(title, description, parentId, allData, fromRecord, numRecords, token) → {Array.<Tag>}
Search between funding tags, at least one optional parameter should be passed
Parameters:
| Name | Type | Description |
|---|---|---|
title |
string | Optional: If passed filters tags by the title of the specific langCode |
description |
string | Optional: If passed filters tags by the description of the specific langCode |
parentId |
string | Array.<string> | Optional: If passed filters tags by their parent |
allData |
boolean | string | Optional: If passed with true value, all data will be returned (fromRecord and numRecords are not required) |
fromRecord |
number | Required: The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required: The number of records to load |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/find-funding-tags
Returns:
The matching tags
- Type
- Array.<Tag>
(static) findTags(type, creationUserId, title, description, parentId, allData, fromRecord, numRecords, token) → {Array.<Tag>}
Search Tags from their attributes. At least one optional parameter should be passed
Parameters:
| Name | Type | Description |
|---|---|---|
type |
string | Array.<string> | Optional for the action: If passed filters tags by its type |
creationUserId |
string | Array.<string> | Optional for the action: If passed filters tags by its creator |
title |
string | Optional for the action: If passed filters tags by the title of the specific langCode |
description |
string | Optional for the action: If passed filters tags by the description of the specific langCode |
parentId |
string | Array.<string> | Optional for the action: If passed filters tags by their parent |
allData |
boolean | string | Optional for the action: If passed with true value, all data will be returned (fromRecord and numRecords are not required) |
fromRecord |
number | Required by the action: The number of the first record to load (exclusive - 0 to start from the first) |
numRecords |
number | Required by the action: The number of records to load |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/find-tags
Returns:
The matching tags
- Type
- Array.<Tag>
(static) getFlatTagsByParentIds(tagIds, childrenTreeDepth, token) → {Array.<{tagId: string, parentTagId: string, title: string, parentTitle: string}>}
Load a list of Tags from their parent ids, but with a flat structure
Parameters:
| Name | Type | Description |
|---|---|---|
tagIds |
Array.<string> | string | Required by the action: The parent tag ids |
childrenTreeDepth |
Number | Optional for the action: The depth to retrieve (default 1) |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-flat-tags-by-parent-ids
Returns:
The retrieved tags
- Type
- Array.<{tagId: string, parentTagId: string, title: string, parentTitle: string}>
(static) getTagById(tagId, token) → {Tag}
Get a tag by the id
Parameters:
| Name | Type | Description |
|---|---|---|
tagId |
string | Required for the action: The id of the tag |
token |
string | Required: the Authorization Bearer token passed in the Header of the request |
Listens to Events:
- event:HTTP GET /rest-api/corporateacademy-mediator/get-tag-by-id
Returns:
The matching tag
- Type
- Tag