Tetabot APIs

Introduction

The Tetabot API is a RESTful API. It is designed as much as possible to have resource-oriented URLs and to use HTTP status codes to indicate API status.

We use standard HTTP which can be understood by any HTTP client, and we support CORS to allow you to interact with our API from a client-side web application. Remember, you should never expose your secret API key in any public client-side code.

JSON is always returned from the API, including errors.

Tetabot uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing), and codes in the 5xx range indicate an error with our servers.

You need to send the API Key as a header : x-api-key: YOUR-API-KEY-HERE

        • Response Class (Status 200)

          OK

          {}


          Parameters

          Parameter Value Description Parameter Type Data Type

          the id of the extractor to start get the latest crawl run data

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't own this extractor, or doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Not found: Extractor has not been run.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          OK

          {}


          Parameters

          Parameter Value Description Parameter Type Data Type

          The id of the extractor to start get the latest crawl run data

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't own this extractor, or doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Not found: Extractor has not been run.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          OK

          {
            "sequenceNumber": 0,
            "url": "string",
            "timestamp": 0,
            "extractorData": {},
            "exceptionType": "string",
            "error": "string",
            "pageData": {},
            "runtimeConfigId": "string"
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          extractorId

          path string

          url

          query string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          400

          Invalid ID supplied

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          401

          Unauthorized

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          OK

          <?xml version="1.0"?>
          <inline_model_1>
            <!-- additional elements allowed -->
          </inline_model_1>
          


          Parameters

          Parameter Value Description Parameter Type Data Type

          The id of the extractor to start get the crawl run data

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't own this extractor, or doesn't have a valid session.

          <?xml version="1.0"?>
          <APIError>
            <message>string</message>
            <code>1</code>
            <error>string</error>
          </APIError>
          
          404

          Not found: Extractor has not been run.

          <?xml version="1.0"?>
          <APIError>
            <message>string</message>
            <code>1</code>
            <error>string</error>
          </APIError>
          
        • Response Class (Status 200)

          OK

          {}


          Parameters

          Parameter Value Description Parameter Type Data Type

          extractorId

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          400

          No in progress crawl found to cancel.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          401

          User doesn't own this extractor, or doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          OK

          {}


          Parameters

          Parameter Value Description Parameter Type Data Type

          the id of the extractor to start crawling with

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          400

          Extractor is archived or a crawl already in progress.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          401

          User doesn't own this extractor, or doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          search result for crawl runs

          {
            "hits": {
              "hits": [
                {
                  "_score": 0,
                  "_type": "string",
                  "_id": "string",
                  "fields": {
                    "guid": "string",
                    "failedUrlCount": 0,
                    "rowCount": 0,
                    "state": "string",
                    "stoppedAt": 0,
                    "successUrlCount": 0,
                    "startedAt": 0,
                    "runtimeConfigId": "string",
                    "totalUrlCount": 0,
                    "extractorId": "string",
                    "urlListId": "string"
                  }
                }
              ],
              "total": 0
            },
            "took": 0,
            "timed_out": true
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          The field to sort search results by. e.g _meta.creationTimestamp

          query string

          Page of search results

          query integer

          extractorId to search

          query string

          how many crawl runs per page

          query integer

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          crawl run object

          {
            "guid": "string",
            "failedUrlCount": 0,
            "rowCount": 0,
            "state": "string",
            "stoppedAt": 0,
            "successUrlCount": 0,
            "startedAt": 0,
            "runtimeConfigId": "string",
            "totalUrlCount": 0,
            "extractorId": "string",
            "urlListId": "string"
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Attachment Id, found in the crawl run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Attachment Id, found in the crawl run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Attachment Id, found in the crawl run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Attachment Id, found in the crawl run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Attachment Id, found in the crawl run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          crawlRunId

          path string

          Attachment Id, found in the crawl run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          <?xml version="1.0"?>
          <APIError>
            <message>string</message>
            <code>1</code>
            <error>string</error>
          </APIError>
          
          404

          Unable to find supplied extractor ID or attachment ID.

          <?xml version="1.0"?>
          <APIError>
            <message>string</message>
            <code>1</code>
            <error>string</error>
          </APIError>
          
        • Parameters

          Parameter Value Description Parameter Type Data Type

          extractorId

          path string

          List of inputs, line separated javascript objects. WARNING the format for these javascript objects is in NDJSON format, not standard JSON.

          body
          {
            "_url": "string",
            "Example Input": "string"
          }

          Response Messages

          HTTP Status Code Reason Response Model Headers
          201

          Inputs list has been uploaded

          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 201)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          extractorId

          path string

          Attachment Id of the inputs, found in the extractor object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Parameters

          Parameter Value Description Parameter Type Data Type

          extractorId

          path string

          List of URLs, line separated. Be sure to keep one URL per line. (Not a JSON array)

          body string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          201

          URL list has been uploaded

          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 201)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          extractorId

          path string

          Attachment Id of the urlList, found in the extractor object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          report object

          {
            "status": "string",
            "name": "string",
            "summary": {},
            "reportId": "string",
            "published": true,
            "configId": "string",
            "guid": "string",
            "type": "string"
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          reportId

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          search result for report runs

          {
            "autoPublish": true,
            "latestConfigId": "string",
            "guid": "string",
            "type": "string",
            "name": "string"
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          The field to sort search results by. e.g _meta.creationTimestamp

          query string

          Page of search results

          query integer

          reportId to search

          query string

          how many report runs per page

          query integer

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          report run object

          {
            "autoPublish": true,
            "latestConfigId": "string",
            "guid": "string",
            "type": "string",
            "name": "string"
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          reportRunId

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report run ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          reportRunId

          path string

          Attachment Id, found in the report run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report run ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          reportRunId

          path string

          Attachment Id, found in the report run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report run ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          reportRunId

          path string

          Attachment Id, found in the report run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report run ID or attachment ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          file


          Parameters

          Parameter Value Description Parameter Type Data Type

          reportRunId

          path string

          Attachment Id, found in the report run object

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          <?xml version="1.0"?>
          <APIError>
            <message>string</message>
            <code>1</code>
            <error>string</error>
          </APIError>
          
          404

          Unable to find supplied report run ID or attachment ID.

          <?xml version="1.0"?>
          <APIError>
            <message>string</message>
            <code>1</code>
            <error>string</error>
          </APIError>
          
        • Response Class (Status 200)

          array of crawl run schedules

          {
            "nextRunAt": 0,
            "ownerId": "string",
            "startTimestamp": 0,
            "interval": "string",
            "extractorId": "string",
            "intervalData": {
              "type": "string",
              "minutes": "string",
              "time": "string"
            }
          }


          Response Messages

          HTTP Status Code Reason Response Model Headers
          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          crawl run schedule

          {
            "nextRunAt": 0,
            "ownerId": "string",
            "startTimestamp": 0,
            "interval": "string",
            "extractorId": "string",
            "intervalData": {
              "type": "string",
              "minutes": "string",
              "time": "string"
            }
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          Request body with the schema defined on the left. Interval is a cron string.

          body
          {
            "startTimestamp": 1485448509727,
            "interval": "15 * * * *",
            "extractorId": "00000000-0000-0000-0000-000000000000"
          }

          Response Messages

          HTTP Status Code Reason Response Model Headers
          400

          Validation errors on the request input.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          401

          User doesn't own this extractor, or doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          403

          User is not allowed to create schedule for this extractor.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          crawl run schedule

          {
            "nextRunAt": 0,
            "ownerId": "string",
            "startTimestamp": 0,
            "interval": "string",
            "extractorId": "string",
            "intervalData": {
              "type": "string",
              "minutes": "string",
              "time": "string"
            }
          }


          Parameters

          Parameter Value Description Parameter Type Data Type

          the id of the extractor with a schedule

          path string
        • Parameters

          Parameter Value Description Parameter Type Data Type

          the id of the extractor with a schedule

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          200

          Empty object

          401

          User doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          403

          User is not allowed to delete this schedule.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied extractor ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
        • Response Class (Status 200)

          OK

          {}


          Parameters

          Parameter Value Description Parameter Type Data Type

          the id of the report to run

          path string

          Response Messages

          HTTP Status Code Reason Response Model Headers
          400

          Report is archived or a report run is already in progress.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          401

          User doesn't own this report, or doesn't have a valid session.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }
          404

          Unable to find supplied report ID.

          {
            "message": "string",
            "code": 0,
            "error": "string"
          }