{
    "info": {
        "title": "CERT-FR Openapi",
        "version": "2.0"
    },
    "servers": [
        {
            "url": "https://www.cert.ssi.gouv.fr/"
        }
    ],
    "tags": [
        {
            "name": "Public.Alert"
        },
        {
            "name": "Public.Advisory"
        }
    ],
    "paths": {
        "/avis/json/": {
            "get": {
                "parameters": [],
                "tags": [
                    "Public.Advisory"
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/OutPublicApiAdvisoryList"
                                    }
                                }
                            }
                        },
                        "description": "OK"
                    }
                }
            }
        },
        "/alerte/json/": {
            "get": {
                "parameters": [],
                "tags": [
                    "Public.Alert"
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/OutPublicApiAlertList"
                                    }
                                }
                            }
                        },
                        "description": "OK"
                    }
                }
            }
        },
        "/avis/{reference}/json/": {
            "get": {
                "parameters": [
                    {
                        "in": "path",
                        "name": "reference",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Public.Advisory"
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OutPublicApiAdvisory"
                                }
                            }
                        },
                        "description": "OK"
                    }
                }
            }
        },
        "/alerte/{reference}/json/": {
            "get": {
                "parameters": [
                    {
                        "in": "path",
                        "name": "reference",
                        "schema": {
                            "type": "string"
                        },
                        "required": true
                    }
                ],
                "tags": [
                    "Public.Alert"
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/OutPublicApiAlert"
                                }
                            }
                        },
                        "description": "OK"
                    }
                }
            }
        }
    },
    "openapi": "3.0.3",
    "components": {
        "schemas": {
            "OutPublicApiAdvisoryList": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": null
                    },
                    "reference": {
                        "type": "string",
                        "pattern": "(^(CERTFR|CERTA)-(20)[0-1][0-9]-(AVI)-[\\d]{2,4}$)|(^(CERTFR)-(20)[2-9][0-9]-(AVI)-[\\d]{3,4}$)"
                    },
                    "json_url": {
                        "readOnly": true
                    },
                    "last_revision_date": {
                        "type": "string",
                        "format": null,
                        "description": "Date au format ISO '%Y-%m-%dT%H:%M:%S.%f' sans temps.Contient 'null' si la date n'est pas définie.",
                        "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d{6}"
                    },
                    "scada": {
                        "readOnly": true,
                        "description": "Marqueur indiquant que l'avis concerne des produits spécifiques au milieu industriel."
                    }
                },
                "required": [
                    "reference",
                    "title"
                ],
                "additionalProperties": false
            },
            "OutPublicApiAlertList": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": null
                    },
                    "reference": {
                        "type": "string",
                        "pattern": "(^(CERTFR|CERTA)-(20)[0-1][0-9]-(ALE)-[\\d]{2,4}$)|(^(CERTFR)-(20)[2-9][0-9]-(ALE)-[\\d]{3,4}$)"
                    },
                    "json_url": {
                        "readOnly": true
                    },
                    "last_revision_date": {
                        "type": "string",
                        "format": null,
                        "description": "Date au format ISO '%Y-%m-%dT%H:%M:%S.%f' sans temps.Contient 'null' si la date n'est pas définie.",
                        "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d{6}"
                    }
                },
                "required": [
                    "reference",
                    "title"
                ],
                "additionalProperties": false
            },
            "OutPublicApiVendor": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Nom de l'éditeur. La valeur 'N/A' signifie qu'il n'a pas été renseigné."
                    },
                    "scada": {
                        "type": "boolean",
                        "description": "Marqueur indiquant que l'éditeur fournit des produits spécifiques au milieu industriel."
                    }
                },
                "required": [
                    "name"
                ],
                "additionalProperties": false
            },
            "OutPublicApiProduct": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "description": "Nom du produit. La valeur 'N/A' signifie qu'il n'a pas été renseigné."
                    },
                    "vendor": {
                        "$ref": "#/components/schemas/OutPublicApiVendor"
                    }
                },
                "additionalProperties": false
            },
            "OutPublicApiAffectedSystem": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "description": "Description du système affecté, au format markdown."
                    },
                    "product": {
                        "$ref": "#/components/schemas/OutPublicApiProduct"
                    }
                },
                "additionalProperties": false
            },
            "OutPublicApiCve": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "pattern": "CVE-[1|2][\\d]{3}-[\\d]{4,}$",
                        "description": "Contient l'identifiant CVE de la vulnérabilité."
                    },
                    "url": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Contient l'URL relative à l'identifiant CVE."
                    }
                },
                "required": [
                    "name",
                    "url"
                ],
                "additionalProperties": false
            },
            "OutPublicApiLink": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Contient le titre d'un élément de documentation."
                    },
                    "url": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Contient l'URL relative à l'élément de documentation."
                    }
                },
                "required": [
                    "title",
                    "url"
                ],
                "additionalProperties": false
            },
            "OutPublicApiRevision": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Contient une brève description des changements liés à la révision du document."
                    },
                    "revision_date": {
                        "type": "string",
                        "format": null,
                        "description": "Date au format ISO '%Y-%m-%dT%H:%M:%S.%f' sans temps.Contient 'null' si la date n'est pas définie.",
                        "pattern": "\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d{6}"
                    }
                },
                "required": [
                    "description"
                ],
                "additionalProperties": false
            },
            "OutPublicApiRisk": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Contient la description textuelle du risque lié à la vulnérabilité."
                    }
                },
                "required": [
                    "description"
                ],
                "additionalProperties": false
            },
            "OutPublicApiVendorAdvisory": {
                "type": "object",
                "properties": {
                    "title": {
                        "type": "string",
                        "description": "Contient la description du document publié par l'éditeur."
                    },
                    "url": {
                        "type": "string",
                        "description": "Contient l'URL relative au document publié par l'éditeur."
                    },
                    "published_at": {
                        "type": "string",
                        "format": null,
                        "description": "Date au format '%Y-%m-%d'. Contient 'null' si la date n'est pas définie.",
                        "pattern": "\\d{4}-[01]\\d-[0-3]\\d"
                    }
                },
                "additionalProperties": false
            },
            "OutPublicApiAdvisory": {
                "type": "object",
                "properties": {
                    "$ref": {
                        "readOnly": true,
                        "description": "A reference to the schema for this API"
                    },
                    "affected_systems_content": {
                        "type": "string",
                        "description": "Remarques générales concernant les systèmes affectés, au format markdown."
                    },
                    "content": {
                        "type": "string",
                        "description": "Contenu de l'avis, au format markdown."
                    },
                    "summary": {
                        "type": "string",
                        "description": "Résumé de l'avis, au format markdown."
                    },
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": null
                    },
                    "reference": {
                        "type": "string",
                        "pattern": "(^(CERTFR|CERTA)-(20)[0-1][0-9]-(AVI)-[\\d]{2,4}$)|(^(CERTFR)-(20)[2-9][0-9]-(AVI)-[\\d]{3,4}$)"
                    },
                    "affected_systems": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiAffectedSystem"
                        }
                    },
                    "cves": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiCve"
                        }
                    },
                    "links": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiLink"
                        }
                    },
                    "revisions": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiRevision"
                        }
                    },
                    "risks": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiRisk"
                        }
                    },
                    "vendor_advisories": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiVendorAdvisory"
                        }
                    }
                },
                "required": [
                    "reference",
                    "title"
                ],
                "additionalProperties": false
            },
            "OutPublicApiAlert": {
                "type": "object",
                "properties": {
                    "$ref": {
                        "readOnly": true,
                        "description": "A reference to the schema for this API"
                    },
                    "affected_systems_content": {
                        "type": "string",
                        "description": "Remarques générales concernant les systèmes affectés, au format markdown."
                    },
                    "content": {
                        "type": "string",
                        "description": "Contenu de l'alerte, au format markdown."
                    },
                    "summary": {
                        "type": "string",
                        "description": "Résumé de l'alerte, au format markdown."
                    },
                    "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": null
                    },
                    "closed_at": {
                        "type": "string",
                        "format": null,
                        "description": "Date au format '%Y-%m-%d'. Contient 'null' si la date n'est pas définie.",
                        "pattern": "\\d{4}-[01]\\d-[0-3]\\d"
                    },
                    "reference": {
                        "type": "string",
                        "pattern": "(^(CERTFR|CERTA)-(20)[0-1][0-9]-(ALE)-[\\d]{2,4}$)|(^(CERTFR)-(20)[2-9][0-9]-(ALE)-[\\d]{3,4}$)"
                    },
                    "cves": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiCve"
                        }
                    },
                    "revisions": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiRevision"
                        }
                    },
                    "vendor_advisories": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiVendorAdvisory"
                        }
                    },
                    "links": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiLink"
                        }
                    },
                    "affected_systems": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiAffectedSystem"
                        }
                    },
                    "risks": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/OutPublicApiRisk"
                        }
                    }
                },
                "required": [
                    "reference",
                    "title"
                ],
                "additionalProperties": false
            }
        }
    }
}