# Automations

## Get all Automations

This API gives you a list of all automations for a specific platform.

{% hint style="info" %}
Use [this](https://texau.gitbook.io/api-docs/reference/platforms#getting-all-platforms) to get the platform ID.
{% endhint %}

## GET /api/v1/public/automations

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"AutomationsDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"total":{"type":"number"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AutomationData"}}},"required":["success","message","total","data"]},"AutomationData":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"platformId":{"type":"string"}},"required":["id","name","label","platformId"]}}},"paths":{"/api/v1/public/automations":{"get":{"operationId":"ApiController_getAllAutomations","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}},{"name":"start","required":false,"in":"query","description":"The page No","schema":{"minimum":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"The Page Size","schema":{"minimum":1,"maximum":50,"type":"number"}},{"name":"platformId","required":true,"in":"query","description":"Platform ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Automations fetch successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationsDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error while fetching Automations"}},"tags":["API Service"]}}}}
```

### Get Automation By ID

This API will give you a list of `inputs` and `output` of specific automation.

{% hint style="info" %}
Use `automationID` from response of the above API
{% endhint %}

## GET /api/v1/public/automations/{automationId}

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"AutomationByIdDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/AutomationByIdData"}},"required":["success","message","data"]},"AutomationByIdData":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"shortName":{"type":"string"},"category":{"type":"string"},"platformId":{"type":"string"},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/Inputs"}},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/Outputs"}}},"required":["id","name","description","shortName","category","platformId","inputs","outputs"]},"Inputs":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"isRequired":{"type":"boolean"},"choices":{"type":"array","items":{"type":"object"}}},"required":["name","label","description","type","isRequired","choices"]},"Outputs":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"}},"required":["name","label","description","type"]}}},"paths":{"/api/v1/public/automations/{automationId}":{"get":{"operationId":"ApiController_getAutomationById","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}},{"name":"automationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Automation fetched successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationByIdDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"404":{"description":"Automation does not exists"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error in fetching automation"}},"tags":["API Service"]}}}}
```
