curl --request POST \
--url https://api.projectdiscovery.io/v1/template \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"template": "<string>",
"prompt": "<string>"
}
'{
"message": "<string>",
"template_id": "<string>",
"template_name": "<string>",
"template": {
"uri": "<string>",
"id": "<string>",
"name": "<string>",
"author": [
"<string>"
],
"tags": [
"<string>"
],
"severity": "<string>",
"type": "<string>",
"dir": "<string>",
"ref": "<string>",
"vendor": "<string>",
"product": "<string>",
"classification": {
"cve-id": [
"<string>"
],
"cwe-id": [
"<string>"
],
"cvss-metrics": "<string>",
"cvss-score": 123,
"epss-score": 123,
"epss-percentile": 123,
"cpe": "<string>"
},
"metadata": {},
"digest": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"release_tag": "<string>",
"is_early": true,
"raw": "<string>",
"template_id": "<string>",
"description": "<string>",
"filename": "<string>",
"impact": "<string>",
"ai_meta": {
"model_used": "<string>",
"is_prompt_by_human": true,
"is_template_by_human": true,
"prompt": "<string>"
},
"references": [
"<string>"
],
"template_type": "public",
"is_draft": true,
"is_github": true,
"is_new": true,
"is_pdteam": true,
"remediation": "<string>"
}
}Create a private template
curl --request POST \
--url https://api.projectdiscovery.io/v1/template \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"template": "<string>",
"prompt": "<string>"
}
'{
"message": "<string>",
"template_id": "<string>",
"template_name": "<string>",
"template": {
"uri": "<string>",
"id": "<string>",
"name": "<string>",
"author": [
"<string>"
],
"tags": [
"<string>"
],
"severity": "<string>",
"type": "<string>",
"dir": "<string>",
"ref": "<string>",
"vendor": "<string>",
"product": "<string>",
"classification": {
"cve-id": [
"<string>"
],
"cwe-id": [
"<string>"
],
"cvss-metrics": "<string>",
"cvss-score": 123,
"epss-score": 123,
"epss-percentile": 123,
"cpe": "<string>"
},
"metadata": {},
"digest": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"release_tag": "<string>",
"is_early": true,
"raw": "<string>",
"template_id": "<string>",
"description": "<string>",
"filename": "<string>",
"impact": "<string>",
"ai_meta": {
"model_used": "<string>",
"is_prompt_by_human": true,
"is_template_by_human": true,
"prompt": "<string>"
},
"references": [
"<string>"
],
"template_type": "public",
"is_draft": true,
"is_github": true,
"is_new": true,
"is_pdteam": true,
"remediation": "<string>"
}
}Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team
Example response
Template Document or object
Show child attributes
The URI of the template (could be a path or a ksuid)
The ID of the template
The name of the template
The authors of the template
The tags of the template
The severity of the template
The type of the template
The vendor of the template
The product of the template
Classification of template including additional metadata like cve-id, cwe-id etc
Show child attributes
CVE IDs for the template
CWE IDs for the template
CVSS Metrics for the template
CVSS Score for the template
EPSS Score for the template
EPSS Percentile for the template
CPE for the template
The digest of the template
The time when template was created
The time when template was updated
The release tag of the template (contains tag when the file was first released)
True if template is in early access
The raw unparsed template
Show child attributes
The AI model used to generate the template
Whether the prompt was written by a human
Whether the template was written by a human
The prompt used to generate the template
public, user, shared Is the template from pdteam
Was this page helpful?