Difference between revisions of "REST API:field Resource"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 9: Line 9:
;Method:GET
;Method:GET
;URI:<tt>{{platformURL}}/rest/field/{objectName}/{fieldName}</tt>
;URI:<tt>{{platformURL}}/rest/field/{objectName}/{fieldName}</tt>
;Response:Metadata structure that defines the field
;Response:Metadata structure that defines the field


Line 16: Line 15:
;Method:GET
;Method:GET
;URI:<tt>{{platformURL}}/rest/field/{objectName}</tt>
;URI:<tt>{{platformURL}}/rest/field/{objectName}</tt>
;Response:An array of metadata structures containing definitions of all the fields in the object.
;Response:An array of metadata structures containing definitions of all the fields in the object.


Line 27: Line 25:


;Request:
;Request:
As described in the [[REST API/Payload Examples]]
:As described in the [[REST API/Payload Examples]]


;Response:
;Response:
Line 47: Line 45:


;Request:
;Request:
As described in the [[REST API/Payload Examples]]
:As described in the [[REST API/Payload Examples]]


;Response:
;Response:
Line 59: Line 57:
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>


===Payload Examples===
===Payload Examples===

Revision as of 21:10, 23 July 2015

Manage Field metadata using the REST API.

Access Permissions

Lock-tiny.gif

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 Metadata for All 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
        <id>34813dcd768740ad91dc4f168023a9cc</id>  -- field ID
    </message>
</platform>

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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>

Payload Examples