Skip to main content Skip to complementary content

API expressivity

Use the supported OData expressivity to refine your request and retrieve specific data from your dataset. For more information, see the OData documentation.

Supported OData expressivity

The following expressivity patterns can be used to craft specific requests.

Information noteNote: Using an unsupported option in an OData request will result in a 501 - Not Implemented error.
  • url/$metadata
  • url/entity_set_name
  • url/entity_set_name(primary_key_value)
  • url/entity_set_name(primary_key_value)/column_name
  • url/entity_set_name(primary_key_value)/column_name/$value
  • url/entity_set_name?$top=n
  • url/entity_set_name?$skip=n
  • url/entity_set_name?$skip=n&$top=n
  • url/entity_set_name?$select=column_name
  • url/entity_set_name?$orderby=column_name asc|desc
  • url/entity_set_name?$filter=column_name eq 'value'
  • url/entity_set_name?$filter=contains(column_name, 'value')

Examples of requests

The following table shows a few examples of requests that can be sent to your API. In this example, an API was created for the entity set named customers and the API path generated is customers-api-2PZPTB. The dataset contains columns named customer_age, id, customer_name, customer_city and customer_street, and the column id is used as the primary key.
Examples of patterns in requests and their responses
Pattern Description Example
url/entity_set_name Get all data in the entity set.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers

Response:

{
	"@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
	"value": [
		{
			"customer_age": "36",
			"id": "g9wjC",
			"customer_name": "Franklin Washington",
			"customer_city": "Olympia",
			"customer_street": "North Erringer Road"
		},
		{
			"customer_age": "31",
			"id": "DNOFp",
			"customer_name": "Theodore Ford",
			"customer_city": "Boise",
			"customer_street": "Lawrenceville Suwanee"
		},
		{
			"customer_age": "41",
			"id": "IRvgp",
			"customer_name": "Gerald Cleveland",
			"customer_city": "Atlanta",
			"customer_street": "Steele Lane"
		},
		{
			"customer_age": "19",
			"id": "V7o2h",
			"customer_name": "Benjamin Adams",
			"customer_city": "Little Rock",
			"customer_street": "Castillo Drive"
		},
		{
			"customer_age": "56",
			"id": "LwvLC",
			"customer_name": "Theodore Hayes",
			"customer_city": "Saint Paul",
			"customer_street": "Carpinteria South"
		},
		{
			"customer_age": "22",
			"id": "2oWSU",
			"customer_name": "Harry Roosevelt",
			"customer_city": "Bismarck",
			"customer_street": "East Calle Primera"
		},
		{
			"customer_age": "68",
			"id": "tnXgw",
			"customer_name": "Rutherford Fillmore",
			"customer_city": "Cheyenne",
			"customer_street": "Jean de la Fontaine"
		}
	]
}
url/$metadata Get the entity set's metadata.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata

Response:

<?xml version="1.0" encoding="UTF-8" ?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
    <edmx:DataServices>
        <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="customers-api-2PZPTB">
            <EntityType Name="customersItem">
                <Key>
                    <PropertyRef Name="id"/>
                </Key>
                <Property Name="customer_age" Type="Edm.String"/>
                <Property Name="id" Type="Edm.String"/>
                <Property Name="customer_name" Type="Edm.String"/>
                <Property Name="customer_city" Type="Edm.String"/>
                <Property Name="customer_street" Type="Edm.String"/>
            </EntityType>
            <EntityContainer Name="customers">
                <EntitySet Name="customers" EntityType="customers-api-2PZPTB.customersItem"/>
            </EntityContainer>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

url/entity_set_name(primary_key_value) Get a specific entity using its primary key value.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers('g9wjC')
Response:
{
    "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
    "customer_age": "36",
    "id": "g9wjC",
    "customer_name": "Franklin Washington",
    "customer_city": "Olympia",
    "customer_street": "North Erringer Road"
}
url/entity_set_name(primary_key_value)/column_name Get a single column for a specific entity.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers('g9wjC')/customer_name

Response:

{
    "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers/customer_name",
    "value": "Franklin Washington"
}
url/entity_set_name(primary_key_value)/column_name/$value Get a column's raw value for a specific entity.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers('g9wjC')/customer_city/$value

Response:

Olympia
url/entity_set_name?$top=n Get a limited number of entities.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$top=2

Response:

