Метод «Сохранить информацию о классах, поддерживаемых сервисом»¶
Endpoint: PUT {hostname}/dh-registry-service/api/v1/applications/{name}/classes
Метод возвращает информацию о классах объекта для зарегистрированного в Системе приложения.
Более подробное описание метода находится в yaml файле «registry-service», который расположен в папке с документацией.
Маппинг параметров запроса
| Входящие параметры | Способ передачи параметров | Требования к заполнению |
|---|---|---|
| name | Path | Наименование приложения, полученное методом GET {hostname}/dh-registry-service/api/v1/applications |
| id | Body | Идентификатор свойства, применим для динамического класса |
| name | Body | Наименование класса |
| code | Body | Код класса латиницей |
| rootClassType | Body | Тип родительского класса. Доступные значения: FOLDER, RELATION, DOCUMENT, ITEM, COLLECTION, EVENT, OBJECT |
| description | Body | Описание класса |
| properties: · propertySetId · code · name · description · type · settablitiy · persistenceType · cardinality · required · hidden · orderable · searchable · defaultValue · validationExpression: - id - name - expression - description - example · ordinal · kind · linkObjectClass · verifiable · private |
Body | Описание свойств класса |
| tags | Body | Теги класса |
| isSystem | Body | Признак системного класса |
| propertySets: · id · code · name · description · createdBy · creationDate · modifiedBy · modificationDate |
Body | Описание свойств набора |
| isCreatable | Body | Признак возможности создания экземпляра класса |
| endpoints: · id · method · url · body · headers: - name - value |
Body | Ссылки на операции с классом |
| tags | Body | Значение согласно описанию в зависимости от потребностей клиента |
| contentStreamAllowed | Body | Значение согласно описанию в зависимости от потребностей клиента |
| renditionAllowed | Body | Значение согласно описанию в зависимости от потребностей клиента |
| allowIncludeClasses | Body | Значение согласно описанию в зависимости от потребностей клиента |
| isObjectVersionable | Body | Значение согласно описанию в зависимости от потребностей клиента |
| isCompound | Body | Значение согласно описанию в зависимости от потребностей клиента |
| policyId | Body | Идентификатор политики размещения |
Пример запроса:
curl --location --request PUT 'https://docshouse-test.k8s.lan.lanit.ru/dh-gateway-api-service/dh-registry-service/api/v1/applications/myApp/classes' \
-header 'accept: */*' \
-header 'Content-Type: application/json' \
-data '[
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"Issystem": true,
"propertySets": [
{
"id": "4d7d8ad1-5501-4e66-957a-c55f9fdadd67",
"code": "myPropertySetName",
"name": "string",
"description": "string",
"createdBy": "string",
"creationDate": "2024-10-30T08:15:46.277Z",
"modifiedBy": "string",
"modificationDate": "2024-10-30T08:15:46.277Z",
"system": true
}
],
"isCreatable": true,
"isRenditionAllowed": true,
"_endpoints": [
{
"id": "collection",
"method": "GET",
"url": "/api/v1/documents/${objectId}",
"body": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
}
]
},
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"system": true,
"contentStreamAllowed": "ContentStreamType.NOTALLOWED",
"renditionAllowed": true,
"allowedIncludeClasses": [
{
"includeClassCode": "string",
"includeRootClassType": "FOLDER",
"minOccurs": 0,
"maxOccurs": 0
}
],
"allowedFileFormats": [
"string"
],
"maxFileSize": 0,
"shouldUseGlobalFormats": true,
"policyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"propertySets": [
{
"id": "4d7d8ad1-5501-4e66-957a-c55f9fdadd67",
"code": "myPropertySetName",
"name": "string",
"description": "string",
"createdBy": "string",
"creationDate": "2024-10-30T08:15:46.277Z",
"modifiedBy": "string",
"modificationDate": "2024-10-30T08:15:46.277Z",
"system": true
}
],
"isObjectVersionable": true,
"isCompound": true,
"isCreatable": true,
"_endpoints": [
{
"id": "collection",
"method": "GET",
"url": "/api/v1/documents/${objectId}",
"body": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
}
]
},
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"system": true,
"objectClassCode": "Invoice",
"objectRootClassType": "FOLDER"
},
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"system": true,
"propertySets": [
{
"id": "4d7d8ad1-5501-4e66-957a-c55f9fdadd67",
"code": "myPropertySetName",
"name": "string",
"description": "string",
"createdBy": "string",
"creationDate": "2024-10-30T08:15:46.277Z",
"modifiedBy": "string",
"modificationDate": "2024-10-30T08:15:46.277Z",
"system": true
}
],
"allowedIncludeClasses": [
{
"includeClassCode": "string",
"includeRootClassType": "FOLDER",
"minOccurs": 0,
"maxOccurs": 0
}
],
"isCreatable": true,
"isRenditionAllowed": true,
"_endpoints": [
{
"id": "collection",
"method": "GET",
"url": "/api/v1/documents/${objectId}",
"body": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
}
]
},
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"system": true,
"propertySets": [
{
"id": "4d7d8ad1-5501-4e66-957a-c55f9fdadd67",
"code": "myPropertySetName",
"name": "string",
"description": "string",
"createdBy": "string",
"creationDate": "2024-10-30T08:15:46.277Z",
"modifiedBy": "string",
"modificationDate": "2024-10-30T08:15:46.277Z",
"system": true
}
],
"isCreatable": true,
"isRenditionAllowed": true,
"_endpoints": [
{
"id": "collection",
"method": "GET",
"url": "/api/v1/documents/${objectId}",
"body": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
}
]
},
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"system": true,
"isCreatable": true,
"_endpoints": [
{
"id": "collection",
"method": "GET",
"url": "/api/v1/documents/${objectId}",
"body": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
}
]
},
{
"id": "c2afecb6-6837-42b9-b9f2-6cef18616a48",
"name": "Счет-фактура",
"code": "Invoice",
"rootClassType": "DOCUMENT",
"description": "string",
"properties": [
{
"propertySetId": "1f0eff20-3281-4877-9813-d650455722f0",
"code": "myPropertyName",
"name": "string",
"description": "string",
"type": "DhPropertyType.TEXT",
"settability": "DhPropertySettability.READ_ONLY",
"persistenceType": "DhPropertyPersistenceType.NOT_PERSISTENT",
"cardinality": "DhPropertyCardinality.SINGLE",
"required": true,
"hidden": true,
"orderable": true,
"searchable": true,
"defaultValue": {},
"validationExpression": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"expression": "string",
"description": "string",
"example": "string"
},
"ordinal": 0,
"kind": "DhPropertyKind.STATIC",
"linkObjectClass": "string",
"verifiable": true,
"private": true
}
],
"tags": [
"string"
],
"system": true,
"allowedSourceClasses": {
"documents": [
"string"
],
"folders": [
"string"
],
"collections": [
"string"
],
"items": [
"string"
],
"objects": [
"string"
],
"documentsStatic": [
"string"
],
"documentsDynamic": [
"string"
]
},
"allowedTargetClasses": {
"documents": [
"string"
],
"folders": [
"string"
],
"collections": [
"string"
],
"items": [
"string"
],
"objects": [
"string"
],
"documentsStatic": [
"string"
],
"documentsDynamic": [
"string"
]
},
"propertySets": [
{
"id": "4d7d8ad1-5501-4e66-957a-c55f9fdadd67",
"code": "myPropertySetName",
"name": "string",
"description": "string",
"createdBy": "string",
"creationDate": "2024-10-30T08:15:46.278Z",
"modifiedBy": "string",
"modificationDate": "2024-10-30T08:15:46.278Z",
"system": true
}
],
"isCreatable": true,
"_endpoints": [
{
"id": "collection",
"method": "GET",
"url": "/api/v1/documents/${objectId}",
"body": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
}
]
}
]'