...
Code Block | ||
---|---|---|
| ||
{
"comments": "Metadata transform document",
"metadata": {
"X-Written-When-Meta": "${date:yyyyMMdd-HHmmss}",
"X-Contains-Meta": "${domain}/${bucket}",
"X-Copyright-Meta": "Copyright ${date:yyyy}, MetaCorp, Inc",
"X-Author-Meta": "${user}"
}
} |
...
- Create the XForm file with the definitions for your custom metadata, described above.
- Important: Validate the syntax of the JSON you are applying. Use a JSON validator such as https://jsonlint.com.
- Save it as
xform.json
or similar. - Verify that the user that will upload to the Gateway has the permissions on their policy to be able to PUT a policy or GET a policy.
- The XForm is an
/etc
document, which you upload via the management API using the /_admin/manage path:- If your Gateway IP is 10.0.0.10, the starting URL is
http://10.0.0.10/_admin/manage
- If your Gateway resolves from cloud.example.com, the starting URL is
http://cloud.example.com/_admin/manage/
- If your Gateway IP is 10.0.0.10, the starting URL is
- To etc documents in a tenant, use this form (see Namespace Structure):
http://cloud.example.com/_admin/manage/tenants/{tenantname}/etc/{insertyourjson}
The application of the XForm metadata doc is a HTTP PUT, shown here as cURL:
Code Block language bash curl -X PUT --data-binary @xformcorp.json -u tlokko -H "Content-Type: application/json" https://cloud.example.com/_admin/manage/tenants/cloud/domains/d1.cloud.example.com/etc/metaxform.json
...