ProjectsApi Resource

This section of the API encompasses functionality relating to Explorer projects. A working knowledge of the Gavagai Explorer GUI is needed to properly understand the functionality detailed here. For a general introduction to the Gavagai Explorer, refer to the general Explorer documentation.

GET /projects

For an authenticated user, this method returns all Projects accessible by that user.

 https://api.gavagai.se/explorer/v1/projects
 

Response Body
media type data type description
application/json array of ProjectInfo (JSON) A list of projects.

Example

Request
GET /projects
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "id" : 12345,
  "rows" : 12345,
  "created" : 12345,
  "encoding" : "...",
  "title" : "...",
  "status" : "ERROR",
  "statusMessage" : "...",
  "headers" : [ {
    "numberOfEmptyCells" : 12345,
    "NPSCandidate" : true,
    "filterable" : true,
    "id" : 12345,
    "header" : "...",
    "suggestedLanguage" : "KS",
    "columnDataSize" : 12345,
    "timeSeriesCandidate" : true
  }, {
    "numberOfEmptyCells" : 12345,
    "NPSCandidate" : true,
    "filterable" : true,
    "id" : 12345,
    "header" : "...",
    "suggestedLanguage" : "AZ",
    "columnDataSize" : 12345,
    "timeSeriesCandidate" : true
  } ],
  "model" : {
    "title" : "...",
    "created" : 12345,
    "id" : 12345,
    "createdBy" : {
      "userId" : "..."
    },
    "type" : "DYNAMIC",
    "outdated" : true,
    "language" : "..."
  },
  "createdBy" : {
    "userId" : "..."
  }
} ]
                
              

POST /projects

For an authenticated user, this method will upload a CSV file that will be used to create a project. This will send the data to the server and return a response (with the project id) when the data is sent. The new project will then enter the INITIALIZING status and you may query the project (send a GET to /projects/{id}) until it changes status to EXPLORABLE.

 https://api.gavagai.se/explorer/v1/projects
 

Request Parameters
name type description constraints
analyzingColumnIndex query The index of the column in the sheet containing the data to be analyzed. Indices are counted starting from 1. int
encoding query Use this parameter if you know exactly what the encoding of the file is. If nothing is provided a best guess is performed.  
title query Title of the project. In absence of this parameter, the project will be initialized with a null title.  
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json ProjectId (JSON) Numeric id of the project on the form {id: x}.

Example

Request
POST /projects?title={title}&analyzingColumnIndex={analyzingColumnIndex}
Content-Type: multipart/form-data
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345
}
                
              

POST /projects

For an authenticated user, this method will upload rows that will be used to create a project. This will send the data to the server and return as soon as the sending is done. The new project will then enter the INITIALIZING status and you may query the project (send a GET to /projects/{id}) until it changes status to EXPLORABLE.

 https://api.gavagai.se/explorer/v1/projects
 

Request Parameters
name type description constraints
analyzingColumnIndex query The index of the column to be analyzed starting with index 1. int
encoding query Use this parameter if you know exactly what the encoding of the file is. If nothing is provided a best guess is performed.  
title query Title of the project.  
Request Body
media type data type description
application/json RowsData (JSON) The data rows
Response Body
media type data type description
application/json ProjectId (JSON) Numeric id of the project on the form {id: x}.

Example

