---
title: "Retrieve list of objects under specified folder"
method: GET
path: "/entities/by-folder/{folderId}"
tags: ["Folders"]
---

# Retrieve list of objects under specified folder

`GET /entities/by-folder/{folderId}`

Retrieve a list of objects under a specified folder, including child folders, segments, batch segments, predictive scoring models, funnels, Profile API tokens and Journeys.

## Path parameters

- `folderId` integer, required

## Query parameters

- `depth` integer, required
- `with_rule` boolean

## Response `200`

Returns a list of entities under the specified folder. The specified folder is also included.

- EntitiesGetByFolderJsonApiResponse
  - `data` union[], required
    - union
      - FolderJsonApiResource
        - `id` string, required
        - `type` 'folder-segment', required
        - `attributes` object, required
          - `audienceId` string, required — ID of the parent audience. For composable folders this carries the composable audience id; the complete-vs-composable discriminator lives on the parent audience entity, not on the folder.
          - `name` string, required
          - `description` string, nullable, required
          - `createdAt` string, date-time, required
          - `updatedAt` string, date-time, required
          - `enrichments` object, nullable
          - `rule` object, nullable
          - `permissions` FolderPermissions, required
            - `view` boolean
            - `edit` boolean
        - `relationships` object, required
          - `children` object
            - `data` object[]
              - …
          - `parentFolder` RelationshipsFolderNullableJsonApiResource
            - `data` object, nullable
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - BatchSegmentJsonApiResource
        - `id` string, required
        - `type` 'segment-batch', required
        - `attributes` object, required
          - `audienceId` string, required
          - `name` string, required
          - `description` string, nullable, required
          - `population` number, nullable, required
          - `numSyndications` integer
          - `rule` union, required
            - PartialV5RuleYamlV5IonRuleIonRule
              - …
            - object, nullable
          - `createdAt` string, date-time, required
          - `updatedAt` string, date-time, required
          - `countPopulation` boolean
          - `segmentInsightDashboardId` integer, nullable
          - `isEmptyRule` boolean
        - `relationships` object, required
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - RealtimeSegmentJsonApiResource
        - `id` string, required
        - `type` 'segment-realtime', required
        - `attributes` object, required
          - `audienceId` string, required
          - `name` string, required
          - `description` string, nullable, required
          - `population` number, nullable, required
          - `numSyndications` integer, nullable
          - `rule` union, required
            - PartialV5RuleYamlV5IonRuleIonRule
              - …
            - object, nullable
          - `createdAt` string, date-time, required
          - `updatedAt` string, date-time, required
          - `countPopulation` boolean
        - `relationships` object, required
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - ComposableSegmentJsonApiResource
        - `id` string, required
        - `type` 'composable-segment', required
        - `attributes` object, required
          - `composableAudienceId` string, required — ID of the composable audience this segment belongs to
          - `name` string, required — Name of the composable segment
          - `description` string, nullable, required — Description of the composable segment
          - `rule` union, required
            - PartialV5RuleYamlV5IonRuleIonRule
              - …
            - object, nullable
          - `isEmptyRule` boolean, required — Indicates whether the segment has an empty rule (no filtering criteria)
          - `population` number, nullable, required — Population count for the segment. Currently always null for composable segments as population tracking is not yet implemented
          - `numSyndications` integer, required — Number of activations (syndications) associated with this segment
          - `createdAt` string, date-time, required — Timestamp when the segment was created
          - `updatedAt` string, date-time, required — Timestamp when the segment was last updated
        - `relationships` object, required
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - FunnelJsonApiResource
        - `id` string, required
        - `type` 'funnel', required
        - `attributes` object, required
          - `audienceId` string, required
          - `name` string, required
          - `description` string, nullable, required
          - `population` number, nullable, required
          - `numSyndications` integer, required
          - `createdAt` string, date-time, required
          - `updatedAt` string, date-time, required
          - `countPopulation` boolean
          - `stages` FunnelStageJsonApiResource[]
            - `id` string
            - `segmentId` string
            - `name` string, required
            - `numSyndications` integer
        - `relationships` object, required
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - PredictiveSegmentJsonApiResource
        - `id` string, required
        - `type` 'predictive-segment', required
        - `attributes` PredictiveSegmentJsonApiResourceAttr, required
          - `audienceId` string
          - `baseSegmentId` string, nullable
          - `segmentId` string
          - `scoredSegmentId` string, nullable
          - `name` string
          - `description` string, nullable
          - `categoricalAsColumnNames` string[]
          - `categoricalArrayAsColumnNames` string[]
          - `quantitativeAsColumnNames` string[]
          - `accuracy` number, double, nullable — Accuracy for trained model evaluated on initial training.
          - `areaUnderRocCurve` number, double, nullable — Evaluation score for the model. See also https://en.wikipedia.org/wiki/Receiver_operating_characteristic#Area_under_the_curve
          - `gradeThresholds` number[] — Given the items [a, b, c], they must meet the condition `a >= b >= c`
          - `createdAt` string, date-time
          - `updatedAt` string, date-time
          - `modelUpdatedAt` string, date-time
        - `relationships` object, required
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - TokenJsonApiResource
        - `id` string, required
        - `type` 'token', required
        - `attributes` object, required
          - `audienceId` string
          - `name` string, required
          - `token` string, uuid — UUID of the token
          - `description` string
          - `keyColumn` string — A key column name to fetch the information of a customer.
          - `attributeColumns` string[], required — associated attribute column names.
          - `createdAt` string, date-time
          - `updatedAt` string, date-time
        - `relationships` object, required
          - `segments` RelationshipsSegmentJsonApiResource
            - `data` union[]
              - …
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - JourneyJsonApiResource
        - `id` string, required
        - `type` 'journey', required
        - `attributes` object, required
          - `audienceId` string, required
          - `name` string, required
          - `description` string, nullable, required
          - `state` 'draft' | 'simulation' | 'launched', required
          - `goal` JourneyCriteria, nullable, required
            - `name` string, required
            - `description` string
            - `segmentId` string, required
            - `target` JourneyJumpTarget
              - …
          - `createdAt` string, date-time, required
          - `updatedAt` string, date-time, required
          - `launchedAt` string, date-time, nullable, required
          - `journeyStages` JourneyStageJsonApiResource[], required
            - `id` string — Server-generated. Omit when creating a stage; supply to target an existing stage when updating.
            - `name` string, required
            - `description` string
            - `steps` JourneyStep, nullable
              - …
            - `rootStep` string
            - `entryCriteria` JourneyCriteria, nullable
              - …
            - `milestone` JourneyCriteria, nullable
              - …
            - `exitCriterias` JourneyCriteria[]
              - …
          - `paused` boolean, required
          - `pausedAt` string, date-time, nullable, required
          - `allowReentry` boolean, required
          - `reentryMode` 'no_reentry' | 'reentry_unless_goal_achieved' | 'reentry_always'
          - `journeyBundleId` string, nullable
          - `journeyBundleName` string, nullable
          - `versionNumber` integer
          - `journeyBundleDescription` string, nullable
          - `latestExecution` Execution
            - `workflowId` string, required
            - `workflowSessionId` string, required
            - `createdAt` string, date-time, required
            - `finishedAt` string, date-time, nullable, required
            - `status` 'success' | 'canceled' | 'error' | 'canceling' | 'blocked' | 'queued' | 'running', required
            - `workflowAttemptId` string, required
        - `relationships` object, required
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - ActivationTemplateJsonApiResource
        - `id` string
        - `type` 'activation-template'
        - `attributes` object
          - `audienceId` string, required
          - `name` string, required
          - `description` string, nullable, required
          - `kind` integer — 0: batch, 1: batch_journey
          - `allColumns` boolean — activation all column flag ('true' means that you use all attribute data)
          - `columns` union
            - object[] — Syndication column detail. Basic syntax is `{"column": "alias_name", "source": {...}}`. `source` accepts various definitions. See ColumnExpression/StringExpression for details. example value is using ColumnExpression without `function` property.
              - …
            - NullValue, nullable
              - …
          - `scheduleType` 'cron' | 'daily' | 'hourly' | 'minutes_interval' | 'monthly' | 'none' | 'weekly' — Deprecated. Old parameter for setting schedule type. See/Use RepeatUnit instead.
          - `scheduleOption` string, nullable
          - `timezone` string, nullable
          - `startAt` string, ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$, nullable — cdp-api will fill some value for old syndications with ScheduleType is not NoneType. '%Y-%M-%DT%h:%m:%s' is expected.
          - `endOn` string, date, nullable
          - `repeatUnit` 'none' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'once' — Setting an activation repetition cycle such as "day" or "week".
          - `repeatFrequency` integer — Setting an activation repeat frequency. Currently, it is set only when the repeat unit is "minute". If the repeat unit is "minute", the interval is set in minutes.
          - `repeatSubFrequency` integer[] — Parameter for more detailed frequency settings. Values are array of integers. Currently, this parameter is only valid for repeat unit "week". For multiple days of the week, each value should be 1 to 7. 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday
          - `connectionId` string, nullable
          - `connectorConfig` object, nullable
          - `notifyOn` string[]
          - `emailRecipients` integer[]
          - `createdAt` string, date-time, required
          - `updatedAt` string, date-time, required
          - `state` 'draft' | 'published'
          - `nestedWorkflowProjectName` string, nullable
          - `nestedWorkflowName` string, nullable
          - `activationActionsEnabled` boolean
          - `lockEnabled` boolean
          - `runAfterJourneyRefresh` boolean, nullable — If true, this activation step will be executed immediately after the journey is refreshed. Only available for kind of journey.
          - `syndicationBehavior` ActivationTemplateSyndicationBehaviorProperties
            - `columns` object[] — Syndication column detail. Basic syntax is `{"column": "alias_name", "source": {...}}`. `source` accepts various definitions. See ColumnExpression/StringExpression for details. example value is using ColumnExpression without `function` property.
              - …
            - `behaviorTableName` string — Behavior table name which contains behavior records
            - `joinRow` integer, nullable — How much rows would be joined (value is N for Top-N join)
            - `joinStrategy` 'All' | 'First' | 'Last' | 'Top-N'
            - `formatting` 'rows' | 'cols'
            - `orderBy` object[]
              - …
          - `fieldProperties` ActivationTemplateFieldProperties — activation template field properties
            - `locked` ActivationTemplateFieldPropertiesLocked, required — activation template field properties locked
              - …
          - `activationCount` integer — Number of related activations
          - `journeyCount` integer — Number of related journeys
          - `available` boolean — This template is available or not (It contains PBP PII BLOCKED columns or not)
        - `relationships` object
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
      - PartialRealtimeJourneyYamlRealtimeJourneyByFolderResource
        - `id` string
        - `type` 'realtime-journey'
        - `attributes` object
          - `name` string, required
          - `description` string, required
          - `state` 'draft' | 'launched', required
          - `paused` boolean, required
          - `realtimeJourneyStages` object[], required
            - `id` string
            - `name` string, required
        - `relationships` object
          - `parentFolder` RelationshipsFolderJsonApiResource, required
            - `data` object
              - …
      - PartialRealtimeJourneyYamlRealtimePersonalizationByFolderResource
        - `id` string
        - `type` 'realtime-personalization'
        - `attributes` object
          - `name` string, required
          - `description` string, required
          - `sections` object[], required
            - `id` string
            - `name` string, required
        - `relationships` object
          - `parentFolder` RelationshipsFolderJsonApiResource, required
            - `data` object
              - …
      - MlSolutionJsonApiResource
        - `id` string, required
        - `type` 'mlSolution', required
        - `attributes` union, required
          - object
            - `name` string, required
            - `audienceId` string, required
            - `description` string, nullable, required
            - `targetColumn` string, required — Target column name for the prediction
            - `state` 'draft' | 'published', required
            - `solutionType` 'rfm', required
            - `behaviorName` string, required — Behavior name for input data
            - `timestampColumn` string — Timestamp column name for input data. If not specified, the column will be generated by time
            - `minClusters` integer, nullable
            - `maxClusters` integer, nullable
            - `numClusters` integer, nullable
            - `createdAt` string, date-time, required
            - `updatedAt` string, date-time, required
            - `lastPublishedAt` string, date-time, nullable, required — Last published date time. If null, it means the solution is not published yet.
          - object
            - `name` string, required
            - `audienceId` string, required
            - `description` string, nullable, required
            - `targetColumn` string, required — Target column name for the prediction
            - `state` 'draft' | 'published', required
            - `solutionType` 'cltv', required
            - `behaviorName` string, required — Behavior name for input data
            - `timestampColumn` string — Timestamp column name for input data. If not specified, the column will be generated by time
            - `discountRate` number, float, nullable
            - `segmentTimeHorizon` string, nullable — Time horizon for CLTV segments in 1m/3m/6m/12m/24m
            - `createdAt` string, date-time, required
            - `updatedAt` string, date-time, required
            - `lastPublishedAt` string, date-time, nullable, required — Last published date time. If null, it means the solution is not published yet.
        - `relationships` object, required
          - `parentFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `outputFolder` RelationshipsFolderJsonApiResource
            - `data` object
              - …
          - `createdBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
          - `updatedBy` RelationshipsUserJsonApiResource
            - `data` object, nullable
              - …
  - `included` UserJsonApiResource[], required
    - `id` string, required
    - `type` 'user', required
    - `attributes` object, required
      - `tdUserId` string, required
      - `name` string, required

---

[API](https://skmtc.net/treasure/apis/cdp-api.md) · [All operations](https://skmtc.net/treasure/apis/cdp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/cdp-api/revisions/24caa8eb809b/schema)
