Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Scenario

Response

POSITIVE/Good Request

Code Block
{
    "field-percent": "2",
    "field-required": "required",
    "field-currency": "200",
    "field-checkbox": "false",
    "name": "name3",
    "key": "name3",
    "field-number": "1",
    "field-ipaddress": "121212121",
    "id": 61,
    "field-type": {
        "id": 56,
        "name": "name3"
    },
    "field-hyperlink": "https://google.com.ph?q=yes"
}

$key is not specify

Code Block
{
	"spaceKey": "DEMO",
	"name": "name3",
    "field-type": {
        "id": 56,
        "name": "name3"
    },
    "field-hyperlink": "https://google.com.ph?q=yes"
}

HTTP STATUS: 400

Code Block
{
    "error": "REQUIRED",
    "message": "key is required"
}

$key is not unique within the table

Code Block
{
    "error": "VALUE_NOT_VALID",
    "message": "key[sixth-entity] on table[name-one] already exist - key should be unique within a table"
}

$name is not specify

Code Block
{
	"spaceKey": "DEMO",
    "field-type": {
        "id": 56,
        "name": "name3"
    },
    "field-hyperlink": "https://google.com.ph?q=yes"
}

HTTP STATUS: 400

Code Block
{
    "error": "REQUIRED",
    "message": "name is required"
}

$spaceKey is not specified

Code Block
{
	"name": "Row 1st",
    "field-type": {
        "id": 56,
        "name": "name3"
    },
    "field-hyperlink": "https://google.com.ph?q=yes"
}

HTTP STATUS: 400

Code Block
{
    "error": "REQUIRED",
    "message": "spaceKey is required"
}

$spaceKey is non-existing

HTTP STATUS: 400

Code Block
{
    "error": "NON_EXISTING",
    "message": "Space[DEM] does not exists"
}

$tableKey is non-existing

HTTP STATUS: 404

Code Block
{
    "error": "NOT FOUND",
    "message": "URL doesn't point to existing table"
}

$row[0].id is non-existing

Code Block
{
    "name": "second Entity",
    "key": "sixthz-entity",
    "field-fk": [{
    	"id": "14700"
    }],
    "spaceKey": "CIA2"
}

Code Block
{
    "error": "VALUE_NOT_VALID",
    "message": "value.id[14700] of field[field-fk] refer to non-existing Row"
}

$row[0].key is non-existing

Code Block
{
    "name": "second Entity",
    "key": "sixthz-entity",
    "field-fk": [{
    	"key": "keyvalue1"
    }],
    "spaceKey": "CIA2"
}

Code Block
{
    "error": "VALUE_NOT_VALID",
    "message": "value.id[keyvalue1] of field[field-fk] refer to non-existing Row"
}

$row identified by id or key existing but it’s Table is not the same as defined in the Column

Code Block
{
    "name": "second Entity",
    "key": "sixthz-entity",
    "field-fk": [{
    	"id": "19104",
    	"key": "open"
    }],
    "spaceKey": "CIA2"
}

Code Block
{
    "error": "VALUE_NOT_VALID",
    "message": "value.id[19104] entity type doesn't match with what is defined."
}

column is required

Code Block
{
    "name": "second Entity",
    "key": "sixthzz-entity",
    "spaceKey": "CIA2"
}
Code Block
{
    "error": "REQUIRED",
    "message": "field-required is required"
}
  • field-required is the column name mark as Required