Creates a new application asset based on the provided details, such as name, criticality, and asset selection.
Required license:
Cortex XSIAM Premium. In Cortex XSIAM Enterprise and Cortex NG SIEM, requires the Cortex Cloud Posture Management add-on. Not supported in XSIAM Enterprise Plus.
Authorization
String
required
{api_key}
{api_key}
UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP
x-xdr-auth-id
String
required
{api_key_id}
{api_key_id}
241
curl -X 'POST'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
-H
'Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP '
-H
'x-xdr-auth-id: 241'
'https://api-yourfqdn/public_api/appsec/v1/application'
-d
'{
"productManager" : [ "productManager", "productManager" ],
"assetSelection" : {
"filter" : {
"values" : [ "values", "values" ]
},
"assetIds" : [ "assetIds", "assetIds" ]
},
"businessUnit" : "businessUnit",
"name" : "name",
"description" : "description",
"devOwner" : [ "devOwner", "devOwner" ],
"devOpsOwner" : [ "devOpsOwner", "devOpsOwner" ],
"businessOwner" : [ "businessOwner", "businessOwner" ]
}'
import http.client
conn = http.client.HTTPSConnection("api-yourfqdn")
payload = "{\"name\":\"string\",\"businessCriticality\":\"Critical\",\"businessUnit\":\"string\",\"creationType\":\"Auto\",\"description\":\"string\",\"compliance\":\"PCI-DSS\",\"businessOwner\":[\"string\"],\"devOwner\":[\"string\"],\"devOpsOwner\":[\"string\"],\"productManager\":[\"string\"],\"assetSelection\":{\"selectionType\":\"filter\",\"section\":\"code\",\"filter\":{\"values\":[\"string\"],\"provider\":\"CIRCLE_CI\",\"filterType\":\"REPOSITORY\"},\"assetIds\":[\"string\"]}}"
headers = {
'Authorization': "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ",
'x-xdr-auth-id': "241",
'content-type': "application/json"
}
conn.request("POST", "/public_api/appsec/v1/application", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api-yourfqdn/public_api/appsec/v1/application")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP '
request["x-xdr-auth-id"] = '241'
request["content-type"] = 'application/json'
request.body = "{\"name\":\"string\",\"businessCriticality\":\"Critical\",\"businessUnit\":\"string\",\"creationType\":\"Auto\",\"description\":\"string\",\"compliance\":\"PCI-DSS\",\"businessOwner\":[\"string\"],\"devOwner\":[\"string\"],\"devOpsOwner\":[\"string\"],\"productManager\":[\"string\"],\"assetSelection\":{\"selectionType\":\"filter\",\"section\":\"code\",\"filter\":{\"values\":[\"string\"],\"provider\":\"CIRCLE_CI\",\"filterType\":\"REPOSITORY\"},\"assetIds\":[\"string\"]}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"name": "string",
"businessCriticality": "Critical",
"businessUnit": "string",
"creationType": "Auto",
"description": "string",
"compliance": "PCI-DSS",
"businessOwner": [
"string"
],
"devOwner": [
"string"
],
"devOpsOwner": [
"string"
],
"productManager": [
"string"
],
"assetSelection": {
"selectionType": "filter",
"section": "code",
"filter": {
"values": [
"string"
],
"provider": "CIRCLE_CI",
"filterType": "REPOSITORY"
},
"assetIds": [
"string"
]
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-yourfqdn/public_api/appsec/v1/application");
xhr.setRequestHeader("Authorization", "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ");
xhr.setRequestHeader("x-xdr-auth-id", "241");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-yourfqdn/public_api/appsec/v1/application")
.header("Authorization", "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ")
.header("x-xdr-auth-id", "241")
.header("content-type", "application/json")
.body("{\"name\":\"string\",\"businessCriticality\":\"Critical\",\"businessUnit\":\"string\",\"creationType\":\"Auto\",\"description\":\"string\",\"compliance\":\"PCI-DSS\",\"businessOwner\":[\"string\"],\"devOwner\":[\"string\"],\"devOpsOwner\":[\"string\"],\"productManager\":[\"string\"],\"assetSelection\":{\"selectionType\":\"filter\",\"section\":\"code\",\"filter\":{\"values\":[\"string\"],\"provider\":\"CIRCLE_CI\",\"filterType\":\"REPOSITORY\"},\"assetIds\":[\"string\"]}}")
.asString();import Foundation
let headers = [
"Authorization": "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ",
"x-xdr-auth-id": "241",
"content-type": "application/json"
]
let parameters = [
"name": "string",
"businessCriticality": "Critical",
"businessUnit": "string",
"creationType": "Auto",
"description": "string",
"compliance": "PCI-DSS",
"businessOwner": ["string"],
"devOwner": ["string"],
"devOpsOwner": ["string"],
"productManager": ["string"],
"assetSelection": [
"selectionType": "filter",
"section": "code",
"filter": [
"values": ["string"],
"provider": "CIRCLE_CI",
"filterType": "REPOSITORY"
],
"assetIds": ["string"]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-yourfqdn/public_api/appsec/v1/application")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-yourfqdn/public_api/appsec/v1/application",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"name\":\"string\",\"businessCriticality\":\"Critical\",\"businessUnit\":\"string\",\"creationType\":\"Auto\",\"description\":\"string\",\"compliance\":\"PCI-DSS\",\"businessOwner\":[\"string\"],\"devOwner\":[\"string\"],\"devOpsOwner\":[\"string\"],\"productManager\":[\"string\"],\"assetSelection\":{\"selectionType\":\"filter\",\"section\":\"code\",\"filter\":{\"values\":[\"string\"],\"provider\":\"CIRCLE_CI\",\"filterType\":\"REPOSITORY\"},\"assetIds\":[\"string\"]}}",
CURLOPT_HTTPHEADER => [
"Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ",
"content-type: application/json",
"x-xdr-auth-id: 241"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-yourfqdn/public_api/appsec/v1/application");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ");
headers = curl_slist_append(headers, "x-xdr-auth-id: 241");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"name\":\"string\",\"businessCriticality\":\"Critical\",\"businessUnit\":\"string\",\"creationType\":\"Auto\",\"description\":\"string\",\"compliance\":\"PCI-DSS\",\"businessOwner\":[\"string\"],\"devOwner\":[\"string\"],\"devOpsOwner\":[\"string\"],\"productManager\":[\"string\"],\"assetSelection\":{\"selectionType\":\"filter\",\"section\":\"code\",\"filter\":{\"values\":[\"string\"],\"provider\":\"CIRCLE_CI\",\"filterType\":\"REPOSITORY\"},\"assetIds\":[\"string\"]}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-yourfqdn/public_api/appsec/v1/application");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "UCoWpG4rkNzgCp2dsh8m02iVpZsskwKHz7N1tErPcUV3Wmf59Gc9kytmgOv0pDWoem3PBlORyRIPiir4OcYdWUOWAM3JyTgoCxQf4nQoTlKmFRKz9Bj5vIjluw66p9WP ");
request.AddHeader("x-xdr-auth-id", "241");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"string\",\"businessCriticality\":\"Critical\",\"businessUnit\":\"string\",\"creationType\":\"Auto\",\"description\":\"string\",\"compliance\":\"PCI-DSS\",\"businessOwner\":[\"string\"],\"devOwner\":[\"string\"],\"devOpsOwner\":[\"string\"],\"productManager\":[\"string\"],\"assetSelection\":{\"selectionType\":\"filter\",\"section\":\"code\",\"filter\":{\"values\":[\"string\"],\"provider\":\"CIRCLE_CI\",\"filterType\":\"REPOSITORY\"},\"assetIds\":[\"string\"]}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);namestringrequiredA unique name for the application asset.
A unique name for the application asset.
businessCriticalitystring (Enum)requiredThe operational importance of the asset.
The operational importance of the asset.
businessUnitstringBusiness unit responsible for the asset.
Business unit responsible for the asset.
creationTypestring (Enum)requiredDefines how the application asset is created.
Defines how the application asset is created.
descriptionstringA brief description of the asset's purpose.
A brief description of the asset's purpose.
compliancestring (Enum)The compliance status or requirement category for an asset.
The compliance status or requirement category for an asset.
businessOwnerarray[string]A list of stakeholders responsible for the asset from the business side.
A list of stakeholders responsible for the asset from the business side.
devOwnerarray[string]A list of primary developers or engineering leads responsible for the code.
A list of primary developers or engineering leads responsible for the code.
devOpsOwnerarray[string]A list of SRE or DevOps engineers managing the infrastructure.
A list of SRE or DevOps engineers managing the infrastructure.
productManagerarray[string]A list of product managers responsible for overseeing the application asset.
A list of product managers responsible for overseeing the application asset.
assetSelectionobjectDefine the logic for how specific technical assets must be linked to this application.
Define the logic for how specific technical assets must be linked to this application.
selectionTypestring (Enum)requiredMethod to select application assets.
Method to select application assets.
sectionstring (Enum)requiredIdentifies the functional section to which the asset selection applies.
Identifies the functional section to which the asset selection applies.
filterobjectDefines filter criteria to dynamically select application assets. This field supports one of the supported application asset selection filter types.
Defines filter criteria to dynamically select application assets. This field supports one of the supported application asset selection filter types.
valuesarray[string]requiredIf the filterType is REPOSITORY, enter the repository ID as the value.
If the filterType is ORGANIZATION, enter the organization URL of the provider.
If the filterType is REPOSITORY, enter the repository ID as the value.
If the filterType is ORGANIZATION, enter the organization URL of the provider.
providerobject
string (Enum)Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
string (Enum)Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
string (Enum)Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
string (Enum)Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
filterTypeobjectrequiredThe asset attribute used to filter assets from the selected provider.
The asset attribute used to filter assets from the selected provider.
string (Enum)Specifies the available values for the code type filter.
Specifies the available values for the code type filter.
string (Enum)Specifies the available values for the run type filter.
Specifies the available values for the run type filter.
valuesobjectrequiredContainer for filter values used to match application assets.
Container for filter values used to match application assets.
orgUrlstringOrganization URL used to filter assets belonging to a specific organization.
Organization URL used to filter assets belonging to a specific organization.
repositoryIdstringUnique identifier of the repository used to filter assets.
Unique identifier of the repository used to filter assets.
projectUrlstringProject URL used to filter assets belonging to a specific project.
Project URL used to filter assets belonging to a specific project.
orgUnifyFilterobjectDefines unification rules applied at the organization level.
Defines unification rules applied at the organization level.
providersobjectrequired
string (Enum)Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
string (Enum)Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
string (Enum)Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
string (Enum)Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
namestringrequiredName of the organization used for asset unification.
Name of the organization used for asset unification.
projectUnifyFilterobjectDefines unification rules applied at the project level.
Defines unification rules applied at the project level.
providersobjectrequired
string (Enum)Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
string (Enum)Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
string (Enum)Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
string (Enum)Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
namestringrequiredName of the project used for asset unification.
Name of the project used for asset unification.
repositoryUnifyFilterobjectDefines unification rules applied at the repository level.
Defines unification rules applied at the repository level.
providersobjectrequired
string (Enum)Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
Build system or CI provider used for the asset. Allowed values: CIRCLE_CI JENKINS GITLAB_CI AZURE_PIPELINES GITHUB_ACTIONS
string (Enum)Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
Source code management (SCM) or code hosting provider.
Allowed values: GITLAB, GITHUB, BITBUCKET, AZURE_REPOS, AWS_CODE_COMMIT
string (Enum)Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
Runtime or execution environment provider for the application or asset. Allowed Values: GCP, AWS, AZURE
string (Enum)Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
Deployment platform or system used to deploy the application or asset. Allowed values: ACR ECR GAR JFrog Docker
namestringrequiredName of the repository used for asset unification.
Name of the repository used for asset unification.
filterTypeobjectThe asset attribute used to filter assets from the selected provider.
The asset attribute used to filter assets from the selected provider.
string (Enum)Specifies the available values for the code type filter.
Specifies the available values for the code type filter.
string (Enum)Specifies the available values for the run type filter.
Specifies the available values for the run type filter.
stringDefines filter criteria to dynamically select application assets. This field supports one of the supported application asset selection filter types.
Defines filter criteria to dynamically select application assets. This field supports one of the supported application asset selection filter types.
assetIdsarray[string]A list of unique identifiers representing the assets to be included.
A list of unique identifiers representing the assets to be included.
{
"name": "test-app",
"businessCriticality": "Low",
"businessUnit": "string",
"creationType": "Auto",
"description": "string",
"businessOwner": [],
"devOwner": [],
"devOpsOwner": [],
"productManager": [],
"assetSelection": {
"selectionType": "filter",
"section": "code",
"filter": {
"values": [
"928aa0b599d2df33978d958e96d146fc299ac68f02fda5cc376440f41452c2e0"
],
"provider": "GITHUB",
"filterType": "REPOSITORY"
},
"assetIds": []
}
}