url/entity_set_name |
Obtenir toutes les données du jeu d'entités. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers
Réponse :
{
"@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 |
Obtenir les métadonnées du jeu d'entités. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata
Réponse :
<?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) |
Obtenir une entité spécifique via sa valeur de clé primaire. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers('g9wjC')
Réponse :{
"@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 |
Obtenir une colonne seule pour une entité spécifique. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers('g9wjC')/customer_name
Réponse :
{
"@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 |
Obtenir la valeur brute d'une colonne pour une entité spécifique. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers('g9wjC')/customer_city/$value
Réponse :
|
url/entity_set_name?$top=n |
Récupérer un nombre limité d'entités. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$top=2
Réponse :
{
"@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 |
Récupérer une collection d'entités, en ignorant les n premières entités. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$skip=5
Réponse :
{
"@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 |
Créer une pagination et obtenir une page spécifique d'entités à partir d'une collection. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$skip=5&$top=2
Réponse :
{
"@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 |
Récupérer seulement certains attributs d'entités. Note InformationsRemarque : La colonne utilisée comme clé primaire est toujours incluse.
|
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$select=customer_city,customer_street
Réponse :
{
"@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 |
Récupérer une collection d'entités dans un ordre spécifique, à l'aide d'un ou plusieurs attribut·s. Les deux valeurs possibles pour cette option sont asc et desc. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$orderby=customer_age desc
Réponse :
{
"@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' |
Récupérer une collection d'entités correspondant à un filtre. |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$filter=customer_city eq 'Olympia'
Réponse :
{
"@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"
}
]
}
Note InformationsRemarque : Selon l'outil utilisé pour appeler l'API, il est possible d'obtenir une erreur si les espaces sont encodés avec des signes plus (+). Pour éviter ce problème, assurez-vous que les espaces sont encodés en encodage-pourcent : %20.
|
url/entity_set_name?$filter=contains(column_name, 'value') |
Obtenez une collection d'entités correspondant à un filtre où column_name contient une certaine valeur ('value'). |
Requête :
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers?$filter=contains(customer_name, 'Van')
Réponse :
{
"@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"
}
]
}
|