Adding Metadata
Adding Metadata to your requests is a great way to save extra information about your Jobs.
A Metadata object is composed of a key
and a value
. The key
is a string that identifies the type of information you want to save. The value
is a string that contains the information you want to save.
You can add metadata to your Summarization jobs (see Start Summary) and Extraction jobs (see Start Extract) by adding X-Wordcab-Metadata-<Key>
headers to your request, where <Key>
is the name of the metadata field you want to add.
By convention, Wordcab will extract anything after the X-Wordcab-Metadata-
prefix and use it as the key
for the metadata field. The value of the header will be used as the value
for the metadata field. All strings will be converted to lowercase, and any dashes will be converted to underscores.
Here is an example of how to add a metadata field to a request:
{
"X-Wordcab-Metadata-Project": "Project-1",
"X-Wordcab-Metadata-Client": "Company-Alpha"
}
Which will look like this in the Job:
{
...
"metadata": {
"project": "project_1",
"client": "company_alpha"
}
...
}
Updated about 2 years ago