Request
POST /projects?title={title}&analyzingColumnIndex={analyzingColumnIndex}
Content-Type: application/json
Accept: application/json

                
{
  "rows" : [ {
    "columnValues" : [ "...", "..." ]
  }, {
    "columnValues" : [ "...", "..." ]
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345
}
                
              

GET /projects/folders

Get a user's folders and projects

 https://api.gavagai.se/explorer/v1/projects/folders
 

Response Body
media type data type description
application/json FolderStructure (JSON)

Example

Request
GET /projects/folders
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "folders" : { },
  "projects" : { }
}
                
              

POST /projects/folders

Creates a folder in user's account

 https://api.gavagai.se/explorer/v1/projects/folders
 

Request Body
media type data type
application/json FolderRequest (JSON)
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
POST /projects/folders
Content-Type: application/json
Accept: application/json

                
{
  "title" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

GET /projects/languages

This method returns all currently supported languages in the Explorer.

Response Body
media type data type description
application/json array of Language (JSON) A list containing the ISO language code of each language supported.

Example

Request
GET /projects/languages
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

DELETE /projects/{id}

Removes the project. This call will return at once and the project will enter the DELETING status. You could optionally repeatedly query the /projects endpoint to see when the project disappears.

 https://api.gavagai.se/explorer/v1/projects/{id}
 

Request Parameters
name type description constraints
id path The identifier for the project to remove. int

Example

Request
DELETE /projects/{id}

              
Response
HTTP/1.1 204 No Content

              

GET /projects/{id}

Return a Project for the given projectId. This includes information like project's status, settings, number of rows, time of creation, column headers, history of uploads, etc.

 https://api.gavagai.se/explorer/v1/projects/{id}
 

Request Parameters
name type description constraints
id path The id of the project to fetch. int
Response Body
media type data type description
application/json Project (JSON) A project.

Example

Request
GET /projects/{id}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "settings" : [ {
    "key" : "...",
    "value" : "...",
    "description" : "..."
  }, {
    "key" : "...",
    "value" : "...",
    "description" : "..."
  } ],
  "id" : 12345,
  "rows" : 12345,
  "created" : 12345,
  "encoding" : "...",
  "headers" : [ {
    "numberOfEmptyCells" : 12345,
    "NPSCandidate" : true,
    "filterable" : true,
    "id" : 12345,
    "header" : "...",
    "suggestedLanguage" : "SD",
    "columnDataSize" : 12345,
    "timeSeriesCandidate" : true
  }, {
    "numberOfEmptyCells" : 12345,
    "NPSCandidate" : true,
    "filterable" : true,
    "id" : 12345,
    "header" : "...",
    "suggestedLanguage" : "JA",
    "columnDataSize" : 12345,
    "timeSeriesCandidate" : true
  } ],
  "title" : "...",
  "status" : "ERROR",
  "statusMessage" : "...",
  "reports" : [ {
    "progressPercentage" : 12345,
    "id" : 12345,
    "type" : "PDF_TOPIC_DRIVERS",
    "created" : 12345,
    "status" : "ERROR"
  }, {
    "progressPercentage" : 12345,
    "id" : 12345,
    "type" : "EXCEL_FULL",
    "created" : 12345,
    "status" : "FINISHED"
  } ],
  "history" : [ {
    "created" : 12345,
    "id" : 12345,
    "message" : "...",
    "rows" : 12345,
    "fileName" : "..."
  }, {
    "created" : 12345,
    "id" : 12345,
    "message" : "...",
    "rows" : 12345,
    "fileName" : "..."
  } ],
  "model" : {
    "title" : "...",
    "created" : 12345,
    "id" : 12345,
    "createdBy" : {
      "userId" : "..."
    },
    "type" : "DYNAMIC",
    "outdated" : true,
    "language" : "..."
  },
  "createdBy" : {
    "userId" : "..."
  }
}
                
              

PUT /projects/{id}

Updates the project name, the project specific settings or connect the project to a model. To see the possible values for project settings, along with an explanation for each field, call a GET request on this same endpoint.

Note that the model identified by the modelId field must be a dynamic model, in which case the project will be dependent on the model.

 https://api.gavagai.se/explorer/v1/projects/{id}
 

Request Parameters
name type description constraints
id path The identifier of the project. int
Request Body
media type data type description
application/json ProjectRequest (JSON) The information with which to update the project.
Response Body
media type data type description
application/json Project (JSON) The project containing the updated information.

Example

Request
PUT /projects/{id}
Content-Type: application/json
Accept: application/json

                
{
  "title" : "...",
  "encoding" : "...",
  "settings" : [ {
    "key" : "...",
    "value" : "...",
    "description" : "..."
  }, {
    "key" : "...",
    "value" : "...",
    "description" : "..."
  } ],
  "modelId" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "settings" : [ {
    "key" : "...",
    "value" : "...",
    "description" : "..."
  }, {
    "key" : "...",
    "value" : "...",
    "description" : "..."
  } ],
  "id" : 12345,
  "rows" : 12345,
  "created" : 12345,
  "encoding" : "...",
  "headers" : [ {
    "numberOfEmptyCells" : 12345,
    "NPSCandidate" : true,
    "filterable" : true,
    "id" : 12345,
    "header" : "...",
    "suggestedLanguage" : "DA",
    "columnDataSize" : 12345,
    "timeSeriesCandidate" : true
  }, {
    "numberOfEmptyCells" : 12345,
    "NPSCandidate" : true,
    "filterable" : true,
    "id" : 12345,
    "header" : "...",
    "suggestedLanguage" : "OC",
    "columnDataSize" : 12345,
    "timeSeriesCandidate" : true
  } ],
  "title" : "...",
  "status" : "INITIALIZING",
  "statusMessage" : "...",
  "reports" : [ {
    "progressPercentage" : 12345,
    "id" : 12345,
    "type" : "EXCEL_FULL",
    "created" : 12345,
    "status" : "ERROR"
  }, {
    "progressPercentage" : 12345,
    "id" : 12345,
    "type" : "PDF_DRIVERS",
    "created" : 12345,
    "status" : "IN_PROGRESS"
  } ],
  "history" : [ {
    "created" : 12345,
    "id" : 12345,
    "message" : "...",
    "rows" : 12345,
    "fileName" : "..."
  }, {
    "created" : 12345,
    "id" : 12345,
    "message" : "...",
    "rows" : 12345,
    "fileName" : "..."
  } ],
  "model" : {
    "title" : "...",
    "created" : 12345,
    "id" : 12345,
    "createdBy" : {
      "userId" : "..."
    },
    "type" : "MANAGED",
    "outdated" : true,
    "language" : "..."
  },
  "createdBy" : {
    "userId" : "..."
  }
}
                
              

PUT /projects/folders/{folderId}

Updates the folder meta-information, such as the name.

Request Parameters
name type description constraints
folderId path The id of the folder int
Request Body
media type data type
application/json FolderRequest (JSON)
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
PUT /projects/folders/{folderId}
Content-Type: application/json
Accept: application/json

                
{
  "title" : "..."
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

DELETE /projects/folders/{id}

Removes the folder and the projects and sub folders that are in the folder.

Request Parameters
name type description constraints
id path The id of the folder. int

Example

Request
DELETE /projects/folders/{id}

              
Response
HTTP/1.1 204 No Content

              

GET /projects/folders/{id}

Gets the content of the given folder.

Request Parameters
name type description constraints
id path The id of the folder. int
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
GET /projects/folders/{id}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

POST /projects/{id}/append

For an authenticated user, this method will upload a CSV file and append it to an existing project. When the file has been uploaded the ProjectStatus changes to APPENDING. You may query the project until it changes state to EXPLORABLE. The file to append should contain the same number of columns as the previously uploaded files to the project, but (unlike initial files) no header row.

 https://api.gavagai.se/explorer/v1/projects/{id}/append
 

Request Parameters
name type description constraints
id path The numerical id of the project to append to. int
encoding query Use this parameter if you know exactly what the encoding of the file is. If nothing is provided a best guess is performed.  
message query The message that will be added to the log history.  
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json ProjectId (JSON) Numeric id of the project on the form {id: x}.

Example

Request
POST /projects/{id}/append
Content-Type: multipart/form-data
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345
}
                
              

POST /projects/{id}/append

For an authenticated user, this method will upload data and append it to an existing project. When the data has been uploaded the ProjectStatus changes to APPENDING. You may query the project until it changes state to EXPLORABLE. The file to append should contain the same number of columns as the previously uploaded files to the project, but (unlike initial files) no header row.

 https://api.gavagai.se/explorer/v1/projects/{id}/append
 

Request Parameters
name type description constraints
id path The numerical id of the project to append to. int
encoding query Use this parameter if you know exactly what the encoding of the file is. If nothing is provided a best guess is performed.  
message query The message that will be added to the log history  
Request Body
media type data type description
application/json RowsData (JSON) The data rows
Response Body
media type data type description
application/json ProjectId (JSON) Numeric id of the project on the form {id: x}.

Example

Request
POST /projects/{id}/append
Content-Type: application/json
Accept: application/json

                
{
  "rows" : [ {
    "columnValues" : [ "...", "..." ]
  }, {
    "columnValues" : [ "...", "..." ]
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345
}
                
              

GET /projects/{id}/details

Gets the details of topic terms and associations combinations; e.g.text examples and tonality scores.

 https://api.gavagai.se/explorer/v1/projects/{id}/details
 

Request Parameters
name type description default constraints multivalued
id path The integer identifier for the project.   int no
associations query Optionally specify the associations you are interested in as well. Same format as for the terms: ?associations=association1&associations=assoc2     yes
firstResult query An index into all available examples matching combination of terms and association. Defaults to 0, which means the first pageSize number of examples. 0 int no
pageSize query The number of examples to return. Defaults to 15. 15 int no
sortByTonality query The tonality to sort by. From highest value to lowest     no
terms query Specify the terms you are interested in getting details for. One query paramter per term like this: ?terms=a_term&terms=some_other_term&...     yes
Response Body
media type data type description
application/json TermDetails (JSON) The details of the topic.

Example

Request
GET /projects/{id}/details?terms={term_1}&terms={term_2}&sortByTonality=NEGATIVITY
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "documents" : [ {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  }, {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  } ],
  "tonalities" : [ {
    "tone" : "...",
    "normalizedScore" : 0.6,
    "score" : 3.6
  }, {
    "tone" : "...",
    "normalizedScore" : 0.4,
    "score" : 2.4
  } ],
  "terms" : [ "...", "..." ],
  "associations" : [ "...", "..." ],
  "tonalityDocumentCount" : 12345
}
                
              

GET /projects/{id}/explore

Retrieves the result of a project exploration if it is ready, and the status of the project exploration while it is ongoing.

Use this method for polling the status of a recently started exploration (see POST documentation for the same endpoint). When the status indicates that the exploration has been completed use the same method to retrieve the result. The possible states are in ExplorationState. The exploration starts in the ExplorationState#STARTED state and finishes in FINISHED. You may get the state TIMEOUT if the process did not finish within the permitted time range (because the project contains too much data). If there was a problem and the state is ERROR you can check the status message for the reason.
 https://api.gavagai.se/explorer/v1/projects/{id}/explore
 

Request Parameters
name type description default constraints
id path The identifier for the project to explore.   int
retry query If current status is TIMEOUT or ERROR, setting retry to true means that a new explore session is beeing started with the latest context false boolean
Response Body
media type data type description
application/json ProjectExplorationResponse (JSON) Information about the current status of an ongoing exploration, or the result of a completed exploration.

Example

Request
GET /projects/{id}/explore
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "status" : {
    "startTime" : 1546610555204,
    "message" : "...",
    "acceptOverageToken" : "...",
    "currency" : "...",
    "state" : "FINISHED",
    "overageAmount" : 12345,
    "explorationTimeMillis" : { },
    "productPriceInCents" : 12345,
    "progress" : 50
  },
  "ignoreTerms" : [ "...", "..." ],
  "groups" : [ {
    "title" : "...",
    "sentimentCalculated" : true,
    "id" : 12345,
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "pinned" : true,
    "documentCount" : 12345,
    "topics" : [ {
      "documentCount" : 12345,
      "associations" : [ { }, { } ],
      "detailedSuggestions" : [ { }, { } ],
      "title" : "...",
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      },
      "terms" : [ "...", "..." ],
      "tonalityContext" : { },
      "suggestions" : [ "...", "..." ],
      "tonalityDocumentCount" : 12345,
      "sentimentCalculated" : true,
      "tonalities" : [ { }, { } ],
      "id" : 12345
    }, {
      "documentCount" : 12345,
      "associations" : [ { }, { } ],
      "detailedSuggestions" : [ { }, { } ],
      "title" : "...",
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      },
      "terms" : [ "...", "..." ],
      "tonalityContext" : { },
      "suggestions" : [ "...", "..." ],
      "tonalityDocumentCount" : 12345,
      "sentimentCalculated" : true,
      "tonalities" : [ { }, { } ],
      "id" : 12345
    } ],
    "tonalityDocumentCount" : 12345
  }, {
    "title" : "...",
    "sentimentCalculated" : true,
    "id" : 12345,
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "pinned" : true,
    "documentCount" : 12345,
    "topics" : [ {
      "documentCount" : 12345,
      "associations" : [ { }, { } ],
      "detailedSuggestions" : [ { }, { } ],
      "title" : "...",
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      },
      "terms" : [ "...", "..." ],
      "tonalityContext" : { },
      "suggestions" : [ "...", "..." ],
      "tonalityDocumentCount" : 12345,
      "sentimentCalculated" : true,
      "tonalities" : [ { }, { } ],
      "id" : 12345
    }, {
      "documentCount" : 12345,
      "associations" : [ { }, { } ],
      "detailedSuggestions" : [ { }, { } ],
      "title" : "...",
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      },
      "terms" : [ "...", "..." ],
      "tonalityContext" : { },
      "suggestions" : [ "...", "..." ],
      "tonalityDocumentCount" : 12345,
      "sentimentCalculated" : true,
      "tonalities" : [ { }, { } ],
      "id" : 12345
    } ],
    "tonalityDocumentCount" : 12345
  } ],
  "language" : "...",
  "columnHeaderId" : 12345,
  "filters" : [ {
    "value" : "...",
    "operator" : "SMALLER_THAN",
    "columnHeaderId" : 12345,
    "valueFormat" : "..."
  }, {
    "value" : "...",
    "operator" : "BIGGER_THAN_EQUAL",
    "columnHeaderId" : 12345,
    "valueFormat" : "..."
  } ],
  "tones" : [ "...", "..." ],
  "totalDocumentCount" : 12345,
  "conceptFilter" : { },
  "coverageStatistics" : {
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalityDocumentCount" : 12345,
    "sentimentCalculated" : true,
    "documentCount" : 12345
  },
  "projectTonalities" : {
    "sortByTonality" : "...",
    "tonalityDocumentCount" : 12345,
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ]
  },
  "ignoreTermsDictionary" : {
    "property1" : "...",
    "property2" : "..."
  },
  "outdated" : true,
  "modelChangeSet" : {
    "topicChangeSets" : [ {
      "changeType" : "RENAMED",
      "renamedFrom" : "...",
      "title" : "...",
      "removedTerms" : [ { }, { } ],
      "addedTerms" : [ { }, { } ]
    }, {
      "changeType" : "REMOVED",
      "renamedFrom" : "...",
      "title" : "...",
      "removedTerms" : [ { }, { } ],
      "addedTerms" : [ { }, { } ]
    } ],
    "removedIgnoreTerms" : [ {
      "translations" : [ "...", "..." ],
      "term" : "..."
    }, {
      "translations" : [ "...", "..." ],
      "term" : "..."
    } ],
    "addedIgnoreTerms" : [ {
      "translations" : [ "...", "..." ],
      "term" : "..."
    }, {
      "translations" : [ "...", "..." ],
      "term" : "..."
    } ]
  }
}
                
              

