Enrichments

Enrichments are added to projects to change how incoming items are processed.

Methods

List Enrichments

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

Returns an array of all enrichments in the project.

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
Headers:

See Common Headers.

Status Codes:
  • 200 – Array of objects dictionaries is returned.

See also Common Status Codes.

Returns:

Array of enrichments.

[
    {
        "type": "pipelet",
        "config": {
            "api_key": "TEXTRAZOR_API_KEY",
            "pipelet": "tenant-name/textrazor"
        },
        "name": "Entities",
        "id": "pipelet-tenant-name/textrazor"
    },
    {
        "type": "keyword",
        "config": {
            "keywords": {
                "company": ["Squirro"]
            },
            "query": "Squirro OR Nektoon"
        },
        "id": "keyword-an2_XAaxRZCg-7DMiTGpxQ",
        "name": "Squirro"
    }
]

Create Enrichment

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

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

Data is passed in as a JSON object.

Valid object keys:

  • type – Type of enrichment to create. Valid values: pipelet, keyword.
  • name – Enrichment name.
  • config – Enrichment configuration. Contents depends on type.
Headers:See Common Headers.
Status Codes:
  • 201 – Enrichment was created.

See also Common Status Codes.

Returns:

Created enrichments.

{
    "type": "keyword",
    "config": {
        "keywords": {
            "company": ["Squirro"]
        },
        "query": "Squirro OR Nektoon"
    },
    "id": "keyword-an2_XAaxRZCg-7DMiTGpxQ",
    "name": "Squirro"
}

Get Enrichment

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

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • enrichment_id – Enrichment identifier.
Headers:

See Common Headers.

Status Codes:
  • 200 – Enrichment is returned.

See also Common Status Codes.

Returns:

Enrichment.

{
    "type": "keyword",
    "config": {
        "keywords": {
            "company": ["Squirro"]
        },
        "query": "Squirro OR Nektoon"
    },
    "id": "keyword-an2_XAaxRZCg-7DMiTGpxQ",
    "name": "Squirro"
}

Update Enrichment

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

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

Data is passed in as a JSON object. Takes the same input as the Create Enrichment resource.

Headers:See Common Headers.
Status Codes:
  • 200 – Enrichment was updated.

See also Common Status Codes.

Returns:

The updated enrichment.

{
    "type": "keyword",
    "config": {
        "keywords": {
            "company": ["Squirro"]
        },
        "query": "Squirro OR Nektoon"
    },
    "id": "keyword-an2_XAaxRZCg-7DMiTGpxQ",
    "name": "Squirro"
}

Delete Enrichment

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

Parameters:
  • tenant – User tenant.
  • project_id – Project identifier.
  • enrichment_id – Enrichment identifier.
Headers:

See Common Headers.

Status Codes:
  • 204 – Enrichment was deleted.

See also Common Status Codes.