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.
state
value options are1
(Disabled),2
(Draft), and3
(Enabled).pallet_type
value options are2
(Python),3
(Bash), and7
(Node).program
value options arepython3
,bash
, andnode
and should correspond withpallet_type
.type
for aspec_list
object value options are1
(String),2
(Integer),3
(Floating),4
(Boolean),5
(Date),6
(Select),7
(Password),8
(External file). Forselect
input types, thetype_spec
field will be an array of objects containingname
andvalue
fields and a default selection must be made corresponding to one of the objectname
fields.number_of_retries
can be between 0 and 24.ttr
can be between 0 and 3600 in increments of 300.runtime_timeout
can be between 300 and 3600.exclude_exit_code_ranges
may 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_file
holds atemp
field with an object withid
andurl
keys - these are populated using theRequestID
andExternalFile
values 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
]
]
}