create_resource_type_field

Get metadata field information for all (matching) fields.

Available from version 10.3+.

Requires permission a.

Variable Description Data type
$name Field name string
$resource_types CSV of applicable resource types for this field. Use 0 (zero) for global, for others see get_resource_types() string
$type Metadata field type. For values see the FIELD_TYPE_* constants string

Response

Returns a 403 HTTP status if not authorised or 200 HTTP status with an appropriate payload.

Examples

Successful request processed:

{"status":"success","data":{"ref":129}}

Bad input (e.g empty name or invalid resource type or type) causing a failure:

{"status":"fail","data":{"message":"Unable to save"}}