Skip to content

flask based RESTful API wrapper around project linchpin

License

Notifications You must be signed in to change notification settings

mansikulkarni96/restylinchpin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

restylinchpin

flask based RESTful API wrapper built around project linchpin

Table Of Contents

Overview

HTTP RESTful API.

Requests pass data via JSON encoded bodies except for GET requests where data will be passed via URL and excecute them on linchpin Command Line Interface to provision workspaces and return a JSON response to the user.

A user can currently make use of following supported features:

  • Create Workspaces : Users can create a new worskpace locally.
  • List Workspaces : Users can list all existing workspace within a config directory.
  • Delete Workspaces : Users can delete workspace by name.
  • Fetch Workspaces from a remote URL : Users can fetch remote workspaces from git or web directory locally.
  • Provision workspaces : Users can provision workspaces across multiple cloud providers.
  • Destroy Workspaces : Users can teardown the resources provisioned after using them.

User Management

api_key based authentication for user operations

creating users
endpoint:
/users
methodtype: POST
request:
{
"username":"username",
"password":"password",
"email":"email"
}
response:
{
username=username,
admin=boolean indicating created as admin user or not
email=email,
status="username created successfully"
}

Login
endpoint:
/login
User has to send a basic authentication header with username and password generated above, an autogenerated (hashed) api_key will be returned to the user for resource access.
Response:
{
"api_key":"api_key value"
}
This api_key will be verified by passing a key:api_key and value: api_key value obtained above,in the request headers during each of the API calls including user and workspace actions to grant resource access by determining the access rights of the current user. Admin users can access all resources whereas other resources are only accessible to the owner of that resource.

Upload/create credentials
POST /users/username/credentials
RequestBody:
{ file : text or attached file
file_name : name,
encrypted: boolean,
vault_pass: ansible vault password
}
return : response with successful credential upload status

List credentials
GET /users/username/credentials/file_name
return : response with encrypted credentials from file

Delete credentials
DELETE /users/username/credentials/file-name
return : response with successful delete status

Update credentials
PUT /users/username/credentials/file_name
RequestBody: { file : updated text or updated attached file
encrypted: boolean,
vault_pass: ansible vault password
}
return : response with successful credential update status

Linchpin Project

LinchPin is a simple cloud orchestration tool. Its intended purpose is managing cloud resources across multiple infrastructures. These resources can be provisioned, decommissioned, and configured all using declarative data and a simple command-line interface.

Refer to Linchpin Repository for detailed information: https://github.com/CentOS-PaaS-SIG/linchpin

Deployment

restylinchpin will be deployed and available on Openshift.
Start using restylicnhpin with pypi: pip install restylinchpin

Documenation (In progress)

Swagger
ReadTheDocs

About

flask based RESTful API wrapper around project linchpin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Dockerfile 1.0%