Opero Docs

Get rule

GET
/v1/rules/{id}

Returns one organization-scoped automation rule from the token organization.

Authorization

api-token
AuthorizationBearer <token>

Opero API token. Send it as Authorization: Bearer ek_...

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/rules/string"
{  "data": {    "id": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "name": "string",    "category": "string",    "description": "string",    "summary": "string",    "summaryGeneratedAt": "2019-08-24T14:15:22Z",    "isActive": true,    "scope": "ORGANIZATION",    "trigger": {      "id": "string",      "type": "RECORD_CREATED",      "objectId": "string",      "config": {}    },    "steps": [      {        "id": "string",        "type": "RUN_QUERY",        "position": 0,        "name": "string",        "config": {},        "contextKey": "string",        "onFailure": "string"      }    ],    "edges": [      {        "fromStepId": "string",        "toStepId": "string",        "branchKey": "string"      }    ],    "entryStepId": "string"  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}