Find asset by exact name

POST /api/meta/search/indexsearch#findAssetByExactName

Search for assets with an exact name.

Body Required

Query to run the search.

  • Replace the __typeName.keyword with the name of the asset type
  • Replace the name.keyword with the exact name of the asset to find

This example specifically searches for a glossary term with the exact name of Customer Acquisition Cost.

In addition to the default set of properties returned in a search, this request will also retrieve:

  • the term's glossary (anchor)
  • the user-provided description of the term (userDescription)
  • the term's certificate status (certificateStatus)
  • any announcement details on the term (announcementType, announcementTitle, announcementMessage)
  • the term's owners (ownerUsers, ownerGroups)

For the related object (the term's glossary) it will also retrieve the glossary's:

  • certificate status
  • name
  • description
  • qualified name
  • dsl object Required

    Search query for Atlan. This uses the Elastic Query DSL, which will not be fully described here due to its complexity.

  • attributes array[string] | null

    List of attribute names to include on each result. These attributes should exist on the assets being searched.

  • relationAttributes array[string] | null

    List of attribute names to include on each relationship included in the results. These attributes should exist on at least one of the relationships that could be returned on one of the assets in the results.

Responses

  • 200 object

    Assets that exactly match the specified parameters. In the case of this example, only glossary terms that are in an active state with a name that exactly matches Customer Acquisition Cost.

    • Type of query.

      Value is INDEX.

    • Details of the query that was run. These can be used to re-run precisely the same query for paging.

      • attributes array[string]

        List of attribute names requested to be included on each result.

      • relationAttributes array[string]

        List of attribute names requested to be included on each relationship included in the results.

      • Default value is false.

      • Default value is false.

      • Default value is false.

      • query string

        Full DSL query that was received to produce these results, but encoded as a string rather than a JSON object.

    • entities array[object]

      Details of a single result from a search.

      • typeName string

        Name of the type definition that defines this instance.

      • attributes object | null

        Attributes that can exist across all assets in Atlan.

        • Unique name for this asset. This is typically a concatenation of the asset's name onto its parent's qualifiedName.

        • name string

          Human-readable name of the asset.

      • classifications array[object] | null

        Instance of a classification in Atlan, with its detailed information.

        • typeName string

          Name of the classification. Note that this is the static-hashed unique name of the classification, not the human-readable displayName.

        • Unique identifier of the entity to which this classification is attached.

        • propagate boolean | null

          Whether to propagate this classification to other entities related to the entity to which the classification is attached.

        • Whether to remove this classification from other entities to which it has been propagated when the classification is removed from this entity.

        • entityStatus string | null

          Status of the entity to which this classification is attached.

          Values are ACTIVE or DELETED.

      • displayText string | null

        Human-readable name of the entity.

      • guid string

        Unique identifier of the entity instance.

      • isIncomplete boolean | null

        Default value is false.

      • createdBy string | null

        Username of the user who created the object.

      • updatedBy string | null

        Username of the user who last updated the object.

      • createTime integer | null

        Time (epoch) at which this object was created, in milliseconds.

      • updateTime integer | null

        Time (epoch) at which this object was last updated, in milliseconds.

      • version integer | null

        Version of this object.

      • classificationNames array[string] | null

        List of classifications for this entity. Note that these are the internal hashed names used in Atlan, not the displayText of the classification.

      • labels array[string] | null

        Internal use only.

      • status string

        Status of the entity, either ACTIVE or DELETED.

        Values are ACTIVE or DELETED.

      • meaningNames array[string] Deprecated

        Unused.

      • meanings array[object] Deprecated

        Unused.

    • Approximate count of the total number of results.

POST /api/meta/search/indexsearch#findAssetByExactName
curl \
 -X POST https://tenant.atlan.com/api/meta/search/indexsearch#findAssetByExactName \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"dsl":{"from":0,"size":20,"query":{"bool":{"must":[{"match":{"__state":"ACTIVE"}},{"match":{"__typeName.keyword":"AtlasGlossaryTerm"}},{"match":{"name.keyword":"Customer Acquisition Cost"}}]}}},"attributes":["anchor","userDescription","certificateStatus","announcementMessage","announcementTitle","announcementType","ownerUsers","ownerGroups"],"relationAttributes":["certificateStatus","name","description","qualifiedName"]}'
Request example
{
  "dsl": {
    "from": 0,
    "size": 20,
    "query": {
      "bool": {
        "must": [
          {
            "match": {
              "__state": "ACTIVE"
            }
          },
          {
            "match": {
              "__typeName.keyword": "AtlasGlossaryTerm"
            }
          },
          {
            "match": {
              "name.keyword": "Customer Acquisition Cost"
            }
          }
        ]
      }
    }
  },
  "attributes": [
    "anchor",
    "userDescription",
    "certificateStatus",
    "announcementMessage",
    "announcementTitle",
    "announcementType",
    "ownerUsers",
    "ownerGroups"
  ],
  "relationAttributes": [
    "certificateStatus",
    "name",
    "description",
    "qualifiedName"
  ]
}
Response example (200)
{
  "searchParameters": {
    "attributes": [
      "anchor",
      "userDescription",
      "certificateStatus",
      "announcementMessage",
      "announcementTitle",
      "announcementType",
      "ownerUsers",
      "ownerGroups"
    ],
    "relationAttributes": [
      "certificateStatus",
      "name",
      "description",
      "qualifiedName"
    ],
    "query": "{\"from\":0,\"size\":20,\"query\":{\"bool\":{\"must\":[{\"match\": {\"__state\":\"ACTIVE\"}},{\"match\":{\"__typeName.keyword\": \"AtlasGlossaryTerm\"}},{\"match\":{\"name.keyword\": \"Customer Acquisition Cost\"}}]}}}"
  },
  "entities": [
    {
      "typeName": "AtlasGlossaryTerm",
      "attributes": {
        "certificateStatus": "VERIFIED",
        "ownerGroups": [],
        "userDescription": "The average amount spent in order to acquire a customer. CAC is calculated by dividing the total amount spent on acquisition activities by the total number of customers acquired during a certain time period. The acquisition activity costs cover various efforts including business development and marketing, as well as salaries, external consultancy fees, and technology costs.",
        "qualifiedName": "qIJpoOZHEQjIv460a4DTy@vdLN8ETB3KiDLTzoDcT6j",
        "anchor": {
          "guid": "97eb9009-f355-4700-9bfa-0d202051d9e2",
          "typeName": "AtlasGlossary",
          "attributes": {
            "certificateStatus": "VERIFIED",
            "name": "Metrics"
          },
          "uniqueAttributes": {
            "qualifiedName": "vdLN8ETB3KiDLTzoDcT6j"
          }
        },
        "name": "Customer Acquisition Cost",
        "announcementTitle": "Calculation moved to complex method from Jan 2022 onwards",
        "announcementMessage": "Please refer to the readme for detailed differences between the calculation methods.",
        "ownerUsers": [
          "jdoe"
        ]
      },
      "guid": "af6a32d4-936b-4a59-9917-7082c56ba443",
      "status": "ACTIVE",
      "displayText": "Customer Acquisition Cost",
      "classificationNames": [
        "J5q2QzErHG4unHTA0C5GE0"
      ],
      "classifications": [
        {
          "typeName": "J5q2QzErHG4unHTA0C5GE0",
          "entityGuid": "af6a32d4-936b-4a59-9917-7082c56ba443",
          "entityStatus": "ACTIVE",
          "propagate": true,
          "removePropagationsOnEntityDelete": true
        }
      ],
      "meaningNames": [],
      "meanings": [],
      "isIncomplete": false,
      "labels": [],
      "createdBy": "jsmith",
      "updatedBy": "jdoe",
      "createTime": 1646914776550,
      "updateTime": 1651168541536
    }
  ],
  "approximateCount": 1
}