POST /projects/{id}/explore

Starts an exploration of the project. This is only possible if the project has the EXPLORABLE status. This call will return instantly after starting the explore process (with HTTP status 204 since there will be no content). You should supply a ProjectExplorationContext giving the specifics of the exploration. Use the same call but with GET to get a status for the explore process.

 https://api.gavagai.se/explorer/v1/projects/{id}/explore
 

Request Parameters
name type description constraints
id path The id of the project to explore. int
Request Body
media type data type description
application/json ProjectExplorationContext (JSON) The exploration context to use.

Example

Request
POST /projects/{id}/explore
Content-Type: application/json

                
{
  "columnHeaderId" : 12345,
  "language" : "...",
  "topicsPageSize" : 12345,
  "associationsPageSize" : 12345,
  "ignoreTerms" : [ "...", "..." ],
  "filters" : [ {
    "value" : "...",
    "operator" : "SMALLER_THAN_EQUAL",
    "columnHeaderId" : 12345,
    "valueFormat" : "..."
  }, {
    "value" : "...",
    "operator" : "BIGGER_THAN_EQUAL",
    "columnHeaderId" : 12345,
    "valueFormat" : "..."
  } ],
  "groups" : [ {
    "title" : "...",
    "topics" : [ {
      "title" : "...",
      "sticky" : true,
      "terms" : [ "...", "..." ]
    }, {
      "title" : "...",
      "sticky" : true,
      "terms" : [ "...", "..." ]
    } ],
    "pinned" : true
  }, {
    "title" : "...",
    "topics" : [ {
      "title" : "...",
      "sticky" : true,
      "terms" : [ "...", "..." ]
    }, {
      "title" : "...",
      "sticky" : true,
      "terms" : [ "...", "..." ]
    } ],
    "pinned" : true
  } ],
  "acceptOverageToken" : "...",
  "conceptFilter" : {
    "filtered" : true,
    "conceptId" : 12345,
    "inclusive" : true
  },
  "calculateGraphData" : true
}
                
              
Response
HTTP/1.1 201 Created

              

PUT /projects/{id}/model

Updates the model to which a project is connected. If the dynamic model was created from the project, all dependent projects will receive the corresponding update. Alternatively, if the model was applied to the project, only that version of the model will be impacted. Note that the only possible update in this scenario is an update of translations.

 https://api.gavagai.se/explorer/v1/projects/{id}/model
 

Request Parameters
name type description constraints
id path The project identifier int
Request Body
media type data type description
application/json ModelInput (JSON) The information with which to update the project.
Response Body
media type data type description
application/json Model (JSON) The model containing the updated information.

Example

