We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/processing/dictionary/create

Creates a new dictionary. A dictionary provides efficient lookup and mapping operations over a collection of strings.

The user must be authenticated and have write permissions to the associated site group.

Request

The request object has the following fields:

Name

Type

Required

Description

siteGroupId

String

Yes

The site group identifier that determines where the new dictionary will logically belong, i.e., the new dictionary's "parent". A user's permissions for the dictionary are inferred from the user's permissions for the site group.

name

String

Yes

A brief description of the dictionary's purpose and function.

description

String

No

A longer description of the dictionary's purpose and function.

workbook

String

No

The dictionary data, provided as a base-64 encoded Excel workbook. The Excel workbook must adhere to certain

formatting rules

.

entries

Object

No

The dictionary data, provided as a JSON object. The JSON object must adhere to certain

formatting rules

.

The workbook and entries fields are mutually exclusive, only one of them can be provided.

See here for Excel workbook formatting rules.

See here for JSON object formatting rules.

If workbook is provided and the workbook contains Japanese data, note that the workbook should not contain any phonetic run.aspx) data. Otherwise such data might be part of the data extracted from the workbook, and pollute the generated dictionaries. Possible ways to achieve this include, e.g., exporting the data to *.csv and then reimporting the data, or running a macro that deletes the phonetic run data.


Response

The response object has the following fields:

Name

Type

Description

dictionaryId

String

The identifier of the newly created dictionary.

name

String

The name of the newly created dictionary.

messages

Array of String

If workbook or entries were provided, a list of progress or warning messages may be have been produced during processing of the dictionary data.

Examples

Create a new dictionary placeholder.

Since neither workbook nor entries is provided, the placeholder actually holds no dictionary data.

This can be added at at later time using the [/processing/dictionary/update](page:///processing/dictionary/update) API method.

Bash
$ cx.py /processing/dictionary/create '{"siteGroupId":"1234567","name":"My dictionary"}'
{
 "dictionaryId": "9232299593928824873",
}

Last updated: