コンテンツグループ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を使用していません。
<b id="i2"><a id="x1" xid="i20.1.1">URL []に</a></b>投稿しました。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>