API Libraries > REST API

REST API

Rockset’s REST API allows for creating and managing all resources in Rockset. Each supported endpoint is documented below.

All endpoints are only accessible via https. The base URL of the Rockset API server is:

https://api.rs2.usw2.rockset.com

All requests must be authorized with a Rockset API key, which can be created in the Rockset console. The API key must be provided as ApiKey {api_key} in the Authorization request header. For example:

Authorization: ApiKey aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT

The REST API can be accessed by any client or library that makes HTTP requests. Below is an example of how to access the a REST API endpoint through a popular JavaScript library, axios.

const axios = require('axios');

let ROCKSET_API_TOKEN = "YOUR_API_KEY_HERE"

let config = {
    headers: {'Authorization': "ApiKey " + ROCKSET_API_TOKEN}
};

axios.get('https://api.rs2.usw2.rockset.com/v1/orgs/self/integrations',
    config
  )
  .then( (response) => {
    let data = response.data
    console.log(data)
  })
  .catch( (error) => {
    console.log(error);
  })

Debugging Error Codes

The REST API may return an error code if there is an error either on the user end or the Rockset end. Below are some debugging tips for common error codes.

Error 401: Unauthorized

You are not authenticated correctly. Check to make sure that your API key is correct.

Error 403: Forbidden

You do not have access to this content. Check to make sure you have the required permissions.

Error 404: Not Found

We did not find the URL you are requesting. Check to make sure the URL is spelled correctly.

Error 5xx: Server Error

Internal server error at Rockset. We will be notified and investigate the problem.

ApiKeys

List API Keys

List all API keys for the authenticated user.

GET /v1/orgs/self/users/self/apikeys
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "name": "my-event-logger-key",
      "key": "aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT"
    }
  ]
}

Create API Key

Create a new API key for the authenticated user.

POST /v1/orgs/self/users/self/apikeys
Request Body
Response (200)
{
  "name": "event-logger"
}

Delete API Key

Delete an API key for the authenticated user.

DELETE /v1/orgs/self/users/self/apikeys/{name}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "name": "my-event-logger-key",
    "key": "aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT"
  }
}
ParameterLocationRequiredTypeDescription
namepathyesstringname of the API key

List API Keys for any user (admin only)

List all API keys for any user (admin only).

GET /v1/orgs/self/users/{user}/apikeys
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "name": "my-event-logger-key",
      "key": "aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT"
    }
  ]
}
ParameterLocationRequiredTypeDescription
userpathyesstring

Create API Key for any user (admin only)

Create a new API key for any user (admin only).

POST /v1/orgs/self/users/{user}/apikeys
Request Body
Response (200)
{
  "name": "event-logger"
}
ParameterLocationRequiredTypeDescription
userpathyesstring

Delete API Key for any user (admin only)

Delete an API key for any user (admin only).

DELETE /v1/orgs/self/users/{user}/apikeys/{name}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "name": "my-event-logger-key",
    "key": "aB35kDjg93J5nsf4GjwMeErAVd832F7ad4vhsW1S02kfZiab42sTsfW5Sxt25asT"
  }
}
ParameterLocationRequiredTypeDescription
namepathyesstringname of the API key
userpathyesstring

Collections

List Collections

Retrieve all collections in an organization.

