エンティティ定義リソース

システム内の各エンティティ定義は、エンティティ定義リソースによって表されます。このリソースを使用して、エンティティ定義の状態を取得したり、エンティティ定義を更新および削除したりできます。

GETHEADPUTDELETE の各メソッドを使用できます。

GET /api/entitydefinitions/name

エンティティ定義の状態を含むエンティティ定義オブジェクトを返します。

要求の例:

RequestResponse
GET http://hostname/api/entitydefinitions/EntityDefinition1
Host: hostname
Accept: application/json

応答の例:

RequestResponse
HTTP/1.1 200 OK
Content-Length: content length
Content-Type: application/json; charset=utf-8
ETag: "hash string"

{
    "id":298,
    "name":"EntityDefinition1",
    "member_groups":[
        {
            "name":"New member group",
            "labels":{
                "en-US":"New member group",
                "nl-BE":"Nieuwe onderdeel groep"
            },
            "members":[
                {
                    "type":"String"
                    "name":"New string property"
                },
                ...
            ]
        },
        ...
    ],
    "self":{
        "href":"http://hostname/api/entitydefinitions/EntityDefinition1"
    },
    "entities":{
        "href":"http://hostname/api/entitydefinitions/EntityDefinition1/entities"
    }
}

PUT /api/entitydefinitions/name

要求で送信された状態でエンティティ定義を更新します。 処理に成功すると、サーバーは 204 No Content で応答します。 要求の本文には、エンティティ定義オブジェクトを含める必要があり、すべてのプロパティが必要です。 プロパティが存在しない場合、その値は削除されます。 含まれていないメンバーはすべて削除されます。

要求の例:

RequestResponse
PUT http://hostname/api/entitydefinitions/EntityDefinition1
Host: hostname
Content-Type: application/json

{
    "member_groups":[
        {
            "labels":{
                "nl-NL":"Nieuwe onderdeel groep"
            }
        }
    ]
}

応答の例:

RequestResponse
HTTP/1.1 204 No Content

DELETE /api/entitydefinitions/name

エンティティ定義を削除します。 処理に成功すると、サーバーは 204 No Content で応答します。

要求の例:

RequestResponse
DELETE http://hostname/api/entitydefinitions/EntityDefinition1
Host: hostname

応答の例:

RequestResponse
HTTP/1.1 204 No Content

何かフィードバックはありますか?

この記事を改善するための提案がある場合は、