# Blueprints

The following endpoints allow you to manage scenarios blueprints.

## Get scenario blueprint

> Retrieves a blueprint of a scenario with a given ID.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Blueprints","description":"The following endpoints allow you to manage scenarios blueprints."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/blueprint":{"get":{"tags":["Scenarios / Blueprints"],"summary":"Get scenario blueprint","description":"Retrieves a blueprint of a scenario with a given ID.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true},{"name":"blueprintId","in":"query","schema":{"type":"integer"},"description":"The unique ID of the blueprint version. It can be retrieved from the [Get blueprint versions](/api-reference/scenarios/blueprints/get--scenarios--scenarioid--blueprints.md) endpoint. This parameter can be useful when you want to retrieve the older version of the blueprint."},{"name":"draft","in":"query","schema":{"type":"boolean"},"description":"If this parameter is set to `true`, the draft version of the scenario blueprint will be retrieved. If set to `false`, the live version of the blueprint will be retrieved. In case that the `blueprintId` parameter is set to the query as well, this parameter is ignored."}],"responses":{"200":{"description":"Blueprint retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"response":{"type":"object","properties":{"blueprint":{"type":"object","properties":{"flow":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"ca":{"type":"string"},"qs":{"type":"array","items":{}},"url":{"type":"string","format":"uri"},"gzip":{"type":"boolean"},"method":{"type":"string"},"headers":{"type":"array","items":{}},"timeout":{"type":"string"},"authPass":{"type":"string"},"authUser":{"type":"string"},"bodyType":{"type":"string"},"shareCookies":{"type":"boolean"},"parseResponse":{"type":"boolean"},"followRedirect":{"type":"boolean"},"useQuerystring":{"type":"boolean"},"rejectUnauthorized":{"type":"boolean"}}},"module":{"type":"string","format":"uri"},"onerror":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"mapper":{"type":"object","properties":{"count":{"type":"string","format":"utc-millisec"},"retry":{"type":"boolean"},"interval":{"type":"string","format":"utc-millisec"}}},"module":{"type":"string","format":"uri"},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}},"restore":{"type":"object","properties":{"retry":{"type":"object","properties":{"mode":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}}}},"parameters":{"type":"object"}}}},"version":{"type":"integer"},"metadata":{"type":"object","properties":{"expect":{"type":"array","items":{"type":"object"}},"restore":{"type":"object","properties":{"qs":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"method":{"type":"object","properties":{"mode":{"type":"string"},"label":{"type":"string"}}},"headers":{"type":"object","properties":{"mode":{"type":"string"},"items":{"type":"array","items":{}}}},"bodyType":{"type":"object","properties":{"label":{"type":"string"}}}}},"designer":{"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"}}},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"}}}}}},"parameters":{"type":"object","properties":{"handleErrors":{"type":"boolean"}}}}}},"name":{"type":"string"},"metadata":{"type":"object","properties":{"version":{"type":"integer"},"scenario":{"type":"object","properties":{"maxErrors":{"type":"integer"},"autoCommit":{"type":"boolean"},"roundtrips":{"type":"integer"}}}}}}},"scheduling":{"type":"object","properties":{"type":{"type":"string","enum":["immediately","indefinitely","once","daily","weekly","monthly","yearly"]},"interval":{"type":"integer","minimum":0},"date":{"type":"string","format":"date-time"},"between":{"type":"array","items":{"type":"string","format":"date-time"}},"time":{"type":"string","pattern":"^[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?(\\\\.[0-9]+)?$"},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":31}},"months":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"restrict":{"type":"array","items":{"type":"object","properties":{"time":{"type":"array","items":{"type":"string","nullable":true,"pattern":"^[0-2]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?(\\\\.[0-9]+)?$"}},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":31}},"months":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}}}}},"maximum_runs_per_minute":{"type":"integer","nullable":true,"minimum":1,"maximum":10000}}},"idSequence":{"type":"integer"},"created":{"type":"string","format":"date-time"},"last_edit":{"type":"string","format":"date-time"}}}}}}}}}}}}}
```

## Get blueprint versions

> Retrieves a collection of all blueprints versions for a scenario with a given ID. Due to the regular archiving process, only the versions that are not older than 60 days can be retrieved. Each returned blueprint version consists of the date and time of the blueprint creation, IDs of the blueprint version and related scenario, and the information if the blueprint was created for the draft or live scenario version.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"Scenarios / Blueprints","description":"The following endpoints allow you to manage scenarios blueprints."}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["scenarios:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/scenarios/{scenarioId}/blueprints":{"get":{"tags":["Scenarios / Blueprints"],"summary":"Get blueprint versions","description":"Retrieves a collection of all blueprints versions for a scenario with a given ID. Due to the regular archiving process, only the versions that are not older than 60 days can be retrieved. Each returned blueprint version consists of the date and time of the blueprint creation, IDs of the blueprint version and related scenario, and the information if the blueprint was created for the draft or live scenario version.","parameters":[{"description":"The ID of the scenario. You can get the `scenarioId` with the [List scenarios](/api-reference/scenarios/get--scenarios.md) API call.","name":"scenarioId","in":"path","schema":{"type":"integer"},"required":true}],"responses":{"200":{"description":"Blueprints versions successfully retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"scenariosBlueprints":{"type":"array","items":{"type":"object","properties":{"created":{"type":"string","format":"date-time"},"version":{"type":"integer"},"scenarioId":{"type":"integer"},"draft":{"type":"boolean"}}}}}}}}}}}}}}
```