GET /v1/orgs/self/collections
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "created_by": "hello@rockset.com",
      "name": "global-transactions",
      "description": "transactions from stores worldwide",
      "workspace": "commons",
      "status": "READY",
      "sources": [
        {
          "integration_name": "aws-integration",
          "s3": {
            "prefix": "prefix/to/keys",
            "pattern": "prefix/to/**/keys/*.format",
            "bucket": "s3://customer-account-info"
          },
          "kinesis": {
            "stream_name": "click_stream",
            "aws_region": "us-east-2"
          },
          "gcs": {
            "bucket": "server-logs",
            "prefix": "prefix/to/keys"
          },
          "redshift": {
            "database": "dev",
            "schema": "common",
            "table_name": "redshift_table_name",
            "incremental_field": "updated_at"
          },
          "dynamodb": {
            "table_name": "dynamodb_table_name",
            "aws_region": "us-east-2"
          },
          "file_upload": {
            "file_name": "file1.json",
            "file_size": 12345,
            "file_upload_time": "2019-01-15T21:48:23Z"
          },
          "kafka": {
            "kafka_topic_name": "example-topic"
          },
          "status": {
            "state": "INITIALIZING",
            "since": "2019-01-15T21:48:23Z",
            "message": "error 403 forbidden",
            "last_processed_at": "2019-01-15T21:48:23Z",
            "last_processed_item": "/path/to/some/object",
            "total_processed_items": 32849023,
            "last_error_at": "2019-01-15T21:48:23Z",
            "last_error_item": "/path/to/some/object",
            "last_error_reason": "invalid format .docx",
            "total_error_items": 32849023
          },
          "format_params": {
            "json": true,
            "csv": {
              "firstLineAsColumnNames": true,
              "separator": ",",
              "encoding": "UTF-8",
              "columnNames": "[c1, c2, c3]",
              "columnTypes": "['BOOLEAN', 'INTEGER', 'FLOAT', 'STRING']",
              "quoteChar": "\""
            },
            "xml": {
              "root_tag": "root",
              "encoding": "UTF-8",
              "doc_tag": "row",
              "value_tag": "value",
              "attribute_prefix": "_attr"
            }
          }
        }
      ],
      "stats": {
        "doc_count": 2145,
        "total_size": 123456,
        "fill_progress": 0.6,
        "purged_doc_count": 2145,
        "purged_doc_size": 123456,
        "last_updated_ms": 1535101094433,
        "last_queried_ms": 1535101119334
      },
      "retention_secs": 2592000,
      "field_mappings": [
        {
          "name": "myTestMapping",
          "input_fields": [
            {
              "field_name": "address.city.zipcode",
              "if_missing": "['SKIP', 'PASS']",
              "is_drop": true,
              "param": "zip"
            }
          ],
          "output_field": {
            "field_name": "zip_hash",
            "value": "SHA256(:zip)",
            "on_error": "['SKIP', 'FAIL']"
          }
        }
      ]
    }
  ]
}

List Collections for Workspace

Retrieve all collections in a workspace.

GET /v1/orgs/self/ws/{workspace}/collections
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "created_by": "hello@rockset.com",
      "name": "global-transactions",
      "description": "transactions from stores worldwide",
      "workspace": "commons",
      "status": "READY",
      "sources": [
        {
          "integration_name": "aws-integration",
          "s3": {
            "prefix": "prefix/to/keys",
            "pattern": "prefix/to/**/keys/*.format",
            "bucket": "s3://customer-account-info"
          },
          "kinesis": {
            "stream_name": "click_stream",
            "aws_region": "us-east-2"
          },
          "gcs": {
            "bucket": "server-logs",
            "prefix": "prefix/to/keys"
          },
          "redshift": {
            "database": "dev",
            "schema": "common",
            "table_name": "redshift_table_name",
            "incremental_field": "updated_at"
          },
          "dynamodb": {
            "table_name": "dynamodb_table_name",
            "aws_region": "us-east-2"
          },
          "file_upload": {
            "file_name": "file1.json",
            "file_size": 12345,
            "file_upload_time": "2019-01-15T21:48:23Z"
          },
          "kafka": {
            "kafka_topic_name": "example-topic"
          },
          "status": {
            "state": "INITIALIZING",
            "since": "2019-01-15T21:48:23Z",
            "message": "error 403 forbidden",
            "last_processed_at": "2019-01-15T21:48:23Z",
            "last_processed_item": "/path/to/some/object",
            "total_processed_items": 32849023,
            "last_error_at": "2019-01-15T21:48:23Z",
            "last_error_item": "/path/to/some/object",
            "last_error_reason": "invalid format .docx",
            "total_error_items": 32849023
          },
          "format_params": {
            "json": true,
            "csv": {
              "firstLineAsColumnNames": true,
              "separator": ",",
              "encoding": "UTF-8",
              "columnNames": "[c1, c2, c3]",
              "columnTypes": "['BOOLEAN', 'INTEGER', 'FLOAT', 'STRING']",
              "quoteChar": "\""
            },
            "xml": {
              "root_tag": "root",
              "encoding": "UTF-8",
              "doc_tag": "row",
              "value_tag": "value",
              "attribute_prefix": "_attr"
            }
          }
        }
      ],
      "stats": {
        "doc_count": 2145,
        "total_size": 123456,
        "fill_progress": 0.6,
        "purged_doc_count": 2145,
        "purged_doc_size": 123456,
        "last_updated_ms": 1535101094433,
        "last_queried_ms": 1535101119334
      },
      "retention_secs": 2592000,
      "field_mappings": [
        {
          "name": "myTestMapping",
          "input_fields": [
            {
              "field_name": "address.city.zipcode",
              "if_missing": "['SKIP', 'PASS']",
              "is_drop": true,
              "param": "zip"
            }
          ],
          "output_field": {
            "field_name": "zip_hash",
            "value": "SHA256(:zip)",
            "on_error": "['SKIP', 'FAIL']"
          }
        }
      ]
    }
  ]
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace

