title: Is it possible to fetch Partition Key of a collection in CosmosDB using their SDK?
body: <p>I am using RESTfull HTTP request to fetch the Partition Key of a collection. I am doing:</p>
  
  <pre><code>        response = client.GetStringAsync(new Uri(baseUri, resourceLink)).Result;
          var data3 = (JObject)JsonConvert.DeserializeObject(response);
          if (data3["partitionKey"] != null)
          {
              string partitionKey = data3["partitionKey"]["paths"][0].ToString();
              string PartitionKey = partitionKey.Substring(1);
              return PartitionKey;
          }
  </code></pre>
  
  <p>Is there a more efficient way to do this? Do their SDK's have a direct way to fetch the Partition Key?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>My response on fetching partition key range is:</p>
  
  <p><code>item={
    "_rid": "lIB0ALrgyAACAAAAAAAAUA==",
    "id": "0",
    "_etag": "\"00000000-0000-0000-0318-18b49de501d4\"",
    "minInclusive": "",
    "maxExclusive": "FF",
    "ridPrefix": 0,
    "_self": "dbs/lIB0AA==/colls/lIB0ALrgyAA=/pkranges/lIB0ALrgyAACAAAAAAAAUA==/",
    "throughputFraction": 1.0,
    "status": "online",
    "parents": [],
    "_ts": 1528895512
  }</code></p>
  
  <p>How does this take me close to finding out what the partition key is?</p>