Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

IN DEVELOPMENT: FEATURE IS CURRENTLY NOT AVAILABLE

Due to the dynamic nature of AffinityLive it's really difficult to determine what fields are available and required when creating and editing objects.

Endpoints

(POST|GET) [/object_type1,object_type2,..object_typeN]/_forms/fields

Request fields for given object type(s). For example, 

$ curl -XGET /addresses,contacts/_forms/fields

would give you something back like

{
    "response": {
		"forms": {
			"addresses": [{
				"title": "Address",
				"fields": [{
					"key": "title",
					"title": "Title",
					"type": "text",
					"required": 1
				}, ...]
			}],
			"contacts": [{
				...
			}],
		}
	},
	"meta": { ... }
}

You can also pass the form information in as body data. This can be used to configure the forms, which we will discuss a little bit later in the document. For example,

$ curl -XPOST /_forms/fields -d'{
	"forms": {
		"addresses": { ... configure addresses form ... },
		"contacts: 1,
	}
}';

would return a similar structure of fields. The fields endpoint accept the following parameters:

  • forms : The forms for each object type, with optional configuration options.

 

  • No labels