Create Collection

Create new collection in a workspace.

POST /v1/orgs/self/ws/{workspace}/collections
Request Body
Response (200)
{
  "name": "global-transactions",
  "description": "transactions from stores worldwide",
  "sources": [
    {
      "integration_name": "aws-integration",
      "s3": {
        "prefix": "prefix/to/keys",
        "pattern": "prefix/to/**/keys/*.format",
        "bucket": "s3://customer-account-info"
      },
      "kinesis": {
        "stream_name": "click_stream",
        "aws_region": "us-east-2"
      },
      "gcs": {
        "bucket": "server-logs",
        "prefix": "prefix/to/keys"
      },
      "redshift": {
        "database": "dev",
        "schema": "common",
        "table_name": "redshift_table_name",
        "incremental_field": "updated_at"
      },
      "dynamodb": {
        "table_name": "dynamodb_table_name",
        "aws_region": "us-east-2"
      },
      "file_upload": {
        "file_name": "file1.json",
        "file_size": 12345,
        "file_upload_time": "2019-01-15T21:48:23Z"
      },
      "kafka": {
        "kafka_topic_name": "example-topic"
      },
      "status": {
        "state": "INITIALIZING",
        "since": "2019-01-15T21:48:23Z",
        "message": "error 403 forbidden",
        "last_processed_at": "2019-01-15T21:48:23Z",
        "last_processed_item": "/path/to/some/object",
        "total_processed_items": 32849023,
        "last_error_at": "2019-01-15T21:48:23Z",
        "last_error_item": "/path/to/some/object",
        "last_error_reason": "invalid format .docx",
        "total_error_items": 32849023
      },
      "format_params": {
        "json": true,
        "csv": {
          "firstLineAsColumnNames": true,
          "separator": ",",
          "encoding": "UTF-8",
          "columnNames": "[c1, c2, c3]",
          "columnTypes": "['BOOLEAN', 'INTEGER', 'FLOAT', 'STRING']",
          "quoteChar": "\""
        },
        "xml": {
          "root_tag": "root",
          "encoding": "UTF-8",
          "doc_tag": "row",
          "value_tag": "value",
          "attribute_prefix": "_attr"
        }
      }
    }
  ],
  "retention_secs": 1000000,
  "event_time_info": {
    "field": "timestamp",
    "format": "seconds_since_epoch",
    "time_zone": "UTC"
  },
  "field_mappings": [
    {
      "name": "myTestMapping",
      "input_fields": [
        {
          "field_name": "address.city.zipcode",
          "if_missing": "['SKIP', 'PASS']",
          "is_drop": true,
          "param": "zip"
        }
      ],
      "output_field": {
        "field_name": "zip_hash",
        "value": "SHA256(:zip)",
        "on_error": "['SKIP', 'FAIL']"
      }
    }
  ]
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace

Delete Collection

Delete a collection and all its documents from Rockset.

DELETE /v1/orgs/self/ws/{workspace}/collections/{collection}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "created_by": "hello@rockset.com",
    "name": "global-transactions",
    "description": "transactions from stores worldwide",
    "workspace": "commons",
    "status": "READY",
    "sources": [
      {
        "integration_name": "aws-integration",
        "s3": {
          "prefix": "prefix/to/keys",
          "pattern": "prefix/to/**/keys/*.format",
          "bucket": "s3://customer-account-info"
        },
        "kinesis": {
          "stream_name": "click_stream",
          "aws_region": "us-east-2"
        },
        "gcs": {
          "bucket": "server-logs",
          "prefix": "prefix/to/keys"
        },
        "redshift": {
          "database": "dev",
          "schema": "common",
          "table_name": "redshift_table_name",
          "incremental_field": "updated_at"
        },
        "dynamodb": {
          "table_name": "dynamodb_table_name",
          "aws_region": "us-east-2"
        },
        "file_upload": {
          "file_name": "file1.json",
          "file_size": 12345,
          "file_upload_time": "2019-01-15T21:48:23Z"
        },
        "kafka": {
          "kafka_topic_name": "example-topic"
        },
        "status": {
          "state": "INITIALIZING",
          "since": "2019-01-15T21:48:23Z",
          "message": "error 403 forbidden",
          "last_processed_at": "2019-01-15T21:48:23Z",
          "last_processed_item": "/path/to/some/object",
          "total_processed_items": 32849023,
          "last_error_at": "2019-01-15T21:48:23Z",
          "last_error_item": "/path/to/some/object",
          "last_error_reason": "invalid format .docx",
          "total_error_items": 32849023
        },
        "format_params": {
          "json": true,
          "csv": {
            "firstLineAsColumnNames": true,
            "separator": ",",
            "encoding": "UTF-8",
            "columnNames": "[c1, c2, c3]",
            "columnTypes": "['BOOLEAN', 'INTEGER', 'FLOAT', 'STRING']",
            "quoteChar": "\""
          },
          "xml": {
            "root_tag": "root",
            "encoding": "UTF-8",
            "doc_tag": "row",
            "value_tag": "value",
            "attribute_prefix": "_attr"
          }
        }
      }
    ],
    "stats": {
      "doc_count": 2145,
      "total_size": 123456,
      "fill_progress": 0.6,
      "purged_doc_count": 2145,
      "purged_doc_size": 123456,
      "last_updated_ms": 1535101094433,
      "last_queried_ms": 1535101119334
    },
    "retention_secs": 2592000,
    "field_mappings": [
      {
        "name": "myTestMapping",
        "input_fields": [
          {
            "field_name": "address.city.zipcode",
            "if_missing": "['SKIP', 'PASS']",
            "is_drop": true,
            "param": "zip"
          }
        ],
        "output_field": {
          "field_name": "zip_hash",
          "value": "SHA256(:zip)",
          "on_error": "['SKIP', 'FAIL']"
        }
      }
    ]
  }
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace
collectionpathyesstringname of the collection

