Show one proposal of a Library widget: status, files and review comments
curl --request POST \
--url http://localhost:3000/api/v1/widgets/proposal \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"ref": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/widgets/proposal"
payload = {
"number": "<string>",
"ref": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({number: '<string>', ref: '<string>'})
};
fetch('http://localhost:3000/api/v1/widgets/proposal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/widgets/proposal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>',
'ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/widgets/proposal"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/widgets/proposal")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/widgets/proposal")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"<string>\",\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"base": {
"files": [
{
"bytes": 123,
"path": "<string>",
"sha256": "<string>"
}
],
"number": 123
},
"comments": [
{
"author": {
"agentId": "<string>",
"name": "<string>",
"self": true
},
"body": "<string>",
"can": {
"resolve": true
},
"createdAt": "<string>",
"id": "<string>",
"line": 123,
"outdated": true,
"parentId": "<string>",
"path": "<string>",
"resolvedAt": "<string>",
"resolvedBy": {
"name": "<string>"
},
"round": 123
}
],
"contentsVisible": true,
"files": [
{
"bytes": 123,
"path": "<string>",
"sha256": "<string>",
"content": "<string>"
}
],
"item": {
"archived": true,
"contentHash": "<string>",
"description": "<string>",
"externalAllowed": true,
"kind": "<string>",
"name": "<string>",
"project": {
"id": "<string>",
"slug": "<string>",
"name": "<string>"
},
"publishedAt": "<string>",
"publishedBy": {
"name": "<string>"
},
"ref": "<string>",
"scope": "org",
"slug": "<string>",
"updatedAt": "<string>",
"version": 123
},
"number": 123,
"proposal": {
"author": {
"agentId": "<string>",
"name": "<string>",
"self": true
},
"baseVersion": 123,
"can": {
"edit": true,
"publish": true,
"reject": true,
"submit": true,
"withdraw": true
},
"contentHash": "<string>",
"createdAt": "<string>",
"currentVersion": 123,
"decidedAt": "<string>",
"decidedBy": {
"name": "<string>"
},
"decisionReason": "<string>",
"description": "<string>",
"externalAllowed": true,
"fileCount": 123,
"name": "<string>",
"note": "<string>",
"number": 123,
"openComments": 123,
"proposedAt": "<string>",
"publishedVersion": 123,
"ref": "<string>",
"reviewUrl": "<string>",
"round": 123,
"stale": true,
"status": "draft",
"totalBytes": 123,
"updatedAt": "<string>"
},
"ref": "<string>"
}widgets
Show one proposal of a Library widget: status, files and review comments
POST
/
api
/
v1
/
widgets
/
proposal
Show one proposal of a Library widget: status, files and review comments
curl --request POST \
--url http://localhost:3000/api/v1/widgets/proposal \
--header 'Content-Type: application/json' \
--data '
{
"number": "<string>",
"ref": "<string>"
}
'import requests
url = "http://localhost:3000/api/v1/widgets/proposal"
payload = {
"number": "<string>",
"ref": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({number: '<string>', ref: '<string>'})
};
fetch('http://localhost:3000/api/v1/widgets/proposal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/v1/widgets/proposal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '<string>',
'ref' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/v1/widgets/proposal"
payload := strings.NewReader("{\n \"number\": \"<string>\",\n \"ref\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/api/v1/widgets/proposal")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"<string>\",\n \"ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/v1/widgets/proposal")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"<string>\",\n \"ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"base": {
"files": [
{
"bytes": 123,
"path": "<string>",
"sha256": "<string>"
}
],
"number": 123
},
"comments": [
{
"author": {
"agentId": "<string>",
"name": "<string>",
"self": true
},
"body": "<string>",
"can": {
"resolve": true
},
"createdAt": "<string>",
"id": "<string>",
"line": 123,
"outdated": true,
"parentId": "<string>",
"path": "<string>",
"resolvedAt": "<string>",
"resolvedBy": {
"name": "<string>"
},
"round": 123
}
],
"contentsVisible": true,
"files": [
{
"bytes": 123,
"path": "<string>",
"sha256": "<string>",
"content": "<string>"
}
],
"item": {
"archived": true,
"contentHash": "<string>",
"description": "<string>",
"externalAllowed": true,
"kind": "<string>",
"name": "<string>",
"project": {
"id": "<string>",
"slug": "<string>",
"name": "<string>"
},
"publishedAt": "<string>",
"publishedBy": {
"name": "<string>"
},
"ref": "<string>",
"scope": "org",
"slug": "<string>",
"updatedAt": "<string>",
"version": 123
},
"number": 123,
"proposal": {
"author": {
"agentId": "<string>",
"name": "<string>",
"self": true
},
"baseVersion": 123,
"can": {
"edit": true,
"publish": true,
"reject": true,
"submit": true,
"withdraw": true
},
"contentHash": "<string>",
"createdAt": "<string>",
"currentVersion": 123,
"decidedAt": "<string>",
"decidedBy": {
"name": "<string>"
},
"decisionReason": "<string>",
"description": "<string>",
"externalAllowed": true,
"fileCount": 123,
"name": "<string>",
"note": "<string>",
"number": 123,
"openComments": 123,
"proposedAt": "<string>",
"publishedVersion": 123,
"ref": "<string>",
"reviewUrl": "<string>",
"round": 123,
"stale": true,
"status": "draft",
"totalBytes": 123,
"updatedAt": "<string>"
},
"ref": "<string>"
}Response
Success — body conforms to the @Returns schema.