Graph Vertex

このリソースは、指定したフィルタ条件および射影に従って、頂点のリストを返します。
apmdevops104jp
このリソースは、指定したフィルタ条件および射影に従って、頂点のリストを返します。
  • タイムスタンプの時点での履歴クエリが可能です。属性、アラート、およびその他のフィールドは、履歴を保持します。デフォルトのタイムスタンプは、現在です。
  • 静的射影の「compact」と「full」をサポートしています。デフォルトは「compact」です。
以下の 2 つの方法でこのエンドポイントを呼び出すことができます。
  1. フィルタを使用しない場合は単純な GET フォーム。
    GET /apm/appmap/graph/vertex?timestamp=2016-01-01T00:00:01Z&projection=full
  2. POST オプションはフィルタを使用する場合に便利です。フィルタ条件は POST ペイロードとして送信されます。POST /apm/appmap/graph/vertex?timestamp=2016-01-01T00:00:01Z&projection=fullContent-Type: application/json
    {
        "includeStartPoint": false,
        "orItems":[
            {
                "andItems":[
                    {
                         "itemType" : "attributeFilter",
                         "attributeName": "city",
                         "attributeOperator": "IN",
                         "values": [ null, "Paris", "London" ] 
                     }
                ]
            }
        ]
    }
フィルタの形式と機能
    • サポートされている操作 - IN、NOT_IN、MATCHES、NOT_MATCHES
 
  • IN - 完全一致
 
// filter for Verices where attribute named "city" is undefined or equals to "Paris" or "London" { "includeStartPoint": false, "orItems":[ { "andItems":[ { "itemType" : "attributeFilter", "attributeName": "city", "attributeOperator": "IN", "values": [ null, "Paris", "London" ] //null means undefined } ] } ] }
 
 
NOT_IN - 等しくない。
// filter for Verices where attribute named "city" is not "Paris" or undefined { "includeStartPoint": false, "orItems":[ { "andItems":[ { "itemType" : "attributeFilter", "attributeName": "city", "attributeOperator": "NOT_IN", "values": [ "Paris", null ] //null means undefined } ] } ] }
 
MATCHES - 「*」を使用したワイルドカード一致。パターン内のアスタリスク(*)は、値の 0 個以上の文字と一致させることができます。
// filter for Verices where attribute named "city" matches "P*s" wildcard. { "includeStartPoint": false, "orItems":[ { "andItems":[ { "itemType" : "attributeFilter", "attributeName": "city", "attributeOperator": "MATCHES", "values": [ "P*s"] } ] } ] }
 
 
 
NOT_MATCHES - ワイルドカードは一致しない。
// filter for Verices where attribute named "city" does not match "P*s" wildcard. The resultset will also include vertices where "city" attribute is undefined. { "includeStartPoint": false, "orItems":[ { "andItems":[ { "itemType" : "attributeFilter", "attributeName": "city", "attributeOperator": "MATCHES", "values": [ "P*s"] } ] } ] }
// To exclude vertices where "city" attribute is undefined add corresponding condition to the filter { "includeStartPoint": false, "orItems":[ { "andItems":[ { "itemType" : "attributeFilter", "attributeName": "city", "attributeOperator": "MATCHES", "values": [ "P*s"] }, { "itemType" : "attributeFilter", "attributeName": "city", "attributeOperator": "NOT_IN", "values": [ null ] } ] } ] }
フィルタは複数のフィルタ条件を組み合わせることができます。
{ "includeStartPoint": false, //true if Include request start point "orItems":[ { "andItems":[ { "itemType" : "attributeFilter", //can be "attributeFilter" or "btCoverage" "attributeName": "Attr1", "attributeOperator": "IN", "values": ["value1","value2", null] }, { "itemType" : "btCoverage", "andItemsForBtCoverage": [ { "attributeName": "Attr2", "attributeOperator": "IN", "values": ["value1","value2"] } ] }, { "itemType" : "attributeFilter", "attributeName": "Name", "attributeOperator": "NOT_IN", "values": ["value1"] } ] }, { "andItems":[ { "itemType" : "btCoverage", "andItemsForBtCoverage": [ { "attributeName": "Attr2", "attributeOperator": "MATCHES", "values": ["val*","us*active"] } ] }, { "itemType" : "btCoverage", "andItemsForBtCoverage": [ { "attributeName": "Business Service", "attributeOperator": "IN", "values": ["value1"] }, { "attributeName": "Hostname", "attributeOperator": "IN", "values": ["value1","value2"] } ] } ] }, ] }
「AttributeName」として、フィルタは以下をサポートしています
  • 有効な頂点属性名 - 「agent」や「hostname」など
  • 「serviceId」 - UI に表示される場合と同じように、「ビジネス サービス」によってフィルタする
  • 「transactionId」 - UI に表示される場合と同じように、「ビジネス トランザクション」によってフィルタする
projection
compact(デフォルト)
 { "_embedded": { "vertex": [ { "timestamp": "2016-05-12T08:10:55.738Z", "attributes": { "agent": ["turyu01-win04|NowhereBank|Mediator"], "hostname": ["turyu01-win04"], "Source cluster": ["Enterprise Team Center"], "name": ["Backends|Queue|requestValidation"], "agentDomain": ["SuperDomain"], "Attr1": ["newValue"], "Attr2": ["newValue2"], "processedBy": ["BackendVertexIdentifier"], "type": ["GENERICBACKEND"], "applicationname": ["Mediator"] }, "_links": { "parent": { "href": "http://localhost:8081/apm/appmap/graph/vertex" }, "self": { "href": "http://localhost:8081/apm/appmap/graph/vertex/Enterprise%20Team%20Center%3A8" } }, "id": "Enterprise Team Center:8" }, {...}, {...} ] }, "_links": { "self": { "href": "http://localhost:8081/apm/appmap/graph/vertex" }, "parent": { "href": "http://localhost:8081/apm/appmap" } } }
 
Full
 { "_embedded": { "vertex": [ { "timestamp": "2016-05-12T08:15:42.683Z", "attributes": [ { "name": "agentDomain", "value": "SuperDomain", "type": "GATHERED" }, { "name": "Attr2", "value": "newValue2", "type": "CUSTOM" }, { "name": "Attr2", "value": "newValue3", "type": "DECORATED" } ], "_links": { "parent": { "href": "http://localhost:8081/apm/appmap/graph/vertex" }, "self": { "href": "http://localhost:8081/apm/appmap/graph/vertex/Enterprise%20Team%20Center%3A8" } }, "id": "Enterprise Team Center:8" }, {...}, {...} ] }, "_links": { "self": { "href": "http://localhost:8081/apm/appmap/graph/vertex" }, "parent": { "href": "http://localhost:8081/apm/appmap" } } }
パッチ
選択した Vertex の属性値を更新します。
  • 属性名は一意である必要があります。重複した属性は破棄されます。
  • null は属性が削除されます。
  • 指定した頂点に属性がある場合は、更新されます。そうでない場合、PATCH により CUSTOM 属性が作成されます
  • CUSTOM 属性は、作成、更新、または削除することができます。PATCH によって属性が作成された場合、それは常に CUSTOM です。
  • 属性ルールによって作成された CUSTOM 属性を更新できます。
  • BASIC 属性は更新または削除できません。
要求のペイロードの例を以下に示します。
 { "items" : [ { "id":"Enterprise Team Center:8", "attributes": { "Attr1":["newValue", "newValue2"], "Attr2": null } }, {...}, {...} ] }