Saved Global Filters API

The saved global filters endpoints provide a way to view saved global filter details by user and stack or delete them. All endpoints require a user to be logged in, and the POST endpoints require CSRF tokens.

Get a List of Saved Global Filter Hashes for the Current User

GET /api/v1/hashr/saved_global_filters/

Get a list of Saved Global Filter Hashes for Current User

Example Request:

GET /api/v1/hashr/saved_global_filters/
Accept: application/json

Example Response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

[
   {
     "user": "chris@juice.com",
     "stack": "Census for Data Services Demo App",
     "hash": "aThing",
     "name": "My Filters",
     "created": "2016-06-07T15:52:13.600823Z",
     "modified": "2016-06-07T15:52:13.600864Z"
   }
]
Response JSON Array of Objects:
 
  • user (string) – the email address of the user
  • stack (string) – the stack and app for the filter
  • hash (string) – the hash associated with the saved filter set
  • name (string) – the named given to the saved filter set
  • created (datetime) – when the saved filter set was created
  • modified (datetime) – when the saved filter set was last modified
Request Headers:
 
  • Accept – the response content type depends on Accept header
Response Headers:
 
Status Codes:

Get a List of Saved Global Filter Hashes for the Current User by Stack

GET /api/v1/hashr/saved_global_filters/stack/(string: stack_id)/

Get a list of Saved Global Filter Hashes for Current User

Example Request:

GET /api/v1/hashr/saved_global_filters/stack/a0a91e46/
Accept: application/json

Example Response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

[
   {
     "user": "chris@juice.com",
     "stack": "Census for Data Services Demo App",
     "hash": "aThing",
     "name": "My Filters",
     "created": "2016-06-07T15:52:13.600823Z",
     "modified": "2016-06-07T15:52:13.600864Z"
   }
]
Parameters:
  • stack_id (string) – the ID of the stack
Response JSON Array of Objects:
 
  • user (string) – the email address of the user
  • stack (string) – the stack and app for the filter
  • hash (string) – the hash associated with the saved filter set
  • name (string) – the named given to the saved filter set
  • created (datetime) – when the saved filter set was created
  • modified (datetime) – when the saved filter set was last modified
Request Headers:
 
  • Accept – the response content type depends on Accept header
Response Headers:
 
Status Codes:

Get a specific Saved Global Filter Hash for the Current User

GET /api/v1/hashr/saved_global_filters/(string: hash)/

Get a list of Saved Global Filter Hashes for Current User for a Stack

Example Request:

GET /api/v1/hashr/saved_global_filters/aThing/
Accept: application/json

Example Response:

 HTTP/1.1 200 OK
 Vary: Accept
 Content-Type: text/javascript

 {
   "user": "chris@juice.com",
   "stack": "Census for Data Services Demo App",
   "hash": "aThing",
   "name": "My Filters",
   "created": "2016-06-07T15:52:13.600823Z",
   "modified": "2016-06-07T15:52:13.600864Z"
}
Parameters:
  • hash (string) – the hash associated with the saved filter set
Response JSON Object:
 
  • user (string) – the email address of the user
  • stack (string) – the stack and app for the filter
  • hash (string) – the hash associated with the saved filter set
  • name (string) – the named given to the saved filter set
  • created (datetime) – when the saved filter set was created
  • modified (datetime) – when the saved filter set was last modified
Request Headers:
 
  • Accept – the response content type depends on Accept header
Response Headers:
 
Status Codes:

Creating a Saved Global Filter Hash for the Current User

POST /api/v1/hashr/saved_global_filters/

Creating a Saved Global Filter Hashes for Current User

Example Request:

POST /api/v1/hashr/saved_global_filters/
Accept: application/json

{
  "stack_id": "a0a91e46",
  "hash": "aThing",
  "name": "My Filters",
}

Example Response:

HTTP/1.1 201 CREATED
Vary: Accept
Content-Type: text/javascript

{
  "user": "chris@juice.com",
  "stack": "Census for Data Services Demo App",
  "hash": "aThing",
  "name": "My Filters",
  "created": "2016-06-07T15:52:13.600823Z",
  "modified": "2016-06-07T15:52:13.600864Z"
}
Request JSON Object:
 
  • stack_id (string) – the ID of the stack
  • hash (string) – the hash associated with the saved filter set
  • name (string) – the named given to the saved filter set
Response JSON Object:
 
  • user (string) – the email address of the user
  • stack (string) – the stack and app for the filter
  • hash (string) – the hash associated with the saved filter set
  • name (string) – the named given to the saved filter set
  • created (datetime) – when the saved filter set was created
  • modified (datetime) – when the saved filter set was last modified
Request Headers:
 
  • Accept – the response content type depends on Accept header
Response Headers:
 
Status Codes:
  • 200 OK – no error
  • 400 Bad Request – Check response data for a message about missing or invalid data

Deleting specific Saved Global Filter Hash for the Current User

DELETE /api/v1/hashr/saved_global_filters/(string: hash)/

Deleting a specific Saved Global Filter Hash for Current User

Example Request:

DELETE /api/v1/hashr/saved_global_filters/aThing/
Accept: application/json

Example Response:

HTTP/1.1 204 NO CONTENT
Vary: Accept
Content-Type: text/javascript
Status Codes:

Updating specific Saved Global Filter Hash for the Current User

PUT /api/v1/hashr/saved_global_filters/(string: hash)/

Updating a specific Saved Global Filter Hash for Current User

Example Request:

PUT /api/v1/hashr/saved_global_filters/aThing/
Accept: application/json

{
  "stack_id": "a0a91e46",
  "hash": "aThing",
  "name": "My Renamed Filters",
}

Example Response:

HTTP/1.1 204 NO CONTENT
Vary: Accept
Content-Type: text/javascript

{
  "user": "chris@juice.com",
  "stack": "Census for Data Services Demo App",
  "hash": "aThing",
  "name": "My Renamed Filters",
  "created": "2016-06-07T15:52:13.600823Z",
  "modified": "2016-06-07T16:52:13.600864Z"
}
Status Codes: