GET /{table}.do
JSONv2 getRecords
The legacy JSON Data Retrieval processor ({table}.do?JSONv2). It is not part of the REST API artifact the other profiles are derived from; this document is authored from the vendor's JSON Data Retrieval API pages, so it carries no artifact hash. Only sysparm_action=getRecords is served (matched in any letter case); every other action is 400. sysparm_query behaves as on the Table API. sysparm_record_count, the vendor's JSONv2 parameter, limits the number of records; sysparm_limit is accepted as on the Table API and applies when sysparm_record_count is absent. displayvalue=false (default) returns stored values, true returns display values, and all returns stored values plus dv_<field> display values; every column is a string. displayvariables=true adds each record's variables, for requested items (sc_req_item) only, ordered by order.
Authentication
[
{
"basicAuth": []
}
]
Request, responses and operation details
{
"operationId": "json_data_retrieval_get_records",
"summary": "JSONv2 getRecords",
"description": "The legacy JSON Data Retrieval processor ({table}.do?JSONv2). It is not part of the REST API artifact the other profiles are derived from; this document is authored from the vendor's JSON Data Retrieval API pages, so it carries no artifact hash. Only sysparm_action=getRecords is served (matched in any letter case); every other action is 400. sysparm_query behaves as on the Table API. sysparm_record_count, the vendor's JSONv2 parameter, limits the number of records; sysparm_limit is accepted as on the Table API and applies when sysparm_record_count is absent. displayvalue=false (default) returns stored values, true returns display values, and all returns stored values plus dv_<field> display values; every column is a string. displayvariables=true adds each record's variables, for requested items (sc_req_item) only, ordered by order.",
"x-purplesuite-classification": "modeled-core",
"x-docs-topic": "https://www.servicenow.com/docs/r/zZBaGIzc7EPkA0ySnMn5eg/Ts12CWmUsFYAc4F0dD7J7w",
"parameters": [
{
"name": "table",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "JSONv2",
"in": "query",
"required": true,
"allowEmptyValue": true,
"schema": {
"type": "string"
},
"description": "Selects the JSONv2 processor; its value is ignored."
},
{
"name": "sysparm_action",
"in": "query",
"required": true,
"schema": {
"type": "string",
"pattern": "^[Gg][Ee][Tt][Rr][Ee][Cc][Oo][Rr][Dd][Ss]$"
}
},
{
"name": "sysparm_query",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "sysparm_record_count",
"in": "query",
"schema": {
"type": "string",
"pattern": "^\\d+$"
},
"description": "An integer that limits the number of records retrieved."
},
{
"name": "sysparm_limit",
"in": "query",
"schema": {
"type": "string",
"pattern": "^\\d+$"
}
},
{
"name": "displayvalue",
"in": "query",
"schema": {
"type": "string",
"pattern": "^(?:[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee]|[Aa][Ll][Ll])$"
}
},
{
"name": "displayvariables",
"in": "query",
"schema": {
"type": "string",
"pattern": "^(?:[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])$"
}
}
],
"responses": {
"200": {
"description": "The matching records.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"records"
],
"properties": {
"records": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {
"variables": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"question_text",
"type",
"value",
"order",
"children"
],
"properties": {
"name": {
"type": "string"
},
"question_text": {
"type": "string"
},
"type": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"description": "The variable's numeric type code (6 = single line text)."
},
"value": {
"type": "string"
},
"order": {
"type": "integer"
},
"children": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
}
}
},
"x-purplesuite-response-source": "https://www.servicenow.com/docs/r/zZBaGIzc7EPkA0ySnMn5eg/Ts12CWmUsFYAc4F0dD7J7w"
}
}
}
},
"400": {
"description": "Unknown table or an action other than getRecords.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/purplesuite.PlatformError"
}
}
}
},
"401": {
"description": "Missing or wrong Basic credential.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/purplesuite.PlatformError"
}
}
}
},
"404": {
"description": "Unknown PurpleSuite instance.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/purplesuite.PlatformError"
}
}
}
}
}
}