Get Collection

Get details about a collection.

GET /v1/orgs/self/ws/{workspace}/collections/{collection}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "created_by": "hello@rockset.com",
    "name": "global-transactions",
    "description": "transactions from stores worldwide",
    "workspace": "commons",
    "status": "READY",
    "sources": [
      {
        "integration_name": "aws-integration",
        "s3": {
          "prefix": "prefix/to/keys",
          "pattern": "prefix/to/**/keys/*.format",
          "bucket": "s3://customer-account-info"
        },
        "kinesis": {
          "stream_name": "click_stream",
          "aws_region": "us-east-2"
        },
        "gcs": {
          "bucket": "server-logs",
          "prefix": "prefix/to/keys"
        },
        "redshift": {
          "database": "dev",
          "schema": "common",
          "table_name": "redshift_table_name",
          "incremental_field": "updated_at"
        },
        "dynamodb": {
          "table_name": "dynamodb_table_name",
          "aws_region": "us-east-2"
        },
        "file_upload": {
          "file_name": "file1.json",
          "file_size": 12345,
          "file_upload_time": "2019-01-15T21:48:23Z"
        },
        "kafka": {
          "kafka_topic_name": "example-topic"
        },
        "status": {
          "state": "INITIALIZING",
          "since": "2019-01-15T21:48:23Z",
          "message": "error 403 forbidden",
          "last_processed_at": "2019-01-15T21:48:23Z",
          "last_processed_item": "/path/to/some/object",
          "total_processed_items": 32849023,
          "last_error_at": "2019-01-15T21:48:23Z",
          "last_error_item": "/path/to/some/object",
          "last_error_reason": "invalid format .docx",
          "total_error_items": 32849023
        },
        "format_params": {
          "json": true,
          "csv": {
            "firstLineAsColumnNames": true,
            "separator": ",",
            "encoding": "UTF-8",
            "columnNames": "[c1, c2, c3]",
            "columnTypes": "['BOOLEAN', 'INTEGER', 'FLOAT', 'STRING']",
            "quoteChar": "\""
          },
          "xml": {
            "root_tag": "root",
            "encoding": "UTF-8",
            "doc_tag": "row",
            "value_tag": "value",
            "attribute_prefix": "_attr"
          }
        }
      }
    ],
    "stats": {
      "doc_count": 2145,
      "total_size": 123456,
      "fill_progress": 0.6,
      "purged_doc_count": 2145,
      "purged_doc_size": 123456,
      "last_updated_ms": 1535101094433,
      "last_queried_ms": 1535101119334
    },
    "retention_secs": 2592000,
    "field_mappings": [
      {
        "name": "myTestMapping",
        "input_fields": [
          {
            "field_name": "address.city.zipcode",
            "if_missing": "['SKIP', 'PASS']",
            "is_drop": true,
            "param": "zip"
          }
        ],
        "output_field": {
          "field_name": "zip_hash",
          "value": "SHA256(:zip)",
          "on_error": "['SKIP', 'FAIL']"
        }
      }
    ]
  }
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace
collectionpathyesstringname of the collection

