<commit_before>FORMAT: 1A
HOST: http://iot-camera-object-recognizer.herokuapp.com/

# IOT Object Camera Recognizer.

IOT object camera recognizer.
Orginize camera objects list and check current state of stage.

# Manage Objects api [/webapi/houses/{houseid}/objects]

+ Parameters
    + houseid (required, string, `"76c6-456d-8971"`) ... Unique house identifier

## List All Objects [GET]
Returns code 200 and list of jsons if correct houseid, 404 otherwise.
+ Response 200 (application/json)

    + Body

            [
                {
                    "id": "randomid1",
                    "type": "chair"
                },
                {
                    "id": "kokanto",
                    "type": "toxic"
                },
                {
                    "id": "randomid3",
                    "type": "table"
                }
            ]

+ Response 404 (application/json)

## Add Object [POST]

You may put new object in camera known list(placed on the stage).
If houseid is incorrect 404 is returned.

+ type (string) - object type

+ Request (application/json)

        {
            "type": "alien"
        }

+ Response 200 (application/json)

    + Body

            {
                "id": "newObjectId",
                "type": "alien"
            }

+ Response 404 (application/json)

## Get Object by id [GET/{objectid}]
Get an object type by id, if houseid or objectid is not valid 404 is returned.
+ Parameters
    + objectid (required, string, `"76c6-456d-8971"`) ... ID of an object, returned by api when called put object

+ Response 200 (application/json)

    + Body

            {
                "id": "requestedid",
                "type": "objecttype"
            }

+ Response 404 (application/json)

## Put Object by id [PUT/{objectid}]

You may update object type by id. 404 if invalid ids

+ type (string): new object type

+ Parameters
    + objectid (required, string, `"76c6-456d-8971"`) ... ID of an object, returned by api when called put object

+ Request (application/json)

        {
            "type": "newType"
        }

+ Response 200 (application/json)

+ Response 404 (application/json)

## Delete Object by id [DELETE/{objectid}]

You may delete object type by id. 404 if invalid ids

+ type (string): new object type

+ Parameters
    + objectid (required, string, `"76c6-456d-8971"`) ... ID of an object, returned by api when called put object

+ Response 200 (application/json)

+ Response 404 (application/json)

# Check for unknown objects api [GET/houses/{houseid}/check]

You may ask recognizer for uknown objects on the stage.
if result is false then list of objects is returned as value of "objects"
key. If everything is Ok then only result true is returned.
404 is returned if houseid is invalid.<commit_msg>Transferring API Description file from Apiary.io<commit_after>FORMAT: 1A
HOST: http://iot-camera-object-recognizer.herokuapp.com/

# IOT Object Camera Recognizer.

IOT object camera recognizer.
Orginize camera objects list and check current state of stage.

# Get List or Add new Object api [/webapi/houses/{houseid}/objects]

+ Parameters
    + houseid (required, string, `"76c6-456d-8971"`) ... Unique house identifier

## List All Objects [GET]
Returns code 200 and list of jsons if correct houseid, 404 otherwise.
+ Response 200 (application/json)

    + Body

            [
                {
                    "id": "randomid1",
                    "type": "chair"
                },
                {
                    "id": "kokanto",
                    "type": "toxic"
                },
                {
                    "id": "randomid3",
                    "type": "table"
                }
            ]

+ Response 404 (application/json)

## Add Object [POST]

You may put new object in camera known list(placed on the stage).
If houseid is incorrect 404 is returned.

+ type (string) - object type

+ Request (application/json)

        {
            "type": "alien"
        }

+ Response 200 (application/json)

    + Body

            {
                "id": "newObjectId",
                "type": "alien"
            }

+ Response 404 (application/json)

# Manage Known objects api [/webapi/houses/{houseid}/objects/{objectid}]

+ Parameters
    + objectid (required, string, `"76c6-456d-8971"`) ... ID of an object, returned by api when called put object


### Get Object by id [GET]
Get an object type by id, if houseid or objectid is not valid 404 is returned.

+ Response 200 (application/json)

    + Body

            {
                "id": "requestedid",
                "type": "objecttype"
            }

+ Response 404 (application/json)

### Put Object by id [PUT]

You may update object type by id. 404 if invalid ids

+ type (string): new object type

+ Request (application/json)

        {
            "type": "newType"
        }

+ Response 200 (application/json)

+ Response 404 (application/json)

### Delete Object by id [DELETE]

You may delete object type by id. 404 if invalid ids

+ type (string): new object type

+ Response 200 (application/json)

+ Response 404 (application/json)

# Check for unknown objects api [GET/houses/{houseid}/check]

You may ask recognizer for uknown objects on the stage.
if result is false then list of objects is returned as value of "objects"
key. If everything is Ok then only result true is returned.
404 is returned if houseid is invalid.
{'fraction_non_alphanumeric': 0.10212373037857803, 'fraction_numerical': 0.03102493074792244, 'mean_word_length': 2.1126436781609197, 'pattern_counts': {'":': 24, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2296610', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1495, 'n_words': 573}