# Get single item by unique key

- Operation ID: `getItemDetailByKey`
- HTTP method: `GET`
- Path: `/catalogs/itemDetail`
- [Human-readable API reference](https://hub.synerise.com/api-reference/data-management#tag/Catalogs/operation/getItemDetailByKey)

## 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:
  /catalogs/itemDetail:
    get:
      tags:
        - Catalogs
      summary: Get single item by unique key
      description: |
        Retrieve a single item from a catalog by using the value of the unique identifier (key) in the catalog. If you want to retrieve an item by its ID in the Synerise database, use [/bags/{catalogId}/items/{itemId}](#operation/getItem).

        ---

        **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=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `ITEMS_COLLECTOR_CATALOG_READ`

        **User role permission required:** `assets_catalogs: read`
      operationId: getItemDetailByKey
      security:
        - JWT: []
      parameters:
        - name: catalogName
          in: query
          required: true
          description: Name of the catalog
          schema:
            type: string
        - name: key
          in: query
          required: true
          description: |
            Value of the unique identifier of the item in the catalog. When you retrieve an item using [this endpoint](#operation/getItemsByBag), the identifier is in the `itemKey` field.

            ```
            {
                "creationDate": "2020-09-30T11:31:16.314Z",
                "id": 73753,
                "itemKey": "uniqueValue", // this is the value of the key
                "lastModified": null,
                "value": "{\"exampleKey\":\"uniqueValue\",\"exampleKey2\":\"exampleValue\"}",
                "bag": {
                    "author": "authorName",
                    "creationDate": "2020-09-30T10:52:31.264Z",
                    "id": 1053,
                    "lastModified": "2020-09-30T11:41:11.808Z",
                    "name": "sampleCatalog"
                }
            },
            ```
          schema:
            type: string
      responses:
        "200":
          description: A single item
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: The column values from this item's catalog row.
                    properties:
                      itemId:
                        type: string
                        description: Unique ID, equal to the `itemKey` used in the request to this endpoint.
                    additionalProperties:
                      description: Column values
                  metaData:
                    type: object
                    description: This object holds the metadata of the response.
                    properties:
                      totalCount:
                        type: integer
                        description: The total number of matching values (key-value pairs; array items; objects) in the database
                      requestTime:
                        type: string
                        description: The processing time of the request
                        example: 0.11 [s]
        "401":
          description: "Unauthorized: token missing/expired/invalid; invalid API key; etc."
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: Status code
                  error:
                    type: string
                    description: Error summary
                  message:
                    type: string
                    description: Error message
                  timestamp:
                    type: string
                    description: Time when the error occurred
        "403":
          description: "Forbidden: insufficient permissions; wrong consumer scope"
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: Status code
                  error:
                    type: string
                    description: Error summary
                  message:
                    type: string
                    description: Error message
                  timestamp:
                    type: string
                    description: Time when the error occurred
        "404":
          description: Entity not found
          content:
            text/plain:
              schema:
                type: string
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Catalogs/operation/getItemDetailByKey
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE", headers=headers)

            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/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            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": "/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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/catalogs/itemDetail');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'catalogName' => 'SOME_STRING_VALUE',
              'key' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            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/catalogs/itemDetail?catalogName=SOME_STRING_VALUE&key=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .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: Catalogs
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
````
