13.07.2015 Views

Database.com REST API Developer's Guide - Salesforce.com

Database.com REST API Developer's Guide - Salesforce.com

Database.com REST API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using <strong>REST</strong> <strong>API</strong> ResourcesGet Field and Other Metadata for an ObjectExample request body for retrieving Widget custom object metadatanone requiredExample response body for retrieving Widget custom object metadata{"objectDescribe" :{"name" : "Widget__c","updateable" : true,"label" : "Widget","keyPrefix" : "a01","custom" : true,...}"replicateable" : true,"retrieveable" : true,"undeletable" : true,"triggerable" : true},"recentItems" : [ ]To get a <strong>com</strong>plete description of an object, including field names and their metadata, see Get a List of Objects.Get Field and Other Metadata for an ObjectUse the SObject Describe resource to retrieve all the metadata for an object, including information about each field, URLs,and child relationships.Examplehttps://na1.salesforce.<strong>com</strong>/services/data/v20.0/Widget__c/describe/ -H "Authorization:Bearer token"Example request bodynone requiredExample response body{"name" : "Widget__c","fields" :[{"length" : 18,"name" : "Id","type" : "id","defaultValue" : { "value" : null },"updateable" : false,"label" : "Record ID",...},...],32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!