Inserta fase
POST
/ProjectPhase/External/Insert
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"id\": 1, \"title\": \"example\", \"projectId\": 1, \"startDateEstimated\": \"example\", \"endDateEstimated\": \"example\", \"estimatedExpenseDeduction\": 1, \"estimatedRevenueDeduction\": 1, \"weight\": 1, \"percentageConclusion\": 1, \"observation\": \"example\", \"idc\": 1, \"idp\": 1 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert"
payload := strings.NewReader("{ \"id\": 1, \"title\": \"example\", \"projectId\": 1, \"startDateEstimated\": \"example\", \"endDateEstimated\": \"example\", \"estimatedExpenseDeduction\": 1, \"estimatedRevenueDeduction\": 1, \"weight\": 1, \"percentageConclusion\": 1, \"observation\": \"example\", \"idc\": 1, \"idp\": 1 }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"id\": 1, \"title\": \"example\", \"projectId\": 1, \"startDateEstimated\": \"example\", \"endDateEstimated\": \"example\", \"estimatedExpenseDeduction\": 1, \"estimatedRevenueDeduction\": 1, \"weight\": 1, \"percentageConclusion\": 1, \"observation\": \"example\", \"idc\": 1, \"idp\": 1 }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"id\": 1, \"title\": \"example\", \"projectId\": 1, \"startDateEstimated\": \"example\", \"endDateEstimated\": \"example\", \"estimatedExpenseDeduction\": 1, \"estimatedRevenueDeduction\": 1, \"weight\": 1, \"percentageConclusion\": 1, \"observation\": \"example\", \"idc\": 1, \"idp\": 1 }");Request request = new Request.Builder() .url("https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, data: { id: 1, title: 'example', projectId: 1, startDateEstimated: 'example', endDateEstimated: 'example', estimatedExpenseDeduction: 1, estimatedRevenueDeduction: 1, weight: 1, percentageConclusion: 1, observation: 'example', idc: 1, idp: 1 }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":1,"title":"example","projectId":1,"startDateEstimated":"example","endDateEstimated":"example","estimatedExpenseDeduction":1,"estimatedRevenueDeduction":1,"weight":1,"percentageConclusion":1,"observation":"example","idc":1,"idp":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"id\": 1, \"title\": \"example\", \"projectId\": 1, \"startDateEstimated\": \"example\", \"endDateEstimated\": \"example\", \"estimatedExpenseDeduction\": 1, \"estimatedRevenueDeduction\": 1, \"weight\": 1, \"percentageConclusion\": 1, \"observation\": \"example\", \"idc\": 1, \"idp\": 1 }")val request = Request.Builder() .url("https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()curl --request POST \ --url https://api-prod.scoreplan.com.br/ProjectPhase/External/Insert \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "title": "example", "projectId": 1, "startDateEstimated": "example", "endDateEstimated": "example", "estimatedExpenseDeduction": 1, "estimatedRevenueDeduction": 1, "weight": 1, "percentageConclusion": 1, "observation": "example", "idc": 1, "idp": 1 }'Authorizations
Sección titulada «Authorizations »Request Body required
Sección titulada «Request Body required » Media type application/json
object
id
integer format: int64
title
null | string
projectId
integer format: int64
startDateEstimated
null | string
endDateEstimated
null | string
estimatedExpenseDeduction
number format: double
estimatedRevenueDeduction
number format: double
weight
integer format: int32
percentageConclusion
integer format: int32
observation
null | string
idc
null | number format: double
idp
null | number format: double
Example generated
{ "id": 1, "title": "example", "projectId": 1, "startDateEstimated": "example", "endDateEstimated": "example", "estimatedExpenseDeduction": 1, "estimatedRevenueDeduction": 1, "weight": 1, "percentageConclusion": 1, "observation": "example", "idc": 1, "idp": 1}Responses
Sección titulada « Responses »OK
Media type application/json
object
id
integer format: int64
title
null | string
projectId
integer format: int64
startDateEstimated
null | string
endDateEstimated
null | string
estimatedExpenseDeduction
number format: double
estimatedRevenueDeduction
number format: double
weight
integer format: int32
percentageConclusion
integer format: int32
observation
null | string
idc
null | number format: double
idp
null | number format: double
Example generated
{ "id": 1, "title": "example", "projectId": 1, "startDateEstimated": "example", "endDateEstimated": "example", "estimatedExpenseDeduction": 1, "estimatedRevenueDeduction": 1, "weight": 1, "percentageConclusion": 1, "observation": "example", "idc": 1, "idp": 1}