Skip to content
Nick Kallen edited this page Aug 22, 2013 · 2 revisions

Blobs

Get a blob

Since blobs can be any arbitrary binary data, the input and responses for the blob API is returned encoded. Currently all data is base64 encoded, but for future compatibility, please use the encoding field when decoding data. Note that the media type application/vnd.gitdb.raw is also supported for blobs.

GET /repos/:repo/blobs/:sha
Response
{
  "name": "README.md",
  "path": "README.md",
  "type": "blob",
  "filemode": 33188,
  "commit_relative_url": "/repos/gitdb/commits/38f8d228f43f53bc42a77d5821aece4f09e66ca7/tree/README.md",
  "url": "/repos/gitdb/blobs/5c5ac45d9513562cc96e8e7021a8064009451ed8",
  "blob": {
    "filemode": 33188,
    "encoding": "base64",
    "size": 1276,
    "content": "KipHaXREQioqI...",
    "sha": "5c5ac45d9513562cc96e8e7021a8064009451ed8",
    "url": "/repos/gitdb/blobs/5c5ac45d9513562cc96e8e7021a8064009451ed8"
  },
  "commit": {
    "sha": "38f8d228f43f53bc42a77d5821aece4f09e66ca7",
    "message": "Better web navigation\n",
    "author": {
      "date": "2013-08-20T15:54:42.000Z",
      "name": "Nick Kallen",
      "email": "socialmediamaster9000@gmail.com"
    },
    "committer": {
      "date": "2013-08-20T15:54:42.000Z",
      "name": "Nick Kallen",
      "email": "socialmediamaster9000@gmail.com"
    },
    "tree": {
      "sha": "93fb384f1f8bfac23a2fbef7f4c40a345a0fd312"
    },
    "parents": [
      {
        "sha": "a3ba5a6e314ed63571e01677463164cb7a8a1e9b",
        "url": "/repos/gitdb/commits/a3ba5a6e314ed63571e01677463164cb7a8a1e9b"
      }
    ],
    "url": "/repos/gitdb/commits/38f8d228f43f53bc42a77d5821aece4f09e66ca7",
    "tree_url": "/repos/gitdb/commits/38f8d228f43f53bc42a77d5821aece4f09e66ca7/tree/",
    "repo": {
      "url": "/repos/gitdb",
      "refs_url": "/repos/gitdb/refs"
    }
  },
  "repo": {
    "url": "/repos/gitdb",
    "refs_url": "/repos/gitdb/refs"
  }
}
Clone this wiki locally