Exemples d'appels API DataFileSources
Les DataFileSources OBTIENNENT
Options de requête
Le tableau ci-dessous montre les différentes options de requête et leurs paramètres
Filtrer le nom | Objectif |
created_at | Utilisez le paramètre created_at pour contrôler les horodatages from et to entre lesquels vous avez besoin de l'état détaillé des fichiers traités (état du fichier, erreurs au niveau du champ) |
source_pour | Utilisez le paramètre source pour filtrer les fichiers en fonction de l'objet d'intérêt |
type |
Utilisez le paramètre type pour déterminer si le type de fichier pour lequel vous avez besoin d'informations - fichier envoyé à Coupa ou fichier envoyé par Coupa |
statut | Utilisez le paramètre status pour filtrer les sources de données par statut de traitement en fonction de l'objectif de votre requête |
file_file_name | Utilisez le paramètre file_file_name pour rechercher des sources de fichiers de données pour un fichier spécifique |
Structure
des données
Vous trouverez ci-dessous un tableau décrivant les différentes valeurs renvoyées pour un appel GET donné. Les espaces avant un nom de champ signifient qu'il est imbriqué sous l'une des balises précédentes :
Argument | Type | Valeurs |
iD | nombre entier | |
created-at | datetime | AAAA-MM-JJTHH :MM :SS-HH :MM |
mis-à-jour à | datetime | AAAA-MM-JJTHH :MM :SS-HH :MM |
type | chaîne | BackgroundCsvFileLoad, DataFileSource, BackgroundImportCorporateCreditCard... |
source-for | chaîne | InvoiceHeader, Payment, Invoices, ExpenseReport, Supplier, User, Item, Commodity, Address, Contract, Account, Lookup Value... |
statut | chaîne | Terminé, Échec, Nouvelle tentative, Chargement, Soumis à la recherche, En attente, Téléchargement, Suspendu, Arrêté |
nom-fichier-fichier | chaîne | Invoices_20141209_234608Z.csv, etc. |
file-file-size | chaîne | 9822 |
result-text | chaîne | Le résultat du processus ex. 27 lignes traitées, création de 0 nouvelle ligne et mise à jour de 11 lignes. |
progression | nombre entier | 27 |
heure de début | datetime | AAAA-MM-JJTHH :MM :SS-HH :MM |
heure de fin | datetime | AAAA-MM-JJTHH :MM :SS-HH :MM |
upload-errors | tableau | |
upload-errors/upload-error | ||
upload-errors/upload-error/id | nombre entier | 123456 |
upload-errors/upload-error/created-at | datetime | AAAA-MM-JJTHH :MM :SS-HH :MM |
upload-errors/upload-error/updated-at | datetime | AAAA-MM-JJTHH :MM :SS-HH :MM |
upload-errors/upload-error/type | chaîne | Le type d'erreur, par ex. UploadRowError |
upload-errors/upload-error/ligne | nombre entier | 1 |
upload-errors/upload-error/firstc-column | ||
upload-errors/upload-error/field-with-error | chaîne | Nom de la colonne où l'erreur s'est produite |
upload-errors/upload-error/value | chaîne |
brouillon, action_acheteur_en attente, approbation_en attente, approuvé, reçu, commandé, partiellement reçu, rejeté, avec tirage au sort |
upload-errors/upload-error/erreurs de champ | tableau | |
upload-errors/upload=error/created-by | utilisateur |
Dossier d'utilisateur comprenant l'identifiant, la connexion, le prénom et le nom de famille, l'adresse électronique, etc. |
upload-errors/upload-error/mis à jour par | utilisateur | Dossier d'utilisateur comprenant l'identifiant, la connexion, le prénom et le nom de famille, l'adresse électronique, etc. |
créé par | utilisateur |
Dossier d'utilisateur comprenant l'identifiant, la connexion, le prénom et le nom de famille, l'adresse électronique, etc. |
mis à jour par | utilisateur | Dossier d'utilisateur comprenant l'identifiant, la connexion, le prénom et le nom de famille, l'adresse électronique, etc. |
Exemples d'appels API
- Exemple 1 : Query Specific DataFileSource
- Exemple 2 : Query DataFileSources pour un jour spécifique
- Exemple 3 : Query DataFileSources pour un objet spécifique
Exemple de requête DataFileSources - Requête pour une date donnée
Dans cet exemple, nous recherchons toutes les DataFileSources créées au cours des dernières 24 heures (l'heure actuelle étant 15 H PST le 17 avril 2015 ou « 2015-04-17 22:00:00 »). Bien que vous puissiez utiliser une date et une heure plus importantes, il est important de se rappeler que l'API DataFileSource contient un certain nombre d'objets et d'enregistrements connexes qui y font référence. Ainsi, l'interrogation de grands nombres ou d'enregistrements peut entraîner des performances négatives dans votre instance. De plus, comme pour tous les appels API à Coupa, il y a une limite de 50 enregistrements retournés par appel. Pour interroger l'ensemble suivant, ajoutez &offset=50 à la fin de votre appel
https ://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='<timestamp>'
https ://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='2015-04-16 22:00:00'
Exemple de sources de données quotidiennes
<?xml version="1.0" encoding="UTF-8"?>
<data-file-sources type="array">
<data-file-source>
<id type="integer">1117</id>
<created-at type="datetime">17/04/2015T08:34:17-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:34:25-07:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>échantillon</status>
<file-file-name>lookup_value_list_wbstype.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>300</file-file-size>
<result-text nil="true" />
<progress nil="true" />
<start-time nil="true" />
<end-time nil="true" />
<upload-errors type="array">
<upload-error>
<id type="integer">920</id>
<created-at type="datetime">17/04/2015T08:34:25-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:34:25-07:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>Mise à jour SAP</first-column>
<field-with-error>parent_id</field-with-error>
<value>1</value>
<field-errors type="array">
<field-error>Parent incapable de trouver le parent correspondant.</field-error>
</field-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</upload-error>
<upload-error>
<id type="integer">921</id>
<created-at type="datetime">17/04/2015T08:34:25-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:34:25-07:00</updated-at>
<type>UploadRowError</type>
<row type="integer">3</row>
<first-column>Mise en œuvre de Coupa</first-column>
<field-with-error>parent_id</field-with-error>
<value>1</value>
<field-errors type="array">
<field-error>Parent incapable de trouver le parent correspondant.</field-error>
</field-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1118</id>
<created-at type="datetime">17/04/2015T08:35:15-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:35:16-07:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>échantillon</status>
<file-file-name>lookup_value_list_wbstype.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>304</file-file-size>
<result-text nil="true" />
<progress nil="true" />
<start-time nil="true" />
<end-time nil="true" />
<upload-errors type="array">
<upload-error>
<id type="integer">922</id>
<created-at type="datetime">17/04/2015T08:35:16-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:35:16-07:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>Mise à jour SAP</first-column>
<field-with-error>parent_id</field-with-error>
<value>1</value>
<field-errors type="array">
<field-error>Parent incapable de trouver le parent correspondant.</field-error>
</field-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</upload-error>
<upload-error>
<id type="integer">923</id>
<created-at type="datetime">17/04/2015T08:35:16-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:35:16-07:00</updated-at>
<type>UploadRowError</type>
<row type="integer">3</row>
<first-column>Mise en œuvre de Coupa</first-column>
<field-with-error>parent_id</field-with-error>
<value>1</value>
<field-errors type="array">
<field-error>Parent incapable de trouver le parent correspondant.</field-error>
</field-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1119</id>
<created-at type="datetime">17/04/2015T08:36:07-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:36:07-07:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>échantillon</status>
<file-file-name>lookup_value_list_wbstype.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>344</file-file-size>
<result-text nil="true" />
<progress nil="true" />
<start-time nil="true" />
<end-time nil="true" />
<upload-errors type="array">
<upload-error>
<id type="integer">917</id>
<created-at type="datetime">17/04/2015T08:36:08-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:36:08-07:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>Mise à jour SAP</first-column>
<field-with-error>parent_id</field-with-error>
<value>1</value>
<field-errors type="array">
<field-error>Parent incapable de trouver le parent correspondant.</field-error>
</field-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</upload-error>
<upload-error>
<id type="integer">925</id>
<created-at type="datetime">17/04/2015T08:36:08-07:00</created-at>
<updated-at type="datetime">17/04/2015T08:36:08-07:00</updated-at>
<type>UploadRowError</type>
<row type="integer">3</row>
<first-column>Mise en œuvre de Coupa</first-column>
<field-with-error>parent_id</field-with-error>
<value>1</value>
<field-errors type="array">
<field-error>Parent incapable de trouver le parent correspondant.</field-error>
</field-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</created-by>
<updated-by>
<id type="integer">81</id>
<login>bknott</login>
<email>brent.knott+bknott@coupa.com</email>
<employee-number />
<firstname>Brent</firstname>
<lastname>Knott</lastname>
<salesforce-id nil="true" />
<company-code>100</company-code>
<cost-center>10000</cost-center>
<account-category>K</account-category>
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1125</id>
<created-at type="datetime">17/04/2015T12:59:44-07:00</created-at>
<updated-at type="datetime">17/04/2015T12:59:45-07:00</updated-at>
<type>DataFileSource</type>
<source-for>Fournisseur</source-for>
<status>échantillon</status>
<file-file-name>remit_to_address_list.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>221</file-file-size>
<result-text nil="true" />
<progress nil="true" />
<start-time nil="true" />
<end-time nil="true" />
<upload-errors type="array">
<upload-error>
<id type="integer">926</id>
<created-at type="datetime">17/04/2015T12:59:46-07:00</created-at>
<updated-at type="datetime">17/04/2015T12:59:46-07:00</updated-at>
<type>UploadHeaderError</type>
<row nil="true" />
<first-column nil="true" />
<field-with-error nil="true" />
<value nil="true" />
<field-errors>L'en-tête de colonne Actif n'est pas valide.</field-errors>
<created-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Assistance</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Assistance</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Assistance</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Assistance</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1126</id>
<created-at type="datetime">17/04/2015T13:00:05-07:00</created-at>
<updated-at type="datetime">17/04/2015T13:00:04-07:00</updated-at>
<type>DataFileSource</type>
<source-for>Fournisseur</source-for>
<status>échantillon</status>
<file-file-name>remit_to_address_list.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>210</file-file-size>
<result-text nil="true" />
<progress nil="true" />
<start-time nil="true" />
<end-time nil="true" />
<upload-errors type="array">
<upload-error>
<id type="integer">927</id>
<created-at type="datetime">17/04/2015T13:00:04-07:00</created-at>
<updated-at type="datetime">17/04/2015T13:00:04-07:00</updated-at>
<type>UploadHeaderError</type>
<row nil="true" />
<first-column nil="true" />
<field-with-error nil="true" />
<value nil="true" />
<field-errors>L'en-tête de colonne Ligne1* n'est pas valide.</field-errors>
<created-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Soutien</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Assistance</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Soutien</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">1</id>
<login>coupasupport</login>
<email>rakesh.tatineni+01@coupa.com</email>
<employee-number />
<firstname>Coupa</firstname>
<lastname>Assistance</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
</data-file-sources>
Exemple de requête DataFileSources - Requête pour un objet spécifique
Dans cet exemple, nous interrogeons toutes les valeurs de recherche entrantes pour le 15 décembre 2014 afin que nous puissions voir s'il y a eu des erreurs avec les fichiers en cours de traitement dans Coupa. Il s'agit d'une requête à plusieurs étapes comme on peut le voir ci-dessous :
https ://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='<day>00:00:00'&created_at[lt]='<day>23:59:59'&source_for=<object>
https ://<instance>.coupahost.com/api/data_file_sources?created_at[gt]='2014-12-15 00:00:00'&created_at[lt]='2014-12-15 23:59:59'&source_for=LookupValue
Cette requête comporte trois parties. La première limite aux seules sources de fichiers de données créées depuis minuit UTC le 15, et la seconde limite les sources de fichiers de données créées avant minuit le 16. La dernière section définit l'objet que nous recherchons, dans ce cas LookupValue.
Exemple de réponse pour LookupValues Inbound le 15/12/14
<?xml version="1.0" encoding="UTF-8"?>
<data-file-sources type="array">
<data-file-source>
<id type="integer">1332</id>
<created-at type="datetime">15/12/2014T08:47:54-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:48:53-08:00</updated-at>
<type>DataFileSource</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>282</file-file-size>
<result-text>0 lignes traitées, création de 0 nouvelles lignes et mise à jour de 0 lignes.</result-text>
<progress type="integer">0</progress>
<start-time type="datetime">15/12/2014T08:48:07-08:00</start-time>
<end-time type="datetime">15/12/2014T08:48:53-08:00</end-time>
<upload-errors type="array">
<upload-error>
<id type="integer">964</id>
<created-at type="datetime">15/12/2014T08:48:10-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:48:10-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">1</row>
<first-column>TESTUS1</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
<upload-error>
<id type="integer">965</id>
<created-at type="datetime">15/12/2014T08:48:13-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:48:13-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>TESTEMEA1</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
<upload-error>
<id type="integer">966</id>
<created-at type="datetime">15/12/2014T08:48:13-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:48:13-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">3</row>
<first-column>TESTSales1</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1333</id>
<created-at type="datetime">15/12/2014T08:55:19-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:55:53-08:00</updated-at>
<type>DataFileSource</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>279</file-file-size>
<result-text>0 lignes traitées, création de 0 nouvelles lignes et mise à jour de 0 lignes.</result-text>
<progress type="integer">0</progress>
<start-time type="datetime">15/12/2014T08:55:27-08:00</start-time>
<end-time type="datetime">15/12/2014T08:55:53-08:00</end-time>
<upload-errors type="array">
<upload-error>
<id type="integer">967</id>
<created-at type="datetime">15/12/2014T08:55:29-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:55:29-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">1</row>
<first-column>TESTUS</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
<upload-error>
<id type="integer">968</id>
<created-at type="datetime">15/12/2014T08:55:29-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:55:29-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>TESTEMEA</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
<upload-error>
<id type="integer">969</id>
<created-at type="datetime">15/12/2014T08:55:29-08:00</created-at>
<updated-at type="datetime">15/12/2014T08:55:29-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">3</row>
<first-column>TESTSales</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1334</id>
<created-at type="datetime">15/12/2014T09:13:17-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:13:55-08:00</updated-at>
<type>DataFileSource</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>258</file-file-size>
<result-text>0 lignes traitées, création de 0 nouvelles lignes et mise à jour de 0 lignes.</result-text>
<progress type="integer">0</progress>
<start-time type="datetime">15/12/2014T09:13:27-08:00</start-time>
<end-time type="datetime">15/12/2014T09:13:55-08:00</end-time>
<upload-errors type="array">
<upload-error>
<id type="integer">970</id>
<created-at type="datetime">15/12/2014T09:13:30-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:13:30-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">1</row>
<first-column>TESTUS</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
<upload-error>
<id type="integer">971</id>
<created-at type="datetime">15/12/2014T09:13:30-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:13:30-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>TESTEMEA</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
<upload-error>
<id type="integer">972</id>
<created-at type="datetime">15/12/2014T09:13:31-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:13:31-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">3</row>
<first-column>TESTSales</first-column>
<field-with-error nil="true" />
<value nil="true" />
<field-errors type="array">
<field-error>Ligne corrompue ou invalide.</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1335</id>
<created-at type="datetime">15/12/2014T09:22:15-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:22:32-08:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type />
<file-file-size>282</file-file-size>
<result-text>3 lignes traitées, création de 0 nouvelle ligne et mise à jour de 3 lignes.</result-text>
<progress type="integer">3</progress>
<start-time type="datetime">15/12/2014T09:22:24-08:00</start-time>
<end-time type="datetime">15/12/2014T09:22:32-08:00</end-time>
<upload-errors type="array" />
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1336</id>
<created-at type="datetime">15/12/2014T09:28:19-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:28:32-08:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type />
<file-file-size>282</file-file-size>
<result-text>3 lignes traitées, création de 0 nouvelle ligne et mise à jour de 3 lignes.</result-text>
<progress type="integer">3</progress>
<start-time type="datetime">15/12/2014T09:28:29-08:00</start-time>
<end-time type="datetime">15/12/2014T09:28:32-08:00</end-time>
<upload-errors type="array" />
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1337</id>
<created-at type="datetime">15/12/2014T09:34:24-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:35:00-08:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type />
<file-file-size>332</file-file-size>
<result-text>4 lignes traitées, création de 0 nouvelle ligne et mise à jour de 3 lignes.</result-text>
<progress type="integer">4</progress>
<start-time type="datetime">15/12/2014T09:34:32-08:00</start-time>
<end-time type="datetime">15/12/2014T09:35:00-08:00</end-time>
<upload-errors type="array">
<upload-error>
<id type="integer">973</id>
<created-at type="datetime">15/12/2014T09:34:35-08:00</created-at>
<updated-at type="datetime">15/12/2014T09:34:35-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>0200</first-column>
<field-with-error>nom</field-with-error>
<value>TESTUS1</value>
<field-errors type="array">
<field-error>Ce nom a déjà été pris</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
<data-file-source>
<id type="integer">1338</id>
<created-at type="datetime">15/12/2014T10:40:57-08:00</created-at>
<updated-at type="datetime">15/12/2014T10:41:33-08:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type />
<file-file-size>332</file-file-size>
<result-text>4 lignes traitées, création de 0 nouvelle ligne et mise à jour de 3 lignes.</result-text>
<progress type="integer">4</progress>
<start-time type="datetime">15/12/2014T10:41:06-08:00</start-time>
<end-time type="datetime">15/12/2014T10:41:33-08:00</end-time>
<upload-errors type="array">
<upload-error>
<id type="integer">974</id>
<created-at type="datetime">15/12/2014T10:41:11-08:00</created-at>
<updated-at type="datetime">15/12/2014T10:41:11-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>0200</first-column>
<field-with-error>nom</field-with-error>
<value>TESTUS1</value>
<field-errors type="array">
<field-error>Ce nom a déjà été pris</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
</data-file-sources>
Exemple de requête DataFileSources - Requête DataFileSource spécifique
Dans cet exemple, nous interrogeons la source de fichiers de données n °1338. Il s'agit de l'ID Coupa interne généré automatiquement pour cet objet et constitue la principale méthode d'identification pour cet enregistrement.
Nous avons deux méthodes pour interroger cet enregistrement :
- Format 1 :
https ://<instance>.coupahost.com/api/data_file_sources/<id>
https ://<instance>.coupahost.com/api/data_file_sources/1338
Le résultat de cette requête est affiché ci-dessous
- Format 2 :
https ://<instance>.coupahost.com/api/data_file_sources?id=<id>
https ://<instance>.coupahost.com/api/data_file_sources?id=1338
Pour ce format, la réponse sera légèrement différente. La totalité de la sortie ci-dessous (à l'exception des informations de version xml) sera enveloppée dans la <data-file-sources type="array"> </data-file-sources>
balise car le paramètre ? pourrait renvoyer plusieurs enregistrements, tout en spécifiant explicitement que l'identifiant ne peut renvoyer que celui
Exemple de réponse GET DATASOURCE
<?xml version="1.0" encoding="UTF-8"?>
<data-file-source>
<id type="integer">1338</id>
<created-at type="datetime">15/12/2014T10:40:57-08:00</created-at>
<updated-at type="datetime">15/12/2014T10:41:33-08:00</updated-at>
<type>BackgroundCsvFileLoad</type>
<source-for>LookupValue</source-for>
<status>terminé</status>
<file-file-name>_Incoming_LookupValues_Knott_LookupValues.csv</file-file-name>
<file-content-type />
<file-file-size>332</file-file-size>
<result-text>4 lignes traitées, création de 0 nouvelle ligne et mise à jour de 3 lignes.</result-text>
<progress type="integer">4</progress>
<start-time type="datetime">15/12/2014T10:41:06-08:00</start-time>
<end-time type="datetime">15/12/2014T10:41:33-08:00</end-time>
<upload-errors type="array">
<upload-error>
<id type="integer">974</id>
<created-at type="datetime">15/12/2014T10:41:11-08:00</created-at>
<updated-at type="datetime">15/12/2014T10:41:11-08:00</updated-at>
<type>UploadRowError</type>
<row type="integer">2</row>
<first-column>0200</first-column>
<field-with-error>nom</field-with-error>
<value>TESTUS1</value>
<field-errors type="array">
<field-error>Ce nom a déjà été pris</field-error>
</field-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</upload-error>
</upload-errors>
<created-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</created-by>
<updated-by>
<id type="integer">93</id>
<login>sftp_integration@coupa.com</login>
<email>sftp_integration@coupa.com</email>
<employee-number nil="true" />
<firstname>sFTP</firstname>
<lastname>Intégration</lastname>
<salesforce-id nil="true" />
<company-code />
<cost-center />
<account-category />
</updated-by>
</data-file-source>
Exemple de requête DataFileSources - Fichier spécifique à la requête
Dans cet exemple, nous recherchons une source de fichiers de données créée pour un fichier nommé lookup_list.csv.
Nous avons deux méthodes pour interroger cet enregistrement :
- Format 1 :
https ://<instance>.coupahost.com/api/data_file_sources?file_file_name=filename
https ://<instance>.coupahost.com/api/data_file_sources?file_file_name=lookup_list.csv
Le résultat de cette requête est affiché ci-dessous
Exemple de réponse GET DATASOURCE
<?xml version="1.0" encoding="UTF-8"?>
<data-file-sources type="array">
<data-file-source>
<id type="integer">990</id>
<created-at type="datetime">2015-07-09T16:32:42-07:00</created-at>
<updated-at type="datetime">2015-07-09T16:34:19-07:00</updated-at>
<type>DataFileSource</type>
<source-for>Recherche</source-for>
<status>terminé</status>
<file-file-name>lookup_list.csv</file-file-name>
<file-content-type>text/csv</file-content-type>
<file-file-size>170</file-file-size>
<result-text>0 lignes traitées, création de 0 nouvelles lignes et mise à jour de 0 lignes.</result-text>
<progress nil="true" />
<start-time type="datetime">2015-07-09T16:34:05-07:00</start-time>
<end-time type="datetime">2015-07-09T16:34:19-07:00</end-time>
<upload-errors type="array" />
<created-by>
<id type="integer">85</id>
<login>staging@coupa.com</login>
<email>staging@coupa.com</email>
<employee-number nil="true" />
<firstname>John</firstname>
<lastname>Doe</lastname>
</created-by>
<updated-by>
<id type="integer">85</id>
<login>staging@coupa.com</login>
<email>staging@coupa.com</email>
<employee-number nil="true" />
<firstname>John</firstname>
<lastname>Doe</lastname>
</updated-by>
</data-file-source>
</data-file-sources>