Documents

Delete Documents

Delete documents from a collection in Rockset.

DELETE /v1/orgs/self/ws/{workspace}/collections/{collection}/docs
Request Body
Response (200)
{
  "data": [
    {
      "_id": "2cd61e3b"
    }
  ]
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace
collectionpathyesstringname of the collection

Add Documents

Add documents to a collection in Rockset.

POST /v1/orgs/self/ws/{workspace}/collections/{collection}/docs
Request Body
Response (200)
{
  "data": [
    {}
  ]
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace
collectionpathyesstringname of the collection

Integrations

List Integrations

List all integrations for organization.

GET /v1/orgs/self/integrations
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "created_by": "hello@rockset.com",
      "name": "event-logs",
      "description": "AWS account with event data for the data science team.",
      "s3": {
        "aws_role": {
          "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
        },
        "aws_access_key": {
          "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
          "aws_secret_access_key": "wJal...."
        }
      },
      "kinesis": {
        "aws_role": {
          "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
        },
        "aws_access_key": {
          "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
          "aws_secret_access_key": "wJal...."
        }
      },
      "dynamodb": {
        "aws_access_key": {
          "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
          "aws_secret_access_key": "wJal...."
        },
        "aws_role": {
          "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
        }
      },
      "redshift": {
        "aws_access_key": {
          "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
          "aws_secret_access_key": "wJal...."
        },
        "username": "awsuser",
        "password": "pswd....",
        "host": "test.yuyugt.us-west-2.redshift.amazonaws.com",
        "port": 5439,
        "s3_bucket_path": "s3://redshift-unload"
      },
      "gcs": {
        "gcp_service_account": {}
      },
      "segment": {},
      "kafka": {
        "kafka_topic_names": [
          null
        ],
        "kafka_data_format": "json"
      }
    }
  ]
}

Create Integration

Create a new integration with Rockset.

POST /v1/orgs/self/integrations
Request Body
Response (200)
{
  "name": "event-logs",
  "description": "AWS account with event data for the data science team.",
  "s3": {
    "aws_role": {
      "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
    },
    "aws_access_key": {
      "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "aws_secret_access_key": "wJal...."
    }
  },
  "kinesis": {
    "aws_role": {
      "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
    },
    "aws_access_key": {
      "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "aws_secret_access_key": "wJal...."
    }
  },
  "dynamodb": {
    "aws_access_key": {
      "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "aws_secret_access_key": "wJal...."
    },
    "aws_role": {
      "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
    }
  },
  "redshift": {
    "aws_access_key": {
      "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
      "aws_secret_access_key": "wJal...."
    },
    "username": "awsuser",
    "password": "pswd....",
    "host": "test.yuyugt.us-west-2.redshift.amazonaws.com",
    "port": 5439,
    "s3_bucket_path": "s3://redshift-unload"
  },
  "gcs": {
    "gcp_service_account": {}
  },
  "segment": {},
  "kafka": {
    "kafka_topic_names": [
      null
    ],
    "kafka_data_format": "json"
  }
}

Delete Integration

Remove an integration.

DELETE /v1/orgs/self/integrations/{integration}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "created_by": "hello@rockset.com",
    "name": "event-logs",
    "description": "AWS account with event data for the data science team.",
    "s3": {
      "aws_role": {
        "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
      },
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      }
    },
    "kinesis": {
      "aws_role": {
        "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
      },
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      }
    },
    "dynamodb": {
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      },
      "aws_role": {
        "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
      }
    },
    "redshift": {
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      },
      "username": "awsuser",
      "password": "pswd....",
      "host": "test.yuyugt.us-west-2.redshift.amazonaws.com",
      "port": 5439,
      "s3_bucket_path": "s3://redshift-unload"
    },
    "gcs": {
      "gcp_service_account": {}
    },
    "segment": {},
    "kafka": {
      "kafka_topic_names": [
        null
      ],
      "kafka_data_format": "json"
    }
  }
}
ParameterLocationRequiredTypeDescription
integrationpathyesstringname of the integration

Get Integration

Get information about a single integration.

