Wait for the latest build of an API
curl --request GET \
--url https://api.peel.sh/v1/apis/{api_id}/wait \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.peel.sh/v1/apis/{api_id}/wait', 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}/wait"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"api": {
"id": "<string>",
"url": "<string>",
"instructions": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"endpoint_count": 123,
"failure": {
"category": "access_policy",
"code": "<string>",
"message": "<string>",
"recommended_action": "contact_support",
"refund_reviewable": true,
"retryable": true,
"support_debug_id": "<string>",
"technical_reason": "<string>"
},
"links": {},
"build": {
"id": "<string>",
"kind": "build",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"user_input_prompt": {},
"progress": [
{}
],
"failure": {
"category": "access_policy",
"code": "<string>",
"message": "<string>",
"recommended_action": "contact_support",
"refund_reviewable": true,
"retryable": true,
"support_debug_id": "<string>",
"technical_reason": "<string>"
},
"version_id": "<string>",
"draft": true
},
"archived": true,
"repair": {
"enabled": true,
"last_checked_at": "2023-11-07T05:31:56Z",
"last_result": "healthy",
"next_check_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"description": "<string>",
"source_url": "<string>",
"error": "<string>",
"requires_session": true,
"user_input_prompt": {},
"endpoints": [
{
"method": "<string>",
"endpoint_name": "<string>",
"input_schema": {},
"output_schema": {},
"endpoint_type": "<string>",
"auth_requirement": "<string>",
"examples": [
{
"kind": "endpoint_call",
"label": "<string>",
"request": {
"method": "POST",
"path": "<string>",
"headers": {},
"body": {}
},
"mcp_tool_call": {
"name": "call_endpoint",
"arguments": {
"endpoint_name": "<string>",
"params": {},
"api_id": "<string>",
"marketplace_id": "<string>",
"session_id": "<string>",
"encryption_key": "<string>"
}
},
"curl": "<string>",
"cli_command": "<string>"
}
],
"initiates_session": true,
"description": "<string>",
"credit_cost": 1
}
],
"version_id": "<string>"
},
"waited": true,
"timed_out": true
}{
"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": {}
}Build and manage APIs
Wait for the latest build of an API
GET
/
v1
/
apis
/
{api_id}
/
wait
Wait for the latest build of an API
curl --request GET \
--url https://api.peel.sh/v1/apis/{api_id}/wait \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.peel.sh/v1/apis/{api_id}/wait', 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}/wait"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"api": {
"id": "<string>",
"url": "<string>",
"instructions": "<string>",
"name": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"endpoint_count": 123,
"failure": {
"category": "access_policy",
"code": "<string>",
"message": "<string>",
"recommended_action": "contact_support",
"refund_reviewable": true,
"retryable": true,
"support_debug_id": "<string>",
"technical_reason": "<string>"
},
"links": {},
"build": {
"id": "<string>",
"kind": "build",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"user_input_prompt": {},
"progress": [
{}
],
"failure": {
"category": "access_policy",
"code": "<string>",
"message": "<string>",
"recommended_action": "contact_support",
"refund_reviewable": true,
"retryable": true,
"support_debug_id": "<string>",
"technical_reason": "<string>"
},
"version_id": "<string>",
"draft": true
},
"archived": true,
"repair": {
"enabled": true,
"last_checked_at": "2023-11-07T05:31:56Z",
"last_result": "healthy",
"next_check_at": "2023-11-07T05:31:56Z",
"reason": "<string>"
},
"description": "<string>",
"source_url": "<string>",
"error": "<string>",
"requires_session": true,
"user_input_prompt": {},
"endpoints": [
{
"method": "<string>",
"endpoint_name": "<string>",
"input_schema": {},
"output_schema": {},
"endpoint_type": "<string>",
"auth_requirement": "<string>",
"examples": [
{
"kind": "endpoint_call",
"label": "<string>",
"request": {
"method": "POST",
"path": "<string>",
"headers": {},
"body": {}
},
"mcp_tool_call": {
"name": "call_endpoint",
"arguments": {
"endpoint_name": "<string>",
"params": {},
"api_id": "<string>",
"marketplace_id": "<string>",
"session_id": "<string>",
"encryption_key": "<string>"
}
},
"curl": "<string>",
"cli_command": "<string>"
}
],
"initiates_session": true,
"description": "<string>",
"credit_cost": 1
}
],
"version_id": "<string>"
},
"waited": true,
"timed_out": true
}{
"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": {}
}⌘I