コントラクトの取得

10.0.6 /api/sam/v2/contracts.json API を使用してコントラクトを取得します。

HTTP 会話の例

GET /api/sam/v2/contracts.json
{
                            "total":1,"rows":
                            [
                            {
                            "contract_id":"CO1","name":"Contract1","type":2,"threshold":100,"metric":{"id":9,"code_name":"INTERNAL_INSTALL"},
                            "computer_group":{"id":0,"name":"All Computers"},"purchase_orders":[{"purchase_number":"PO1","quantity":5000,"entitlement_start":
                            "2021-08-03","entitlement_end":"2030-06-21"},{"purchase_number":"PO2","quantity":2,"entitlement_start":"2030-05-21","entitlement_end":"2030-06-21"}]
                            "software_products":[{"name":"Notepad++","publisher_name":"don.h@free.fr"}]}
                            ]
                            }
GET /api/sam/v2/contracts.json?columns[]=name&columns[]=contract_custom_field_1
{ 
"total":1,"rows": 
 [ 
     {
        "name":"Contract1","contract_custom_field_1":"カスタム・フィールドの値"
     } 
 ] 
}
注: すべての列がデフォルトで表示されるわけではありません。使用可能な列のリストを表示するには、以下のトピックを確認してください。