### Query FIRST API v1 Teams Data (cURL) Source: https://api.first.org Example of how to query the FIRST API v1 for team data using cURL. This demonstrates making a GET request to the /teams endpoint. The output format defaults to JSON. ```bash curl -X GET https://api.first.org/data/v1/teams ``` -------------------------------- ### GET /channels Source: https://api.first.org Retrieves a list of channels. Supports global parameters for filtering, pagination, and output control. ```APIDOC ## GET /channels ### Description Retrieves a list of channels. Supports global parameters for filtering, pagination, and output control. ### Method GET ### Endpoint `/channels` ### Query Parameters - **fields** (string) - Optional - Comma-separated list of fieldnames to be retrieved. Used only for limiting the available resultset. - **limit** (integer) - Optional - Limits the maximum number of records to be shown. Should be an integer number between 0 and 10,000. - **offset** (integer) - Optional - Offsets the list of records by this number. The first item is 0. - **sort** (string) - Optional - Comma-separated list of fieldnames to be used to sort the resultset. Fields starting with `-` (minus sign) indicate a descending order. - **envelope** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If set to true, it will add an object wrapping the resultset. Defaults to `true`. - **pretty** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If the result should be pretty-printed or not. Defaults to `false`. - **callback** (string) - Optional - Only for JSONP resultsets, adds the `callback` as a function call. Only alphanumerical characters are allowed. - **scope** (string) - Optional - Collection of fieldnames to retrieve. Affects the resultset and the possible options for the parameter `fields`. Each data model can specify multiple available scopes. ### Request Example ```bash curl -i "https://api.first.org/data/v1/channels?limit=5" ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **status-code** (string) - The status message of the response. - **version** (string) - The API version used. - **last-modified** (string) - The last modified date of the resultset. - **total-count** (integer) - The total number of records matched. - **access** (string) - The access level of the data. - **data** (array) - An array of channel objects. ``` -------------------------------- ### Filtering FIRST API v1 Data with Parameters (cURL) Source: https://api.first.org Illustrates how to filter data from the FIRST API v1 using URL parameters. This example shows fetching teams with URL encoding for spaces in parameter values. ```bash curl "https://api.first.org/data/v1/teams?param1=foo%20bar¶m2=bar" ``` -------------------------------- ### Requesting Gzip Compression from FIRST API v1 (cURL) Source: https://api.first.org Example of how to request compressed data (Gzip) from the FIRST API v1 by including the Accept-Encoding header. This can reduce data transfer size. ```bash curl -H "Accept-Encoding: compress, gzip" https://api.first.org/data/v1/teams ``` -------------------------------- ### GET /news Source: https://api.first.org Retrieves a list of news items. Supports global parameters for filtering, pagination, and output control. ```APIDOC ## GET /news ### Description Retrieves a list of news items. Supports global parameters for filtering, pagination, and output control. ### Method GET ### Endpoint `/news` ### Query Parameters - **fields** (string) - Optional - Comma-separated list of fieldnames to be retrieved. Used only for limiting the available resultset. - **limit** (integer) - Optional - Limits the maximum number of records to be shown. Should be an integer number between 0 and 10,000. - **offset** (integer) - Optional - Offsets the list of records by this number. The first item is 0. - **sort** (string) - Optional - Comma-separated list of fieldnames to be used to sort the resultset. Fields starting with `-` (minus sign) indicate a descending order. - **envelope** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If set to true, it will add an object wrapping the resultset. Defaults to `true`. - **pretty** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If the result should be pretty-printed or not. Defaults to `false`. - **callback** (string) - Optional - Only for JSONP resultsets, adds the `callback` as a function call. Only alphanumerical characters are allowed. - **scope** (string) - Optional - Collection of fieldnames to retrieve. Affects the resultset and the possible options for the parameter `fields`. Each data model can specify multiple available scopes. ### Request Example ```bash curl -i "https://api.first.org/data/v1/news?limit=10" ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **status-code** (string) - The status message of the response. - **version** (string) - The API version used. - **last-modified** (string) - The last modified date of the resultset. - **total-count** (integer) - The total number of records matched. - **access** (string) - The access level of the data. - **data** (array) - An array of news objects. ``` -------------------------------- ### GET /teams Source: https://api.first.org Retrieves a list of teams. Supports global parameters for filtering, pagination, and output control. ```APIDOC ## GET /teams ### Description Retrieves a list of teams. Supports global parameters for filtering, pagination, and output control. ### Method GET ### Endpoint `/teams` ### Query Parameters - **fields** (string) - Optional - Comma-separated list of fieldnames to be retrieved. Used only for limiting the available resultset. - **limit** (integer) - Optional - Limits the maximum number of records to be shown. Should be an integer number between 0 and 10,000. - **offset** (integer) - Optional - Offsets the list of records by this number. The first item is 0. - **sort** (string) - Optional - Comma-separated list of fieldnames to be used to sort the resultset. Fields starting with `-` (minus sign) indicate a descending order. - **envelope** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If set to true, it will add an object wrapping the resultset. Defaults to `true`. - **pretty** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If the result should be pretty-printed or not. Defaults to `false`. - **callback** (string) - Optional - Only for JSONP resultsets, adds the `callback` as a function call. Only alphanumerical characters are allowed. - **scope** (string) - Optional - Collection of fieldnames to retrieve. Affects the resultset and the possible options for the parameter `fields`. Each data model can specify multiple available scopes. - **country** (string) - Optional - Filters teams by country. ### Request Example ```bash curl -i "https://api.first.org/data/v1/teams?country=br&scope=country&fields=team&pretty=true" ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **status-code** (string) - The status message of the response. - **version** (string) - The API version used. - **last-modified** (string) - The last modified date of the resultset. - **total-count** (integer) - The total number of records matched. - **access** (string) - The access level of the data. - **data** (array) - An array of team objects. - **team** (string) - The name of the team. #### Response Example ```json { "status": 200, "status-code": "OK", "version": "1", "last-modified": "Thu, 21 Jul 2016 19:02:52 GMT", "total-count": 4, "access": "public", "data": [ { "team": "Axur" }, { "team": "CAIS/RNP" }, { "team": "CERT.br" }, { "team": "Defenda CERT" } ] } ``` ``` -------------------------------- ### GET /countries Source: https://api.first.org Retrieves a list of countries. Supports global parameters for filtering, pagination, and output control. ```APIDOC ## GET /countries ### Description Retrieves a list of countries. Supports global parameters for filtering, pagination, and output control. ### Method GET ### Endpoint `/countries` ### Query Parameters - **fields** (string) - Optional - Comma-separated list of fieldnames to be retrieved. Used only for limiting the available resultset. - **limit** (integer) - Optional - Limits the maximum number of records to be shown. Should be an integer number between 0 and 10,000. - **offset** (integer) - Optional - Offsets the list of records by this number. The first item is 0. - **sort** (string) - Optional - Comma-separated list of fieldnames to be used to sort the resultset. Fields starting with `-` (minus sign) indicate a descending order. - **envelope** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If set to true, it will add an object wrapping the resultset. Defaults to `true`. - **pretty** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If the result should be pretty-printed or not. Defaults to `false`. - **callback** (string) - Optional - Only for JSONP resultsets, adds the `callback` as a function call. Only alphanumerical characters are allowed. - **scope** (string) - Optional - Collection of fieldnames to retrieve. Affects the resultset and the possible options for the parameter `fields`. Each data model can specify multiple available scopes. ### Request Example ```bash curl -i "https://api.first.org/data/v1/countries?limit=20" ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **status-code** (string) - The status message of the response. - **version** (string) - The API version used. - **last-modified** (string) - The last modified date of the resultset. - **total-count** (integer) - The total number of records matched. - **access** (string) - The access level of the data. - **data** (array) - An array of country objects. ``` -------------------------------- ### GET /epss Source: https://api.first.org Retrieves a list of EPSS (Exploit Prediction Scoring System) data. Supports global parameters for filtering, pagination, and output control. ```APIDOC ## GET /epss ### Description Retrieves a list of EPSS (Exploit Prediction Scoring System) data. Supports global parameters for filtering, pagination, and output control. ### Method GET ### Endpoint `/epss` ### Query Parameters - **fields** (string) - Optional - Comma-separated list of fieldnames to be retrieved. Used only for limiting the available resultset. - **limit** (integer) - Optional - Limits the maximum number of records to be shown. Should be an integer number between 0 and 10,000. - **offset** (integer) - Optional - Offsets the list of records by this number. The first item is 0. - **sort** (string) - Optional - Comma-separated list of fieldnames to be used to sort the resultset. Fields starting with `-` (minus sign) indicate a descending order. - **envelope** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If set to true, it will add an object wrapping the resultset. Defaults to `true`. - **pretty** (boolean) - Optional - Use `true`, `false`, `0` or `1`. If the result should be pretty-printed or not. Defaults to `false`. - **callback** (string) - Optional - Only for JSONP resultsets, adds the `callback` as a function call. Only alphanumerical characters are allowed. - **scope** (string) - Optional - Collection of fieldnames to retrieve. Affects the resultset and the possible options for the parameter `fields`. Each data model can specify multiple available scopes. ### Request Example ```bash curl -i "https://api.first.org/data/v1/epss?limit=15" ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **status-code** (string) - The status message of the response. - **version** (string) - The API version used. - **last-modified** (string) - The last modified date of the resultset. - **total-count** (integer) - The total number of records matched. - **access** (string) - The access level of the data. - **data** (array) - An array of EPSS data objects. ``` -------------------------------- ### API Response with Envelope Source: https://api.first.org Example JSON response from the API when the 'envelope' parameter is true (default). The response includes metadata such as status, version, total count, and the requested data, all within a single JSON object. ```json { "status": 200, "status-code": "OK", "version": "1", "last-modified": "Thu, 21 Jul 2016 19:02:52 GMT", "total-count": 4, "access": "public", "data": [ { "team": "Axur" }, { "team": "CAIS/RNP" }, { "team": "CERT.br" }, { "team": "Defenda CERT" } ] } ``` -------------------------------- ### API Request with Envelope Source: https://api.first.org Example of a cURL request to the API demonstrating the use of global parameters like 'scope', 'fields', and 'pretty' to control the response format. The 'envelope' parameter is set to true by default, wrapping the data in a JSON object with metadata. ```bash curl -i "https://api.first.org/data/v1/teams?country=br&scope=country&fields=team&pretty=true" ``` -------------------------------- ### API Request without Envelope Source: https://api.first.org Example of a cURL request to the API where the 'envelope' parameter is set to false. This modifies the response to exclude the metadata object and return only the data, with metadata provided in the response headers. ```bash curl -i "https://api.first.org/data/v1/teams?country=br&scope=country&fields=team&envelope=false&pretty=true" ``` -------------------------------- ### API Response without Envelope Source: https://api.first.org Example JSON response from the API when the 'envelope' parameter is false. The response body contains only the requested data, and metadata like status, total count, and version are included in the HTTP headers. ```json [ { "team": "Axur" }, { "team": "CAIS/RNP" }, { "team": "CERT.br" }, { "team": "Defenda CERT" } ] ``` -------------------------------- ### Requesting Specific Format via Extension (cURL) Source: https://api.first.org Shows how to request data in a specific format (XML) by appending the format extension to the URL. This is an alternative to using the Accept header. ```bash curl https://api.first.org/data/v1/teams.xml ``` -------------------------------- ### Global Parameters Source: https://api.first.org These parameters are reserved for pagination and output control and are eligible for several methods. ```APIDOC ## Global Parameters These parameters are reserved for pagination and output control. They are eligible for several methods and should not be used for a method-specific purpose. ### Parameters | Parameter | Type | Description | |---|---|---| | **fields** | string | Comma-separated list of fieldnames to be retrieved. Used only for limiting the available resultset. | | **limit** | integer | Limits the maximum number of records to be shown. Should be an integer number between 0 and 10,000. | | **offset** | integer | Offsets the list of records by this number. The first item is 0. | | **sort** | string | Comma-separated list of fieldnames to be used to sort the resultset. Fields starting with `-` (minus sign) indicate a descending order. Each application should define its default sorting options. | | **envelope** | boolean | Use `true`, `false`, `0` or `1`. If set to true, it will add an object wrapping the resultset, with details on the status, total records found, offset and limit. When `false`, this information is returned in the response header. Defaults to `true`. | | **pretty** | boolean | Use `true`, `false`, `0` or `1`. If the result should be pretty-printed or not. Defaults to `false`. | | **callback** | string | Only for JSONP resultsets, adds the `callback` as a function call. Only alphanumerical characters are allowed. | | **scope** | string | Collection of fieldnames to retrieve. Affects the resultset and the possible options for the parameter `fields`. Each data model can specify multiple available scopes. | ``` -------------------------------- ### Requesting Specific Format from FIRST API v1 (cURL) Source: https://api.first.org Demonstrates how to request data in a specific format (YAML) from the FIRST API v1 using the Accept header. The default format is JSON. ```bash curl -H "Accept: application/yaml" https://api.first.org/data/v1/teams ``` -------------------------------- ### Countries Listing Source: https://api.first.org Retrieve a list of countries from the FIRST database. The default format is JSON. ```APIDOC ## GET /countries ### Description Retrieves a list of countries from the FIRST database. ### Method GET ### Endpoint https://api.first.org/data/v1/countries ### Parameters #### Query Parameters - **format** (string) - Optional - The desired output format (e.g., json, yml, xml, csv, xls, xlsx). ### Request Example ```bash curl -X GET https://api.first.org/data/v1/countries ``` ### Response #### Success Response (200) - **countries** (array) - A list of country objects. #### Response Example ```json { "countries": [ { "id": "USA", "name": "United States" } ] } ``` ``` -------------------------------- ### Events Listing Source: https://api.first.org Retrieve a list of events from the FIRST database. The default format is JSON. ```APIDOC ## GET /events ### Description Retrieves a list of events from the FIRST database. ### Method GET ### Endpoint https://api.first.org/data/v1/events ### Parameters #### Query Parameters - **format** (string) - Optional - The desired output format (e.g., json, yml, xml, csv, xls, xlsx). ### Request Example ```bash curl -X GET https://api.first.org/data/v1/events ``` ### Response #### Success Response (200) - **events** (array) - A list of event objects. #### Response Example ```json { "events": [ { "id": 1, "name": "Example Event", "date": "2023-10-27" } ] } ``` ``` -------------------------------- ### Teams Listing Source: https://api.first.org Retrieve a list of teams from the FIRST database. The default format is JSON. ```APIDOC ## GET /teams ### Description Retrieves a list of teams from the FIRST database. ### Method GET ### Endpoint https://api.first.org/data/v1/teams ### Parameters #### Query Parameters - **format** (string) - Optional - The desired output format (e.g., json, yml, xml, csv, xls, xlsx). ### Request Example ```bash curl -X GET https://api.first.org/data/v1/teams ``` ### Response #### Success Response (200) - **teams** (array) - A list of team objects. #### Response Example ```json { "teams": [ { "id": 1, "name": "Example Team", "country": "USA" } ] } ``` ``` -------------------------------- ### Response Object Structure Source: https://api.first.org The response structure is uniform, showing status and length of data, followed by the data itself. ```APIDOC ## Response Object Structure The response structure is uniform. It first shows the status and length of the data, and then the data itself. ### Example Success Response (envelope=true) ```json { "status": 200, "status-code": "OK", "version": "1", "last-modified": "Thu, 21 Jul 2016 19:02:52 GMT", "total-count": 4, "access": "public", "data": [ { "team": "Axur" }, { "team": "CAIS/RNP" }, { "team": "CERT.br" }, { "team": "Defenda CERT" } ] } ``` ### Example Success Response (envelope=false) ```json [ { "team": "Axur" }, { "team": "CAIS/RNP" }, { "team": "CERT.br" }, { "team": "Defenda CERT" } ] ``` ### Error Handling - The response status can be omitted from the response body and set in the response headers with the `envelope=false` parameter. - The `[Response body].status` and `[Response body].status-code` correspond to the HTTP status message. - When errors occur, the status code should be different than **2XX**. - Additionally, a `[Response body].message` or `X-Message` header may provide additional information about the error. ### Headers - `Last-Modified`: Always present in the response header, it refers to the last time the resultset corresponding to this URL was modified. This information can be used for caching (browsers would request the `If-Modified-Since` header to check if it was modified). - `X-Version` or `[Response body].version`: Points out the actual API version used. - `X-Total` or `[Response body].total`: Indicates how many fields were matched for this request. Using the parameters `offset` and `limit` is possible to paginate the results properly. ### Notes - When a search is valid but renders no results, the `status` is still **200**, with no data (empty array or empty downloaded file). - Using a `limit` of "0" (zero) will still return a valid response object with the proper count of matches. ``` -------------------------------- ### PGP Public Key Block Source: https://api.first.org/data/v1/teams This section contains a PGP public key block, typically used for encrypting and verifying messages. It includes the key ID, fingerprint, and the actual key data. ```text -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2 mQENBFa0agwBCAC586alavyvludh4CI/9WKbq3Sh3VsvxpG4CN6HC22W3I/YQftD 7Q6c/wwRex/vmXlClcp08aHM+mVcvmup+GXXTPES6vmIEgNtyAA3M2ReE7QBJmFK 3WkDVx3P+K0aeyRJ+PnKFOrbGaNpb64iMYeUCZBfnj6m5TLaF94D3kYBubynJlim 2bkbB/5Gq6KNo+F2eDXaySL7jwHRBeymflsEyPnPQj5p1SCjv9Uk4MyaLFXmlVsA xbxu0bgdnVACO6QLrnNluI14Ydgp1gphcOx9Mc81UErdS1xS1yykSoyKDfLP6LHo XNLHUzaLG5N4cO1z10ICsD8l/Ck+uSks3BHlABEBAAG0F0J0Q0lSVCA8Y2lydEBi dGNpcnQuYnQ+iQE5BBMBAgAjBQJWtGoMAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwEC HgECF4AACgkQvzMNrJVHDMk83gf9GuCKwKXxXfrsvmtLWRempRdcDI0PKx6NqX9p VTWTrTOB5of1ei87xANmkWKh4cvH5ZhgWevgtvBEY50o8AS4+zjNW/8IjtNRQJp/ p1zkrvNag42M/CK7lcDmK1UT8efqYl5m/Krfzd3LxA+AuNU9o8Gh7/14rZUbZo+p RqWMextaMT5S9hvl7EJJEWTEaZl/zi9Wm8eeD7gY4u5Sib+05qCle/eQGKyhpw4r QLxiS3rdM0tb/t/+zOMehy/siBGOY1OOg6jn+tDbkp4AGNsfWGfN2oG1XFO+9eJY ktojE0RHbWTF62Fk8vV9Pkr5XARLxpCfceviLeng9ECVnxkE8okCHAQTAQgABgUC VulpaQAKCRBD2a/zl2eyr+X5D/4grZbGtpFpNKlyltlwjNxVLVteq6FKdXesAaD9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jdYBGrbRis QzfrAlU546tLPQnaPT/JeCgmTUJJsII/5ARE5VXz8vFyxlbwTmqu6bPJLpXz6hCz AeVpSBEl6fLEO =j0P7 -----END PGP PUBLIC KEY BLOCK----- ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.