-
Notifications
You must be signed in to change notification settings - Fork 88
RESTful API For Product
Echo edited this page Mar 9, 2019
·
7 revisions
Request
GET /saltshaker/api/v1.0/product/p-ac5c74c821d611e894b0000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": "p-ac5c74c821d611e894b0000c298454d8",
"name": "test",
"description": "test",
"salt_master_url": "http://10.10.10.10:8000",
"salt_master_user": "salt",
"salt_master_password": "salt"
},
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/product
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": [
{
"id": "p-b4aaef1e322611e8ab56000c298454d8",
"name": "test",
"email": "",
"project": "test",
"password": "",
"gitlab_url": "http://test.com.cn",
"api_version": "3",
"description": "test",
"oauth_token": "",
"http_password": "",
"http_username": "",
"private_token": "oKi5YVj1Ji6ifffvsy_H",
"salt_master_url": "http://127.0.0.1:8000",
"salt_master_user": "saltapi",
"salt_master_password": "saltapi"
},
{
"id": "p-1dead8ee322811e8ab56000c298454d8",
"name": "fffff",
"email": "",
"project": "",
"password": "",
"gitlab_url": "",
"api_version": "",
"description": "fff",
"oauth_token": "",
"http_password": "",
"http_username": "",
"private_token": "",
"salt_master_url": "http://10.10.10.10:8000",
"salt_master_user": "saltapi",
"salt_master_password": "saltshaker"
}
]
"status": true,
"message": ""
}
Request
POST /saltshaker/api/v1.0/product
POST Body
{
"name": "test",
"description": "test",
"salt_master_url": "http://127.0.0.1:8000",
"salt_master_user": "saltapi",
"salt_master_password": "saltapi",
"gitlab_url": "http://test.com.cn",
"private_token": "oKi5YVj5rr1Ji6ivsy_H",
"http_password": "",
"oauth_token": "",
"email": "",
"password": "",
"http_username": "",
"http_password": "",
"project":"test",
"api_version":3
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
DELETE /saltshaker/api/v1.0/product/p-72f9c9c82b2311e886cb000c298454d8
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
PUT /saltshaker/api/v1.0/product/p-72f9c9c82b2311e886cb000c298454d8
PUT Body
{
"name": "test",
"description": "test",
"salt_master_url": "http://127.0.0.1:8000",
"salt_master_user": "saltapi",
"salt_master_password": "saltapi",
"gitlab_url": "http://test.com.cn",
"private_token": "oKi5YVj5rr1Ji6ivsy_H",
"http_password": "",
"oauth_token": "",
"email": "",
"password": "",
"http_username": "",
"http_password": "",
"project":"test",
"api_version":3
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": true,
"message": ""
}
Request
GET /saltshaker/api/v1.0/product/check/{salt_api|gitlab_api}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {},
"status": true,
"message": ""
}