新規に使用する場合は、新しいデータ取得(Get Data)APIをお使い下さい。
データ取得(Get Data) API

Get Data

URL

  • POST
  http://{AppPot Server name}:{Port}/{Context root}/api/{companyId}/{appId}/{appVersion}/data/query

Authentication

ユーザー認証が完了している必要があります。

Content-Type: application/json
apppot-token: token

Name Data Format Description
apppot-token String (Required) Login APIの結果得られたユーザートークン

Request parameters

Name Data Format Description
objectNames List<String> (Required) tables name used for query
returnedObjectNames List<String> (Required) tables name will be returned
recordId String (Optional) value of record id. If not specific, get all data
maxRecord int (Optional) if recordId is not specified, return max record data
pageIndex int (Optional)
joinType int (Optional) This is type of join condition:
    1: Inner join
    2: Left outer join
joinObjectName String (Optional) Name of table want to join with
joinColumn String (Optional) Column name of table want to join with
baseObjectName String (Optional) Base table want to join with
baseColumn String (Optional) Column name of base table
tableName String (Required) Name of table in condition
columnName String (Required) Name of column in condition
conditionValue List<String> (Required) condition value
isIgnoreCase String (Optional) case sensitive / insensitive
type int (Required) This is type of search condition:
    1: equal
    2: not equal
    3: like
    4: greater than
    5: greater than or equal
    6: less than
    7: less than or equal
    8: in
    9: IS NULL
type String This is type of whereConditions:
    AND
    OR
    AND or OR condition value will be used for AND or OR with next “searchConditions”

Request example

  {
    "maxRecord": 1000,
    "pageIndex": 1,
    "objectNames": ["grandfather"], //if only have 1 object, you can use this format: "objectNames": "grandfather",
    "returnedObjectNames": ["grandfather", "father"],
   "condition":
    {
     "sortConditions": [
           {
           "conditionValue": 1, // 1: ASC, 2: DESC
           "tableName": "grandfather",
           "columnName": "UpdateTime"
         }
     ],
     "whereConditions": [
       {
         "searchConditions": [
             {
                 "type": 1, // 1: equal, 2: not equal, 3: like, 4: greater than, 5: greater than or equal, 6: less than, 7: less than or equal, 8: in, 9: IS NULL
                 "tableName": "grandfather",
                 "columnName": "name",
                 "conditionValue": ["Grand1"],
                 "isIgnoreCase": "true", //"true": case insensitive, "false": case sensitive
             }
          ],
          "type": "AND" //"AND": And query condition, "OR": Or query condition

        },
        {
         "searchConditions": [
             {
                 "type": 1,
                 "tableName": "grandfather",
                 "columnName": "scopeType",
                 "conditionValue": ["3"]
             }
          ],
          "type": "OR"
        }
      ],

      "joinConditions": [
          {
              "joinType": 1,
              "joinObjectName": "father",
              "joinColumn": "refGrand",
              "baseObjectName": "grandfather",
              "baseColumn": "objectId",
              "whereConditions": [
                {
                  "searchConditions": [
                    {
                       "type": 1,
                       "tableName": "grandfather",
                       "columnName": "scopeType",
                       "conditionValue": ["3"]
                    }
                  ],
                  "type":"AND"
                },
                {
                   "searchConditions": [
                     {
                         "type": 1,
                         "tableName": "grandfather",
                         "columnName": "name",
                         "conditionValue": ["cha1"]
                     }
                   ],
                   "type": "OR"
                  }
              ]
         },
         {
              "joinType": 1,
              "joinObjectName": "children",
              "joinColumn": "objectId",
              "baseObjectName": "father",
              "baseColumn": "refChild",
              "whereConditions": [
                {
                  "searchConditions": [
                    {
                       "type": 1,
                       "tableName": "grandfather",
                       "columnName": "scopeType",
                       "conditionValue": ["3"]
                    }
                  ],
                  "type":"AND"
                },
                {
                   "searchConditions": [
                     {
                         "type": 1,
                         "tableName": "grandfather",
                         "columnName": "objectId",
                         "conditionValue": ["children.objectId"]
                     }
                   ],
                   "type": "OR"
                  }
              ]
         }
    ],
     "scope":3 // 1: User, 2: Group, 3: All
     }
}

Response example

{
	    "results":[
	    {
	        "grandfather":[
	        {
	            "UpdateTime":"1.235465121245E8",
	            "CreateTime":"1.390085336544E12",
	            "name":"Grand1",
	            "objectId":"1",
	            "scopeType":"3.0",
	            "createUserId":"30147.0",
	            "groupIds":"1",
	            "serverCreateTime":"2014-09-10T14:44:10.939-07:00",
	            "serverUpdateTime":"2014-09-10T14:44:10.939-07:00",
	            "serverRecordStatus":"1"
            }
          ],
          "father":[
            {
	            "UpdateTime":"1.235465121245E8",
	            "CreateTime":"1.390085336544E12",
	            "age":"0.0",
	            "name":"Grand1",
	            "objectId":"1",
	            "scopeType":"3.0",
	            "refGrand":"1",
	            "refChild":"1",
	            "createUserId":"30147.0",
	            "groupIds":"1",
	            "serverCreateTime":"2014-09-10T14:44:10.939-07:00",
	            "serverUpdateTime":"2014-09-10T14:44:10.939-07:00",
	            "serverRecordStatus":"1"
            }
	      ]
	    }
	    ],
	    "counter":1,
	    "errCode":0,
	    "pageIndex":1,
	    "status":"OK",
	    "totalPage":1
}

Response properties

Name Data Format Description
errCode int Response error code: 0, 102, 110, 120, 121, 132, 198, 212
status String OK or error
description String Error’s description
results String Array records.