GET /v1/orgs/self/integrations/{integration}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "created_by": "hello@rockset.com",
    "name": "event-logs",
    "description": "AWS account with event data for the data science team.",
    "s3": {
      "aws_role": {
        "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
      },
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      }
    },
    "kinesis": {
      "aws_role": {
        "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
      },
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      }
    },
    "dynamodb": {
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      },
      "aws_role": {
        "aws_role_arn": "arn:aws:iam::2378964092:role/rockset-role"
      }
    },
    "redshift": {
      "aws_access_key": {
        "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
        "aws_secret_access_key": "wJal...."
      },
      "username": "awsuser",
      "password": "pswd....",
      "host": "test.yuyugt.us-west-2.redshift.amazonaws.com",
      "port": 5439,
      "s3_bucket_path": "s3://redshift-unload"
    },
    "gcs": {
      "gcp_service_account": {}
    },
    "segment": {},
    "kafka": {
      "kafka_topic_names": [
        null
      ],
      "kafka_data_format": "json"
    }
  }
}
ParameterLocationRequiredTypeDescription
integrationpathyesstringname of the integration

Organizations

Get Organization

Retrieve information about current organization.

GET /v1/orgs/self
Response (200)
{
  "data": {
    "id": "rockset",
    "created_at": "2001-08-28T00:23:41Z",
    "display_name": "Rockset, Inc",
    "company_name": "Rockset, Inc",
    "tier": "BASIC",
    "qcu": 2,
    "state": "ACTIVE"
  }
}

Queries

Query

Make a SQL query to Rockset.

POST /v1/orgs/self/queries
Request Body
Response (200)
{
  "sql": {
    "query": "SELECT count(*) FROM foo",
    "parameters": [
      {
        "name": "_id",
        "type": "string",
        "value": "85beb391"
      }
    ]
  }
}

Users

List Users

Retrieve all users for an organization.

GET /v1/orgs/self/users
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "email": "hello@rockset.com",
      "first_name": "John",
      "last_name": "Doe",
      "roles": "[\"admin\", \"member\", \"read-only\"]",
      "state": "ACTIVE"
    }
  ]
}

Create User

Create a new user for an organization.

POST /v1/orgs/self/users
Request Body
Response (200)
{
  "email": "hello@rockset.com",
  "roles": "[\"admin\", \"member\", \"read-only\"]"
}

Get Current User

Retrieve currently active user.

GET /v1/orgs/self/users/self
Response (200)
{
  "created_at": "2001-08-28T00:23:41Z",
  "email": "hello@rockset.com",
  "first_name": "John",
  "last_name": "Doe",
  "roles": "[\"admin\", \"member\", \"read-only\"]",
  "state": "ACTIVE"
}

Delete User

Delete a user from an organization.

DELETE /v1/orgs/self/users/{user}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "email": "hello@rockset.com",
    "first_name": "John",
    "last_name": "Doe",
    "roles": "[\"admin\", \"member\", \"read-only\"]",
    "state": "ACTIVE"
  }
}
ParameterLocationRequiredTypeDescription
userpathyesstringuser email

Workspaces

List Workspaces

List all workspaces.

GET /v1/orgs/self/ws
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "created_by": "hello@rockset.com",
      "name": "event_logs",
      "description": "Datasets of system logs for the ops team.",
      "collection_count": 3
    }
  ]
}

Create Workspace

Create a new workspace in your org.

POST /v1/orgs/self/ws
Request Body
Response (200)
{
  "name": "event_logs",
  "description": "Datasets of system logs for the ops team."
}

Delete Workspace

Remove a workspace.

DELETE /v1/orgs/self/ws/{workspace}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "created_by": "hello@rockset.com",
    "name": "event_logs",
    "description": "Datasets of system logs for the ops team.",
    "collection_count": 3
  }
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace

Get Workspace

Get information about a single workspace.

GET /v1/orgs/self/ws/{workspace}
Response (200)
{
  "data": {
    "created_at": "2001-08-28T00:23:41Z",
    "created_by": "hello@rockset.com",
    "name": "event_logs",
    "description": "Datasets of system logs for the ops team.",
    "collection_count": 3
  }
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace

List Workspaces

List workspaces under given workspace.

GET /v1/orgs/self/ws/{workspace}/ws
Response (200)
{
  "data": [
    {
      "created_at": "2001-08-28T00:23:41Z",
      "created_by": "hello@rockset.com",
      "name": "event_logs",
      "description": "Datasets of system logs for the ops team.",
      "collection_count": 3
    }
  ]
}
ParameterLocationRequiredTypeDescription
workspacepathyesstringname of the workspace