Projects

Projects are the main entry point in Squirro.Projects contain objects, which contain the data subscriptions. Projects give access to items that are contained in their index.

Methods

List Projects

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

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.

[
   {
      "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.

{
   "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.

{
   "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:

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

{"title": "Web development"}

Delete Project

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.
JSON Data
  • 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.