Request
PUT /projects/{id}/model
Content-Type: application/json
Accept: application/json

                
{
  "title" : "...",
  "groups" : [ {
    "title" : "...",
    "topics" : [ {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      }
    }, {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      }
    } ],
    "id" : 12345,
    "pinned" : true
  }, {
    "title" : "...",
    "topics" : [ {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      }
    }, {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : {
        "property1" : "...",
        "property2" : "..."
      }
    } ],
    "id" : 12345,
    "pinned" : true
  } ],
  "ignoreTerms" : [ "...", "..." ],
  "ignoreTermsDictionary" : {
    "property1" : "...",
    "property2" : "..."
  }
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "groups" : [ {
    "title" : "...",
    "topics" : [ {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : { }
    }, {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : { }
    } ],
    "id" : 12345,
    "pinned" : true
  }, {
    "title" : "...",
    "topics" : [ {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : { }
    }, {
      "title" : "...",
      "id" : 12345,
      "terms" : [ "...", "..." ],
      "dictionary" : { }
    } ],
    "id" : 12345,
    "pinned" : true
  } ],
  "id" : 12345,
  "usersAccess" : [ {
    "id" : 12345,
    "rights" : "READ_WRITE",
    "created" : 12345,
    "user" : {
      "userId" : "..."
    }
  }, {
    "id" : 12345,
    "rights" : "READ_WRITE",
    "created" : 12345,
    "user" : {
      "userId" : "..."
    }
  } ],
  "createdBy" : {
    "userId" : "..."
  },
  "invitations" : [ {
    "id" : 12345,
    "created" : 12345,
    "model" : {
      "title" : "...",
      "created" : 12345,
      "id" : 12345,
      "createdBy" : { },
      "type" : "MANAGED",
      "outdated" : true,
      "language" : "..."
    },
    "rights" : "READ",
    "recipient" : {
      "userId" : "..."
    }
  }, {
    "id" : 12345,
    "created" : 12345,
    "model" : {
      "title" : "...",
      "created" : 12345,
      "id" : 12345,
      "createdBy" : { },
      "type" : "STANDARD",
      "outdated" : true,
      "language" : "..."
    },
    "rights" : "READ_WRITE",
    "recipient" : {
      "userId" : "..."
    }
  } ],
  "ignoreTerms" : [ {
    "term" : "...",
    "id" : 12345,
    "source" : { }
  }, {
    "term" : "...",
    "id" : 12345,
    "source" : { }
  } ],
  "type" : "DYNAMIC",
  "ignoreTermsDictionary" : { },
  "outdated" : true,
  "language" : "..."
}
                
              

GET /projects/{id}/reports

Get a list of all reports of the given project.

 https://api.gavagai.se/explorer/v1/projects/{id}/reports
 

Request Parameters
name type description constraints
id path The identifier for the project for which to generate a report. int
Response Body
media type data type description
application/json array of ProjectReport (JSON) A list of all created reports for the project.

Example

Request
GET /projects/{id}/reports
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "progressPercentage" : 12345,
  "id" : 12345,
  "type" : "PDF_TOPIC_DRIVERS",
  "created" : 12345,
  "status" : "FINISHED"
} ]
                
              

POST /projects/{id}/reports

Begins to generates a report of the current contents in the project. Not that although this is a POST request, the parameters are passed through the URL. To check the progress of the requested report, call a GET request on /projects/{id}/reports and refer to the corresponding report id.

 https://api.gavagai.se/explorer/v1/projects/{id}/reports
 

Request Parameters
name type description default constraints multivalued
id path The identifier for the project for which to generate a report.   int no
keywords query Boolean to control if keywords columns will be created. true boolean no
poleId query The id of the pole or concept to filter texts by (if desired). Corresponds to target concept in the GUI. 0 long no
poleIds query The ids of the poles (soon concepts) to analyse for strength in the texts.   long yes
sortAlphabetically query Turn on alphabetically sorted topics. false boolean no
topicIds query ids of topics that you want to get the sentiment scores for them for each individual text. When you specify a topicId here, each text in your project will be analyzed with respect to the sentiments around that topic, and columns for the combination of the topic and each sentiment will be added to the resulting report. To find out the topic ids for the project, call GET on /projects/{id}/explore, to see the current ProjectExplorationResponse.   int yes
type query The type of report to generate, for example 'EXCEL' or 'PDF'. PDF "CSV_FULL" or "EXCEL" or "EXCEL_DRIVERS" or "EXCEL_FULL" or "PDF" or "PDF_DRIVERS" or "PDF_TOPIC_DRIVERS" no
Response Body
media type data type description
application/json ProjectReport (JSON) The created report.

Example

Request
POST /projects/{id}/reports?type=EXCEL_FULL&keywords=false
Accept: application/json

              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "progressPercentage" : 12345,
  "id" : 12345,
  "type" : "PDF_DRIVERS",
  "created" : 12345,
  "status" : "ERROR"
}
                
              

GET /projects/{id}/stories

For an authenticated user, this method returns all created stories for the specified project.

 https://api.gavagai.se/explorer/v1/projects/{projectId}/stories
 

Request Parameters
name type description constraints multivalued
id path The id of project. int no
headerIds query (Optional) The ids of the columns that you would like to receive as extra data with every document int yes
Response Body
media type data type description
application/json StoriesResponse (JSON) Json containing the available stories for the observer

Example

Request
GET /projects/{id}/stories
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "stories" : [ {
    "summary" : [ "...", "..." ],
    "headline" : "...",
    "documents" : [ {
      "uri" : "...",
      "title" : "...",
      "type" : "...",
      "metadata" : [ { }, { } ],
      "rowNumber" : 12345
    }, {
      "uri" : "...",
      "title" : "...",
      "type" : "...",
      "metadata" : [ { }, { } ],
      "rowNumber" : 12345
    } ]
  }, {
    "summary" : [ "...", "..." ],
    "headline" : "...",
    "documents" : [ {
      "uri" : "...",
      "title" : "...",
      "type" : "...",
      "metadata" : [ { }, { } ],
      "rowNumber" : 12345
    }, {
      "uri" : "...",
      "title" : "...",
      "type" : "...",
      "metadata" : [ { }, { } ],
      "rowNumber" : 12345
    } ]
  } ],
  "projectId" : 12345
}
                
              

POST /projects/{id}/stories

Creates stories for the given title and url column. The project needs to be explored before you can call this method. If you have created stories it will appear as a column in the report.

 https://api.gavagai.se/explorer/v1/projects/{id}/stories
 

Request Parameters
name type description constraints
id path The id of the project. int
Request Body
media type data type description
application/json StoriesRequest (JSON) The request containing the required data for the stories generation.

Example

Request
POST /projects/{id}/stories
Content-Type: application/json

                
{
  "terms" : [ "...", "..." ],
  "titleHeaderId" : 12345,
  "urlHeaderId" : 12345
}
                
              
Response
HTTP/1.1 201 Created

              

POST /projects/{id}/suggestions

Get suggestions for topics terms. This endpoint retrieves semantically similar words from the Gavagai Lexicon for each term in the request body. These words are filtered so that suggestions returned are only those that are present in the project text data. The response body contains much more detailed information than that which is presented in the GUI, such as a neighbourCounter (how many terms in the request a suggestion is relevant for) and whether the suggestion displays string similarity with any request term.

 https://api.gavagai.se/explorer/v1/projects/{id}/suggestions
 

Request Parameters
name type description constraints
id path The identifier of the project. int
Request Body
media type data type description
application/json SuggestionsRequest (JSON) The request containing relevant terms
Response Body
media type data type description
application/json SuggestionsResult (JSON)

Example

