# Get all directories

- Operation ID: `getTagDirectories`
- HTTP method: `GET`
- Path: `/tags-collector/directories`
- [Human-readable API reference](https://hub.synerise.com/api-reference/data-management#tag/Asset-tags/operation/getTagDirectories)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /tags-collector/directories:
    get:
      tags:
        - Asset tags
      summary: Get all directories
      description: |
        Gets all tag directories from the Workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `TAGS_COLLECTOR_DIRECTORY_READ`

        **User role permission required:** `assets_tags: read`
      operationId: getTagDirectories
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  description: Information about the directory where the tag is assigned. Can be `null`.
                  properties:
                    createdAt:
                      type: string
                      format: date-time
                      description: Creation time
                    hash:
                      type: string
                      description: HashID of the directory
                    name:
                      type: string
                      description: Name of the directory
                    params:
                      type: object
                      description: Free-form parameters
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                    type:
                      type: object
                      description: Details of the directory type
                      properties:
                        createdAt:
                          type: string
                          format: date-time
                          description: Creation time
                        hash:
                          type: string
                          description: HashID of the directory type
                        name:
                          type: string
                          description: Name of the directory type
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Asset-tags/operation/getTagDirectories
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/tags-collector/directories
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            conn.request("GET", "/tags-collector/directories")

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/tags-collector/directories");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/tags-collector/directories",
              "headers": {}
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/tags-collector/directories');
            $request->setMethod(HTTP_METH_GET);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/tags-collector/directories")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Asset tags
```
