Concepts

Concepts

new Concepts(configuration)

Source:
Concepts
Parameters:
Name Type Description
configuration Object
Properties
Name Type Description
projectId string Your DataGraphs project id
apiKey string Your DataGraphs application API Key
clientId string Your DataGraphs application client id
clientSecret string Your DataGraphs application client secret

Methods

create(dataset, concept) → {Concept}

Source:
Create a new concept
Parameters:
Name Type Description
dataset string Id of the dataset the new concept should be added to
concept Object The new concept. This must meet the requirements of the dataset schema
Properties
Name Type Description
type string Required if the dataset contains more than 1 type
Returns:
Concept
Type
Concept

createBulk(dataset, concepts) → {BulkRequestResults}

Source:
Create new concepts
Parameters:
Name Type Description
dataset string Id of the dataset the new concepts should be added to
concepts Array.<Object> The new concept. This must meet the requirements of the dataset schema
Properties
Name Type Description
type string Required if the dataset contains more than 1 type
Returns:
result
Type
BulkRequestResults

delete(id)

Source:
Delete a concept
Parameters:
Name Type Description
id string | Array.<string> The id or ids of the concept(s) to be deleted

get(id, optionsopt) → {Concept}

Source:
Get concept
Parameters:
Name Type Attributes Description
id string Id of the concept to retrieve
options Object <optional>
Properties
Name Type Attributes Description
embed string | Array.<string> <optional>
Which relationship properties to embed into the response. Use "_all" to embed all relationships
fields string | Array.<string> <optional>
List of fields to return in each concept
includeDateFields boolean <optional>
When true, last modified and created dates are included in results
language string <optional>
Language to use for multilingual properties
Returns:
Concept
Type
Concept

replace(id, concept) → {Concept}

Source:
Replace an existing concept
Parameters:
Name Type Description
id string The id of the concept to be updated
concept Object object containing the new state of the concept
Returns:
Concept
Type
Concept
Source:
Search concepts
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
dataset string <optional>
_all Id of dataset to search
filter string <optional>
NQL filter
q string <optional>
String to search for
facets string | Array.<string> <optional>
List of facets to include in results
facetSize number <optional>
10 Number of facets to include in results
dateFacets string | Array.<string> <optional>
List of date facets to include in results
pageSize number <optional>
10 Number of results to return per page
pageNo number <optional>
1 Which page of results to return
sort string <optional>
Sort order in the format {property1}:{asc|desc},{property2}:{asc|desc}
embed string | Array.<string> <optional>
Which relationship properties to embed into the response. Use "_all" to embed all relationships
ids Array.<string> <optional>
List of concept ids to return
boost Array.<string> <optional>
List of properties in the format {property}:{weighting} where weighting is number between 0 and 100
fields Array.<string> <optional>
List of fields to return in each concept
nextPageToken string <optional>
Token that can be used to fetch the next page of results
previousPageToken string <optional>
Token that can be used to fetch the previous page of results
includeDateFields boolean <optional>
When true, last modified and created dates are included in results
language string <optional>
Language to use for multilingual properties
Returns:
Search Results
Type
ConceptSearchResults

update(id, patch) → {Concept}

Source:
Update an existing concept
Parameters:
Name Type Description
id string The id of the concept to be updated
patch Object object containing any fields to be modified
Returns:
Concept
Type
Concept

upsert(dataset, concept) → {Concept}

Source:
Upsert a concept
Parameters:
Name Type Description
dataset string Id of the dataset the concept belongs
concept Object The concept. This must meet the requirements of the dataset schema
Properties
Name Type Description
type string Required if the dataset contains more than 1 type
Returns:
Concept
Type
Concept

upsertBulk(dataset, concepts) → {BulkRequestResults}

Source:
Upsert concepts
Parameters:
Name Type Description
dataset string Id of the dataset the concept belongs
concepts Array.<Object> The concepts. This must meet the requirements of the dataset schema
Properties
Name Type Description
type string Required if the dataset contains more than 1 type
Returns:
result
Type
BulkRequestResults