Request
POST /projects/{id}/suggestions
Content-Type: application/json
Accept: application/json

                
{
  "terms" : [ "...", "..." ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "suggestions" : [ {
    "sumCosine" : 12345.0,
    "reciprocal" : true,
    "term" : "...",
    "cosine" : 12345.0,
    "forWord" : "...",
    "frequency" : 12345,
    "neighbourCounter" : 12345,
    "stringSimilarity" : true
  }, {
    "sumCosine" : 12345.0,
    "reciprocal" : true,
    "term" : "...",
    "cosine" : 12345.0,
    "forWord" : "...",
    "frequency" : 12345,
    "neighbourCounter" : 12345,
    "stringSimilarity" : true
  } ],
  "terms" : [ "...", "..." ]
}
                
              

GET /projects/{id}/columns/{columnHeaderId}

When you want to create a filter you need to know the different existing values in the filter column. This method retrieves the distinct values of a given column in a given project. You may wish to check if the column is actually filterable by looking at the information given in the project. If you try this method on a non-filterable column you will get an error. Once you have at least two values you can create filters with one or more of them and other columns as well. Example: if the 'filterable' column contains many rows of 'male' or 'female' or 'unspecified', this call will return the set of three possible filter values 'male', 'female', and 'unspecified'.

 https://api.gavagai.se/explorer/v1/projects/{id}/columns/{columnHeaderId}
 

Request Parameters
name type description constraints
columnHeaderId path The header identifier for the column for which to retrieve the distinct values. int
id path The identifier for the project from which to retrieve the column values. int
Response Body
media type data type description
application/json array of string (JSON) A set containing all values available in the given column.

Example

Request
GET /projects/{id}/columns/{columnHeaderId}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

DELETE /projects/{id}/history/{historyId}

Asynchronously removes history data from the project (and the data). When the remove is in progress the project status changes state to DELETING. You may query the project to check when then history element is removed. It's not sufficient to only check the ProjectStatus, since it might have status EXPLORABLE if the remove operation fails.

Request Parameters
name type description constraints
historyId path The id of the history element int
id path The id of the project int

Example

Request
DELETE /projects/{id}/history/{historyId}

              
Response
HTTP/1.1 204 No Content

              

DELETE /projects/{id}/reports/{reportId}

Removes the project report.

 https://api.gavagai.se/explorer/v1/projects/{id}/reports/{reportId}
 

Request Parameters
name type description constraints
id path The identifier for the project. int
reportId path The identifier for the report to remove. int

Example

Request
DELETE /projects/{id}/reports/{reportId}

              
Response
HTTP/1.1 204 No Content

              

GET /projects/{id}/reports/{reportId}

Retrieve a completed report, according to the format specified when the report was requested (through a POST method to the /{id}/reports endpoint). Note that in the data tab which contains the original data, all cells will be formatted as text, even if they were of a different format originally.

 https://api.gavagai.se/explorer/v1/projects/{id}/reports/{reportId}
 

Request Parameters
name type description constraints
id path The identifier for the project. int
reportId path The identifier for the generated report. int
Response Body
media type data type description
application/pdf (custom)
application/vnd.ms-excel (custom)
text/csv (custom)

Example

Request
GET /projects/{id}/reports/{reportId}
Accept: application/pdf

              
Response
HTTP/1.1 200 OK
Content-Type: application/pdf

                
...
                
              

GET /projects/{id}/result/cells

Return a CellTopicInformation for the given range which includes the matching topics, sentiment scores and metadata information for the corresponding texts.

 https://api.gavagai.se/explorer/v1/projects/{id}/result/cells
 

Request Parameters
name type description default constraints multivalued
id path The id of the project   int no
calculateTonality query Boolean value indicating if tonality should be calculated false boolean no
firstResult query Where to start reading cells. Defaults to 0, which means the first pageSize number of cells. 0 int no
headerIds query (Optional) The ids of the columns that you would like to receive as extra data with every row   int yes
pageSize query The number of cells to return. Defaults to 100, max 1000 100 int no
Response Body
media type data type description
application/json CellTopicInformation (JSON) A project.

Example

Request
GET /projects/{id}/result/cells?calculateTonality=true&firstResult={firstResult}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "groups" : [ {
    "title" : "...",
    "pinned" : true,
    "id" : 12345,
    "topics" : [ {
      "title" : "...",
      "terms" : [ "...", "..." ],
      "id" : 12345
    }, {
      "title" : "...",
      "terms" : [ "...", "..." ],
      "id" : 12345
    } ]
  }, {
    "title" : "...",
    "pinned" : true,
    "id" : 12345,
    "topics" : [ {
      "title" : "...",
      "terms" : [ "...", "..." ],
      "id" : 12345
    }, {
      "title" : "...",
      "terms" : [ "...", "..." ],
      "id" : 12345
    } ]
  } ],
  "cells" : [ {
    "text" : "...",
    "matchingTopicIds" : [ 12345, 12345 ],
    "rowNumber" : 12345,
    "metadata" : [ {
      "headerId" : 12345,
      "value" : "..."
    }, {
      "headerId" : 12345,
      "value" : "..."
    } ],
    "tonalities" : [ {
      "score" : 12345.0,
      "tone" : "..."
    }, {
      "score" : 12345.0,
      "tone" : "..."
    } ]
  }, {
    "text" : "...",
    "matchingTopicIds" : [ 12345, 12345 ],
    "rowNumber" : 12345,
    "metadata" : [ {
      "headerId" : 12345,
      "value" : "..."
    }, {
      "headerId" : 12345,
      "value" : "..."
    } ],
    "tonalities" : [ {
      "score" : 12345.0,
      "tone" : "..."
    }, {
      "score" : 12345.0,
      "tone" : "..."
    } ]
  } ]
}
                
              

GET /projects/{id}/result/searchTerms

Get all the terms in the project that begin with the provided string (corpus search).

Request Parameters
name type description constraints
id path The id of the project. int
lookfor query String to search for. Needs to be 2 characters or more.  
Response Body
media type data type description
application/json array of string (JSON) A list of terms.

Example

Request
GET /projects/{id}/result/searchTerms?lookfor={string}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

DELETE /projects/folders/{id}/folders/{subFolderId}

Remove a sub folder from a folder.

Request Parameters
name type description constraints
id path The id of the folder. int
subFolderId path The id of the sub folder. int
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
DELETE /projects/folders/{id}/folders/{subFolderId}
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

PUT /projects/folders/{id}/folders/{subFolderId}

Adds a folder to a folder.

Request Parameters
name type description constraints
id path The id of the folder. int
subFolderId path The id of the sub folder which we will move. int
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
PUT /projects/folders/{id}/folders/{subFolderId}
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

DELETE /projects/folders/{id}/projects/{projectId}

Removes a project from a folder (the project itself is not removed).

Request Parameters
name type description constraints
id path The id of the folder. int
projectId path The id of the project. int
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
DELETE /projects/folders/{id}/projects/{projectId}
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

PUT /projects/folders/{id}/projects/{projectId}

Adds a project to a folder.

Request Parameters
name type description constraints
id path The id of the folder. int
projectId path The id of the project. int
Response Body
media type data type description
application/json FolderInformation (JSON)

Example

Request
PUT /projects/folders/{id}/projects/{projectId}
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "created" : 12345,
  "id" : 12345,
  "folders" : { },
  "projects" : { }
}
                
              

GET /projects/{id}/explore/coverageStatistics/tonalities

