DD.WellWorkover.Cloud/AsbCloudWebApi/Rest/WellContact.http

68 lines
2.0 KiB
HTTP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@baseUrl = http://127.0.0.1:5000
@contentType = application/json
@auth = Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiZGV2IiwiaWRDb21wYW55IjoiMSIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6InJvb3QiLCJuYmYiOjE2OTc0MzcwMzEsImV4cCI6MTcyODk5NDYzMSwiaXNzIjoiYSIsImF1ZCI6ImEifQ.vB7Qb3K9gG77iP8y25zB3RcZIQk9cHkq3I1SkcooYJs
@uid = 20210101_000000000
@id = 1
@idWell = 1
@contactTypeId = 1
### получение списка типов контактов
GET {{baseUrl}}/api/well/{{idWell}}/WellContact/type
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
### Получение контактов по типу контакта и ключу скважины
GET {{baseUrl}}/api/well/{{idWell}}/WellContact/type/{{contactTypeId}}
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
### Получение контакта по ключу
GET {{baseUrl}}/api/well/{{idWell}}/WellContact/{{id}}
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
### добавление нового контакта
POST {{baseUrl}}/api/well/{{idWell}}/WellContact
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
{
"id" : 2,
"IdCompanyType" : 1,
"IdWell": 1,
"FullName": "batman",
"Email": "aa@aa.aa",
"Phone": "80000000000",
"Position": "Повар",
"Company": "Мишлен лтд"
}
### изменение контакта
PUT {{baseUrl}}/api/well/{{idWell}}/WellContact
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
{
"id" : 2,
"IdCompanyType" : 1,
"IdWell": 1,
"FullName": "Бэтман Суперменович",
"Email": "bb@bb.bb",
"Phone": "80000000001",
"Position": "Повар",
"Company": "Мишлен лтд"
}
### Удаление контакта
DELETE {{baseUrl}}/api/well/{{idWell}}/WellContact/{{id}}
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}