MeiroDocs

Global Settings

Some settings are allowed only for the users which owns the **settings/global** role.

Section: Group Global Settings. Base URL: https://instance_name.meiro.io/api/.

Global Settings [/global_settings{?load_full_structure}]

List All Global Settings [GET]

Some settings are allowed only for the users which owns the settings/global role.

  • Parameters

    • load_full_structure (number, optional) - Full data structure return flag
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "global_settings": [
        {
            "id": 100,
            "user_id": 200,
            "key": "example key",
            "value": "example value",
            "created": "2017-01-01 15:35:00"
        }
    ]
}

Global Setting [/global_settings/{global_setting_id}{?load_full_structure}]

  • Parameters
    • load_full_structure (number, optional) - Full data structure return flag

Retrieve a Global Setting [GET]

Some settings are allowed only for the users which owns the settings/global role.

  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "global_setting": {
        "id": 100,
        "user_id": 200,
        "key": "example key",
        "value": "example value",
        "created": "2017-01-01 15:35:00"
    }
}

Modify a Global Setting [PATCH]

Required feature: settings/global

  • Attributes

    • value: example value (string)
  • Request (application/json)

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "global_setting": {
        "id": 100,
        "user_id": 200,
        "key": "example key",
        "value": "example value",
        "created": "2017-01-01 15:35:00"
    }
}

Global Setting's history list [/global_settings/{global_setting_id}/history{?limit,offset,order_by,order_dir,load_full_structure}]

Retrieve a Global Setting's History List [GET]

Some settings are allowed only for the users which owns the settings/global role.

  • Parameters

    • limit (number, optional) - Limit of the number of records returned
    • offset (number, optional) - Offset for the number of records returned
    • order_by (string, optional) - Ordered column name
    • order_dir (string, optional) - Ordering direction
    • load_full_structure (number, optional) - Full data structure return flag
  • Request

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "history_list": [
        {
            "id": null,
            "global_setting": {
                "id": 100,
                "user_id": 200,
                "key": "example key",
                "value": "example value",
                "created": "2017-01-01 15:35:00"
            }
        },
        {
            "id": "100",
            "global_setting": {
                "id": 100,
                "user_id": 200,
                "key": "example key",
                "value": "previous value",
                "created": "2017-01-01 13:35:00"
            }
        }
    ],
    "selection_settings": {
        "limit": 20,
        "offset": null,
        "order_by": "id",
        "order_dir": "ASC"
    }
}

Global Setting's history item [/global_settings/{global_setting_id}/history/{history_id}{?load_full_structure}]

Retrieve a Global Setting's History Item [GET]

Some settings are allowed only for the users which owns the settings/global role.

  • Request

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "history": {
        "id": "100",
        "global_setting": {
            "id": 100,
            "user_id": 200,
            "key": "example key",
            "value": "example value",
            "created": "2017-01-01 15:35:00"
        },
        "diff": {
            "key": {
                "from": "test",
                "to": "example key"
            }
        }
    }
}

Revert a Global Setting's History Item [PATCH]

Required feature: settings/global

  • Request

    • Headers

      X-Access-Token: 1234567890abcdef

  • Response 200 (application/json)

{
    "global_setting": {
        "id": 100,
        "user_id": 200,
        "key": "example key",
        "value": "example value",
        "created": "2017-01-01 15:35:00"
    }
}

On this page