Get tonalities for documents not covered by existing topic structure. Includes tonality scores broken down for each unclassified document and an aggregated score for all such documents. This call is asynchronous: the information must first be requested through a POST call to the same endpoint (see below).

Request Parameters
name type description default constraints
id path The project identifier   int
firstResult query An index into all available examples matching combination of terms and association. Defaults to 0, which means the first pageSize number of examples. Note that this is a paginated API, controlled using the firstResult and pageSize parameters. 0 int
pageSize query The number of examples to return. Defaults to 15. 15 int
Response Body
media type data type description
application/json TonalitiesResponse (JSON)

Example

Request
GET /projects/{id}/explore/coverageStatistics/tonalities
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tonalityDocumentCount" : 12345,
  "sortByTonality" : "...",
  "terms" : [ "...", "..." ],
  "tonalities" : [ {
    "tone" : "...",
    "normalizedScore" : 0.6,
    "score" : 3.6
  }, {
    "tone" : "...",
    "normalizedScore" : 0.4,
    "score" : 2.4
  } ],
  "progress" : 12345,
  "associations" : [ "...", "..." ],
  "status" : "FINISHED",
  "documents" : [ {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  }, {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  } ],
  "orderBy" : "INSERTION_ORDER_ASC"
}
                
              

POST /projects/{id}/explore/coverageStatistics/tonalities

Starts an asynchronous coverage tonalities calculation. The information returned includes tonality scores broken down for each document not included in any topic and an aggregated score for all such documents. A GET request to the same url will fetch the progress of the calculations. To be able to use this function, coverage analysis must be enabled in either the account settings (see Accounts section of docs) or the project settings (through /explorer/projects/{id}).

 https://api.gavagai.se/explorer/v1/projects/{projectId}/explore/coverageStatistics/tonalities
 

Request Parameters
name type description default constraints
id path The project identifier.   int
excludeZeroValueScores query Set to true if the sorting should filter out texts with sentiment values scores of 0 for the provided sentiment sortByTonality. The order of the examples to return. Defaults to SENTIMENT_DESC. false boolean
orderBy query SENTIMENT_DESC "INSERTION_ORDER_ASC" or "INSERTION_ORDER_DESC" or "SENTIMENT_DESC"
sortByTonality query Which tonality you want to sort by. Name of tonality must be capitalized.    

Example

Request
POST /projects/{id}/explore/coverageStatistics/tonalities?sortByTonality=POSITIVITY

              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/graphs/associations_timeseries

Get the Associations Timeseries graph data for a specific topic

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/associations_timeseries
 

Request Parameters
name type description default constraints
id path The project identifier   int
npsColumnHeaderId query 0 int
topicId query 0 int
Response Body
media type data type description
application/json AssociationsTimeseriesGraphData (JSON)

Example

Request
GET /projects/{id}/explore/graphs/associations_timeseries
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "progress" : {
    "status" : "IN_PROGRESS",
    "progress" : 12345
  },
  "dataPoints" : [ {
    "totalDocumentCount" : 12345,
    "associations" : [ {
      "documentCount" : 12345,
      "association" : "...",
      "avgScore" : 12345.0
    }, {
      "documentCount" : 12345,
      "association" : "...",
      "avgScore" : 12345.0
    } ],
    "date" : 12345
  }, {
    "totalDocumentCount" : 12345,
    "associations" : [ {
      "documentCount" : 12345,
      "association" : "...",
      "avgScore" : 12345.0
    }, {
      "documentCount" : 12345,
      "association" : "...",
      "avgScore" : 12345.0
    } ],
    "date" : 12345
  } ],
  "title" : "...",
  "topicId" : 12345,
  "npsColumnHeaderId" : 12345,
  "dateColumnHeaderId" : 12345,
  "projectId" : 12345,
  "resolution" : "HOUR"
}
                
              

POST /projects/{id}/explore/graphs/associations_timeseries

Starts the process of generating Associations Timeseries graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/associations_timeseries
 

Request Parameters
name type description constraints
id path The project identifier int
Request Body
media type data type description
application/json AssociationsTimeseriesGraphDataRequest (JSON) The request body

Example

Request
POST /projects/{id}/explore/graphs/associations_timeseries
Content-Type: application/json

                
{
  "npsColumnHeaderId" : 12345,
  "projectId" : 12345,
  "resolution" : "YEAR",
  "topicId" : 12345,
  "dateColumnHeaderId" : 12345
}
                
              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/graphs/highimpact

Get the High Impact Topics graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/highimpact
 

Request Parameters
name type description default constraints
id path The project identifier   int
npsColumnHeaderId query 0 int
Response Body
media type data type description
application/json HighImpactGraphDataResponse (JSON)

Example

Request
GET /projects/{id}/explore/graphs/highimpact
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "npsColumnHeaderId" : 12345,
  "topics" : [ {
    "id" : 12345,
    "differenceFromProjectAverage" : 12345.0,
    "title" : "..."
  }, {
    "id" : 12345,
    "differenceFromProjectAverage" : 12345.0,
    "title" : "..."
  } ],
  "progress" : {
    "status" : "NOT_STARTED",
    "progress" : 12345
  },
  "projectId" : 12345
}
                
              

POST /projects/{id}/explore/graphs/highimpact

Starts the process of generating High Impact Topics graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/highimpact
 

Request Parameters
name type description constraints
id path The project identifier int
Request Body
media type data type description
application/json HighImpactGraphDataRequest (JSON) The request body

Example

Request
POST /projects/{id}/explore/graphs/highimpact
Content-Type: application/json

                
{
  "npsColumnHeaderId" : 12345,
  "projectId" : 12345
}
                
              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/graphs/highimpactassociation

Get the High Impact Topic Associations graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/highimpactassociation
 

Request Parameters
name type description default constraints
id path The project identifier   int
npsColumnHeaderId query 0 int
Response Body
media type data type description
application/json HighImpactAssociationGraphDataResponse (JSON)

Example

Request
GET /projects/{id}/explore/graphs/highimpactassociation
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "projectId" : 12345,
  "graphDatas" : [ {
    "associations" : [ {
      "score" : 12345.0,
      "association" : "..."
    }, {
      "score" : 12345.0,
      "association" : "..."
    } ],
    "topicId" : 12345,
    "graphHeaderString" : "...",
    "topicAvgScore" : 12345.0
  }, {
    "associations" : [ {
      "score" : 12345.0,
      "association" : "..."
    }, {
      "score" : 12345.0,
      "association" : "..."
    } ],
    "topicId" : 12345,
    "graphHeaderString" : "...",
    "topicAvgScore" : 12345.0
  } ],
  "progress" : {
    "status" : "IN_PROGRESS",
    "progress" : 12345
  },
  "npsColumnHeaderId" : 12345
}
                
              

POST /projects/{id}/explore/graphs/highimpactassociation

Starts the process of generating High Impact Topic Associations graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/highimpactassociation
 

Request Parameters
name type description constraints
id path The project identifier int
Request Body
media type data type description
application/json HighImpactAssociationGraphDataRequest (JSON) The request body

Example

Request
POST /projects/{id}/explore/graphs/highimpactassociation
Content-Type: application/json

                
{
  "npsColumnHeaderId" : 12345,
  "projectId" : 12345
}
                
              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/graphs/netsentiment

Get the Net Sentiment graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/netsentiment
 

