Skip to content

Latest commit

 

History

History
182 lines (93 loc) · 2.11 KB

docs.md

File metadata and controls

182 lines (93 loc) · 2.11 KB

API Brief services and ports

Endpoint /login/

  • Method:

    POST

  • URL Params

    Required:

    login=[string]

  • Data Params

  • Success Response:

    • Code: 200
      Token: {token}
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: { error : "Bad login" }

Endpoint /logs/

  • Method:

    GET

  • URL Params

  • Data Params

    Required:

    token=[string]

  • Success Response:

    • Code: 200
      Token: [{log1],[log2],[log3]]
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: "Bad token"

Endpoint /log/<id_log>/

  • Method:

    GET

  • URL Params

  • Data Params

    Required:

    token=[string]

  • Success Response:

    • Code: 200
      Log: {log}
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: "Bad token"

Endpoint /fill/

  • Method:

    POST

  • URL Params

  • Data Params

    Required:

    token=[string] log_id=[string] service_and_receiver=[string]

  • Success Response:

    • Code: 200, 400
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: "Bad token|Bad log ID"

Endpoint /autolog/

  • Method:

    GET

  • URL Params

  • Data Params

    Required:

    token=[string]

  • Success Response:

    • Code: 200
      Log_id: {log_id} Log: {log}
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: "Bad token|Bad log ID"

  • Method:

    POST

  • URL Params

  • Data Params

    Required:

    token=[string] log_id=[int] service_name=[string]

  • Success Response:

    • Code: 201
      GOOD
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: "Bad token|Bad log ID"

    • Code: 401 UNAUTHORIZED
      Content: "TRY AGAIN|BAD"