MENU navbar-image

Introduction

Authenticating requests

This API is authenticated. You should use a token provided by the staff.

Analysis

Start

requires authentication

Example request:
curl --request POST \
    "https://youbble.xyz/api/public/v2/analysis" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request   

POST api/public/v2/analysis

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Start2

requires authentication

Example request:
curl --request POST \
    "https://youbble.xyz/api/public/v2/analysis/v2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Request   

POST api/public/v2/analysis/v2

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Status

requires authentication

Example request:
curl --request GET \
    --get "https://youbble.xyz/api/public/v2/analysis/architecto/status" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/public/v2/analysis/{job_id}/status

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

job_id   string   

The ID of the job. Example: architecto

TC sets

List sets

requires authentication

Example request:
curl --request GET \
    --get "https://youbble.xyz/api/public/v2/tc/tc-sets?per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "owner_id": 1,
            "external_id": null,
            "name": "TC set 1",
            "status": "draft",
            "context_type": "question_answer",
            "context": "What is the meaning of life?"
        },
        {
            "id": 2,
            "owner_id": 1,
            "external_id": null,
            "name": "TC set 2",
            "status": "processing",
            "context_type": "question_answer",
            "context": "Who framed Roger rabbit?"
        },
        {
            "id": 3,
            "owner_id": 1,
            "external_id": "external_id",
            "name": "TC set 3",
            "status": "completed",
            "context_type": "question_answer",
            "context": "Cats or dogs??"
        }
    ],
    "links": {
        "first": "https://our.domain/api/public/v2\\tc/tc-sets?page=1",
        "last": "https://our.domain/api/public/v2\\tc/tc-sets?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://our.domain/api/public/v2\\tc/tc-sets",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}
 

Request   

GET api/public/v2/tc/tc-sets

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

per_page   integer  optional  

Example: 15

Store a set

requires authentication

Example request:
curl --request POST \
    "https://youbble.xyz/api/public/v2/tc/tc-sets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My TC set\",
    \"external_id\": \"my_own_fancy_id\",
    \"callback_url\": \"https:\\/\\/callback.com\",
    \"context\": \"Which is the best watch?\",
    \"context_type\": \"question_answer\"
}"

Example response (201):


{
    "data": {
        "id": 1,
        "owner_id": 1,
        "external_id": null,
        "name": "New TC set",
        "status": "draft",
        "context_type": "question_answer",
        "context": "What is the meaning of life?"
    }
}
 

Request   

POST api/public/v2/tc/tc-sets

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: My TC set

external_id   string  optional  

Example: my_own_fancy_id

callback_url   string  optional  

Must be a valid URL. Example: https://callback.com

context   string   

Must not be greater than 65535 characters. Example: Which is the best watch?

context_type   string   

ENUM: Only 1 possible value for now. Example: question_answer

Must be one of:
  • question_answer

Show a set

requires authentication

Example request:
curl --request GET \
    --get "https://youbble.xyz/api/public/v2/tc/tc-sets/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "data": {
        "id": 1,
        "owner_id": 1,
        "external_id": null,
        "name": "New TC set",
        "status": "draft",
        "context_type": "question_answer",
        "context": "What is the meaning of life?"
    }
}
 

Request   

GET api/public/v2/tc/tc-sets/{set_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Show a set by external id

requires authentication

Example request:
curl --request GET \
    --get "https://youbble.xyz/api/public/v2/tc/tc-sets/external-id/my_own_fancy_id" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "data": {
        "id": 1,
        "owner_id": 1,
        "external_id": null,
        "name": "New TC set",
        "status": "draft",
        "context_type": "question_answer",
        "context": "What is the meaning of life?"
    }
}
 

Request   

