Versions Compared

Key

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

...

Returns all projects in this tenant that the logged in user can access.

Parameters:
Headers:See Common Headers.
Status Codes:
  • 200 – Array of project objects is returned.

See also Common Status Codes.

Returns:

Array of project objects.

Code Block
js
js
[
   {
      "title": "Accounts", "id": "-q7bsMrxTlefD9CCmMdMXg",
      "seeder": "salesforce"
   },
   {
      "title": "JavaScript", "id": "Uenn0QUiTEKxJWgg5NlRgw",
      "seeder": null
   }
]

Create Project

POST https://squirro-endpoint/api/topic/v0/(string: tenant)/projects

Create a new project. On creation a default object is created.

Parameters:
Form Parameters:
  • owner_id – User identifier that owns the project.
  • title – Descriptive title of the project (optional, string of max. 200 characters).
  • seeder – The seeder that owns this project (optional, string of max. 20 characters).
Headers:See Common Headers.
Status Codes:
  • 201 – Project was created.

See also Common Status Codes.

Returns:

Object with project identifier.

Code Block
js
js
{
   "id": "pa-bX3aiTPOTaH7HV5JCgw"
}

Get Project

GET https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)

Returns information about a single project.

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
Headers:See Common Headers.
Status Codes:
  • 200 – Project object is returned.

See also Common Status Codes.

Returns:

Project object.

Code Block
js
js
{
   "id": "Uenn0QUiTEKxJWgg5NlRgw",
   "title": "JavaScript",
   "seeder": null,
   "type": null
}

Update Project

PUT https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
JSON Data:

Data is passed in as a JSON object.

Valid object keys:

  • title – Descriptive title of this project (max. 200 characters).
Headers:See Common Headers.
Status Codes:
  • 204 – Project was updated.

See also Common Status Codes.

Example request:

Code Block
langhttp
PUT /v0/example/projects/Uenn0QUiTEKxJWgg5NlRgw
Host: topic-api.squirro.com
Accept: application/json
Content-Type: application/json

{"title": "Web development"}

...

DELETE https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
Headers:See Common Headers.
Status Codes:
  • 204 – Project was deleted.

See also Common Status Codes.

Reset Project

Resets different entities of a Squirro project based on boolean flags. This currently supports resetting the following three Squirro Entities

  • Dashboards – Deletes all the dashboards in the Squirro project
  • Elasticsearch Index – Deletes all the documents in the Elasticsearch index.
  • Facets – Deletes all the facets. Please note that in order to do a reset of facets, a reset of elasticsearch is mandatory (in the same API call using the relevant boolean flags).

POST https://squirro-endpoint/api/topic/v0/(string: tenant)/projects/(id: project_id)/reset

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • reset_dashboards – Boolean flag to decide whether to reset the project dashboards or not. If True, will delete all the dashboards in the current project. Defaults to False if not specified.
  • reset_elasticsearch_index – Boolean flag to decide whether to reset/delete all documents in a project’s elasticsearch index or not without deleting the index itself. Defaults to False if not specified.
  • reset_facets – Boolean flag to decide whether to delete all the facets in the project. This needs the reset_elasticsearch_index flag to be set to True. Be aware that all the dashboards and other Squirro entities dependent on the current facets will stop working with the reset of facets. Defaults to False if not specified.
Headers:See Common Headers.
Status Codes:
  • 200 – Squirro Project entities were reset.

See also Common Status Codes.