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

68 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

2023-10-16 11:30:38 +05:00
@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
2023-10-16 11:30:38 +05:00
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
### Получение контактов по типу контакта и ключу скважины
2023-10-16 12:07:04 +05:00
GET {{baseUrl}}/api/well/{{idWell}}/WellContact/type/{{contactTypeId}}
2023-10-16 11:30:38 +05:00
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
### Получение контакта по ключу
2023-10-16 11:30:38 +05:00
GET {{baseUrl}}/api/well/{{idWell}}/WellContact/{{id}}
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
### добавление нового контакта
2023-10-16 11:30:38 +05:00
POST {{baseUrl}}/api/well/{{idWell}}/WellContact
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
{
2023-10-16 12:07:04 +05:00
"id" : 2,
2023-10-16 11:30:38 +05:00
"IdCompanyType" : 1,
"IdWell": 1,
2023-10-16 12:07:04 +05:00
"FullName": "batman",
2023-10-16 11:30:38 +05:00
"Email": "aa@aa.aa",
"Phone": "80000000000",
"Position": "Повар",
"Company": "Мишлен лтд"
2023-10-16 11:30:38 +05:00
}
### изменение контакта
2023-10-16 11:30:38 +05:00
PUT {{baseUrl}}/api/well/{{idWell}}/WellContact
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}
{
2023-10-16 12:07:04 +05:00
"id" : 2,
2023-10-16 11:30:38 +05:00
"IdCompanyType" : 1,
"IdWell": 1,
"FullName": "Бэтман Суперменович",
2023-10-16 11:30:38 +05:00
"Email": "bb@bb.bb",
"Phone": "80000000001",
"Position": "Повар",
"Company": "Мишлен лтд"
2023-10-16 11:30:38 +05:00
}
### Удаление контакта
2023-10-16 11:30:38 +05:00
DELETE {{baseUrl}}/api/well/{{idWell}}/WellContact/{{id}}
Content-Type: {{contentType}}
accept: */*
Authorization: {{auth}}