-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For GitLab
Echo edited this page Apr 12, 2018
·
5 revisions
Request
GET /saltshaker/api/v1.0/gitlab/branch?product_id=p-b4aaef1e322611e8ab56000c298454d8&project_type=state_project
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"branchs": {
"branch": [
"dev",
"master"
]
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/gitlab/file?product_id=p-b4aaef1e322611e8ab56000c298454d8&path=vip&branch=master&project_type=state_project
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"files": {
"file": [
{
"name": "migrations",
"type": "tree"
},
{
"name": "__init__.py",
"type": "blob"
},
{
"name": "admin.py",
"type": "blob"
},
{
"name": "models.py",
"type": "blob"
},
{
"name": "tests.py",
"type": "blob"
},
{
"name": "urls.py",
"type": "blob"
},
{
"name": "views.py",
"type": "blob"
}
]
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/gitlab/content?product_id=p-b4aaef1e322611e8ab56000c298454d8&path=common/views.py&branch=master&project_type=pillar_project
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": "# -*- coding:utf-8 -*-\nfrom django.shortcuts import render\n",
"status": true,
"message": ""
}