Metadata
Fields of your own, such as an owner or a region, with a value for each website and section.
Metadata lets you record facts of your own about each website and section, to track them beside its results: who owns it, which region or department it belongs to, the year it launched.
Properties#
A metadata property is one such field. Properties are defined once for the whole account, and each website and section can hold a value for each of them. Account administrators define them on the Metadata settings screen in Silktide; if you cannot find it, ask Silktide to set them up for you. The API reads them but does not create them.
Each property has a name, which is the key its values are read and set by, and a label, which is what people see. It holds one type of value:
propertyType | Holds |
|---|---|
string | Text. |
int | A whole number. |
float | A decimal number. |
bool | true or false. |
url | A web address, as text. |
A property can also be required, have a smallest and largest value (or length, for text), and offer a list of choices, with or without allowing other values. These are guidance for the forms people fill in: the API saves a value without checking it against them.
Values#
Read a section's values with Get a section's metadata, and change them with Set a section's metadata. Section 0 is the whole website; see Websites and sections. You can also give a new website its values when you create it.
In Silktide itself: Metadata screen, in Help.
- GETGet a section's metadata, and the properties it can have
/v1/websites/{websiteId}/sections/{sectionId}/metaReturns a section's metadata values, and every metadata property the account defines, so you can show the empty ones too. - POSTSet some of a section's metadata
/v1/websites/{websiteId}/sections/{sectionId}/metaSets some of a section's metadata values and returns all of them, as Get a section's metadata does.