Newer Version Available

This content describes an older version of this product. View Latest

Retrieve Metadata for an Object

Use the SObject Basic Information resource to retrieve metadata for an object.
Example for retrieving Account metadata
1curl https://yourInstance.salesforce.com/services/data/v20.0/sobjects/Account/ -H "Authorization: Bearer token"
Example request body for retrieving Account metadata
none required
Example response body for retrieving Account metadata
1{
2  "objectDescribe" :
3  {
4    "name" : "Account",
5    "updateable" : true,
6    "label" : "Account",
7    "keyPrefix" : "001",
8
9    ...
10
11    "replicateable" : true,
12    "retrieveable" : true,
13    "undeletable" : true,
14    "triggerable" : true
15  },
16  "recentItems" :
17  [
18    {
19      "attributes" :
20      {
21        "type" : "Account",
22        "url" : "/services/data/v20.0/sobjects/Account/001D000000INjVeIAL"
23      },
24      "Id" : "001D000000INjVeIAL",
25      "Name" : "asdasdasd"
26    },
27
28    ...
29
30  ]
31}

To get a complete description of an object, including field names and their metadata, see Get a List of Objects.