Retrieve Record with Simple GET In Dataverse WebAPI

Table of contents

No heading

No headings in the article.

Below HTTP Request retrieves all the record's fullname field from contact entity, more comma separated fields can be added

GET [Organization URI]/api/data/v9.2/contacts?$select=fullname 
Accept: application/json  
OData-MaxVersion: 4.0  
OData-Version: 4.0
If-None-Match: null

Sample response of above query

{
    "@odata.context": "https://[Organization URI].crm8.dynamics.com/api/data/v9.2/$metadata#contacts(fullname)",
    "value": [
        {
            "@odata.etag": "W/\"867043\"",
            "fullname": "Yvonne McKay (sample)",
            "contactid": "fe2a6a27-89fd-e711-a836-000d3a33a7cb"
        },
        {
            "@odata.etag": "W/\"866666\"",
            "fullname": "अनामिका अग्रवाल (नमूना)",
            "contactid": "540b4637-a636-ec11-8c65-000d3af2b6a6"
        }
    ]
}

If all attributes need to be retrieved, remove $select clause like shown below.

GET [Organization URI]/api/data/v9.2/contacts
Accept: application/json  
OData-MaxVersion: 4.0  
OData-Version: 4.0
If-None-Match: null

Sample response of above query

{
    "@odata.context": "https://[Organization URI].crm8.dynamics.com/api/data/v9.2/$metadata#contacts",
    "value": [
        {
            "@odata.etag": "W/\"867043\"",
            "customertypecode": 1,
            "address2_addresstypecode": 1,
            "merged": false,
            "territorycode": 1
            ...
            ...
        }
    ]
}