post https://api.app.shipyardapp.com/orgs//blueprints
Create a new Blueprint in the target Organization
Request Body
The payload is a JSON definition of a Blueprint. Several things to note about the payload are below.
statevalue options are1(Disabled),2(Draft), and3(Enabled).pallet_typevalue options are2(Python),3(Bash), and7(Node).programvalue options arepython3,bash, andnodeand should correspond withpallet_type.typefor aspec_listobject value options are1(String),2(Integer),3(Floating),4(Boolean),5(Date),6(Select),7(Password),8(External file). Forselectinput types, thetype_specfield will be an array of objects containingnameandvaluefields and a default selection must be made corresponding to one of the objectnamefields.number_of_retriescan be between 0 and 24.ttrcan be between 0 and 3600 in increments of 300.runtime_timeoutcan be between 300 and 3600.exclude_exit_code_rangesmay contain an array of arrays each with two integers between 1 and 255 - in the example below, the exit codes 1, 3, 4, and 5 are ignored.external_fileholds atempfield with an object withidandurlkeys - these are populated using theRequestIDandExternalFilevalues from the Create External File response.
Here's an example Blueprint JSON payload.
{
"name": "Test Blueprint",
"synopsis": "Example synopsis",
"description": "Example description",
"state": 3,
"pallet_type": 2,
"pallet_config": {
"version": "3.7",
"command": {
"program": "python3",
"file_to_run": "script.py"
},
"external_file": {
"temp": {
"file_name": "script.py",
"id": "TEMP",
"url": "s3://production-shipyard-uploads-tmp/tmp/organizations/TEMP/requests/TEMP.sefv2_TEMP"
}
}
},
"spec_list": [
{
"display_name": "First Input",
"name": "FIRST_INPUT",
"type": 1,
"required": false,
"placeholder": "Enter a first input",
"description": "A first input",
"default": "example_value",
"type_spec": {
"multiline": false
}
}
],
"retry_strategy": {
"number_of_retries": 3,
"ttr": 900
},
"runtime_timeout": 2700,
"exclude_exit_code_ranges": [
[
1,
1
],
[
3,
5
]
]
}