GET api/public/v2/tc/tc-sets/external-id/{set_by_external_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_by_external_id   string   

ID in the client system. Example: my_own_fancy_id

Delete a set

requires authentication

Example request:
curl --request DELETE \
    "https://youbble.xyz/api/public/v2/tc/tc-sets/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (204):

Empty response
 

Request   

DELETE api/public/v2/tc/tc-sets/{set_id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Start TC process

requires authentication

Start set processing after texts and (optionally) themes have been uploaded.

Example request:
curl --request POST \
    "https://youbble.xyz/api/public/v2/tc/tc-sets/16/start" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"callback_url\": \"https:\\/\\/callback.com\"
}"

Example response (202):


Empty response
 

Request   

POST api/public/v2/tc/tc-sets/{set_id}/start

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Body Parameters

callback_url   string  optional  

Must be a valid URL. Example: https://callback.com

TC texts

List texts in a set

requires authentication

Example request:
curl --request GET \
    --get "https://youbble.xyz/api/public/v2/tc/tc-sets/16/tc-texts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "external_id": "text_external_id_1",
            "text": "Necessitatibus et sint possimus id.",
            "themes": [
                {
                    "id": 1,
                    "name": "Theme 1",
                    "pre_uploaded": false,
                    "sentiment": "negative",
                    "subthemes": [
                        {
                            "id": 1,
                            "name": "Subtheme 1.1",
                            "pre_uploaded": false,
                            "sentiment": "negative"
                        },
                        {
                            "id": 2,
                            "name": "Subtheme 1.2",
                            "pre_uploaded": false,
                            "sentiment": "negative"
                        }
                    ]
                },
                {
                    "id": 2,
                    "name": "Theme 2",
                    "pre_uploaded": false,
                    "sentiment": "neutral",
                    "subthemes": [
                        {
                            "id": 3,
                            "name": "Subtheme 2.1",
                            "pre_uploaded": false,
                            "sentiment": "neutral"
                        }
                    ]
                },
                {
                    "id": 3,
                    "name": "Theme 3",
                    "pre_uploaded": true,
                    "sentiment": "positive",
                    "subthemes": [
                        {
                            "id": 4,
                            "name": "Subtheme 3.1",
                            "pre_uploaded": true,
                            "sentiment": "positive"
                        },
                        {
                            "id": 5,
                            "name": "Subtheme 3.2",
                            "pre_uploaded": false,
                            "sentiment": "positive"
                        }
                    ]
                }
            ]
        },
        {
            "id": 2,
            "external_id": "text_external_id_2",
            "text": "Non facere unde eius in et ea.",
            "themes": []
        },
        {
            "id": 3,
            "external_id": null,
            "text": "Et doloribus ipsa sequi.",
            "themes": []
        }
    ],
    "links": {
        "first": "https://our.domain/api/public/v2\\tc/tc-sets/1/tc-texts?page=1",
        "last": "https://our.domain/api/public/v2\\tc/tc-sets/1/tc-texts?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://our.domain/api/public/v2\\tc/tc-sets/1/tc-texts",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}
 

Request   

GET api/public/v2/tc/tc-sets/{set_id}/tc-texts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Store texts (bulk)

requires authentication

Example request:
curl --request POST \
    "https://youbble.xyz/api/public/v2/tc/tc-sets/16/tc-texts/bulk" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"points\": [
        {
            \"text\": \"I was very happy to visit your shop today!\",
            \"external_id\": \"my_own_answer_id\"
        }
    ]
}"

Example response (204):

Empty response
 

Request   

POST api/public/v2/tc/tc-sets/{set_id}/tc-texts/bulk

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Body Parameters

points   object[]   
text   string   

Must not be greater than 1000 characters. Example: I was very happy to visit your shop today!

external_id   string  optional  

Must not be greater than 255 characters. Example: my_own_answer_id

TC themes

List themes in a set

requires authentication

Example request:
curl --request GET \
    --get "https://youbble.xyz/api/public/v2/tc/tc-sets/16/tc-themes?per_page=15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Theme 1",
            "pre_uploaded": false,
            "subthemes": [
                {
                    "id": 1,
                    "name": "Subtheme 1.1",
                    "pre_uploaded": false
                },
                {
                    "id": 2,
                    "name": "Subtheme 1.2",
                    "pre_uploaded": false
                }
            ]
        },
        {
            "id": 2,
            "name": "Theme 2",
            "pre_uploaded": false,
            "subthemes": [
                {
                    "id": 3,
                    "name": "Subtheme 2.1",
                    "pre_uploaded": false
                },
                {
                    "id": 4,
                    "name": "Subtheme 2.2",
                    "pre_uploaded": false
                }
            ]
        },
        {
            "id": 3,
            "name": "Theme 3",
            "pre_uploaded": true,
            "subthemes": [
                {
                    "id": 5,
                    "name": "Subtheme 3.1",
                    "pre_uploaded": true
                },
                {
                    "id": 6,
                    "name": "Subtheme 3.2",
                    "pre_uploaded": true
                },
                {
                    "id": 7,
                    "name": "Subtheme 3.3",
                    "pre_uploaded": false
                }
            ]
        }
    ],
    "links": {
        "first": "https://our.domain/api/public/v2\\tc/tc-sets/1/tc-themes?page=1",
        "last": "https://our.domain/api/public/v2\\tc/tc-sets/1/tc-themes?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://our.domain/api/public/v2\\tc/tc-sets/1/tc-themes",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}
 

Request   

GET api/public/v2/tc/tc-sets/{set_id}/tc-themes

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Query Parameters

per_page   integer  optional  

Example: 15

Store themes (bulk)

requires authentication

Example request:
curl --request POST \
    "https://youbble.xyz/api/public/v2/tc/tc-sets/16/tc-themes/bulk" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"themes\": [
        {
            \"name\": \"Customer opinion\",
            \"subthemes\": [
                {
                    \"name\": \"Opinion on quality\"
                }
            ]
        }
    ]
}"

Example response (204):

Empty response
 

Request   

POST api/public/v2/tc/tc-sets/{set_id}/tc-themes/bulk

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

set_id   integer   

The ID of the set. Example: 16

Body Parameters

themes   object[]   
name   string   

Must not be greater than 255 characters. Example: Customer opinion

subthemes   object[]  optional  

Must not have more than 10 items.

name   string   

Must not be greater than 255 characters. Example: Opinion on quality