Opero Docs
API OperoModuły własne

Pobierz schemat typu pola obiektu własnego

GET
/v1/custom-modules/field-types/{type}

Zwraca dozwolony schemat payloadu tworzenia i aktualizacji, schemat opcji, wartości domyślne oraz przykłady dla jednego typu pola obiektu własnego.

Autoryzacja

api-token
AutoryzacjaBearer <token>

Token Opero API. Przekaż go jako Authorization: Bearer ek_...

In: header

Parametry ścieżki

type*tekst

Treść odpowiedzi

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/custom-modules/field-types/string"
{  "data": {    "type": "TEXT",    "label": "string",    "valueKind": "string",    "optionSources": [      "none"    ],    "configSchemaVersion": 0,    "optionsSchema": {},    "createSchema": {},    "updateSchema": {},    "valueSchema": {},    "defaults": {},    "examples": {},    "notes": [      "string"    ],    "capabilities": {      "schemaVersion": 1,      "format": "tiptap",      "nodes": {        "property1": {          "leaf": true,          "markable": true,          "attrs": {            "property1": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            },            "property2": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            }          }        },        "property2": {          "leaf": true,          "markable": true,          "attrs": {            "property1": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            },            "property2": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            }          }        }      },      "marks": {        "property1": {          "attrs": {            "property1": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            },            "property2": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            }          }        },        "property2": {          "attrs": {            "property1": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            },            "property2": {              "type": "string",              "required": true,              "enum": [                "string"              ],              "maxLength": 0,              "minimum": 0,              "maximum": 0,              "nullable": true            }          }        }      },      "limits": {        "property1": 0,        "property2": 0      }    }  }}
{  "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": {}  }}