Share via


SP.Field.schemaXml property (sp.js)

Gets or sets a value that specifies the XML schema that defines the field.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var value = SP.Field.get_schemaXml ()
var value = SP.Field.set_schemaXml ()

Return value

Type: String

A Collaborative Application Markup Language (CAML) string that contains the schema.

Remarks

It must be null, empty, or an XML fragment that conforms to the FieldDefinition type. A field definition describes the structure and format of a field that is used within a list or content type.

REST resource endpoint

See Field resource for more information.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/lists(listid)/fields(fieldid)/schemaXml

HTTP requests

This resource supports the following HTTP commands:

  • POST

POST syntax

POST http://<sitecollection>/<site>/_api/web/lists(listid)/fields(fieldid)/schemaXml

GET syntax

GET http://<sitecollection>/<site>/_api/web/lists(listid)/fields(fieldid)/schemaXml