In order to get started with Dynamic Metadata, create the namespace that the metadata will be stored under. Namespaces are unique. Think of namespaces like a bucket where you can store metadata items into.
Namespaces may only consist of lower-case letters, numbers, and hyphens.
In the following example, we will create a "Heroes" namespace and add hero metadata under the namespace.
...const response =awaitfetch('https://api.utiliti.ai/metadata',{method:'POST',headers:{'Content-Type':'application/json','X-API-key':'<YOUR_API_KEY_HERE>',},body:JSON.stringify({namespace:'heroes',description:'This is the heroes namespace',}),})
SDK coming soon...
CURL*hnd =curl_easy_init();curl_easy_setopt(hnd,CURLOPT_CUSTOMREQUEST,"POST");curl_easy_setopt(hnd,CURLOPT_URL,"https://api.utiliti.ai/metadata");struct curl_slist *headers =NULL;headers =curl_slist_append(headers,"accept: application/json");headers =curl_slist_append(headers,"content-type: application/json");headers =curl_slist_append(headers,"X-API-key: <YOUR_API_KEY_HERE>");curl_easy_setopt(hnd,CURLOPT_HTTPHEADER, headers);curl_easy_setopt(hnd,CURLOPT_POSTFIELDS,"{\"namespace\":\"heroes\",\"description\":\"This is the heroes namespace\"}");CURLcode ret =curl_easy_perform(hnd);
curl --request POST \--url https://api.utiliti.ai/metadata \--header 'X-API-key: <YOUR_API_KEY_HERE>' \--header 'accept: application/json' \--header 'content-type: application/json' \--data '{"namespace":"heroes","description":"This is the heroes namespace"}'
$python -m pip install requests---import requestsurl ="https://api.utiliti.ai/metadata"payload ={"namespace":"heroes","description":"This is the heroes namespace"}headers ={"accept":"application/json","content-type":"application/json","X-API-key":"<YOUR_API_KEY_HERE>"}response = requests.post(url, json=payload, headers=headers)print(response.text)