Custom Statement Tags

Marsview offers intent recognition for text, speech in async and real-time.

Custom statement tag detection Learn more

Custom statement tag detection in real-time speech analytics Learn more

Custom statement tag detection in async speech analytics Learn more

Creation of Statement Tags

API Request

Creates a new statement tag and responds with the new statementTagId in the database

POST https://api.marsview.ai/cb/v1/profile/statement_tags/create_statement_tag

Creates

Query Parameters

Headers

Request Body

{
    "status": true,
    "data": {
        "statementTag": "statement-bxllq7f8vkxh7t78e-1640158143710"
    }
}

Example Curl Request

Shown below is a code snippet to create a new intent

curl --location --request POST 'https://api.marsview.ai/cb/v1/profile/statement_tags/create_statement_tag/<userId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT access token>' \
--data-raw '{
    "userId"                      : "demo@marsview.ai",
    "statementTagName"            : "Demo StatementTag", 
    "statementTagSamples"         : ["This is a statement tag sample", "These samples are used of statement tag detection"],
    "statementTagSamplePhrases"   : ["statement tag phrase", "phrase sample"],
    "priority"                    : 2,
    "threshold"                   : 0.8
}'

Example Response

The statement tag is created if the server responds with a 200 status code and the status is set to True in the JSON response

{
    "status": true,
    "data": {
        "statementTag": "statement-bxllq7f8vkxh7t78e-1640158143710"
    }
}

Get User Statement Tags

API Request

Responds with all the statement tag data and from the database

GET https://api.marsview.ai/cb/v1/profile/statement_tags/get_user_statement_tags

Creates

Query Parameters

Headers

{
    "status": true,
    "data": {
        [
            {
                "_id": "61c28121c3201048f422b612",
                "type": "custom",
                "user_id": "chandra.sekhar@marsview.ai",
                "statement_tag_id": "statement-bxllq7f8vkxgv7vmk-1640136993500",
                "statement_tag_name": "sample name",
                "implements": [],
                "statement_tag_samples": [
                    "This is a statement tag sample", 
                    "These samples are used of statement tag detection"
                    ],
                "statement_tag_sample_phrases": [
                    "statement tag phrase", 
                    "phrase sample"
                    ],
                "priority": 2,
                "threshold": 0.8,
                "deleted": false
            }
        ]
    }
}

Example Curl Request

Shown below is a code snippet to fetch all the intents of a user

curl --location --request GET 'https://api.marsview.ai/cb/v1/profile/statement_tags/get_user_statement_tags/<userId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT access token>' 

Example Response

The intents are fetched and returned if the server responds with a 200 status code and the status is set to True in the JSON response

{
    "status": true,
    "data": {
        [
            {
                "_id": "61c28121c3201048f422b612",
                "type": "custom",
                "user_id": "chandra.sekhar@marsview.ai",
                "statement_tag_id": "statement-bxllq7f8vkxgv7vmk-1640136993500",
                "statement_tag_name": "sample name",
                "implements": [],
                "statement_tag_samples": [
                    "This is a statement tag sample", 
                    "These samples are used of statement tag detection"
                    ],
                "statement_tag_sample_phrases": [
                    "statement tag phrase", 
                    "phrase sample"
                    ],
                "priority": 2,
                "threshold": 0.8,
                "deleted": false
            }
        ]
    }
}

Deletion of Statement Tags

API Request

Deletes an existing statement tag and responds with the deleted statementTagId from the database

DELETE https://api.marsview.ai/cb/v1/profile/statement_tags/delete_statement_tag

Creates

Query Parameters

Headers

{
    "status": true,
    "data": {
        "msg": "Statement Tag Deleted successfully",
        "statementTagId": "statement-bxllq7f8vkxgv8jhu-1640137024434"
    }
}

Example Curl Request

Shown below is a code snippet to delete an existing intent

curl --location --request DELETE 'https://api.marsview.ai/cb/v1/profile/statement_tags/delete_statement_tag/<userId>/<statementTagId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT access token>' 

Example Response

The intent is deleted if the server responds with a 200 status code and the status is set to True in the JSON response

{
    "status": true,
    "data": {
        "msg": "Statement Tag Deleted successfully",
        "statementTagId": "statement-bxllq7f8vkxgv8jhu-1640137024434"
    }
}

Last updated