Use the sObject Describe resource to retrieve all the metadata for an object, including information about each field, URLs, and child relationships.
Example
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/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://MyDomainName.my.salesforce.com/{ID}/e",
"sobject" : "/services/data/v68.0/sobjects/Account",
"uiDetailTemplate" : "https://MyDomainName.my.salesforce.com/{ID}",
...
},
"childRelationships" :
[
{
"field" : "ParentId",
"deprecatedAndHidden" : false,
...
},
....
],
"createable" : true,
"customSetting" : false,
...
}
For more information about the items in the request body, see DescribesObjectResult in the SOAP API Developers Guide.