# Get Scope Tree

GET /tree

#### Description

Retrieves the full scope tree, returning the hierarchical structure of scopes and their relationships within the organization.

Endpoint: POST /tree
Version: 1.0
Security: oauth2

## Request fields (application/json):

  - `onlyActive` (boolean)
    Whether or not to exclude archived scopes in the results
    Example: true

## Response 200 fields (application/json):

  - `scope` (object)
    Example: {"id":"cb1a06f4-8ed9-4614-a17b-f8671194687e","name":"Acme","owner":"402f37f8-6054-4138-be1f-9b22ec08a86b","description":"The Acme Corp scope","parentId":"b38f3039-eaa6-4d2a-948d-821a01c79185","pathIds":["6ff2fae7-02a8-4862-bf0c-61dbc0c33c23","cb1a06f4-8ed9-4614-a17b-f8671194687e"],"pathNames":["Acme-Parent","Acme"]}

  - `scope.id` (string)
    The unique identifier for the scope within the organization
    Example: "cb1a06f4-8ed9-4614-a17b-f8671194687e"

  - `scope.name` (string)
    Name of the scope
    Example: "Acme"

  - `scope.owner` (string)
    The unique identifier of the user who owns the scope
    Example: "402f37f8-6054-4138-be1f-9b22ec08a86b"

  - `scope.description` (string)
    Description of the scope
    Example: "The Acme Corp scope"

  - `scope.parentId` (string)
    The unique identifier for the scope's parent, or null for a top-level scope
    Example: "b38f3039-eaa6-4d2a-948d-821a01c79185"

  - `scope.pathIds` (array)
    The unique identifiers for the scope's parents, starting from the top-most scope
    Example: ["6ff2fae7-02a8-4862-bf0c-61dbc0c33c23","cb1a06f4-8ed9-4614-a17b-f8671194687e"]

  - `scope.pathNames` (array)
    Names of the scope's parents, starting from the top-most scope
    Example: ["Acme-Parent","Acme"]

  - `children` (array)
    Example: [{"id":"71f5fba2-bd08-4e7e-9e6c-05209956f22d","name":"Acme-Child","owner":"402f37f8-6054-4138-be1f-9b22ec08a86b","description":"A child scope of Acme","parentId":"cb1a06f4-8ed9-4614-a17b-f8671194687e","pathIds":["cb1a06f4-8ed9-4614-a17b-f8671194687e","71f5fba2-bd08-4e7e-9e6c-05209956f22d"],"pathNames":["Acme","Acme-Child"]}]

  - `children.id` (string)
    The unique identifier for the scope within the organization
    Example: "cb1a06f4-8ed9-4614-a17b-f8671194687e"

  - `children.name` (string)
    Name of the scope
    Example: "Acme"

  - `children.owner` (string)
    The unique identifier of the user who owns the scope
    Example: "402f37f8-6054-4138-be1f-9b22ec08a86b"

  - `children.description` (string)
    Description of the scope
    Example: "The Acme Corp scope"

  - `children.parentId` (string)
    The unique identifier for the scope's parent, or null for a top-level scope
    Example: "b38f3039-eaa6-4d2a-948d-821a01c79185"

  - `children.pathIds` (array)
    The unique identifiers for the scope's parents, starting from the top-most scope
    Example: ["6ff2fae7-02a8-4862-bf0c-61dbc0c33c23","cb1a06f4-8ed9-4614-a17b-f8671194687e"]

  - `children.pathNames` (array)
    Names of the scope's parents, starting from the top-most scope
    Example: ["Acme-Parent","Acme"]