Request Parameters
name type description default constraints
id path The project identifier   int
npsColumnHeaderId query 0 int
Response Body
media type data type description
application/json NetSentimentGraphDataResponse (JSON)

Example

Request
GET /projects/{id}/explore/graphs/netsentiment
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "progress" : {
    "status" : "IN_PROGRESS",
    "progress" : 12345
  },
  "topics" : [ {
    "id" : 12345,
    "netSentimentNormalized" : 12345.0,
    "associations" : [ {
      "association" : "...",
      "documentCount" : 12345
    }, {
      "association" : "...",
      "documentCount" : 12345
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentCount" : 12345,
    "title" : "...",
    "totalDocumentCount" : 12345,
    "netSentiment" : 12345.0
  }, {
    "id" : 12345,
    "netSentimentNormalized" : 12345.0,
    "associations" : [ {
      "association" : "...",
      "documentCount" : 12345
    }, {
      "association" : "...",
      "documentCount" : 12345
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentCount" : 12345,
    "title" : "...",
    "totalDocumentCount" : 12345,
    "netSentiment" : 12345.0
  } ]
}
                
              

POST /projects/{id}/explore/graphs/netsentiment

Starts the process of generating Net Sentiment graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/netsentiment
 

Request Parameters
name type description constraints
id path The project identifier int
Request Body
media type data type description
application/json NetSentimentGraphDataRequest (JSON) The request body

Example

Request
POST /projects/{id}/explore/graphs/netsentiment
Content-Type: application/json

                
{
  "npsColumnHeaderId" : 12345
}
                
              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/graphs/netsentiment_timeseries

Get the Net Sentiment Timeseries graph data for a specific topic

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/netsentiment_timeseries
 

Request Parameters
name type description default constraints
id path The project identifier   int
npsColumnHeaderId query 0 int
topicId query 0 int
Response Body
media type data type description
application/json NetSentimentTimeseriesGraphDataResponse (JSON)

Example

Request
GET /projects/{id}/explore/graphs/netsentiment_timeseries
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "dateColumnHeaderId" : 12345,
  "resolution" : "DAY",
  "title" : "...",
  "projectId" : 12345,
  "topicId" : 12345,
  "progress" : {
    "status" : "NOT_STARTED",
    "progress" : 12345
  },
  "dataPoints" : [ {
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "totalDocumentCount" : 12345,
    "documentCount" : 12345,
    "netSentiment" : 12345.0,
    "date" : 12345,
    "netSentimentNormalized" : 12345.0
  }, {
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "totalDocumentCount" : 12345,
    "documentCount" : 12345,
    "netSentiment" : 12345.0,
    "date" : 12345,
    "netSentimentNormalized" : 12345.0
  } ],
  "npsColumnHeaderId" : 12345
}
                
              

POST /projects/{id}/explore/graphs/netsentiment_timeseries

Starts the process of generating Net Sentiment Timeseries graph data

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/graphs/netsentiment_timeseries
 

Request Parameters
name type description constraints
id path The project identifier int
Request Body
media type data type description
application/json NetSentimentTimeseriesGraphDataRequest (JSON) The request body

Example

Request
POST /projects/{id}/explore/graphs/netsentiment_timeseries
Content-Type: application/json

                
{
  "npsColumnHeaderId" : 12345,
  "dateColumnHeaderId" : 12345,
  "projectId" : 12345,
  "resolution" : "MONTH",
  "topicId" : 12345
}
                
              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/projectTonalities/tonalities

Returns document tonalities information. The calculation works asynchronously and must first be set in motion by calling a POST method on this same endpoint (documented below). Meta-information about the status of the calculation and a percentage progress is also included. If the calculation has not been started, the status will be NOT_STARTED. Note that this is a paginated API, controlled using the firstResult and pageSize parameters.

 https://api.gavagai.se/explorer/v1/projects/explore/projectTonalities/tonalities
 

Request Parameters
name type description default constraints
id path The project identifier.   int
firstResult query An index into all available examples matching combination of terms and association. Defaults to 0, which means the first pageSize number of examples. 0 int
pageSize query The number of examples to return. Defaults to 15. 15 int
Response Body
media type data type description
application/json TonalitiesResponse (JSON) A breakdown of tonality scores per document, for active tonalities in the current project.

Example

Request
GET /projects/{id}/explore/projectTonalities/tonalities
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tonalityDocumentCount" : 12345,
  "sortByTonality" : "...",
  "terms" : [ "...", "..." ],
  "tonalities" : [ {
    "tone" : "...",
    "normalizedScore" : 0.6,
    "score" : 3.6
  }, {
    "tone" : "...",
    "normalizedScore" : 0.4,
    "score" : 2.4
  } ],
  "progress" : 12345,
  "associations" : [ "...", "..." ],
  "status" : "NOT_STARTED",
  "documents" : [ {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  }, {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  } ],
  "orderBy" : "INSERTION_ORDER_DESC"
}
                
              

POST /projects/{id}/explore/projectTonalities/tonalities

Starts an asynchronous document tonalities calculation. A GET request to the same url will fetch the progress of such a calculation. The result will be based on all documents in the project, unless the project has filters is applied (in which case the result be based documents that fulfil the filtering conditions).

 https://api.gavagai.se/explorer/v1/projects/explore/projectTonalities/tonalities
 

Request Parameters
name type description default constraints
id path The project identifier.   int
orderBy query The order of the examples to return. Defaults to SENTIMENT_DESC. SENTIMENT_DESC "INSERTION_ORDER_ASC" or "INSERTION_ORDER_DESC" or "SENTIMENT_DESC"
sortByTonality query Which tonality you want to sort by. Name of tonality must be capitalized.    

Example

Request
POST /projects/{id}/explore/projectTonalities/tonalities?sortByTonality=NEGATIVITY

              
Response
HTTP/1.1 201 Created

              

GET /projects/{projectId}/headers/{columnHeaderId}/samples

Returning a chosen number of rows from a given column in your upload file. In the Explorer GUI the returned samples are shown to the user to verify they are selecting the correct column of text data to analyse.

 https://api.gavagai.se/explorer/v1/projects/{projectId}/headers/{columnHeaderId}/samples?numberOfTextSamples={numberOfTextSamples}
 

Request Parameters
name type description default constraints
columnHeaderId path The id of column header to retrieve samples from.   int
projectId path The id of the project.   int
numberOfTextSamples query The number of sample texts to return from the corresponding column. 5 int
Response Body
media type data type description
application/json array of string (JSON)

Example

Request
GET /projects/{projectId}/headers/{columnHeaderId}/samples
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /projects/{projectId}/headers/{columnHeaderId}/validateFilterFormat

In there Explorer there is the possibility to filter your documents using meta-information. When filtering by date, it is important that the system correctly parses the date information column. This is done according to a provided value format for the input info. This API call can be used to validate the value format provided, to check the system will correctly interpret the date format in your file.

 https://api.gavagai.se/explorer/v1/projects/{projectId}/headers/{columnHeaderId}/validateFilterFormat?valueFormat={valueFormat}
 

Request Parameters
name type description constraints
columnHeaderId path The id of the column with date information to be validated. int
projectId path The id of the project. int
valueFormat query The valueFormat Example: To map column data in the format "2018-06-18 11:33:23" you need a valueFormat like "%Y-%m-%d %T" Reference: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_str -to-date  
Response Body
media type data type description
application/json FilterValidation (JSON) The filter and a selection of example dates parsed according to the valueFormat.

Example

Request
GET /projects/{projectId}/headers/{columnHeaderId}/validateFilterFormat?valueFormat={valueFormat}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "parsedDates" : [ 12345, 12345 ],
  "filter" : {
    "value" : "...",
    "operator" : "NOT_EQUAL",
    "columnHeaderId" : 12345,
    "valueFormat" : "..."
  }
}
                
              

