CopyHero

Create Blueprint

POST
/api/v1/blueprints/tasks/

Create a TaskBlueprint (workflow) owned by the caller's organization. Superusers may set is_global to create a global workflow visible to every organization; it may only use global tasks (422 otherwise). Anyone else gets 403.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body

Create a workflow. is_global (superusers only, 403 otherwise) makes it visible to every organization; a global workflow may only use global tasks.

name*Name
description?string|null
owner_id?integer|null
job_ids*array<integer>
is_global?Is Global
Defaultfalse

Response Body

Successful Response

application/json
  1. response
name*Name
description?string|null
owner_id?integer|null
id*Id
jobs*array<>
created_at*Created At
Formatdate-time
updated_at*Updated At
Formatdate-time
Example Request
curl -X POST 'https://app.copyhero.app/api/v1/blueprints/tasks/' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "job_ids": [    0  ]}'
Example Response
{  "name": "string",  "description": "string",  "owner_id": 0,  "id": 0,  "jobs": [    {      "name": "string",      "description": "string",      "job_type": "string",      "input_data": "string",      "id": 0,      "owner_id": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}