Oracle CRM On Demand REST API Developer's Guide > Using the Oracle CRM On Demand REST API > Retrieving Metadata about Oracle CRM On Demand Resources >

Describe Examples


This topic contains examples of using the describe request to return metadata information about supported Oracle CRM On Demand resources. For information about supported Oracle CRM On Demand resources, see Oracle CRM On Demand REST API Supported Resources.

This topic includes the following examples:

Retrieving Metadata for All Oracle CRM On Demand Resources

The following details are for a request to retrieve metadata information for all resources. The example shows accounts along with some of the child resources for accounts such as account addresses, account books, and vehicles. This example uses the fields URL parameter to retrieve links metadata:

  • URL: https://<host>/OnDemand/user/Rest/latest/describe?fields=collection.links,children.links,item.links,links&offset=0&limit=1

    NOTE:  The limit field specifies the maximum number of resource items that are returned. You can set the limit field to a maximum value of 100. The default value is 2.

  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

For more information about the fields URL parameter, see Describe Fields Parameters.

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{
     "Resources": {
        "Accounts": {
           "title": "Account",
           "titlePlural": "Accounts",
           "CustomObjectTagName": "Accounts",
            "collection": {
              "links": {
                 "self": {
                    "rel": "self",
                    "href": "/OnDemand/user/Rest/latest/Accounts/"
                    "kind": "collection"
                  },
                 "canonical": {
                    "rel": "canonical",
                    "href": "/OnDemand/user/Rest/latest/Accounts/"
                    "kind": "collection"
                  }
              }
            },
            "item": {
               "links": {
                  "self": {
                     "rel": "self",
                     "href": "/OnDemand/user/Rest/latest/Accounts/{id}"
                     "kind": "item"
                   },
                  "canonical": {
                      "rel": "canonical",
                      "href": "/OnDemand/user/Rest/latest/Accounts/{id}"
                      "kind": "item"
                   },
                  "AccountAddresses": {
                      "rel": "child",
                      "href": "/OnDemand/user/Rest/latest/Accounts/{id}/child/AccountAddresses",
                      "kind": "collection",
                      "cardinality": {
                          "value": "1 to *",
                          "sourceAttributes": "Id",
                          "destinationAttributes": "AccountId"
                      }
                  },
                  "AccountBooks": {
                      "rel": "child",
                      "href": "/OnDemand/user/Rest/latest/Accounts/{id}/child/AccountBooks",
                      "kind": "collection",
                      "cardinality": {
                          "value": "1 to *",
                          "sourceAttributes": "Id",
                          "destinationAttributes": "ObjectId"
                      }
                  }
                  .
                  .
                  .
                  "Vehicles": {
                     "rel": "child",
                     "href": "/OnDemand/user/Rest/latest/Accounts/{id}/child/Vehicles",
                     "kind": "collection",
                     "cardinality": {
                         "value": "1 to *",
                         "sourceAttributes": "Id",
                          "destinationAttributes": "AccountId"
                     }
                  }
               }
            },
            "children": {
               "AccountAddresses": {
                  "title": "Account Address",
                  "titlePlural": "Account Addresses",
                  "CustomObjectTagName": "AccountAddresses",
                  "links": {
                    "describe": {
                        "rel": "describe",
                        "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountAddresses/describe",
                        "kind": "describe"
                    },
                    "canonicalDescribe": {
                         "rel": "canonicalDescribe",
                         "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountAddresses/describe",
                          "kind": "describe"
                    }
                  }
               },
               "AccountBooks": {
                   "title": "Account Book",
                    "titlePlural": "Account Books",
                    "CustomObjectTagName": "AccountBooks",
                    "links": {
                       "describe": {
                           "rel": "describe",
                           "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountBooks/describe",
                           "kind": "describe"
                       },
                       "canonicalDescribe": {
                           "rel": "canonicalDescribe",
                           "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountBooks/describe",
                           "kind": "describe"
                       }
                    }
               },
               .
               .
               .
               "Vehicles": {
                 "title": "Vehicle",
                 "titlePlural": "Vehicles",
                 "CustomObjectTagName": "Vehicles",
                 "links": {
                    "describe": {
                        "rel": "describe",
                        "href": "/OnDemand/user/Rest/latest/Accounts/child/Vehicles/describe",
                        "kind": "describe"
                    },
                    "canonicalDescribe": {
                         "rel": "canonicalDescribe",
                         "href": "/OnDemand/user/Rest/latest/Vehicles/describe",
                         "kind": "describe"
                    }
                 }
               }
            },
            "links": {
               "describe": {
                  "rel": "describe",
                  "href": "/OnDemand/user/Rest/latest/Accounts/describe"
                  "kind": "describe"
               },
               "canonicalDescribe": {
                  "rel": "canonicalDescribe",
                  "href": "/OnDemand/user/Rest/latest/Accounts/describe"
                  "kind": "describe"
               }
            }
         }
    },
    "_contextInfo": {
       "limit": 1,
       "offset": 0,
       "lastpage": false
    }
}