{
    "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
    "value": [
        {
            "customer_age": "36",
            "id": "g9wjC",
            "customer_name": "Franklin Washington",
            "customer_city": "Olympia",
            "customer_street": "North Erringer Road"
        },
        {
            "customer_age": "31",
            "id": "DNOFp",
            "customer_name": "Theodore Ford",
            "customer_city": "Boise",
            "customer_street": "Lawrenceville Suwanee"
        }
    ]
}
url/entity_set_name?$skip=n Get a collection of entities, skipping the first n entities.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$skip=5

Response:

{
  "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
  "value":[
    {
      "customer_age": "22",
      "id": "2oWSU",
      "customer_name": "Harry Roosevelt",
      "customer_city": "Bismarck",
      "customer_street": "East Calle Primera"
    },
    {
      "customer_age": "68",
      "id": "tnXgw",
      "customer_name": "Rutherford Fillmore",
      "customer_city": "Cheyenne",
      "customer_street": "Jean de la Fontaine"
    },
    {
      "customer_age": "40",
      "id": "QcX7L",
      "customer_name": "Warren Adams",
      "customer_city": "Columbus",
      "customer_street": "North Broadway Street"
    }
  ]
}
url/entity_set_name?$skip=n&$top=n Create a pagination and get a specific page of entities from a collection.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$skip=5&$top=2

Response:

{
    "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
    "value": [
        {
            "customer_age": "22",
            "id": "2oWSU",
            "customer_name": "Harry Roosevelt",
            "customer_city": "Bismarck",
            "customer_street": "East Calle Primera"
        },
        {
            "customer_age": "68",
            "id": "tnXgw",
            "customer_name": "Rutherford Fillmore",
            "customer_city": "Cheyenne",
            "customer_street": "Jean de la Fontaine"
        }
    ]
}
url/entity_set_name?$select=column_name Get only certain attributes of entities.
Information noteNote: The column used as primary key is always included.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$select=customer_city,customer_street

Response:

{
    "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
    "value": [
        {
            "@odata.id": "customers('g9wjC')",
            "id": "g9wjC",
            "customer_city": "Olympia",
            "customer_street": "North Erringer Road"
        },
        {
            "@odata.id": "customers('DNOFp')",
            "id": "DNOFp",
            "customer_city": "Boise",
            "customer_street": "Lawrenceville Suwanee"
        },
        {
            "@odata.id": "customers('IRvgp')",
            "id": "IRvgp",
            "customer_city": "Atlanta",
            "customer_street": "Steele Lane"
        }
    ]
}
url/entity_set_name?$orderby=column_name asc|desc Get a collection of entities in a specific order using one or multiple attributes. The two possible values for this option are asc and desc.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$orderby=customer_age desc

Response:

{
    "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
    "value": [
        {
            "customer_age": "78",
            "id": "2lxMe",
            "customer_name": "Thomas Johnson",
            "customer_city": "Charleston",
            "customer_street": "Redwood Highway"
        },
        {
            "customer_age": "75",
            "id": "EK0fU",
            "customer_name": "Benjamin Jefferson",
            "customer_city": "Austin",
            "customer_street": "Monroe Street"
        },
        {
            "customer_age": "70",
            "id": "3Wmih",
            "customer_name": "Grover Carter",
            "customer_city": "Dover",
            "customer_street": "Redwood Highway"
        }
    ]
}
url/entity_set_name?$filter=column_name eq 'value' Get a collection of entities corresponding to a filter.

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$filter=customer_city eq 'Olympia'

Response:

{
  "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
  "value":[
    {
      "customer_age": "36",
      "id": "g9wjC",
      "customer_name": "Franklin Washington",
      "customer_city": "Olympia",
      "customer_street": "North Erringer Road"
    },
    {
      "customer_age": "68",
      "id": "EVFMD",
      "customer_name": "Ronald Van Buren",
      "customer_city": "Olympia",
      "customer_street": "Bayshore Freeway"
    }
  ]
}
Information noteNote: Depending on the tool used to call the API, you may get an error if spaces are encoded with plus signs (+). To avoid this issue, make sure that spaces are encoded in Percent-encoding as %20.
url/entity_set_name?$filter=contains(column_name, 'value') Get a collection of entities corresponding to a filter where the column_name contains a certain 'value'

Request:

https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$filter=contains(customer_name, 'Van')

Response:

{
  "@odata.context": "http://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
  "value":[
    {
      "customer_age": "68",
      "id": "EVFMD",
      "customer_name": "Ronald Van Buren",
      "customer_city": "Olympia",
      "customer_street": "Bayshore Freeway"
    }
  ]
}

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!