Giter Site home page Giter Site logo

hrudb-docs's Introduction

HruDB

Адрес

https://hrudb.herokuapp.com/

Документация

# Добавление/перезаписывание записи по ключу:
#   <key>   - строка в формате [a-z_-0-9]+
#   <value> - строка длинной не более 1048576 символов
#   <token> - заранее полученный авторизационный токен
PUT /storage/<key> <value> HTTP/1.1
Authorization: <token>
Content-Type: plain/text
→ 201 Сreated или 400 Bad Request

# По одному ключу можно положить несколько значений методом POST
POST /storage/<key> <value> HTTP/1.1
Authorization: <token>
Content-Type: plain/text
→ 204 No content или 400 Bad Request

# Получение последней записи по ключу
GET /storage/<key> HTTP/1.1
Authorization: <token>
→ 200 OK <value> или 400 Bad Request, или 404 Not Found

# Получение всех записей по ключу
#  from     - моложе указанного таймстемпа (new Date().getTime())
#  to       - старше указанного таймстемпа (new Date().getTime())
#  sort     – упорядоченные по дате (date, по умолчанию) или по алфавиту (alph)
#  limit    – в указанном количестве (по умолчанию, Infinity)
#  offset   – с отступ от начала выборки (по умолчанию, 0)
GET /storage/<key>/all?[from][to][sort][limit][offset] HTTP/1.1
Authorization: <token>
→ 200 OK [<value1>, <value2>, ...] или 200 OK [], или 400 Bad Request

# Удаление записи/записей по ключу
DELETE /storage/<key> HTTP/1.1
Authorization: <token>
→ 204 No content

# Ошибки приходят в JSON формате
# {
#     "error": {
#         "statusCode": 400,
#         "message": "Bad request"
#     }
# }

hrudb-docs's People

Contributors

gogoleff avatar griboedoff avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

griboedoff

hrudb-docs's Issues

Codestyle

Макс, Данил - дедлайн 12:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.