# Automations

## Get all Automations

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

{% hint style="info" %}
Use [this](../platforms#getting-all-platforms) to get the platform ID.
{% endhint %}

## GET /api/v1/public/automations

>

OpenAPI:

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"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":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"total":{"type":"number"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"platformId":{"type":"string"}},"required":["id","name","label","platformId"]}}},"required":["success","message","total","data"]}}}},"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}

>

OpenAPI:

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}}},"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":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"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":{"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":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"}},"required":["name","label","description","type"]}}},"required":["id","name","description","shortName","category","platformId","inputs","outputs"]}},"required":["success","message","data"]}}}},"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"]}}}}
```
