Publish an owned API to the public marketplace
curl --request POST \
--url https://api.peel.sh/v1/apis/{api_id}/marketplace/publish \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"expected_marketplace_version_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_marketplace_version_id: '<string>'})
};
fetch('https://api.peel.sh/v1/apis/{api_id}/marketplace/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/apis/{api_id}/marketplace/publish"
payload = { "expected_marketplace_version_id": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"published": true,
"already_published": true,
"publication_kind": "first_publish",
"marketplace_id": "<string>",
"api_id": "<string>",
"version_id": "<string>",
"source_version_id": "<string>"
}{
"published": true,
"already_published": true,
"publication_kind": "first_publish",
"marketplace_id": "<string>",
"api_id": "<string>",
"version_id": "<string>",
"source_version_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Marketplace
Publish an owned API to the public marketplace
POST
/
v1
/
apis
/
{api_id}
/
marketplace
/
publish
Publish an owned API to the public marketplace
curl --request POST \
--url https://api.peel.sh/v1/apis/{api_id}/marketplace/publish \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"expected_marketplace_version_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({expected_marketplace_version_id: '<string>'})
};
fetch('https://api.peel.sh/v1/apis/{api_id}/marketplace/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.peel.sh/v1/apis/{api_id}/marketplace/publish"
payload = { "expected_marketplace_version_id": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"published": true,
"already_published": true,
"publication_kind": "first_publish",
"marketplace_id": "<string>",
"api_id": "<string>",
"version_id": "<string>",
"source_version_id": "<string>"
}{
"published": true,
"already_published": true,
"publication_kind": "first_publish",
"marketplace_id": "<string>",
"api_id": "<string>",
"version_id": "<string>",
"source_version_id": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"instance": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"retry": "same_key",
"docs_url": "<string>",
"details": {}
}Body
application/json
Response
The current API version was contributed or was already published.
⌘I