Difference between revisions of "REST API:field Resource"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
Line 1: | Line 1: | ||
Manage [[Field]] metadata using the [[REST API]]. | |||
;Access Permissions: | ;Access Permissions: | ||
Line 20: | Line 20: | ||
See also: [http://lj.platformatyourservice.com/~platfor1/V7/javadocs/fields/ JavaDocs for fields ] | See also: [http://lj.platformatyourservice.com/~platfor1/V7/javadocs/fields/ JavaDocs for fields ] | ||
===Add a Field=== | |||
Add metadata for a new object field. | |||
;Method:POST | |||
;URI:<tt>{{platformURL}}/rest/field/{objectName}/{fieldName}</tt> | |||
;Request: | |||
As described in the [[REST API/Payload Examples]] | |||
;Response: | |||
:<syntaxhighlight lang="xml" enclose="div"> | |||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |||
<platform> | |||
<message> | |||
<code>0</code> | |||
<description>Success</description> | |||
<id>34813dcd768740ad91dc4f168023a9cc</id> -- field ID | |||
</message> | |||
</platform> | |||
</syntaxhighlight> | |||
===Update a Field Definition=== | |||
Update field metadata. | |||
;Method:PUT | |||
;URI:<tt>{{platformURL}}/rest/field/{objectName}/{fieldName}</tt> | |||
;Request: | |||
As described in the [[REST API/Payload Examples]] | |||
;Response: | |||
:<syntaxhighlight lang="xml" enclose="div"> | |||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |||
<platform> | |||
<message> | |||
<code>0</code> | |||
<description>Success</description> | |||
</message> | |||
</platform> | |||
</syntaxhighlight> | |||
===Payload Examples=== | ===Payload Examples=== | ||
:*[[REST_API/Payload_Examples#Auto Number Field|Auto Number Field]] | :*[[REST_API/Payload_Examples#Auto Number Field|Auto Number Field]] | ||
:*[[REST_API/Payload_Examples#CheckBox Field|CheckBox Field]] | :*[[REST_API/Payload_Examples#CheckBox Field|CheckBox Field]] |
Revision as of 21:08, 23 July 2015
Manage Field metadata using the REST API.
- Access Permissions
- Field-level access can vary, depending on Field Visibility
Retrieve Field Metadata
Retrieves metadata about a field in an object
- Method
- GET
- URI
- https://{yourDomain}/networking/rest/field/{objectName}/{fieldName}
- Response
- Metadata structure that defines the field
Retrieve an Array of Metadata for Fields in an Object
Retrieves an array of metadata for fields within an object
- Method
- GET
- URI
- https://{yourDomain}/networking/rest/field/{objectName}
- Response
- An array of metadata structures containing definitions of all the fields in the object.
See also: JavaDocs for fields
Add a Field
Add metadata for a new object field.
- Method
- POST
- URI
- https://{yourDomain}/networking/rest/field/{objectName}/{fieldName}
- Request
As described in the REST API/Payload Examples
- Response
- <syntaxhighlight lang="xml" enclose="div">
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <platform>
<message>
0
<description>Success</description>
<id>34813dcd768740ad91dc4f168023a9cc</id> -- field ID
</message>
</platform> </syntaxhighlight>
Update a Field Definition
Update field metadata.
- Method
- PUT
- URI
- https://{yourDomain}/networking/rest/field/{objectName}/{fieldName}
- Request
As described in the REST API/Payload Examples
- Response
- <syntaxhighlight lang="xml" enclose="div">
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <platform>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
Payload Examples
- Auto Number Field
- CheckBox Field
- Currency Field
- Date Field
- DateTime Field
- Dependent Picklist Field
- Email Address
- Email Field
- File Field
- Formula Field (number)
- Formula Field (date)
- Global Picklist Field
- Image File Field
- Lookup Field
- Multi Checkbox
- Multi Object Lookup
- Number
- Number with Decimals
- Picklist
- Radio Button
- Rich Text Area
- Text Area
- Text Field