Get API Schema

Gets the API schema info of a Kintone API.

MethodGET
URLhttps://{subdomain}.kintone.com/k/v1/apis/*.json
AuthenticationNone
Content-Type

Contents

Permissions

None

Request Parameters

None, but replace the "*.json" in the request URL with the apis.{key}.link obtained with the Get API List API. The Get API List and Get Schema API cannot be used.

Sample Request

JavaScript (using Kintone REST API Request)

1
2
3
4
5
6
7
kintone.api(kintone.api.url('/k/v1/apis/record/get.json', true), 'GET', {}, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

XMLHttpRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
var url = 'https://{subdomain}.kintone.com/k/v1/apis/record/get.json';
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.onload = function() {
  if (xhr.status === 200) {
    // success
    console.log(JSON.parse(xhr.responseText));
  } else {
    // error
    console.log(JSON.parse(xhr.responseText));
  }
};
xhr.send();

Response Parameters

Parameter Type Description
id String The ID of the API.
This can be obtained from the apis.(key) responded from the Get API List API.
baseUrl String The base URL starting with "https://" that will be used with the API.
path String The API path, such as "records.json".
The baseURL + path will become the URL of the API.
httpMethod String The HTTP method for the API
request Object The schema information for the API request, in a JSON Schema format.
response Object The schema information for the API response, in a JSON Schema format.
schemas Object The schema information common within all APIs.
The key represents the string of the Schema information.

Sample Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  "id": "GetRecords",
  "baseUrl": "https://{subdomain}.kintone.com/k/v1/",
  "path": "records.json",
  "httpMethod": "GET",
  "request": {
    "type": "object",
    "required": ["app"],
    "properties": {
      "app": {
        "type": "string",
        "format": "long"
      },
      "fields": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "query": {
        "type": "string",
        "format": "query"
      }
    }
  },
  "response": {
    "type": "object",
    "properties": {
      "records": {
        "type": "array",
        "items": {
          "type": "object",
          "patternProperties": {
            "*": {
              "$ref": "Field"
            }
          }
        }
      }
    }
  },
  "schemas": {
    "Field": {
      "type": "object",
      "anyOf": [
        { "$ref": "SingleLineText" },
        { "$ref": "MultipleLineText" }
        // ...
      ]
    },
    "SingleLineText": {
      "type": "object",
      "properties": {
        "type": { "enum": ["SINGLE_LINE_TEXT"] },
        "value": { "type": "string" }
      }
    },
    "MultipleLineText": {
      "type": "object",
      "properties": {
        "type": { "enum": ["MULTIPLE_LINE_TEXT"] },
        "value": { "type": "string" }
      }
    }
    // ...
  }
}

About JSON Schemas

The above JSON Schema used for request, response and schemas follows draft v4. core and validation are used, but hyper schema is not used.

type and format

To represent the limits used for the parameters of Kintone, the below formats are used in addition to the formats in the JSON Schema.

type format Description
string long An integer within the range of -9223372036854775808 to 9223372036854775807.
string locale Strings of "", "en", "ja" or "zh".
string boolean Strings of "true" or "false".
string email Strings in an Email format.
string number Real data type
string query Kintone query format. Check here for more data on query formats.
string date-time Date and time string in ISO format.
string timezone String representing time-zone.

*More custom Kintone formats may be added in the future.

About File APIs

Upload File API (POST /k/v1/apis/json)

The request object in the JSON Schema contains custom Kintone formats, but the API request will need to be sent as a Multipart format.

Download File API (GET /k/v1/apis/json)

The response object in the JSON Schema is empty, but a file will be downloaded when the API is used.