Segment

Segment Fetch

Fetch a segment by id or slug

get/api/segment/{id}

Request

  • Base URL
    https://api.lytics.io
  • URL
    https://api.lytics.io/api/segment/{id}
  • Auth
    API key in header Authorization

Path parameters

idstring required

id, or slug of a segment, part of url path

Query parameters

account_idstring

Your Lytics account ID.

Response

OK

Example response

{
  "data": {
    "id": "7a7f76ff97ad0e3e96c162f74aee8f8f",
    "account_id": "4f7b525bdba058fc096757a6",
    "author_id": "4f7b525bdba058fc096757a6",
    "kind": "segment",
    "segment_ql": "FILTER AND ( visits > 5, last_visit >= \"2015-04-01 00:00:00Z\", last_visit <  \"2015-04-02 00:00:00Z\")",
    "created": "2014-08-04T21:18:20.124Z",
    "updated": "2014-08-04T21:18:20.124Z",
    "description": "Casual users have been active in the last 90 days and show no extreme behavioral patterns.",
    "name": "Recent Visits",
    "slug_name": "recent_visits",
    "tags": [
      "email_trigger"
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.