ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

/wiki/spaces/EN/pages/17591304241 (remove the link block before publishing the document)

Properties of a REST API method document

Document type

Метод REST API

Document title

[Document status] REST API [Назва методу] [ID методу]

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD)

Date of update

ХХ.ХХ.ХХХХ (дата зміни версії)

Method API ID

API-005-009-002-0181

Microservices (namespace)

IL

Component

Legal Entities

Component ID

COM-005-009

Link на API-специфікацію

Resource

{{host}}/legal_entities

Scope

legal_entity:read

Protocol type

REST

Request type

GET

Sync/Async

Sync

Public/Private

Private

Purpose

This service should be used for internal services/processes. Used without access_token

Logic

c3d8714d-d20d-451a-9b11-6a7e3dc33c92.png

Configuration parameters

Dictionaries

Input parameters

Input parameter

Mandatory

Type

Description

Example

1

id

 

String

Request

d290f1ee-6c54-4b01-90e6-d701748f0851

2

Request structure

See on API-specification

 Example
{
  "password": "qwerty"
}

Headers

Headers

Request data validation

Authorize

Used without access_token

If client knows the employee_request_ID he can create user and approve it.

Processing

Get Employee Request Details

Invoke WS Get Employee Request by ID for further employee creation

 See service specification

Sample Request
curl -X GET -H 'Content-Type: application/json' 'http://ehealth.nebo15.com/employee_requests/d290f1ee-6c54-4b01-90e6-d701748f0851'

Search User

Search user in Auth using email from Employee_Request.

    If found, goto Create user

    else return Error 401

Create user in oAuth

System should create user in oAuth by using Create User WS

email should be used from the employee_request

password should be used from the payload

See service specification

Response structure examples

See on API-specification

 Example
{
  "meta": {
    "code": 201,
    "url": "https://example.com/resource",
    "type": "object",
    "request_id": "6617aeec-15e2-4d6f-b9bd-53559c358f97#17810"
  },
  "data": {
    "email": "john@example.com",
    "settings": {},
    "priv_settings": {},
    "id": "user-1380df72-275a-11e7-93ae-92361f002671",
    "created_at": "2017-04-20T19:14:13Z",
    "updated_at": "2017-04-20T19:14:13Z"
  }
}

HTTP status codes

Response code

HTTP Status code

Message

Internal name

Description

1

Базові

2

201

 Response

 

3

 401

 

 Search user error

 

4

Специфічні

5

Post-processing processes

Technical modules where the method is used

  • No labels