GET /projects/{id}/explore/groups/{groupId}/tonalities

Get result of a group tonality calculation.

Request Parameters
name type description default constraints
groupId path The group identifier   int
id path The project identifier   int
firstResult query An index into all available examples matching combination of terms and association. Defaults to 0, which means the first pageSize number of examples. 0 int
metaDataColumns query Comma separated array of column header id:s which row data will be returned.    
pageSize query The number of examples to return. Defaults to 15. 15 int
Response Body
media type data type description
application/json TonalitiesResponse (JSON)

Example

Request
GET /projects/{id}/explore/groups/{groupId}/tonalities?pageSize={pageSize}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tonalityDocumentCount" : 12345,
  "sortByTonality" : "...",
  "terms" : [ "...", "..." ],
  "tonalities" : [ {
    "tone" : "...",
    "normalizedScore" : 0.6,
    "score" : 3.6
  }, {
    "tone" : "...",
    "normalizedScore" : 0.4,
    "score" : 2.4
  } ],
  "progress" : 12345,
  "associations" : [ "...", "..." ],
  "status" : "IN_PROGRESS",
  "documents" : [ {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  }, {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  } ],
  "orderBy" : "INSERTION_ORDER_DESC"
}
                
              

POST /projects/{id}/explore/groups/{groupId}/tonalities

Starts an asynchronous group tonalities calculation. A GET request to the same url will fetch the progress.

NOTE: The existing method of specifying terms and associations as query parameters has been deprecated. Please use the request body object TonalitiesRequestContext to specify these fields instead

 https://api.gavagai.se/explorer/v1/projects/{id}/explore/groups/{groupId}/tonalities
 

Request Parameters
name type description default constraints multivalued
groupId path The group identifier.   int no
id path The project identifier.   int no
associations query DEPRECATED - please use the request body object to specify associations instead. Optionally specify the associations you are interested in as well. Same format as for the terms: ?associations=association1&associations=assoc2     yes
excludeZeroValueScores query Set to true if the sorting should filter out texts with sentiment values scores of 0 for the provided sentiment sortByTonality. false boolean no
orderBy query The order of the examples to return. Defaults to SENTIMENT_DESC. SENTIMENT_DESC "INSERTION_ORDER_ASC" or "INSERTION_ORDER_DESC" or "SENTIMENT_DESC" no
sortByTonality query Which tonality you want to sort by.     no
terms query DEPRECATED - please use the request body object to specify terms instead. Specify the terms you are interested in getting details for. If left empty all group terms will be taken into account. One query parameter per term like this: ?terms=a_term&terms=some_other_term&...     yes
Request Body
media type data type description
application/json TonalitiesRequestContext (JSON) The context of the tonalities request, specifically with regards to terms to include. If the context element provided in the request, the corresponding query parameters are ignored.
application/xml tonalitiesRequestContext (XML)
application/json TonalitiesRequestContext (JSON)

Example

Request
POST /projects/{id}/explore/groups/{groupId}/tonalities?sortByTonality=POSITIVITY
Content-Type: application/json

                
{
  "terms" : [ "...", "..." ],
  "associations" : [ "...", "..." ]
}
                
              
Response
HTTP/1.1 201 Created

              

GET /projects/{id}/explore/groups/{groupId}/topics/{topicId}/tonalities

Get result of a topic tonality calculation.

Request Parameters
name type description default constraints
groupId path The group identifier   int
id path The project identifier   int
topicId path The topic identifier. The topic must belong to the group identified by the groupId parameter   int
firstResult query An index into all available examples matching combination of terms and association. Defaults to 0, which means the first pageSize number of examples. 0 int
pageSize query The number of examples to return. Defaults to 15. 15 int
Response Body
media type data type description
application/json TonalitiesResponse (JSON)

Example

Request
GET /projects/{id}/explore/groups/{groupId}/topics/{topicId}/tonalities
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tonalityDocumentCount" : 12345,
  "sortByTonality" : "...",
  "terms" : [ "...", "..." ],
  "tonalities" : [ {
    "tone" : "...",
    "normalizedScore" : 0.6,
    "score" : 3.6
  }, {
    "tone" : "...",
    "normalizedScore" : 0.4,
    "score" : 2.4
  } ],
  "progress" : 12345,
  "associations" : [ "...", "..." ],
  "status" : "IN_PROGRESS",
  "documents" : [ {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.6,
      "score" : 3.6
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  }, {
    "relevantSentences" : [ {
      "htmlText" : "...",
      "text" : "..."
    }, {
      "htmlText" : "...",
      "text" : "..."
    } ],
    "selectedMetaDataList" : [ {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    }, {
      "columnTitle" : "...",
      "rowValue" : "...",
      "rowIndex" : 12345
    } ],
    "generalDocumentTonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "tonalities" : [ {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    }, {
      "tone" : "...",
      "normalizedScore" : 0.4,
      "score" : 2.4
    } ],
    "documentText" : "..."
  } ],
  "orderBy" : "INSERTION_ORDER_DESC"
}
                
              

POST /projects/{id}/explore/groups/{groupId}/topics/{topicId}/tonalities

Starts an asynchronous topic tonalities calculation. A GET request to the same url will fetch the progress.

NOTE: The existing method of specifying terms and associations as query parameters has been deprecated. Please use the request body object TonalitiesRequestContext to specify these fields instead

 https://api.gavagai.se/explorer/v1/projects/{projectId}/explore/groups/{groupId}/topics/{topicId}/tonalities
 

Request Parameters
name type description default constraints multivalued
groupId path The group identifier   int no
id path The project identifier   int no
topicId path The topic identifier. The topic must belong to the group identified by the groupId parameter   int no
associations query DEPRECATED - please use the request body object to specify associations instead. Optionally specify the associations you are interested in as well. Same format as for the terms: ?associations=association1&associations=assoc2     yes
excludeZeroValueScores query Set to true if the sorting should filter out texts with sentiment values scores of 0 for the provided sentiment sortByTonality. false boolean no
orderBy query The order of the examples to return. Defaults to SENTIMENT_DESC. SENTIMENT_DESC "INSERTION_ORDER_ASC" or "INSERTION_ORDER_DESC" or "SENTIMENT_DESC" no
sortByTonality query Which tonality you want to sort by.     no
terms query DEPRECATED - please use the request body object to specify terms instead. Specify the terms you are interested in getting details for. If left empty all group terms will be taken into account One query paramter per term like this: ?terms=a_term&terms=some_other_term&...     yes
Request Body
media type data type description
application/json TonalitiesRequestContext (JSON) The context of the tonalities request, specifically with regards to terms to include. If the context element provided in the request, the corresponding query parameters are ignored.
application/xml tonalitiesRequestContext (XML)
application/json TonalitiesRequestContext (JSON)

Example

Request
POST /projects/{id}/explore/groups/{groupId}/topics/{topicId}/tonalities?sortByTonality=NEGATIVITY
Content-Type: application/json

                
{
  "terms" : [ "...", "..." ],
  "associations" : [ "...", "..." ]
}
                
              
Response
HTTP/1.1 201 Created