Retrieving All Top-Level Resources

The following details are for a request to retrieve metadata information for all top-level resources for your company. The example uses the fields URL parameter to retrieve links metadata:

  • URL: https://<host>/OnDemand/user/Rest/latest/describe?fields=links&offset=0&limit=100

    NOTE:  The limit field specifies the maximum number of resource items that are returned. You can set the limit field to a maximum value of 100. The default value is 2.

  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

For more information about the fields URL parameter, see Describe Fields Parameters.

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{
  "Resources": {
    "Accounts": {
      "title": "Account",
      "titlePlural": "Accounts",
      "CustomObjectTagName": "Accounts",
      "links": {
        "describe": {
          "rel": "describe",
          "href": "/OnDemand/user/Rest/latest/Accounts/describe",
          "kind": "describe"
        },
        "canonicalDescribe": {
          "rel": "canonicalDescribe",
          "href": "/OnDemand/user/Rest/latest/Accounts/describe",
          "kind": "describe"
        }
      }
    },
    "AccreditationRequests": {
      "title": "Accreditation Request",
      "titlePlural": "Accreditation Requests",
      "CustomObjectTagName": "AccreditationRequests",
      "links": {
        "describe": {
          "rel": "describe",
          "href": "/OnDemand/user/Rest/latest/AccreditationRequests/describe",
          "kind": "describe"
        },
        "canonicalDescribe": {
          "rel": "canonicalDescribe",
          "href": "/OnDemand/user/Rest/latest/AccreditationRequests/describe",
          "kind": "describe"
        }
      }
    },
    .
    .
    .
    "Vehicles": {
      "title": "Vehicle",
      "titlePlural": "Vehicles",
      "CustomObjectTagName": "Vehicles",
      "links": {
        "describe": {
          "rel": "describe",
          "href": "/OnDemand/user/Rest/latest/Vehicles/describe",
          "kind": "describe"
        },
        "canonicalDescribe": {
          "rel": "canonicalDescribe",
          "href": "/OnDemand/user/Rest/latest/Vehicles/describe",
          "kind": "describe"
        }
      }
    }
  },
  "_contextInfo": {
    "limit": 100,
    "offset": 0,
    "lastpage": true
  }
}

Retrieving All Child Resources

The following details are for a request to retrieve metadata information all child resources for your company. The example shows some of the child resources for accounts such as account addresses, account books, and some of the child resources for vehicles, such as custom object 10, custom object 11, and vehicle books.The example uses the fields URL parameter to retrieve links metadata:

  • URL: https://<host>/OnDemand/user/Rest/latest/describe?fields=children.links&limit=100

    NOTE:  The limit field specifies the maximum number of resource items that are returned. You can set the limit field to a maximum value of 100. The default value is 2.

  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

