GET /api/users/:user_id/table_preferences
List of table preferences for a user

Beispiele

GET /api/users/988725677/table_preferences
403
{
  "error": {
    "message": "Access denied",
    "details": "You are trying access the preferences of a different user",
    "missing_permissions": null
  }
}

Parameter

Parametername Beschreibung
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer


GET /api/users/:user_id/table_preferences/:name
Table preference details of a given table

Beispiele

GET /api/users/135138680/table_preferences/test_subscriptions_resource
200
{
  "id": 2,
  "name": "test_subscriptions_resource",
  "columns": [
    "1",
    "2",
    "3"
  ],
  "created_at": "2019-11-07 08:53:02 UTC",
  "updated_at": "2019-11-07 08:53:02 UTC"
}

Parameter

Parametername Beschreibung
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

name
verpflichtend

Validations:

  • Must be a String


POST /api/users/:user_id/table_preferences
Creates a table preference for a given table

Beispiele

POST /api/users/135138680/table_preferences
{
  "name": "test_subscriptions_resource",
  "columns": [
    "1",
    "2",
    "3"
  ],
  "table_preference": {
    "name": "test_subscriptions_resource",
    "columns": [
      "1",
      "2",
      "3"
    ]
  }
}
201
{
  "id": 1,
  "name": "test_subscriptions_resource",
  "columns": [
    "1",
    "2",
    "3"
  ],
  "created_at": "2019-11-07 08:53:02 UTC",
  "updated_at": "2019-11-07 08:53:02 UTC"
}

Parameter

Parametername Beschreibung
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

table_preferences
verpflichtend

Validations:

  • Must be a Hash

table_preferences[name]
verpflichtend

Name der Tabelle

Validations:

  • Must be a String

table_preferences[columns]
optional

Vom Nutzer gewählte Spalten auflisten

Validations:

  • Must be an array of any type


PUT /api/users/:user_id/table_preferences/:name
Updates a table preference for a given table

Beispiele

PUT /api/users/135138680/table_preferences/test_subscriptions_resource
{
  "columns": [
    "1",
    "2",
    "3"
  ],
  "table_preference": {
    "columns": [
      "1",
      "2",
      "3"
    ]
  }
}
200
{
  "id": 3,
  "name": "test_subscriptions_resource",
  "columns": [
    "1",
    "2",
    "3"
  ],
  "created_at": "2019-11-07 08:53:02 UTC",
  "updated_at": "2019-11-07 08:53:02 UTC"
}

Parameter

Parametername Beschreibung
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

table_preferences
verpflichtend

Validations:

  • Must be a Hash

table_preferences[name]
verpflichtend

Name der Tabelle

Validations:

  • Must be a String

table_preferences[columns]
optional

Vom Nutzer gewählte Spalten auflisten

Validations:

  • Must be an array of any type


DELETE /api/users/:user_id/table_preferences/:name
Delete a table preference for a given table

Beispiele

DELETE /api/users/135138680/table_preferences/test_subscriptions_resource
{
  "table_preference": {}
}
200
{
  "id": 4,
  "name": "test_subscriptions_resource",
  "columns": [
    "1",
    "2",
    "3"
  ],
  "created_at": "2019-11-07 08:53:02 UTC",
  "updated_at": "2019-11-07 08:53:02 UTC"
}

Parameter

Parametername Beschreibung
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

name
verpflichtend

Name der Tabelle

Validations:

  • Must be a String