Synchroniser le document Open API
1 min
POST
https://api.archbee.com/api/public-api/sync-api-reference
Header Parameters
- Content-TypestringrequiredExampleDefaultmultipart/form-data
Form Parameters
- docTreeIdstringExampleDescriptionDefault21-character__string0
- filefilerequiredExampleDescriptionDefault@swagger.jsonFormatbinary
- typestring<openapi | postman>ExampleDescriptionDefaultopenapiAllowedopenapipostman
- openApiTryItstring<true | false>ExampleDescriptionDefaulttrueAllowedtruefalse
- openApiUseOwnBackendstring<true | false>DescriptionDefaultfalseAllowedtruefalse
- showDownloadOpenApiFilestring<true | false>ExampleDescriptionDefaultfalseAllowedtruefalse
- shouldCreateSchemaCategorystring<true | false>ExampleDescriptionDefaultfalseAllowedtruefalse
- shouldCreateIntrostring<true | false>ExampleDescriptionDefaultfalseAllowedtruefalse
- openApiLanguageExampleslistExample
[ "python", "r", "javascript" ]
Description
Responses
200
- objectDescription
- statusstring<OK>ExampleDescriptionAllowedOK
- dataobject
- docTreeIdstringExampleDescription
400
- Response400
- statusstring<OK | Not OK>ExampleDescriptionAllowedOKNot OK
- messagesstring[]Example
[ "Some error message" ]
Description
curl
curl --request POST \
--url https://api.archbee.com/api/public-api/sync-api-reference \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--form 'docTreeId="21-character__string0"' \
--form 'file=@"/path/to/file"' \
--form 'type="openapi"' \
--form 'openApiTryIt="true"' \
--form 'openApiUseOwnBackend="true"' \
--form 'showDownloadOpenApiFile="true"' \
--form 'shouldCreateSchemaCategory="true"' \
--form 'shouldCreateIntro="true"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "multipart/form-data");
var formdata = new FormData();
formdata.append("docTreeId", "21-character__string0");
formdata.append("file", fileInput.files[0], "file");
formdata.append("type", "openapi");
formdata.append("openApiTryIt", "true");
formdata.append("openApiUseOwnBackend", "true");
formdata.append("showDownloadOpenApiFile", "true");
formdata.append("shouldCreateSchemaCategory", "true");
formdata.append("shouldCreateIntro", "true");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://api.archbee.com/api/public-api/sync-api-reference", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.archbee.com/api/public-api/sync-api-reference")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "multipart/form-data"
form_data = [['docTreeId', File.open('undefined')],['file', File.open('/path/to/file')],['type', File.open('undefined')],['openApiTryIt', File.open('undefined')],['openApiUseOwnBackend', File.open('undefined')],['showDownloadOpenApiFile', File.open('undefined')],['shouldCreateSchemaCategory', File.open('undefined')],['shouldCreateIntro', File.open('undefined')]]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.archbee.com/api/public-api/sync-api-reference"
payload = {}
files=[
('file',('file',open('/path/to/file','rb'),'application/octet-stream'))
]
headers = {
'accept': 'application/json',
'content-type': 'multipart/form-data'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
200
// Import OK status
{
"status": "OK",
"data": {
"docTreeId": "21-character__string0"
}
}400
// Invalid request
{
"status": "Not OK",
"messages": [
"Some error message"
]
}Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.