contents
Documentation Version
Spring '15 (API version 33.0)
Language
English
  • Preview Summer '15 (API version 34.0) 34.0
  • Spring '15 (API version 33.0) 33.0
  • Winter '15 (API version 32.0) 32.0
  • Summer '14 (API version 31.0) 31.0
  • Spring '14 (API version 30.0) 30.0
  • Winter '14 (API version 29.0) 29.0
  • English
  • Japanese

Get Field and Other Metadata for an Object

Use the SObject Describe resource to retrieve all the metadata for an object, including information about each field, URLs, and child relationships.

Example
https://na1.salesforce.com/services/data/v20.0/Account/describe/ -H "Authorization: Bearer token"
Example request body
none required
Example response body
{
    "name" : "Account",
    "fields" : 
    [ 
        {  
            "length" : 18,  
            "name" : "Id",  
            "type" : "id",  
            "defaultValue" : {    "value" : null  },  
            "updateable" : false,  
            "label" : "Account ID",  
            ...
        },

        ...

    ],


    "updateable" : true,
    "label" : "Account",
    "keyPrefix" : "001",
    "custom" : false,

    ...

    "urls" : 
    {  
        "uiEditTemplate" : "https://na1.salesforce.com/{ID}/e",  
        "sobject" : "/services/data/v20.0/sobjects/Account",  
        "uiDetailTemplate" : "https://na1.salesforce.com/{ID}",  
        ...
    },

    "childRelationships" : 
    [ 
        {  
            "field" : "ParentId",  
            "deprecatedAndHidden" : false,  
            ...
        }, 

        ....

    ],

    "createable" : true,
    "customSetting" : false,
    ...
}