API OperoObiekty własne
Pobierz schemat modułu własnego
Zwraca bezpieczny dla zewnętrznego API kontekst kreatora schematu modułu własnego, w tym obiekty, pola, referencje, liczby rekordów i hash schematu.
Autoryzacja
api-token AutoryzacjaBearer <token>
Token Opero API. Przekaż go jako Authorization: Bearer ek_...
In: header
Parametry ścieżki
moduleKey*tekst
Treść odpowiedzi
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/custom-modules/string/schema"{ "data": { "module": { "id": "string", "key": "string", "name": "string", "description": "string", "icon": "string", "color": "string", "isActive": true, "isHidden": true }, "objects": [ { "id": "string", "key": "string", "name": "string", "namePlural": "string", "kind": "REGULAR", "isActive": true, "isHidden": true, "isSingleton": true, "icon": "string", "color": "string", "displayLabel": "string", "contentSourceLanguage": "en", "recordCount": 0, "fields": [ { "id": "string", "key": "string", "name": "string", "type": "TEXT", "isIndexed": true, "defaultValue": "string", "localizable": true, "options": {}, "position": 0 } ], "incomingReferences": [ { "id": "string", "type": "string", "fieldId": "string", "fromObjectId": "string", "fromObjectKey": "string", "fromModuleKey": "string", "toObjectId": "string", "toObjectKey": "string", "toModuleKey": "string" } ], "outgoingReferences": [ { "id": "string", "type": "string", "fieldId": "string", "fromObjectId": "string", "fromObjectKey": "string", "fromModuleKey": "string", "toObjectId": "string", "toObjectKey": "string", "toModuleKey": "string" } ] } ], "schemaHash": "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": {} }}