APM Web Applications

The Web Application API facilitates configuration of Web Applications, identification through URL patterns, as well as managing Web Application related attributes, like naming of contextual information on Pages and Ajax Calls, and how to simplify URLs for better identification and aggregation.

Query APM Web Applications

Get all Web Applications Definitions

Run the following cURL command to get all Web Application definitions.

curl -X GET -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/getAll"

Get Web Applications Limits

Run the following cURL command to get Web Applications limits for this environment.

curl -X GET -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/getLimits"

Get Always Applied Web Applications Regular Expressions

Run the following cURL command to get the Regular Expressions that are always applied to Web Applications.

curl -X GET -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/alwaysAppliedRegexes"

Get Web Applications Metrics

Run the following cURL command to get the Web Applications metrics monitored from $since1 to $until1.

curl -X GET -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/getMetrics?since=$since1&until=$until1"

Create APM Web Application

Create a JSON file called test.json and copy the following. The following JSON file will create a new web application that monitors page URLs containing oracletest. It also has some rules in place to save additional information like base_url, pages, AJAX calls, etc.

{
  "webapp":{"name":"testwebapp2","creator":"admin@oracle.com",
  "description":null,"enabled":true,
  "condition":{"type":"or","children":[{"target":"page_url","type":"contains","search":"oracletest"}]},
  "rules":[{
    "entity":"page","target":"page_url","source":"base_url","argument":"","regexes":[]},{"entity":"page","target":"page_context1","source":"none","argument":"","regexes":[]},{"entity":"page","target":"page_context2","source":"none","argument":"","regexes":[]},{"entity":"click","target":"click_url","source":"base_url","argument":"","regexes":[]},{"entity":"click","target":"click_context1","source":"none","argument":"","regexes":[]},{"entity":"click","target":"click_context2","source":"none","argument":"","regexes":[]},{"entity":"ajax","target":"ajax_url","source":"base_url","argument":"","regexes":[]}
  ]}
}

Run the following cURL command to create a new web application testwebapp2 from test.json.

curl -X POST -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/create" -d "@test.json"

Update APM Web Application

Create a JSON file called test.json and copy the following. The following JSON file will update web application testwebapp2 to also search for page_urls containing test.example:

{
  "webapp":{"name":"testwebapp2","creator":"admin@oracle.com",
  "description":null,"enabled":true,
  "condition":{"type":"or","children":[{"target":"page_url","type":"contains","search":"oracletest"},{"target":"page_url","type":"contains","search":"test.example"}]},
  "rules":[{
    "entity":"page","target":"page_url","source":"base_url","argument":"","regexes":[]},{"entity":"page","target":"page_context1","source":"none","argument":"","regexes":[]},{"entity":"page","target":"page_context2","source":"none","argument":"","regexes":[]},{"entity":"click","target":"click_url","source":"base_url","argument":"","regexes":[]},{"entity":"click","target":"click_context1","source":"none","argument":"","regexes":[]},{"entity":"click","target":"click_context2","source":"none","argument":"","regexes":[]},{"entity":"ajax","target":"ajax_url","source":"base_url","argument":"","regexes":[]}
  ]}
}

Run the following cURL command to update web application testwebapp2 from test.json.

curl -X POST -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/update" -d "@test.json"

Query APM Web Application Details

Test Regular Expression

Create a JSON file called test.json and copy the following. The following JSON file will test a new regular expression rule.

{"name":"testwebapp1","input":"www.abc.com","regexes":[{"id":1,"search":"abc","replace":"xyz","description":""}]}

Run the following cURL command to test a new regular expression rule defined in test.json:

curl -X POST -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/webApps/testRegexes" -d "@test.json"

Get Page and Page Updates for Specified Web Application

Run the following cURL command to get page and page updates for specified Web Application:

curl -X GET -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/pageUpdates/getList?since=${since1}&until=${until1}&isWebApp=true&applicationName=${WEB_APP}"

Get Sessions for Specified Web Application

Run the following cURL command to get Sessions for specified Web Application:

curl -X GET -H "X-USER-IDENTITY-DOMAIN-NAME:TENANT_ID" -u SSO_USERNAME:SSO_PASSWORD "OMC_URL:PORT/serviceapi/eum.dataserver/api/v1/sessions/getAll?since=${since1}&until=${until1}&isWebApp=true&applicationName=${WEB_APP}&enableSPAFeature=true