# Canvas Steps

## Get Graph

> Retrieves the graph for a given flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Canvas Steps"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph":{"get":{"summary":"Get Graph","description":"Retrieves the graph for a given flow version.","tags":["Canvas Steps"],"parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}}}}}}
```

## Create Flow Version Graph Step

> Creates a new step on the canvas for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Canvas Steps"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph/steps":{"post":{"summary":"Create Flow Version Graph Step","description":"Creates a new step on the canvas for a specific flow version.","tags":["Canvas Steps"],"parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Delete Flow Version Graph Steps

> Permanently deletes all steps from the canvas for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Canvas Steps"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph/steps":{"delete":{"summary":"Delete Flow Version Graph Steps","description":"Permanently deletes all steps from the canvas for a specific flow version.","tags":["Canvas Steps"],"parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}}}}}}
```

## Get Flow Version Graph Step

> Retrieves the details of a specific canvas step for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Canvas Steps"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph/steps/{step}":{"get":{"summary":"Get Flow Version Graph Step","description":"Retrieves the details of a specific canvas step for a specific flow version.","tags":["Canvas Steps"],"parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."},{"name":"step","in":"path","required":true,"schema":{"type":"string"},"description":"The step identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}}}}}}
```

## Delete Flow Version Graph Step

> Permanently deletes a specific canvas step for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Canvas Steps"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph/steps/{step}":{"delete":{"summary":"Delete Flow Version Graph Step","description":"Permanently deletes a specific canvas step for a specific flow version.","tags":["Canvas Steps"],"parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."},{"name":"step","in":"path","required":true,"schema":{"type":"string"},"description":"The step identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}}}}}}
```

## Paste Steps

> Pastes copied steps onto the canvas for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Canvas Steps"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph/paste-steps":{"post":{"summary":"Paste Steps","description":"Pastes copied steps onto the canvas for a specific flow version.","tags":["Canvas Steps"],"parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"Successful response"},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
