Skip to content

Latest commit

 

History

History
228 lines (174 loc) · 2.68 KB

BLIH.md

File metadata and controls

228 lines (174 loc) · 2.68 KB

Blueprint BLIH

Route : https://api.epiteks.xyz/blih/

General

GET /

Check if API is avaiable

Response :

{
    "status":true/false
}

GET /test

Check if credentials are rights

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

{
    "status":true/false
}

Repository

GET /repositories

Get repositories list

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

[
    "project",
    ...
]

POST /repositories

Create new repository

Parameters :

  • "login":"login_x"
  • "password":"password"

Body :

{
    "name": "Project",
    "description": "OPTIONAL"
}

Response :

{
    "message": "Repository Project created"
}

GET /repositories/repo

Get repository informations

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

{
    "uuid": "...",
    "url": "https://blih.epitech.eu/repositories/Project",
    "creation_time": "123456789",
    "name": "Project",
    "public": "False",
    "description": "None"
}

DELETE /repositories/repo

Delete repository

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

{
    "message": "Repository deleted"
}

GET /repositories/repo/acls

Get repository ACLs

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

[
    {
        "login": "login_y",
        "read": true,
        "write": true,
        "admin": false
    },
    ...
]

GET /repositories/_repo/acls/user

Get repository ACLs for user

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

{
    "login": "login_y",
    "read": true,
    "write": true,
    "admin": false
}

POST /repositories/repo/acls/user

Set repository ACLs for user

Parameters :

  • "login":"login_x"
  • "password":"password"

Body :

{
    "read": true/false,
    "write": true/false,
    "admin": true/false
}

Response :

{
    "message": "ACL correctly applied"
}

SSHKeys

GET /sshkeys

Get sshkeys list

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

[
    {
        "name": "login_x",
        "key": "..."
    },
    ...
]

POST /sshkeys

Add sshkey

Parameters :

  • "login":"login_x"
  • "password":"password"

Body :

{
    "key": "..."
}

Response :

{
    "message": "sshkey uploaded"
}

DELETE /sshkeys/key

Delete sshkey

Parameters :

  • "login":"login_x"
  • "password":"password"

Response :

{
    "message": "sshkey deleted"
}