コンテンツグループAPIのコール例

コンテンツグループの異なるクエリオプション

コンテンツグループAPIを使用して、必要な結果セットをクエリして取得する方法の例を以下に示します。

このクエリは、名前がtestのコンテンツグループを返します

https://<instance>.coupahost.com/api/business_groups?name[contains]=test

このクエリは、ログイン= testsupportで特定のユーザーによって更新されたコンテンツグループを提供します

https://<instance>.coupahost.com/api/business_groups?created_by[login]=testsupport

このクエリは、2014年3月1日以降に作成されたすべてのビジネスグループを表示します

https://<instance>.coupahost.com/api/business_groups?created-at[gt]=2014-03-01T12:00:00

単一のコンテンツグループを取得

この例では、IDが9の単一の経費レポートをクエリしました。

URLにGETしました:

https://<instance>.coupahost.com/api/business_groups/9

または

https://<instance>.coupahost.com/api/business_groups?id=9

結果:

コンテンツグループのサンプル結果をクエリ

<?xml version="1.0" encoding="UTF-8"?>
<business-group>
	 <id type="integer">9</id>
	 <created-at type="datetime">2014-04-04T14:04:20-07:00</created-at>
	 <updated-at type="datetime">2014-04-04T14:04:20-07:00</updated-at>
	 <name>Test1</name>
	 <description>test1 group</description>
	 <created-by>
			<id type="integer">1</id>
			<login>coupasupport</login>
			<email>upgrade@coupa.com</email>
			<employee-number nil="true" />
			<firstname>Coupa</firstname>
			<lastname>Support</lastname>
			<salesforce-id nil="true" />
			<mycustom-userfield />
	 </created-by>
	 <updated-by>
			<id type="integer">1</id>
			<login>coupasupport</login>
			<email>upgrade@coupa.com</email>
			<employee-number nil="true" />
			<firstname>Coupa</firstname>
			<lastname>Support</lastname>
			<salesforce-id nil="true" />
			<mycustom-userfield />
	 </updated-by>
</business-group>

 コンテンツグループの作成

この例では、コンテンツグループを作成しています。参照オブジェクトにCoupaシステムIDは使用していません。

URLに投稿しました: https://<instance url>/api/business_groups/.

<?xml version="1.0" encoding="UTF-8"?>
<business-group>
	 <name>test sample content group</name>
	 <description>What Pattern Group</description>
</business-group>

 

このページに表示されている一部、または全ての内容は、機械翻訳によるものです。ご了承ください。

関連アイテム


Coupa Core API

CoupaのRESTful APIは、お客様のデータをCoupaプラットフォームで読み取り、編集し、統合するための堅牢なアクセスを提供します。

APIの開始

Coupa APIの使用に関する一般情報、およびCSVの使用を検討するタイミング。

OAuth 2.0およびOIDCへの移行

Coupaは従来のAPIキーを廃止し、OAuth 2.0 / OIDCの使用を必要としています。R34以降、新しいAPIキーは発行されず、R35ではAPIキーはサポートされなくなります。

リソース

参照データ、トランザクションデータ、共有リソースなど、オブジェクトのタイプ別にAPIエンドポイントを整理しました。