コンテンツグループAPIの呼び出し例

コンテンツグループのさまざまな検索オプション

以下は、コンテンツグループAPIを使用して、希望する結果セットを取得するための使用例です。

この検索は、テストという名前を持つコンテンツグループを取得します

https ://<instance>[contains ]= test

この検索は、ログイン名が「testsupport」のユーザーによって更新されたコンテンツグループを取得します

https ://<instance>[login ]= testsupport

この検索は、2014年3月1日以降に作成されたすべてのビジネスグループを取得します

https ://<instance>.coupahost.com/api/business_groups?created-at [gt] = 2014 -03 -01 T 12: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 -04 T 14:04:20 - 07:00</created-at> <updated-at type="datetime">2014 -04 -04 T 14:04:20 - 07:00</updated-at> <name>Test 1</name> <description>test 1 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に対してPOSTリクエストを送信しました。
https ://<instance url>/api/business_groups /.
<?xml version="1.0" encoding="UTF-8"?> <business-group> <name>テストサンプルコンテンツグループ</name> <description>What Pattern Group</description> </business-group>