For more information about the fields URL parameter, see Describe Fields Parameters.

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{
  "Resources": {
    "Accounts": {
    "title": "Account",
    "titlePlural": "Accounts",
    "CustomObjectTagName": "Accounts",
    "children": {
      "AccountAddresses": {
        "title": "Account Address",
        "titlePlural": "Account Addresses",
        "CustomObjectTagName": "AccountAddresses",
        "links": {
          "describe": {
            "rel": "describe",
              "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountAddresses/describe",
              "kind": "describe"
          },
          "canonicalDescribe": {
            "rel": "canonicalDescribe",
            "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountAddresses/describe",
            "kind": "describe"
          }
        }
      },
      "AccountBooks": {
        "title": "Account Book",
        "titlePlural": "Account Books",
        "CustomObjectTagName": "AccountBooks",
        "links": {
          "describe": {
            "rel": "describe",
            "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountBooks/describe",
            "kind": "describe"
          },
          "canonicalDescribe": {
            "rel": "canonicalDescribe",
            "href": "/OnDemand/user/Rest/latest/Accounts/child/AccountBooks/describe",
            "kind": "describe"
          }
        }
    },
    .
    .
    .
    "Vehicles": {
      "title": "Vehicle",
      "titlePlural": "Vehicles",
      "CustomObjectTagName": "Vehicles",
      "children": {
        "CustomObjects10": {
          "title": "Custom Object 10",
          "titlePlural": "Custom Objects 10",
          "CustomObjectTagName": "CustomObjects10",
          "links": {
            "describe": {
              "rel": "describe",
              "href": "/OnDemand/user/Rest/latest/Vehicles/child/CustomObjects10/describe",
              "kind": "describe"
            },
            "canonicalDescribe": {
              "rel": "canonicalDescribe",
              "href": "/OnDemand/user/Rest/latest/CustomObjects10/describe",
              "kind": "describe"
            }
          }
        },
        "CustomObjects11": {
          "title": "Custom Object 11",
          "titlePlural": "Custom Objects 11",
          "CustomObjectTagName": "CustomObjects11",
          "links": {
            "describe": {
              "rel": "describe",
              "href": "/OnDemand/user/Rest/latest/Vehicles/child/CustomObjects11/describe",
              "kind": "describe"
            },
            "canonicalDescribe": {
              "rel": "canonicalDescribe",
              "href": "/OnDemand/user/Rest/latest/CustomObjects11/describe",
              "kind": "describe"
            }
          }
        },
        .
        .
        .
        "VehicleBooks": {
          "title": "Vehicle Book",
          "titlePlural": "Vehicle Books",
          "CustomObjectTagName": "VehicleBooks",
          "links": {
            "describe": {
              "rel": "describe",
              "href": "/OnDemand/user/Rest/latest/Vehicles/child/VehicleBooks/describe",
              "kind": "describe"
            },
            "canonicalDescribe": {
              "rel": "canonicalDescribe",
              "href": "/OnDemand/user/Rest/latest/Vehicles/child/VehicleBooks/describe",
               "kind": "describe"
            }
          }
        }
      }
    }
  },
  "_contextInfo": {
    "limit": 100,
    "offset": 0,
    "lastpage": true
  }
}

Retrieving Child Resources for a Top-Level Resource

The following details are for a request to retrieve metadata information for a given top-level resource object, for example, Business Plan. The example shows some of the child resources for a business plan such as accreditation requests, activities, and plan opportunities. The example uses the fields URL parameter to retrieve links metadata:

  • URL: https://<host>/OnDemand/user/Rest/latest/BusinessPlans/describe?fields=children.links

    NOTE:  The limit field specifies the maximum number of resource items that are returned. You can set the limit field to a maximum value of 100. The default value is 2.

  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

For more information about the fields URL parameter, see Describe Fields Parameters.

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{
  "Resources": {
    "BusinessPlans": {
      "title": "Business Plan",
      "titlePlural": "Business Plans",
      "CustomObjectTagName": "BusinessPlans",
      "children": {
        "AccreditationRequests": {
          "title": "Accreditation Request",
          "titlePlural": "Accreditation Requests",
          "CustomObjectTagName": "AccreditationRequests",
            "links": {
              "describe": {
                "rel": "describe",
                "href": "/OnDemand/user/Rest/latest/BusinessPlans/child/AccreditationRequests/describe",
                "kind": "describe"
              },
              "canonicalDescribe": {
                "rel": "canonicalDescribe",
                "href": "/OnDemand/user/Rest/latest/AccreditationRequests/describe",
                "kind": "describe"
              }
            }
        },
        "Activities": {
          "title": "Activity",
          "titlePlural": "Activities",
          "CustomObjectTagName": "Activities",
          "links": {
            "describe": {
              "rel": "describe",
              "href": "/OnDemand/user/Rest/latest/BusinessPlans/child/Activities/describe",
              "kind": "describe"
            },
            "canonicalDescribe": {
              "rel": "canonicalDescribe",
              "href": "/OnDemand/user/Rest/latest/Activities/describe",
              "kind": "describe"
            }
          }
        },
        .
        .
        .
        "PlanOpportunities": {
          "title": "Plan Opportunity",
          "titlePlural": "Plan Opportunities",
          "CustomObjectTagName": "PlanOpportunities",
          "links": {
            "describe": {
              "rel": "describe",
              "href": "/OnDemand/user/Rest/latest/BusinessPlans/child/PlanOpportunities/describe",
              "kind": "describe"
            },
            "canonicalDescribe": {
              "rel": "canonicalDescribe",
              "href": "/OnDemand/user/Rest/latest/PlanOpportunities/describe",
              "kind": "describe"
            }
          }
        }
      }
    }
  },
  "_contextInfo": {
    "limit": 1,
    "offset": 0,
    "lastpage": true
  }
}

Retrieving Metadata for a Specific Oracle CRM On Demand Resource

The following details are for a request to retrieve metadata information for an accounts resource. This example uses the fields URL parameter to retrieve attribute values for the resource and shows metadata for only two of the many fields for account:

  • URL: https://<host>/OnDemand/user/Rest/latest/Accounts/describe?fields=attributes&offset=0&limit=1
  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

For more information about describe attributes, see Describe Field Attributes.

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{
   "Resources": {
        "Accounts": {
            "title": "Account",
            "titlePlural": "Accounts",
            "CustomObjectTagName": "Accounts",
                "attributes": [
                {
                   "name": "FuriganaName", // default tag name
                   "type": "string", // field type
                   "updatable": true, // readonly = false
                   "mandatory": false, // required = true
                   "queryable": true, // searchable
                   "title": "Furigana Name", // display name
                   "maxLength": 100,
                   "markfortranslation": false,
                   "copyenabled": true,
                   "optimized": false,
                   "postdefault": false,
                   "casesensitivity": false,
                   "htmlfieldtag": "Furigana Name",
                   "customwsintegrationtag": "FuriganaName"
                },
                {
                   "name": "PrimaryGroup",
                   "type": "string",
                   "updatable": false,
                   "mandatory": false,
                   "queryable": true,
                   "title": "Primary Group",
                   "maxLength": 50,
                   "markfortranslation": false,
                   "copyenabled": false,
                   "optimized": false,
                   "postdefault": false,
                   "casesensitivity": false,
                   "htmlfieldtag": "Owner Group Name",
                   "customwsintegrationtag": "PrimaryGroup"
                }
           ]
        }
     },
     "_contextInfo": {
         "limit": 1,
         "offset": 0,
         "lastpage": false
   }
}

Retrieving Metadata for an Oracle CRM On Demand Collection

The following details are for a request to retrieve metadata information about an accounts collection, including the account actions supported and links to parent and child resources:

  • URL: https://<host>/OnDemand/user/Rest/latest/Accounts/describe?fields=collection.actions,links
  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{"Resources":
   {"Accounts":
     {
      "title":"MyAccount",
      "titlePlural":"MyAccounts",
      "CustomObjectTagName":"Accounts","collection":
     {
      "actions":[
        {
          "name":"get",
          "method":"GET",
          "responseType":["application/vnd.oracle.adf.resource+json"]},
        {
           "name":"create",
            "method":"POST",
            "responseType":["application/vnd.oracle.adf.resource+json"],
            "requestType":["application/vnd.oracle.adf.resource+json"]
         }
        ]
     },
     "links":
        {
          "describe":
           {
            "rel":"describe",
            "href":"/OnDemand/user/Rest/latest/Accounts/describe"},
           "canonicalDescribe":
           {
             "rel":"canonicalDescribe",
             "href":"/OnDemand/user/Rest/latest/Accounts/describe"}
        }
     }
   },
   "_contextInfo":{
     "limit":1,
     "offset":0,
     "lastpage":true}
}

Retrieving Metadata for an Oracle CRM On Demand Child Resource

The following details are for a request to retrieve metadata information about an Account Notes child resource:

  • URL: https://<host>/OnDemand/user/Rest/latest/Accounts/1QA2-22789P/child/AccountNotes/describe
  • HTTP Method: GET
  • Content-Type: None
  • Request body: None

The following are the details for the response to a successful request:

  • HTTP Code: 200
  • Content-Type: application/vnd.oracle.adf.resource+json
  • Response body:

{"Resources":{"AccountNotes":
   {"title":"Account Note",
   "titlePlural":"Account Notes",
   "CustomObjectTagName":"AccountNotes",
   "attributes":[
     {
      "name":"AccountId",
      "type":"string",
      "updatable":true,
      "mandatory":true,
      "queryable":true,
      "title":"MyAccount Id",
      "maxLength":15,
      "markfortranslation":false,
      "copyenabled":false,
      "optimized":false,
      "postdefault":false,
      "casesensitivity":false,
      "htmlfieldtag":"Account Id",
      "wscustomintegrationtag":"AccountId"},
     {
      "name":"Description",
      "type":"string",
      "updatable":true,
      "mandatory":false,
      "queryable":true,
      "title":"Note",
      "maxLength":16350,
      "markfortranslation":false,
      "copyenabled":true,
      "optimized":false,
      "postdefault":false,
      "casesensitivity":false,
      "htmlfieldtag":"Note",
      "wscustomintegrationtag":"Description"},
     {
      "name":"ExternalSystemId",
      "type":"string",
      "updatable":true,
      "mandatory":false,
      "queryable":true,
      "title":"ExternalUniqueID",
      "maxLength":30,
      "markfortranslation":false,
      "copyenabled":true,
      "optimized":false,
      "postdefault":false,
      "casesensitivity":false,
      "htmlfieldtag":"External System Id",
      "wscustomintegrationtag":"ExternalSystemId"},
     {
      "name":"Id",
      "type":"string",
      "updatable":false,
      "mandatory":true,
      "queryable":true,
      "title":"RowId",
      "maxLength":15,
      "markfortranslation":false,
      "copyenabled":false,
      "optimized":false,
      "postdefault":false,
      "casesensitivity":false,
      "htmlfieldtag":"Id",
      "wscustomintegrationtag":"Id"},
     {
      "name":"Subject",
      "type":"string",
      "updatable":true,
      "mandatory":true,
      "queryable":true,
      "title":"Subject",
      "maxLength":150,
      "markfortranslation":false,
      "copyenabled":true,
      "optimized":false,
      "postdefault":false,
      "casesensitivity":false,
      "htmlfieldtag":"Note Type",
      "wscustomintegrationtag":"Subject"}],
      "item":
        {
        "links":{
           "self":{
              "rel":"self",
              "href":"/OnDemand/user/Rest/latest/Accounts/1QA2-22789P/child/AccountNotes/{id}"},
            "canonical":{
               "rel":"canonical",
               "href":"/OnDemand/user/Rest/latest/Accounts/1QA2-22789P/child/AccountNotes/{id}"}},
        "actions":[{
             "name":"get",
             "method":"GET",
             "responseType":["application/vnd.oracle.adf.resource+json"]},
            {
               "name":"update",
               "method":"PATCH",
               "responseType":["application/vnd.oracle.adf.resource+json"],
               "requestType":["application/vnd.oracle.adf.resource+json"]},
           {
              "name":"delete",
              "method":"DELETE"}]
        },
      "links":{
          "describe":{
             "rel":"describe",
             "href":"/OnDemand/user/Rest/latest/Accounts/1QA2-22789P/child/AccountNotes/describe"},
            "canonicalDescribe":{
              "rel":"canonicalDescribe",
              "href":"/OnDemand/user/Rest/latest/Accounts/1QA2-22789P/child/AccountNotes/describe"}
      }
    }
  },
  "_contextInfo":
  {
   "limit":1,
   "offset":0,
   "lastpage":true}
}

Oracle CRM On Demand REST API Developer's Guide, Release 33 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.