diff --git a/.gradle/6.8/executionHistory/executionHistory.bin b/.gradle/6.8/executionHistory/executionHistory.bin index 23bad2572ad7c8ae5ac2dc9faf908fc2116d2f2f..6c4371072e86ffb1576eec5e135dce204b588459 100644 Binary files a/.gradle/6.8/executionHistory/executionHistory.bin and b/.gradle/6.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/6.8/executionHistory/executionHistory.lock b/.gradle/6.8/executionHistory/executionHistory.lock index 1527eeafbbc49ed5a3e48246a5ab4e91ab3a4aee..28998218a1970d20ea33cf2ca6c1bed39c07145b 100644 Binary files a/.gradle/6.8/executionHistory/executionHistory.lock and b/.gradle/6.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/6.8/fileHashes/fileHashes.bin b/.gradle/6.8/fileHashes/fileHashes.bin index ed1f14e1fa498f47916af61830d7efe4669b087f..ceea90fe0f481e4a9e0cdb1b9e9558bf864e89a4 100644 Binary files a/.gradle/6.8/fileHashes/fileHashes.bin and b/.gradle/6.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/6.8/fileHashes/fileHashes.lock b/.gradle/6.8/fileHashes/fileHashes.lock index cb57f771ac703f4f83bd908c144bf07d884e6f9a..1fed9743e90f7bfe55602dd08b29cc96bac378c8 100644 Binary files a/.gradle/6.8/fileHashes/fileHashes.lock and b/.gradle/6.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/6.8/fileHashes/resourceHashesCache.bin b/.gradle/6.8/fileHashes/resourceHashesCache.bin index fd35e8619e95c4f811824ded1035ec7d03e80985..17888ac22c6231be8428c898318c4acb04995b82 100644 Binary files a/.gradle/6.8/fileHashes/resourceHashesCache.bin and b/.gradle/6.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/6.8/javaCompile/classAnalysis.bin b/.gradle/6.8/javaCompile/classAnalysis.bin index b4bd48bad45914d0d436969a122a4d4c55553e7e..01cf286d16a3bbe8d968570450ed50cde7e8ebb1 100644 Binary files a/.gradle/6.8/javaCompile/classAnalysis.bin and b/.gradle/6.8/javaCompile/classAnalysis.bin differ diff --git a/.gradle/6.8/javaCompile/jarAnalysis.bin b/.gradle/6.8/javaCompile/jarAnalysis.bin index 0365edea547e2749c9143efd1fb1c4f58e1c8207..9b6bf7cedd538f406ff685478d40d6d01d39913b 100644 Binary files a/.gradle/6.8/javaCompile/jarAnalysis.bin and b/.gradle/6.8/javaCompile/jarAnalysis.bin differ diff --git a/.gradle/6.8/javaCompile/javaCompile.lock b/.gradle/6.8/javaCompile/javaCompile.lock index 565ff71081353572803b7b25b2f034b52b7fb5bc..e9b1f71693cca610c91d5e4c65c38194df201e88 100644 Binary files a/.gradle/6.8/javaCompile/javaCompile.lock and b/.gradle/6.8/javaCompile/javaCompile.lock differ diff --git a/.gradle/6.8/javaCompile/taskHistory.bin b/.gradle/6.8/javaCompile/taskHistory.bin index a14d69eb347b24cac2ab508ecb137091808508a6..cbf0e2265a94cd05dcfd437910c97da66916ce59 100644 Binary files a/.gradle/6.8/javaCompile/taskHistory.bin and b/.gradle/6.8/javaCompile/taskHistory.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index f80636578e3f40234fdd5a85d95cd2fa9f9d1616..01860e08789bf4aba267b1afcfa47823536490db 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ConvertYAMLtoJSON.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ConvertYAMLtoJSON.class deleted file mode 100644 index 6cb292875459d234915745616e417dd77b132b97..0000000000000000000000000000000000000000 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ConvertYAMLtoJSON.class and /dev/null differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class index 055dc9f70958036a9dc4cc2bfcc4a14fbc272aba..e4ef5cb19bea26f085849903f6a3596fd3f3dc8d 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/ParameterObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class index fac5dd7f4ba341871a2a8b3bfb058fcf0e67b9a5..60d94b372a2812902613712aa83d4aeba698a76a 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/PathItem.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class index 5b171078e4d6de775d53b417f908b9918494b408..c82eb87e627594586697d10e5f4e580364cbf7cb 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/SchemaObject.class differ diff --git a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class index 291505eb6ff1d9c3acc317bc1e5608415cc47543..6d023ed1604e82260da39ad7def69a4a411a3ee5 100644 Binary files a/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class and b/build/classes/java/main/de/tudresden/inf/st/openapi/ast/TagObject.class differ diff --git a/build/classes/java/test/openapi/OpenAPIMain_test.class b/build/classes/java/test/openapi/OpenAPIMain_test.class index 9a46862355186c3620dc4be7330680cd135b2a17..938e585d92da7e104690440021663a05a88dfac0 100644 Binary files a/build/classes/java/test/openapi/OpenAPIMain_test.class and b/build/classes/java/test/openapi/OpenAPIMain_test.class differ diff --git a/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html b/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html index 6f9398114c0fba39a56bfc164f14d1a8d43cba38..d510d6e1b46664bad3db39ff74a1ca75a1cbc077 100644 --- a/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html +++ b/build/reports/tests/test/classes/openapi.OpenAPIMain_test.html @@ -41,7 +41,7 @@ </td> <td> <div class="infoBox" id="duration"> -<div class="counter">1.581s</div> +<div class="counter">1.703s</div> <p>duration</p> </div> </td> @@ -79,7 +79,7 @@ </thead> <tr> <td class="success">test()</td> -<td class="success">1.581s</td> +<td class="success">1.703s</td> <td class="success">passed</td> </tr> </table> @@ -87,7 +87,7 @@ <div id="tab1" class="tab"> <h2>Standard output</h2> <span class="code"> -<pre>20 +<pre>30 Loading expression DSL file '1password.com.yaml'. Loading expression DSL file '1password.local.yaml'. Loading expression DSL file '6-dot-authentiqio.appspot.com.yaml'. @@ -101,7 +101,17 @@ Loading expression DSL file 'adyen.com.AccountService.6.yaml'. Loading expression DSL file 'agco-ats.com.yaml'. Loading expression DSL file 'amazonaws.com.accessanalyzer.2019-11-01.yaml'. Loading expression DSL file 'amazonaws.com.acm.2015-12-08.yaml'. +Loading expression DSL file 'amentum.space.atmosphere.1.1.1.yaml'. +Loading expression DSL file 'amentum.space.aviation_radiation.1.5.0.yaml'. +Loading expression DSL file 'amentum.space.global-magnet.1.3.0.yaml'. +Loading expression DSL file 'amentum.space.gravity.1.1.1.yaml'. +Loading expression DSL file 'amentum.space.space_radiation.1.1.1.yaml'. +Loading expression DSL file 'anchore.io.0.1.18.yaml'. Loading expression DSL file 'api-with-examples.json'. +Loading expression DSL file 'api.gov.uk.vehicle-enquiry.1.1.0.yaml'. +Loading expression DSL file 'api2pdf.com.1.0.0.yaml'. +Loading expression DSL file 'apicurio.local.registry.1.3.2.Final.yaml'. +Loading expression DSL file 'apidapp.com.2019-02-14T164701Z.yaml'. Loading expression DSL file 'callback-example.json'. Loading expression DSL file 'link-example.json'. Loading expression DSL file 'petstore-expanded.json'. @@ -119,7 +129,7 @@ Loading expression DSL file 'uspto.json'. <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> </label> </div>Generated by -<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 16. 오전 4:01:27</p> +<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 19. 오후 5:46:49</p> </div> </div> </body> diff --git a/build/reports/tests/test/index.html b/build/reports/tests/test/index.html index e24155348c826a2e0b67a5762ce4586d6ec77e1f..f7ba573c9283cd32d0f4712e1b04c64e9dc1c280 100644 --- a/build/reports/tests/test/index.html +++ b/build/reports/tests/test/index.html @@ -38,7 +38,7 @@ </td> <td> <div class="infoBox" id="duration"> -<div class="counter">1.581s</div> +<div class="counter">1.703s</div> <p>duration</p> </div> </td> @@ -85,7 +85,7 @@ <td>1</td> <td>0</td> <td>0</td> -<td>1.581s</td> +<td>1.703s</td> <td class="success">100%</td> </tr> </tbody> @@ -112,7 +112,7 @@ <td>1</td> <td>0</td> <td>0</td> -<td>1.581s</td> +<td>1.703s</td> <td class="success">100%</td> </tr> </tbody> @@ -126,7 +126,7 @@ <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> </label> </div>Generated by -<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 16. 오전 4:01:27</p> +<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 19. 오후 5:46:49</p> </div> </div> </body> diff --git a/build/reports/tests/test/packages/openapi.html b/build/reports/tests/test/packages/openapi.html index 98733babd4201c2557e981452c44c99b2717f330..110a9feaddd0a0f1427fa35fb4e4035cab54873b 100644 --- a/build/reports/tests/test/packages/openapi.html +++ b/build/reports/tests/test/packages/openapi.html @@ -40,7 +40,7 @@ </td> <td> <div class="infoBox" id="duration"> -<div class="counter">1.581s</div> +<div class="counter">1.703s</div> <p>duration</p> </div> </td> @@ -83,7 +83,7 @@ <td>1</td> <td>0</td> <td>0</td> -<td>1.581s</td> +<td>1.703s</td> <td class="success">100%</td> </tr> </table> @@ -96,7 +96,7 @@ <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/> </label> </div>Generated by -<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 16. 오전 4:01:27</p> +<a href="http://www.gradle.org">Gradle 6.8</a> at 2021. 8. 19. 오후 5:46:49</p> </div> </div> </body> diff --git a/build/resources/main/amentum.space.atmosphere.1.1.1.yaml b/build/resources/main/amentum.space.atmosphere.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2592746862c6777e5463e8e3bcde9eb0c113806c --- /dev/null +++ b/build/resources/main/amentum.space.atmosphere.1.1.1.yaml @@ -0,0 +1,407 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + Instantly access empirical models of atmospheric density and composition that are recommended by the Committee on Space Research (COSPAR) for satellite drag calculations. <br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Atmosphere API + version: 1.1.1 + x-apisguru-categories: + - location + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://atmosphere.amentum.space/openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: atmosphere +tags: + - description: | + The <a href='https://ccmc.gsfc.nasa.gov/modelweb/atmos/nrlmsise00.html'>NRLMSISE-00</a> model was developed by the US Naval Research Laboratory. It is based on mass spectrometry and incoherent radar scatter data, includes drag and accelerometer data, and accounts for anomalous oxygen at high altitudes. It is recommended by the International Committee on Space Resarch (COSPAR) as the standard for atmospheric composition. <br><br> The API now automatically updates the Ap and F10.7 cm radio flux indices unless provided by the user. + name: nrlmsise00 + x-displayName: NRLMSISE-00 + - description: | + The <a href='https://sol.spacenvironment.net/jb2008/'>JB2008</a> (Jacchia-Bowman) model is a newer model developed by Space Environment Technologies and the US Air Force Space Command. + The model accounts for various phenomena related to EUV heating of + the thermosphere and uses the DST index as the driver of global + density changes. The model is complementary to the NRLMSISE00 model + and is more accurate during times of high solar activity and + geomagnetic storms. It is recommended by COSPAR as the standard + for thermospheric density in satellite drag calculations.<br><br> + The API now automatically updates the indices needed to account + for global density variations due to geomagnetic storms and EUV heating. + name: jb2008 + x-displayName: JB2008 +paths: + /jb2008: + get: + description: | + under given conditions. + operationId: app.api.endpoints.JB2008.sample_atmosphere + parameters: + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Altitude" + - $ref: "#/components/parameters/GeodeticLatitude" + - $ref: "#/components/parameters/GeodeticLongitude" + - $ref: "#/components/parameters/UTC" + responses: + "200": + content: + application/json: + example: + at_alt_temp: + units: K + value: 667.005615234375 + exospheric_temp: + units: K + value: 666.522705078125 + total_mass_density: + units: kg/m3 + value: 5.201439105817496e-12 + schema: + properties: + at_alt_temp: + properties: + units: + type: string + value: + type: number + type: object + exospheric_temp: + properties: + units: + type: string + value: + type: number + type: object + total_mass_density: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful atmospheric density calculation + summary: | + Compute atmospheric density and temperatures + tags: + - jb2008 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://atmosphere.amentum.io/jb2008?year=2020&month=5&day=21&altitude=300&geodetic_latitude=42&geodetic_longitude=42&utc=2" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import json + import requests + + url = "https://atmosphere.amentum.io/jb2008" + + params = { + 'year' : 2020, + 'month' : 5, + 'day' : 21, + 'geodetic_latitude' : 42, + 'geodetic_longitude' : 42, + 'altitude' : 300, # km + 'utc' : 2, # hours + } + headers = {"API-Key" : "<add_your_key>"} + # handle exceptions + response = requests.get(url, params=params, headers=headers) + json_payload = response.json() + + print(json.dumps(json_payload, indent=4, sort_keys=True)) + /nrlmsise00: + get: + description: | + at specified conditions. + operationId: app.api.endpoints.NRLMSISE00.sample_atmosphere + parameters: + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Altitude" + - $ref: "#/components/parameters/GeodeticLatitude" + - $ref: "#/components/parameters/GeodeticLongitude" + - $ref: "#/components/parameters/UTC" + - $ref: "#/components/parameters/F107A" + - $ref: "#/components/parameters/F107" + - $ref: "#/components/parameters/AP" + responses: + "200": + content: + application/json: + example: + Ar_density: + units: /m3 + value: 345221344 + H_density: + units: /m3 + value: 846266302464 + He_density: + units: /m3 + value: 14137357762560 + N2_density: + units: /m3 + value: 7370196910080 + N_density: + units: /m3 + value: 424038367232 + O2_density: + units: /m3 + value: 285386670080 + O_density: + units: /m3 + value: 160525593870336 + anomalous_O_density: + units: /m3 + value: 2940371.25 + ap: + value: 3 + at_alt_temp: + units: K + value: 590.3972778320312 + exospheric_temp: + units: K + value: 590.4319458007812 + f107: + units: sfu + value: 70 + f107a: + units: sfu + value: 69.35802469135803 + total_mass_density: + units: kg/m3 + value: 4.7264410267533474e-12 + schema: + properties: + Ar_density: + properties: + units: + type: string + value: + type: number + type: object + H_density: + properties: + units: + type: string + value: + type: number + type: object + He_density: + properties: + units: + type: string + value: + type: number + type: object + N2_density: + properties: + units: + type: string + value: + type: number + type: object + N_density: + properties: + units: + type: string + value: + type: number + type: object + O2_density: + properties: + units: + type: string + value: + type: number + type: object + O_density: + properties: + units: + type: string + value: + type: number + type: object + anomalous_O_density: + properties: + units: + type: string + value: + type: number + type: object + ap: + properties: + value: + type: number + type: object + at_alt_temp: + properties: + units: + type: string + value: + type: number + type: object + exospheric_temp: + properties: + units: + type: string + value: + type: number + type: object + f107: + properties: + units: + type: string + value: + type: number + type: object + f107a: + properties: + units: + type: string + value: + type: number + type: object + total_mass_density: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful atmospheric density calculation + summary: | + Compute atmospheric composition, density, and temperatures + tags: + - nrlmsise00 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://atmosphere.amentum.io/nrlmsise00?year=2020&month=5&day=21&altitude=300&geodetic_latitude=42&geodetic_longitude=42&utc=2" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import json + import requests + + url = "https://atmosphere.amentum.io/nrlmsise00" + + headers = {"API-Key" : "<add_your_key>"} + + params = { + 'year' : 2020, + 'month' : 5, + 'day' : 21, + 'geodetic_latitude' : 42, + 'geodetic_longitude' : 42, + 'altitude' : 300, # km + 'utc' : 2, # hours + } + # handle exceptions + response = requests.get(url, params=params, headers=headers) + json_payload = response.json() + + print(json.dumps(json_payload, indent=4, sort_keys=True)) +components: + parameters: + AP: + description: | + (Optional) The Ap-index provides a daily average level for geomagnetic activity F107, F107A, AP effects can be neglected below 80 km. If unspecified, the average of values in the 24 hours preceding the date-time are automatically calculated from data provided by GFZ German Research Centre for Geosciences. + in: query + name: ap + required: false + schema: + example: 30 + type: number + Altitude: + description: Altitude in (km) + in: query + name: altitude + required: true + schema: + example: 300 + type: number + Day: + description: Day in DD format + in: query + name: day + required: true + schema: + example: 21 + type: integer + F107: + description: | + (Optional) Daily F10.7 cm radio flux for previous day (SFU). F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and Atmospheric Administration are retrieved automatically. + in: query + name: f107 + required: false + schema: + example: 120 + type: number + F107A: + description: | + (Optional) 81 day average of F10.7 flux (SFU) centered on the specified day. F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and Atmospheric Administration are retrieved automatically. + in: query + name: f107a + required: false + schema: + example: 120 + type: number + GeodeticLatitude: + description: GeodeticLatitude (deg) -90 to 90 deg + in: query + name: geodetic_latitude + required: true + schema: + example: 42 + type: number + GeodeticLongitude: + description: GeodeticLongitude (deg) 0 to 360 deg + in: query + name: geodetic_longitude + required: true + schema: + example: 42 + type: number + Month: + description: Month in MM format + in: query + name: month + required: true + schema: + example: 5 + type: integer + UTC: + description: Coordinated Universal Time (hrs) + in: query + name: utc + required: true + schema: + example: 2 + type: number + Year: + description: Year in YYYY format + in: query + name: year + required: true + schema: + example: 2020 + type: integer +x-tagGroups: + - name: Density and composition + tags: + - nrlmsise00 + - jb2008 diff --git a/build/resources/main/amentum.space.aviation_radiation.1.5.0.yaml b/build/resources/main/amentum.space.aviation_radiation.1.5.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e7457c4d0b66762c0d24837b3b8e205d8a6952f4 --- /dev/null +++ b/build/resources/main/amentum.space.aviation_radiation.1.5.0.yaml @@ -0,0 +1,1183 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + Our atmosphere protects us from a hostile space radiation environment comprising high energy particles of solar and intergalactic origin. Solar radiation is significant during unpredictable and short lived solar flares and coronal mass ejections (CMEs); however, galactic cosmic radiation (GCR) is omnipresent. The GCR intensity varies with latitude, longitude, and time due to effects of solar activity on the interplanetary magnetic field, as well as the Earth's magnetic field. Space radiation collides with gases in the atmosphere, leading to a complex shower of high energy radiation, the intensity and composition of which varies spatially and temporally. Excessive exposure to radiation can damage DNA and lead to long-term health effects such as an increased risk of cancer. <br><br> Resulting radiation levels at commercial aircraft altitudes are greater than at sea level due. Aircrew are classified as radiation workers in some countries; however, planning to limit their exposure, and monitoring, is generally lacking. Both real-time measurements and predictive models of radiation in the atmosphere are important to mitigate the radiation risk crew. <br><br> + We host a RESTful API to models of cosmic ray induced ionising radiation in the atmosphere. The PARMA or CARI7 endpoints can be used to calculate Effective Dose or Ambient Dose Equivalent at a point. + The Route Dose API calculates the same quantities along a great circle route between two airports using CARI7. <br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Aviation Radiation API + version: 1.5.0 + x-apisguru-categories: + - location + - open_data + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://cosmicrays.amentum.space//openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: aviation_radiation +tags: + - description: | + Developed by the US Federal Aviation Administration's Civil Aerospace Medical Institute, CARI7 calculates cosmic ray doses in the atmosphere. See <a href="https://academic.oup.com/rpd/article/175/4/419/2884614">here</a> for a complete description of CARI-7. The original source code and Terms and Conditions can be found <a href="https://www.faa.gov/data_research/research/med_humanfacs/aeromedical/radiobiology/cari7/">here</a><br><br> <br><br> Note: The dose is considered a monthly average. It accounts for for heliocentric potential modulation only, minor geomagnetic storm and forbush decreases are ignored. + name: cari7 + x-displayName: CARI7 API + - description: | + The Route Dose API estimates radiation doses along a flight route between two airports with known ICAO or IATA codes or coordinates as latitude/longitude. Waypoints are calculated assuming a great circle route, a constant altitude (in kilometers) and a user-defined flight duration (in hours). Dose rates are calculated at each waypoint using CARI-7. The dose rate profile is integrated along the route to obtain the total dose for the flight. <br><br> Note: Dose is considered a monthly average accounting for heliocentric potential (HP) modulation only, minor geomagnetic storm and forbush decrease corrections are ignored. The calculation relies on HP data from the US Federal Aviation Administration that is released monthly. Doses can be calculated on the current date and short-range forecasting of several weeks is supported (the exact forecast horizon depends on the release date of the FAA data). + name: routedose + x-displayName: Route Dose API + - description: | + The PARMA model was developed by the Japan Atomic Energy Agency (JAEA) and estimates fluxes of neutrons, protons, ions, muons, electrons, positrons, and photons on a given date, latitude, longitude, and altitude. A comprehensive description of PARMA can be found in the publications <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0160390">here</a> and <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144679">here</a>.<br><br> <br><br> Note: the PARMA API only accounts for heliocentric potential modulation, minor geomagnetic storm and forbush decreases are ignored. + name: parma + x-displayName: PARMA API +paths: + /cari7/ambient_dose: + get: + description: | + The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. + Use this endpoint if you are comparing model predictions to measurements. + operationId: app.api_cari7.endpoints.CARI7.ambient_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: true + schema: + example: 11 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: Hour in 24 hour time. + in: query + name: utc + required: true + schema: + example: 3 + type: integer + - description: | + The particle type as a string. Specifying 'total' returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - neutron + - photon + - e- + - e+ + - mu- + - mu+ + - proton + - pi- + - pi+ + - deuteron + - triton + - helion + - alpha + - Li + - Be + - B + - C + - N + - O + - F + - Ne + - Na + - Mg + - Al + - Si + - P + - S + - Cl + - Ar + - K + - Ca + - Sc + - Ti + - V + - Cr + - Mn + - Fe + example: total + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 2.322303291477743 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + The ambient dose equivalent rate calculated for a single particle type, or accumulated over all particle types. + tags: + - cari7 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/cari7/ambient_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&utc=3&particle=total" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "total", + "utc" : 3 + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/cari7/ambient_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /cari7/effective_dose: + get: + description: | + Effective Dose is a radiation protection quantity defined by the International Commission on + Radiological Protection (ICRP) and represents the stochastic health + risk to the human body at low levels of radiation. + It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. + Use this endpoint if you need to estimate radiation exposures of personnel. + operationId: app.api_cari7.endpoints.CARI7.effective_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: true + schema: + example: 11 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: Hour in 24 hour time. + in: query + name: utc + required: true + schema: + example: 3 + type: integer + - description: | + The particle type as a string. Specifying 'total' returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - neutron + - photon + - e- + - e+ + - mu- + - mu+ + - proton + - pi- + - pi+ + - deuteron + - triton + - helion + - alpha + - Li + - Be + - B + - C + - N + - O + - F + - Ne + - Na + - Mg + - Al + - Si + - P + - S + - Cl + - Ar + - K + - Ca + - Sc + - Ti + - V + - Cr + - Mn + - Fe + example: total + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 2.1532952875056712 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + The effective dose rate calculated for a single particle type, or accumulated over all particle types. + tags: + - cari7 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/cari7/effective_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&utc=3&particle=total" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "total", + "utc" : 3 + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/cari7/effective_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /parma/ambient_dose: + get: + description: | + The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. + Use this endpoint if you are comparing model predictions to measurements. + operationId: app.api_parma.endpoints.PARMA.ambient_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: false + schema: + example: 11 + type: number + - description: | + Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both. + in: query + name: atmospheric_depth + required: false + schema: + example: 0.92 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: | + The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - e- + - e+ + - mu+ + - mu- + - gamma + - neutron + - proton + - alpha + example: proton + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 0.26835067168474125 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose read operation + summary: | + The ambient dose equivalent rate calculated for a single particle type, or accumulated over all particle types. + tags: + - parma + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/parma/ambient_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=proton" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "proton" + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/parma/ambient_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /parma/differential_intensity: + get: + description: | + The differential intensity of a particle is a directional quantity that describes the number of particles per unit area, per unit solid angle, per unit energy, and per unit time. The API leverages the functionality of PARMA to calculate differential intensity distributions with energies in units of MeV and Intensity in units of /cm2/sr/MeV/s. + operationId: app.api_parma.endpoints.PARMA.differential_intensity + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: false + schema: + example: 11 + type: number + - description: | + Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both. + in: query + name: atmospheric_depth + required: false + schema: + example: 0.92 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: | + The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - e- + - e+ + - mu+ + - mu- + - gamma + - neutron + - proton + - alpha + example: proton + type: string + - description: Direction cosine. 1.0 is in the downward direction. + in: query + name: angle + required: true + schema: + example: 1 + type: number + responses: + "200": + content: + application/json: + schema: + example: + energies: + data: + - 10.592537251772889 + - 11.885022274370186 + - 13.335214321633243 + - 14.96235656094434 + - 16.78804018122561 + - 18.836490894898017 + - 21.134890398366483 + - 23.71373705661657 + - 26.60725059798812 + - 29.853826189179625 + - 33.4965439157828 + - 37.583740428844465 + - 42.16965034285828 + - 47.31512589614811 + - 53.08844442309891 + - 59.56621435290114 + - 66.83439175686158 + - 74.98942093324571 + - 84.13951416451967 + - 94.40608762859253 + - 105.92537251772909 + - 118.85022274370202 + - 133.35214321633254 + - 149.62356560944343 + - 167.88040181225605 + - 188.36490894898 + - 211.34890398366454 + - 237.1373705661653 + - 266.0725059798806 + - 298.5382618917954 + - 334.9654391578269 + - 375.83740428844317 + - 421.69650342858097 + - 473.1512589614788 + - 530.8844442309862 + - 595.662143529008 + - 668.3439175686115 + - 749.894209332452 + - 841.3951416451905 + - 944.0608762859177 + - 1059.2537251772821 + - 1188.5022274370106 + - 1333.5214321633146 + - 1496.2356560944222 + - 1678.804018122547 + - 1883.6490894897847 + - 2113.4890398366283 + - 2371.3737056616337 + - 2660.725059798784 + - 2985.38261891793 + - 3349.6543915782418 + - 3758.374042884401 + - 4216.965034285775 + - 4731.512589614749 + - 5308.84444230982 + - 5956.621435290031 + - 6683.4391756860605 + - 7498.942093324459 + - 8413.951416451835 + - 9440.6087628591 + - 10592.537251772736 + - 11885.022274370007 + - 13335.214321633035 + - 14962.356560944098 + - 16788.04018122533 + - 18836.49089489769 + - 21134.890398366108 + - 23713.737056616137 + - 26607.250597987622 + - 29853.82618917905 + - 33496.543915782146 + - 37583.74042884371 + - 42169.65034285741 + - 47315.12589614711 + - 53088.44442309776 + - 59566.21435289981 + - 66834.39175686006 + - 74989.42093324398 + - 84139.51416451768 + - 94406.08762859023 + units: MeV + intensities: + data: + - 0.000015126557258481497 + - 0.00001599438328728434 + - 0.00001689468409778281 + - 0.00001782700110028125 + - 0.000018789989894315395 + - 0.000019781312921179226 + - 0.00002079773698769471 + - 0.000021835319990199245 + - 0.00002288931588809045 + - 0.000023953698331015904 + - 0.000025020740419725837 + - 0.00002608079723261754 + - 0.00002712202346190026 + - 0.000028129941429425255 + - 0.000029086999403906575 + - 0.000029972245159538348 + - 0.00003076112412042979 + - 0.00003142535794905927 + - 0.000031932955656189876 + - 0.000032248618858073125 + - 0.000032334985958519275 + - 0.000032155208240777106 + - 0.000031677197295996437 + - 0.000030879552903400744 + - 0.000029726220825502388 + - 0.000028234425803141926 + - 0.00002650516406182499 + - 0.000024602269634120444 + - 0.000022594819983033717 + - 0.000020552475431477016 + - 0.00001853662594721251 + - 0.000016596094572091987 + - 0.00001476576885147725 + - 0.000013067285256001253 + - 0.000011511187862538484 + - 0.000010100122716208363 + - 0.00000883240101591408 + - 0.000007703733932387032 + - 0.00000670576631351448 + - 0.000005822881145729626 + - 0.000005046340372076868 + - 0.000004369966582442526 + - 0.000003781202020752834 + - 0.0000032689518931964352 + - 0.0000028234311080639376 + - 0.000002436034648930342 + - 0.0000020992258398508115 + - 0.0000018064235849092022 + - 0.0000015518898432506667 + - 0.000001331051662285105 + - 0.0000011394488995132188 + - 9.726057340258263e-7 + - 8.265824310558272e-7 + - 6.998212586927555e-7 + - 5.894224376580005e-7 + - 4.93568138996158e-7 + - 4.116922090268701e-7 + - 3.460236317178158e-7 + - 3.037548828699797e-7 + - 2.9135185653116735e-7 + - 2.82520391784604e-7 + - 2.3785220594554244e-7 + - 1.7791153699257012e-7 + - 1.2924247345559558e-7 + - 9.48243126183575e-8 + - 7.043455232978242e-8 + - 5.2623996885656347e-8 + - 3.935459373084662e-8 + - 2.939334162588793e-8 + - 2.1909771678801793e-8 + - 1.6297871509147514e-8 + - 1.2099955678192665e-8 + - 8.967477745797399e-9 + - 6.635335072413951e-9 + - 4.902621621420823e-9 + - 3.6176621571186638e-9 + - 2.6663515657204105e-9 + - 1.963121398302903e-9 + - 1.4439864047128638e-9 + - 1.0612233263106733e-9 + units: /cm2/s/sr/MeV + properties: + energies: + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + intensities: + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + type: object + description: Successful read of intensity operation + summary: The energy differential intensity of a particle at a given zenith angle. + tags: + - parma + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/parma/differential_intensity?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=proton&angle=1.0" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, # km + "latitude" : 30, # degrees (N) + "longitude" : 30, # degrees (E) + "year" : 2019, # + "month" : 12, + "day" : 1, + "particle" : "proton", + "angle" : 1.0 + } + headers = {"API-Key" : "<add_your_key>"} + + url = "https://avrad.amentum.io/parma/differential_intensity" + + # make the call and handle errors + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the flux + json_payload = response.json() + + kes = json_payload["energies"]["data"] # MeV + flux = json_payload["intensities"]["data"] # /cm2/s/sr/MeV + + print(f"Kinetic energies: {kes} MeV") + print(f"Intensities: {flux} /cm2/s/sr/MeV") + /parma/effective_dose: + get: + description: | + Effective dose is a radiation protection quantity defined by the International Commission on Radiological Protection (ICRP) and represents the stochastic health risk to the human body at low levels of radiation. It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. + Use this endpoint if you need to estimate radiation exposures of personnel. + operationId: app.api_parma.endpoints.PARMA.effective_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: false + schema: + example: 11 + type: number + - description: | + Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both. + in: query + name: atmospheric_depth + required: false + schema: + example: 0.92 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: | + The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - e- + - e+ + - mu+ + - mu- + - gamma + - neutron + - proton + - alpha + example: proton + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 1.9456004308224644 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose read operation + summary: | + The effective dose rate calculated for a single particle type, or accumulated over all particle types. + tags: + - parma + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/parma/effective_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=total" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "total" + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/parma/effective_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /route/ambient_dose: + get: + description: | + The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. <br> <br> Use this endpoint if you are comparing model predictions to measurements. <br> <br> Note: the airport codes or coordinates (depending on which was specified), and the date in DD/MM/YYYY format, are echoed in the json response as strings. + operationId: app.api_icaro.endpoints.ICARO.ambient_dose + parameters: + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the origin airport. + in: query + name: origin + required: true + schema: + example: YSSY + type: string + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the destination airport. + in: query + name: destination + required: true + schema: + example: 33.94250107,-118.4079971 + type: string + - description: Altitude (in km). The minimum is 0 m, the maximum is 20 km. + in: query + name: altitude + required: true + schema: + example: 10.1 + type: number + - description: The flight duration in hours. The minimum is 0, the maximum is 20 hrs. + in: query + name: duration + required: true + schema: + example: 5 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 5 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 21 + type: integer + responses: + "200": + content: + application/json: + schema: + example: + dose: + date: 21/05/2019 + destination: 33.94250107,-118.4079971 + origin: YSSY + units: uSv + value: 10.911498908287665 + properties: + dose: + properties: + date: + type: string + destination: + type: string + origin: + type: string + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + Calculate the ambient equivalent dose along a great circle flight route. + tags: + - routedose + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/route/ambient_dose?origin=YSSY&destination=33.94250107,-118.4079971&altitude=10.1&duration=5&year=2019&month=5&day=21" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "origin" : "YSSY", # can be ICAO or iATA codes + "destination" : "33.94250107,-118.4079971", + "altitude" : 10.1, # km, + "duration" : 5, # hours + "year" : 2019, + "month" : 5, + "day" : 21 + } + headers = {"API-Key" : "<add_your_key>"} + try: + response = requests.get("https://avrad.amentum.io/route/ambient_dose", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + dose = response_json['dose']['value'] + print(f"Total Ambient Dose was {dose:.2f} uSv") + /route/effective_dose: + get: + description: | + Effective Dose is a radiation protection quantity defined by the International Commission on + Radiological Protection (ICRP) and represents the stochastic health + risk to the human body at low levels of radiation. + It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. <br> <br> Use this endpoint if you need to estimate radiation exposures of personnel. <br> <br> Note: the airport codes or coordinates (depending on which was specified), and the date in DD/MM/YYYY format, are echoed in the json response as strings. + operationId: app.api_icaro.endpoints.ICARO.effective_dose + parameters: + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the origin airport. + in: query + name: origin + required: true + schema: + example: YSSY + type: string + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the destination airport. + in: query + name: destination + required: true + schema: + example: 33.94250107,-118.4079971 + type: string + - description: Altitude (in km). The minimum is 0 m, the maximum is 20 km. + in: query + name: altitude + required: true + schema: + example: 10.1 + type: number + - description: The flight duration in hours. The minimum is 0, the maximum is 20 hrs. + in: query + name: duration + required: true + schema: + example: 5 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 5 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 21 + type: integer + responses: + "200": + content: + application/json: + schema: + example: + dose: + date: 21/05/2019 + destination: 33.94250107,-118.4079971 + origin: YSSY + units: uSv + value: 9.90406659800017 + properties: + dose: + properties: + date: + type: string + destination: + type: string + origin: + type: string + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + Calculate the total effective dose along a great circle flight route. + tags: + - routedose + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/route/effective_dose?origin=YSSY&destination=33.94250107,-118.4079971&altitude=10.1&duration=5&year=2019&month=5&day=21" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "origin" : "YSSY", # can be ICAO or iATA codes + "destination" : "33.94250107,-118.4079971", + "altitude" : 10.1, # km, + "duration" : 5, # hours + "year" : 2019, + "month" : 5, + "day" : 21 + } + headers = {"API-Key" : "<add_your_key>"} + try: + response = requests.get("https://avrad.amentum.io/route/effective_dose", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the dose + dose = response_json['dose']['value'] + print(f"Total Effective Dose was {dose:.2f} uSv") +x-tagGroups: + - name: Calculate radiation dose along a great circle flight route + tags: + - routedose + - name: Calculate radiation intensity or dose at a point + tags: + - cari7 + - parma diff --git a/build/resources/main/amentum.space.global-magnet.1.3.0.yaml b/build/resources/main/amentum.space.global-magnet.1.3.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..824484b4fa0c16b7b16e9987075d9cd5a65cea24 --- /dev/null +++ b/build/resources/main/amentum.space.global-magnet.1.3.0.yaml @@ -0,0 +1,171 @@ +openapi: 3.0.0 +servers: + - url: /wmm +info: + contact: + x-twitter: amentumspace + description: | + + The World Magnetic Model calculates the intensity and direction of the Earth's magnetic field on a specific date-time, geodetic altitude, latitude, and longitude. It is relied upon throughout the world for navigation, mineral exploration, atmospheric and space science, and is installed on billions of devices. <br><br> + A comprehensive description of the World Magnetic Model, including its limitations, can be found <a href='https://www.ngdc.noaa.gov/geomag/WMM/'>here</a>. <br><br> + We provide a RESTful API to access the out-of-cycle World Magnetic Model (WMM2015v2) valid for years 2015.0 - 2020.0 and WMM2020 valid for years 2020.0 - 2025.0<br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Geomag API + version: 1.3.0 + x-apisguru-categories: + - location + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://globalmagnet.amentum.space/wmm/openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: global-magnet +paths: + /magnetic_field: + get: + description: | + at specified conditions. + operationId: app.api_wmm.endpoints.WMM.magnetic_field + parameters: + - $ref: "#/components/parameters/Altitude" + - $ref: "#/components/parameters/Latitude" + - $ref: "#/components/parameters/Longitude" + - $ref: "#/components/parameters/Year" + responses: + "200": + content: + application/json: + schema: + example: + declination: + units: Deg + value: 34.144142150878906 + grid_variation: + units: -65.8558578491211 + value: Deg + inclination: + units: Deg + value: 87.98262786865234 + total_intensity: + units: nT + value: 58421.87109375 + properties: + declination: + description: | + The angle in the horizontal plane between magnetic north and true north. Declination is positive when magnetic north is east of true north. + properties: + units: + type: string + value: + type: number + type: object + grid_variation: + description: | + Referenced to grid north, referenced to 0 deg meridian of a polar stereographic projection. Only defined for latitudes greater than 55 degrees and less than -55 degrees (arctic and antarctic). + properties: + units: + type: string + value: + type: number + type: object + inclination: + description: | + Also known as 'dip', is the angle made between the horizontal plane and the magnetic field vector at some position. Positive inclination corresponds to a downward pointing. + properties: + units: + type: string + value: + type: number + type: object + total_intensity: + description: | + Total magnetic field intensity in nano Teslas. + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful magnetic field intensity calculation + summary: | + Calculate magnetic declination, inclination, total field intensity, and grid variation + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://geomag.amentum.io/wmm/magnetic_field?altitude=10&latitude=80&longitude=100&year=2020.5" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import json + import requests + + headers = {"API-Key" : "<add_your_key>"} + + hostname = "https://geomag.amentum.io/wmm/magnetic_field" + + params = dict( + altitude = 10, # [km] + longitude = 100, # [deg] + latitude = 80, + year = 2020.5 # decimal year, half-way through 2020 + ) + + try: + response = requests.get(hostname, params=params, headers=headers) + # extract JSON payload of response as Python dictionary + json_payload = response.json() + # raise an Exception if we encoutnered any HTTP error codes like 404 + response.raise_for_status() + except requests.exceptions.ConnectionError as e: + # handle any typo errors in url or endpoint, or just patchy internet connection + print(e) + except requests.exceptions.HTTPError as e: + # handle HTTP error codes in the response + print(e, json_payload['error']) + except requests.exceptions.RequestException as e: + # general error handling + print(e, json_payload['error']) + else: + json_payload = response.json() + print(json.dumps(json_payload, indent=4, sort_keys=True)) +components: + parameters: + Altitude: + description: Geodetic Altitude 0 km to 600 km. + in: query + name: altitude + required: true + schema: + example: 10 + type: number + Latitude: + description: Geodetic Latitude. -90 deg (S) to 90 deg (N). + in: query + name: latitude + required: true + schema: + example: 80 + type: number + Longitude: + description: Geodetic Longitude. -180 deg (W) to 180 deg (E). + in: query + name: longitude + required: true + schema: + example: 100 + type: number + Year: + description: Year as a decimal in the range 2015-2025 (2017.5 would be half way through 2017). + in: query + name: year + required: true + schema: + example: 2020.5 + type: number diff --git a/build/resources/main/amentum.space.gravity.1.1.1.yaml b/build/resources/main/amentum.space.gravity.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ce3d4898d022e0fb04fef38d5f0960e35a2b090d --- /dev/null +++ b/build/resources/main/amentum.space.gravity.1.1.1.yaml @@ -0,0 +1,217 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + The gravitational field of the earth is non-uniform. The <a href='https://en.wikipedia.org/wiki/Geoid'>geoid</a> is the shape the + ocean surface would take if only gravity and the rotation of the Earth + were considered. The geoid is the surface that defines zero elevation.<br><br> + + The geoid height is the difference between an ideal reference ellipsoid and the geoid.<br><br> + The gravity anomaly is the difference between the acceleration due to gravity on the Earth's surface and the value calculated assuming the reference ellipsoid.<br><br> + The official Earth Gravitational Model <a href=https://en.wikipedia.org/wiki/Earth_Gravitational_Model#EGM2008/>EGM2008</a> was developed and released to the public by the National Geospatial-Intelligence Agency (NGA).<br><br> + Our EGM2008 API provides on-demand access to the EGM2008 model, as implemented by the open-source GeographicLib <a href=https://geographiclib.sourceforge.io/html/gravity.html>Gravity</a> library.<br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Gravity API + version: 1.1.1 + x-apisguru-categories: + - location + - open_data + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://gravity.amentum.space//openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: gravity +tags: + - description: | + Calculate geoid height and gravity anomaly values using the EGM2008 model + name: egm2008 + x-displayName: EGM2008 API +paths: + /egm2008/geoid_height: + get: + description: | + for a given latitude / longitude. + operationId: app.api_egm2008.endpoints.EGM2008.calculate_height + parameters: + - $ref: "#/components/parameters/Latitude" + - $ref: "#/components/parameters/Longitude" + responses: + "200": + content: + application/json: + example: + height: + units: m + value: 45.88107058892659 + schema: + $ref: "#/components/schemas/Height" + description: Successful geoid height calculation + summary: | + Calculate the geoid height + tags: + - egm2008 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://gravity.amentum.io/egm2008/geoid_height?latitude=-45&longitude=45" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + headers = {"API-Key" : "<add_your_key>"} + + params = { + "latitude" : "-45", + "longitude" : "45" + } + + # Make the API call + try: + response = requests.get( + "https://gravity.amentum.io/egm2008/geoid_height", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the height + height = response_json['height']['value'] + h_unit = response_json['height']['units'] + print("Height: ", height, h_unit) + /egm2008/gravity_anomaly: + get: + description: | + for a given latitude / longitude. + operationId: app.api_egm2008.endpoints.EGM2008.calculate_anomaly + parameters: + - $ref: "#/components/parameters/Latitude" + - $ref: "#/components/parameters/Longitude" + responses: + "200": + content: + application/json: + example: + eta: + units: arcsec + value: -0.9413662219916251 + gravity_anomaly: + units: mGal + value: 27.954737031742376 + xi: + units: arcsec + value: 1.371151956763653 + schema: + $ref: "#/components/schemas/Anomaly" + description: Successful anomaly calculation + summary: | + Calculate gravity anomaly values + tags: + - egm2008 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://gravity.amentum.io/egm2008/gravity_anomaly?latitude=-45&longitude=45" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + headers = {"API-Key" : "<add_your_key>"} + + params = { + "latitude" : "-45", + "longitude" : "45" + } + + # Make the API call + try: + response = requests.get( + "https://gravity.amentum.io/egm2008/gravity_anomaly", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract eta + eta = response_json['eta']['value'] + e_unit = response_json['eta']['units'] + print("Eta: ", eta, e_unit) + + # Extract gravity anomaly + ga = response_json['gravity_anomaly']['value'] + ga_unit = response_json['gravity_anomaly']['units'] + print("Gravity Anomaly: ", ga, ga_unit) + + # Extract xi + xi = response_json['xi']['value'] + xi_unit = response_json['xi']['units'] + print("Xi: ", xi, xi_unit) +components: + parameters: + Latitude: + description: Geographic latitude (-90 to 90 deg). + in: query + name: latitude + required: true + schema: + example: -45 + type: number + Longitude: + description: Geographic longitude (-180 to 180 deg). + in: query + name: longitude + required: true + schema: + example: 45 + type: number + schemas: + Anomaly: + properties: + eta: + description: Eta (arcsec) - easterly component of deflection of vertical. + properties: + units: + type: string + value: + type: number + type: object + gravity_anomaly: + description: | + Gravity anomaly (mGal) + properties: + units: + type: string + value: + type: number + type: object + xi: + description: | + Xi (arcsec) - northerly component of deflection of vertical. + properties: + units: + type: string + value: + type: number + type: object + type: object + Height: + properties: + height: + description: | + Geoid height (m) + properties: + units: + type: string + value: + type: number + type: object + type: object diff --git a/build/resources/main/amentum.space.space_radiation.1.1.1.yaml b/build/resources/main/amentum.space.space_radiation.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d2b45f3cf0c8aa76f95265442d3e103851eaaea8 --- /dev/null +++ b/build/resources/main/amentum.space.space_radiation.1.1.1.yaml @@ -0,0 +1,539 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + Space has a hostile radiation environment that increases the risk of cancers in humans and malfunctions in spacecraft electronics. The types of space radiation of primary concern are: + <ul> + <li> + Galactic Cosmic Rays from outside our solar system generated by + supernovae and other phenomena; + </li> + <li> + Solar Energetic Particles produced by the Sun during intense and + sporadic bursts of activity; and + </li> + <li> + Trapped Radiation: energetic particles confined by Earth's magnetic + field, usually comprising an inner belt of mostly high energy protons + and an outer belt dominated by lower energy electrons and plasma. + </li> + </ul> + + Understanding the space radiation environment for a particular mission profile is becoming increasingly important. Commercial off-the-shelf electronic components that aren't resilient to space radiation are now prevalent. Longer duration missions to cislunar space, Mars, and beyond are placing astronauts at greater risk of radiation exposure. <br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Space Radiation API + version: 1.1.1 + x-apisguru-categories: + - location + - open_data + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://spaceradiation.amentum.space/openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: space_radiation +tags: + - description: | + AE9/AP9/SPM is a set of models developed by the US Air Force Research Laboratory that calculates the fluxes of trapped radiation (radiation belt and plasma particles in near-Earth space) for use in space system design, mission planning, and other climatological applications. <br><br> + A description of the AE9/AP9/SPM models, including energy ranges for which the respective models are valid, can be found <a href='https://www.vdl.afrl.af.mil/programs/ae9ap9/'>here</a>. The model is valid for dates between decimal years 2015.0 and 2020.0<br><br> + The following endpoints wrap the original Ae9Ap9 code (version 1.50.001) which is available <a href='https://www.vdl.afrl.af.mil/programs/ae9ap9/downloads.php'>here</a>. <br><br> + name: trapped + x-displayName: AE9/AP9/SPM trapped radiation models + - description: | + This endpoint provides access to Amentum's implementation of the DLR Galactic Cosmic Radiation model. <br><br> A description of the model can be found in the scientific article <a href="https://www.sciencedirect.com/science/article/abs/pii/S0273117712005947">"A ready-to-use galactic cosmic ray model"</a>, Matthiä, Daniel, et al., Advances in Space Research 51.3 (2013): 329-338. <br><br> It accounts for solar modulation using a single parameter, <i>W</i>, derived from measurements of carbon flux by the Cosmic Ray Isotope Spectrometer aboard the Advanced Composition Explorer spacecraft.<br><br> A linear relationship between <i>W</i> and terrestrial based neutron monitor count rates (measured at the Oulu station in Finland) has been established:<br> W = -0.093 cr + 638.7 <br> Our implementation uses Oulu station count rates as input, calculating galactic cosmic ray flux on a particular date. + name: gcr + x-displayName: DLR galactic cosmic radiation model +paths: + /gcr/flux_dlr: + get: + description: | + for the given energy, atomic number, and date. + operationId: app.api.endpoints.GCR.calculate_dlr_flux + parameters: + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Z" + - $ref: "#/components/parameters/Energy" + responses: + "200": + content: + application/json: + example: + flux: + units: /m^2/s/sr/(MeV/n) + value: 0.006709578488527858 + schema: + $ref: "#/components/schemas/FluxAtEnergy" + description: Successful flux calculation + summary: | + Calculate particle flux + tags: + - gcr + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://spacerad.amentum.io/gcr/flux_dlr?year=2017&month=1&day=1&z=6&energy=100" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = dict( + year=2017, + month=1, + day=1, + z=6, + energy=100 + ) + headers = {"API-Key" : "<add_your_key>"} + # Make the API call + try: + response = requests.get("https://spacerad.amentum.io/gcr/flux_dlr", params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the flux + flux = response_json['flux']['value'] + f_unit = response_json['flux']['units'] + print("Flux: ", flux, f_unit) + /trapped/flux_mean: + get: + description: | + at given coordinates and date-time. + operationId: app.api.endpoints.TrappedRadiation.calculate_flux_mean + parameters: + - $ref: "#/components/parameters/Model" + - $ref: "#/components/parameters/CoordSystem" + - $ref: "#/components/parameters/CoordUnits" + - $ref: "#/components/parameters/Coord1" + - $ref: "#/components/parameters/Coord2" + - $ref: "#/components/parameters/Coord3" + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Hour" + - $ref: "#/components/parameters/Minute" + - $ref: "#/components/parameters/Second" + responses: + "200": + content: + application/json: + example: + energies: + data: + - 0.04 + - 0.07 + - 0.1 + - 0.25 + - 0.5 + - 0.75 + - 1 + - 1.5 + - 2 + - 2.5 + - 3 + - 3.5 + - 4 + - 4.5 + - 5 + - 5.5 + - 6 + - 6.5 + - 7 + - 8.5 + - 10 + units: MeV + flux: + data: + - 854635898.3161561 + - 564685905.5669771 + - 178490117.91626602 + - 47643571.94054352 + - 12254101.813260391 + - 4549350.837767644 + - 1803653.1511005901 + - 654692.4848865604 + - 207898.83220077943 + - 64091.642036893325 + - 21119.72803543081 + - 7526.08326415376 + - 2847.94993909225 + - 1117.8011168229402 + - 490.68560475708034 + - 269.114292404757 + - 177.84563745629936 + - 128.22793816827138 + - 78.49896611035479 + - 43.74101815451732 + - 30.335272788461896 + units: /cm^2/s/MeV + schema: + $ref: "#/components/schemas/Flux" + description: Successful flux calculation + summary: | + Calculate mean particle flux + tags: + - trapped + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://spacerad.amentum.io/trapped/flux_mean?model=AE9&coord_sys=GEI&coord_units=KM&coord1=3216.6&coord2=35426&coord3=603.4&year=2017&month=1&day=1&hour=0&minute=0&second=0" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = dict( + model="AE9", # proton flux + coord_sys="GEI", # Geocentric equatorial inertial + coord_units="KM", # kilometers + coord1=3216.6, # in KM + coord2=35426, + coord3=603.4, + year=2017, + month=1, + day=1, + hour=0, + minute=0, + second=0, + ) + headers = {"API-Key" : "<add_your_key>"} + # Make the API call + try: + response = requests.get("https://spacerad.amentum.io/trapped/flux_mean", params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the flux + energies = response_json['energies']['data'] + e_unit = response_json['energies']['units'] + flux = response_json['flux']['data'] + f_unit = response_json['flux']['units'] + print("Energies: ", energies, e_unit) + print("Mean Fluxes: ", flux, f_unit) + /trapped/flux_percentile: + get: + description: | + at given coordinates and date-time. + operationId: app.api.endpoints.TrappedRadiation.calculate_flux_percentile + parameters: + - $ref: "#/components/parameters/Model" + - $ref: "#/components/parameters/CoordSystem" + - $ref: "#/components/parameters/CoordUnits" + - $ref: "#/components/parameters/Coord1" + - $ref: "#/components/parameters/Coord2" + - $ref: "#/components/parameters/Coord3" + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Hour" + - $ref: "#/components/parameters/Minute" + - $ref: "#/components/parameters/Second" + - $ref: "#/components/parameters/Percentile" + responses: + "200": + content: + application/json: + example: + energies: + data: + - 0.04 + - 0.07 + - 0.1 + - 0.25 + - 0.5 + - 0.75 + - 1 + - 1.5 + - 2 + - 2.5 + - 3 + - 3.5 + - 4 + - 4.5 + - 5 + - 5.5 + - 6 + - 6.5 + - 7 + - 8.5 + - 10 + units: MeV + flux: + data: + - 448667784.4812672 + - 322139086.68134594 + - 116785893.33177781 + - 32665389.706181422 + - 7991547.299112285 + - 2586068.6893010717 + - 839339.9184292991 + - 251004.07802610364 + - 69547.20063526293 + - 19974.510921688125 + - 6379.793949894077 + - 2089.794228005704 + - 779.5936616445822 + - 313.1551441702104 + - 141.5097428322324 + - 71.78622535090953 + - 40.65088904584258 + - 25.06786549513947 + - 12.794710202598523 + - 5.620209093649994 + - 3.319852121012902 + units: /cm^2/s/MeV + schema: + $ref: "#/components/schemas/Flux" + description: Successful flux calculation + summary: | + Calculate percentile particle flux + tags: + - trapped + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://spacerad.amentum.io/trapped/flux_percentile?model=AE9&coord_sys=GEI&coord_units=KM&coord1=3216.6&coord2=35426&coord3=603.4&year=2017&month=1&day=1&hour=0&minute=0&second=0&percentile=50" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: |+ + import requests + + params = dict( + model="AE9", # proton flux + coord_sys="GEI", # Geocentric equatorial inertial + coord_units="KM", # kilometers + coord1=3216.6, # in KM + coord2=35426, + coord3=603.4, + year=2017, + month=1, + day=1, + hour=0, + minute=0, + second=0, + percentile=50 # median flux + ) + + headers = {"API-Key" : "<add_your_key>"} + + # Make the API call + try: + response = requests.get("https://spacerad.amentum.io/trapped/flux_percentile", params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the flux + energies = response_json['energies']['data'] + e_unit = response_json['energies']['units'] + flux = response_json['flux']['data'] + f_unit = response_json['flux']['units'] + print("Energies: ", energies, e_unit) + print("Median Fluxes: ", flux, f_unit) + +components: + parameters: + Coord1: + description: | + <br>First coordinate value to specify position. <br><br> Ordering for GEI, GEO coords:X, Y, Z<br> Ordering for GDZ coords: Alt, Lat, Long<br> Valid ranges for latitude: -90, 90<br> Valid ranges for longitude: 0, 360<br> + in: query + name: coord1 + required: true + schema: + example: 3216.6 + type: number + Coord2: + description: <br>Second coordinate value. + in: query + name: coord2 + required: true + schema: + example: 35426 + type: number + Coord3: + description: <br>Third coordinate value. + in: query + name: coord3 + required: true + schema: + example: 603.4 + type: number + CoordSystem: + description: | + <br>Coordinate system to use: <br><br> - Geodetic/WGS84 (GDZ) <br> - Geocentric Cartesian (GEO) <br> - Geocentric Earth Inertial (GEI) <br> See "Bhavnani, K. H., & Vancour, R. P. (1991). Coordinate systems for space and geophysical applications" for coord system definitions. + in: query + name: coord_sys + required: true + schema: + enum: + - GDZ + - GEO + - GEI + example: GEI + type: string + CoordUnits: + description: | + <br>Coordinate units to use: km (KM) or Earth Radii (RE) + in: query + name: coord_units + required: true + schema: + enum: + - KM + - RE + example: KM + type: string + Date: + description: <br>Decimal year (eg 1997.65) + in: query + name: date + required: true + schema: + type: number + Day: + description: <br> + in: query + name: day + required: true + schema: + example: 1 + type: integer + Energy: + description: | + <br>Particle energy in MeV/n<br> Valid range: [0, 10<sup>6</sup>] MeV/n<br> + in: query + name: energy + required: true + schema: + example: 100 + type: number + Hour: + description: <br> + in: query + name: hour + required: true + schema: + example: "0" + type: integer + Minute: + description: <br> + in: query + name: minute + required: true + schema: + example: "0" + type: integer + Model: + description: | + <br>Which model to use: <br><br> - Energetic electrons (AE9) <br> - Energetic protons (AP9) <br> - Space plasma model for electrons (SPME) <br> - for hydrogen (SPMH) <br> - for helium (SPMHE) <br> - for oxygen (SPMO) + in: query + name: model + required: true + schema: + enum: + - AE9 + - AP9 + - SPME + - SPMH + - SPMHE + - SPMO + example: AE9 + type: string + Month: + description: <br> + in: query + name: month + required: true + schema: + example: 1 + type: integer + Percentile: + description: | + <br>Integer percentile at which to calc flux (50 is the median value). + in: query + name: percentile + required: true + schema: + example: 50 + type: integer + Second: + description: <br> + in: query + name: second + required: true + schema: + example: "0" + type: integer + Year: + description: <br> + in: query + name: year + required: true + schema: + example: 2017 + type: integer + Z: + description: <br>Particle atomic number + in: query + name: z + required: true + schema: + example: 6 + type: number + schemas: + Flux: + properties: + energies: + description: | + Particle energies at which omnidirectional flux values are calculated, and their units. + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + flux: + description: | + Corresponding omnidirectional flux values, and their units. + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + type: object + FluxAtEnergy: + properties: + flux: + description: | + Particle flux value and units. + properties: + units: + type: string + value: + type: number + type: object + type: object +x-tagGroups: + - name: Trapped Radiation + tags: + - trapped + - name: Galactic Cosmic Radiation + tags: + - gcr diff --git a/build/resources/main/anchore.io.0.1.18.yaml b/build/resources/main/anchore.io.0.1.18.yaml new file mode 100644 index 0000000000000000000000000000000000000000..23749c69ef37744925f2d4d2e3a0ea749134f9cf --- /dev/null +++ b/build/resources/main/anchore.io.0.1.18.yaml @@ -0,0 +1,5581 @@ +openapi: 3.0.0 +servers: + - url: / + - url: http://anchore.local +info: + contact: + email: nurmi@anchore.com + x-twitter: anchore + description: This is the Anchore Engine API. Provides the primary external API for users of the service. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Anchore Engine API Server + version: 0.1.18 + x-apisguru-categories: + - developer_tools + x-logo: + url: https://twitter.com/anchore/profile_image?size=original + x-origin: + - format: openapi + url: https://raw.githubusercontent.com/anchore/anchore-engine/master/anchore_engine/services/apiext/swagger/swagger.yaml + version: "3.0" + x-providerName: anchore.io +tags: + - description: Subscription Management + name: Subscriptions + - description: Policy Management + name: Policies + - description: Image Management + name: Images + - description: View Image Content + name: Image Content + - description: Vulnerability checks and reports + name: Vulnerabilities + - description: Evaluate images against policies + name: Policy Evaluation + - description: Registry Management + name: Registries + - description: Repository Credential Management + name: Repository Credentials + - description: System Management + name: System + - description: Service Management + name: Services + - description: Resource Summaries + name: Summaries + - description: View and delete events + name: Events + - description: Resource Queries + name: Queries + - description: Manage Accounts, Users, and Credentials + name: User Management + - description: Get and operate on the authenticated user's identity + name: Identity + - description: Data Archiving Management + name: Archives +paths: + /: + get: + description: Simple status check + operationId: ping + responses: + "200": + content: + application/json: + schema: + type: string + description: Version check response, returns the api version prefix (e.g. 'v1') + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /account: + get: + operationId: get_users_account + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Account" + description: User details for caller's user + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List the account for the authenticated user + tags: + - Identity + x-anchore-authz-action: getAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + /accounts: + get: + operationId: list_accounts + parameters: + - description: Filter accounts by state + in: query + name: state + required: false + schema: + enum: + - enabled + - disabled + - deleting + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccountList" + description: Accound summary listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List user summaries. Only available to the system admin user. + tags: + - User Management + x-anchore-authz-action: listAccounts + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + post: + operationId: create_account + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AccountCreationRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Account" + description: Account Record + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Conflicting user information. User already exists. + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Create a new user. Only avaialble to admin user. + tags: + - User Management + x-anchore-authz-action: createAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}": + delete: + operationId: delete_account + parameters: + - in: path + name: accountname + required: true + schema: + type: string + responses: + "204": + description: Successful deletion + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete the specified account, only allowed if the account is in the disabled state. All users will be deleted along with the account and all resources will be garbage collected + tags: + - User Management + x-anchore-authz-action: deleteAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + get: + operationId: get_account + parameters: + - in: path + name: accountname + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Account" + description: Get user information + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get info about an user. Only available to admin user. Uses the main user Id, not a username. + tags: + - User Management + x-anchore-authz-action: getAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/state": + put: + operationId: update_account_state + parameters: + - in: path + name: accountname + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AccountStatus" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccountStatus" + description: Updated state of the account + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: State requested is invalid based on current state of the account + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Update the state of an account to either enabled or disabled. For deletion use the DELETE route + tags: + - User Management + x-anchore-authz-action: updateAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/users": + get: + operationId: list_users + parameters: + - in: path + name: accountname + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + description: List of user credential records + items: + $ref: "#/components/schemas/User" + type: array + description: User listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List accounts for the user + tags: + - User Management + x-anchore-authz-action: listUsers + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + post: + operationId: create_user + parameters: + - in: path + name: accountname + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserCreationRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Credential summary + summary: Create a new user + tags: + - User Management + x-anchore-authz-action: createUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/users/{username}": + delete: + operationId: delete_user + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + responses: + "204": + description: Deleted credential + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete a specific user credential by username of the credential. Cannot be the credential used to authenticate the request. + tags: + - User Management + x-anchore-authz-action: deleteUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + get: + operationId: get_account_user + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: User record + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get a specific user in the specified account + tags: + - User Management + x-anchore-authz-action: getUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/users/{username}/credentials": + delete: + operationId: delete_user_credential + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + - in: query + name: credential_type + required: true + schema: + enum: + - password + type: string + responses: + "204": + description: Successful deletion + "400": + description: Conflict, cannot delete the credential used to authenticate this request + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete a credential by type + tags: + - User Management + x-anchore-authz-action: updateUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + get: + operationId: list_user_credentials + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialList" + description: User credential listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get current credential summary + tags: + - User Management + x-anchore-authz-action: getUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + post: + operationId: create_user_credential + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/AccessCredential" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Add a credential, overwritting if already exists + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: add/replace credential + tags: + - User Management + x-anchore-authz-action: updateUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + /archives: + get: + operationId: list_archives + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArchiveSummary" + description: Archive summary listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: listArchives + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + /archives/images: + get: + operationId: list_analysis_archive + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArchivedAnalyses" + description: Image analysis archive listing for the requesting account (not the whole system) + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: listArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + post: + operationId: archive_image_analysis + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageAnalysisReferences" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AddAnalysisArchiveResult" + description: Archive statuses + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: createArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + "/archives/images/{imageDigest}": + delete: + description: Performs a synchronous archive deletion + operationId: delete_archived_analysis + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: query + name: force + required: false + schema: + type: boolean + responses: + "200": + description: ArchivdImageAnalysis successfully deleted + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: deleteArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + get: + description: Returns the archive metadata record identifying the image and tags for the analysis in the archive. + operationId: get_archived_analysis + parameters: + - description: The image digest to identify the image analysis + in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArchivedAnalysis" + description: Archived Image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: getArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + /archives/rules: + get: + operationId: list_analysis_archive_rules + parameters: + - description: If true include system global rules (owned by admin) even for non-admin users. Defaults to true if not set. Can be set to false to exclude globals + in: query + name: system_global + required: false + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveRules" + description: Archive transition rules + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: listArchiveTransitionRules + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + post: + operationId: create_analysis_archive_rule + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + description: Archive transition rule + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: createArchiveTransitionRule + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + "/archives/rules/{ruleId}": + delete: + operationId: delete_analysis_archive_rule + parameters: + - in: path + name: ruleId + required: true + schema: + type: string + responses: + "200": + description: Analysis archive rule succesfuly deleted + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: deleteArchiveTransitionRule + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + get: + operationId: get_analysis_archive_rule + parameters: + - in: path + name: ruleId + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + description: Archive transition rule + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: getArchiveTransitionRule + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + /event_types: + get: + description: Returns list of event types in the category hierarchy + operationId: list_event_types + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventTypesList" + description: List of event types + summary: List Event Types + tags: + - Events + x-anchore-authz-action: listEvents + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + /events: + delete: + description: Delete all or a subset of events filtered using the optional query parameters + operationId: delete_events + parameters: + - description: Delete events that occurred before the timestamp + in: query + name: before + required: false + schema: + type: string + - description: Delete events that occurred after the timestamp + in: query + name: since + required: false + schema: + type: string + - description: Delete events that match the level - INFO or ERROR + in: query + name: level + required: false + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: List of deleted event IDs + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete Events + tags: + - Events + x-anchore-authz-action: deleteEvents + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + get: + description: Returns a paginated list of events in the descending order of their occurrence. Optional query parameters may be used for filtering results + operationId: list_events + parameters: + - description: Filter events by the originating service + in: query + name: source_servicename + required: false + schema: + type: string + - description: Filter events by the originating host ID + in: query + name: source_hostid + required: false + schema: + type: string + - description: Filter events by a prefix match on the event type (e.g. "user.image.") + in: query + name: event_type + required: false + schema: + pattern: ^[a-z0-9-_.*]+$ + type: string + - description: Filter events by the type of resource - tag, imageDigest, repository etc + in: query + name: resource_type + required: false + schema: + type: string + - description: Filter events by the id of the resource + in: query + name: resource_id + required: false + schema: + type: string + - description: Filter events by the level - INFO or ERROR + in: query + name: level + required: false + schema: + type: string + - description: Return events that occurred after the timestamp + in: query + name: since + required: false + schema: + type: string + - description: Return events that occurred before the timestamp + in: query + name: before + required: false + schema: + type: string + - description: Pagination controls - return the nth page of results. Defaults to first page if left empty + in: query + name: page + required: false + schema: + default: 1 + type: integer + - description: Number of events in the result set. Defaults to 100 if left empty + in: query + name: limit + required: false + schema: + default: 100 + type: integer + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventsList" + description: Paginated list of event records and the next token + summary: List Events + tags: + - Events + x-anchore-authz-action: listEvents + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + "/events/{eventId}": + delete: + description: Delete an event by its event ID + operationId: delete_event + parameters: + - description: Event ID of the event to be deleted + in: path + name: eventId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + summary: Delete Event + tags: + - Events + x-anchore-authz-action: getEvent + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + get: + description: Lookup an event by its event ID + operationId: get_event + parameters: + - description: Event ID of the event for lookup + in: path + name: eventId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventResponse" + description: Single event record + summary: Get Event + tags: + - Events + x-anchore-authz-action: getEvent + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + /health: + get: + description: Health check, returns 200 and no body if service is running + operationId: health_check + responses: + "200": + description: Empty body on success + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.apis.common + /images: + delete: + description: Delete analysis for image digests in the list asynchronously + operationId: delete_images_async + parameters: + - explode: false + in: query + name: imageDigests + required: true + schema: + items: + type: string + type: array + style: form + x-nullable: false + - in: query + name: force + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteImageResponseList" + description: successful operation + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Bulk mark images for deletion + tags: + - Images + x-anchore-authz-action: deleteImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + get: + description: List all images visible to the user + operationId: list_images + parameters: + - description: Include image history in the response + in: query + name: history + required: false + schema: + type: boolean + - description: Full docker-pull string to filter results by (e.g. docker.io/library/nginx:latest, or myhost.com:5000/testimages:v1.1.1) + in: query + name: fulltag + required: false + schema: + type: string + - description: Filter by image_status value on the record. Default if omitted is 'active'. + in: query + name: image_status + required: false + schema: + default: active + enum: + - all + - active + - deleting + type: string + - description: Filter by analysis_status value on the record. + in: query + name: analysis_status + required: false + schema: + enum: + - not_analyzed + - analyzed + - analyzing + - analysis_failed + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: successful operation + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List all visible images + tags: + - Images + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + post: + description: Creates a new analysis task that is executed asynchronously + operationId: add_image + parameters: + - description: Override any existing entry in the system + in: query + name: force + required: false + schema: + type: boolean + - description: Instruct engine to automatically begin watching the added tag for updates from registry + in: query + name: autosubscribe + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageAnalysisRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Successfully added image to analysis queue + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Submit a new image for analysis by the engine + tags: + - Images + x-anchore-authz-action: createImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}": + delete: + operationId: delete_image_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: query + name: force + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteImageResponse" + description: Image deletion success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete image by docker imageId + tags: + - Images + x-anchore-authz-action: deleteImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + get: + operationId: get_image_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Image lookup success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Lookup image by docker imageId + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/check": + get: + description: Get the policy evaluation for the given image + operationId: get_image_policy_check_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: query + name: policyId + required: false + schema: + type: string + - in: query + name: tag + required: true + schema: + type: string + - in: query + name: detail + required: false + schema: + type: boolean + - in: query + name: history + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyEvaluationList" + description: Policy evaluation success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Check policy evaluation status for image + tags: + - Images + x-anchore-authz-action: getImageEvaluation + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content": + get: + operationId: list_image_content_by_imageid + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List image content types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content/files": + get: + operationId: get_image_content_by_type_imageId_files + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentFilesResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type files + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content/java": + get: + operationId: get_image_content_by_type_imageId_javapackage + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentJAVAPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type java + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content/{ctype}": + get: + operationId: get_image_content_by_type_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: path + name: ctype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/vuln": + get: + operationId: get_image_vulnerability_types_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + enum: + - all + - os + - non-os + type: string + type: array + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerability types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/vuln/{vtype}": + get: + operationId: get_image_vulnerabilities_by_type_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: path + name: vtype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VulnerabilityResponse" + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerabilities by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}": + delete: + operationId: delete_image + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: query + name: force + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteImageResponse" + description: Image deletion success + summary: Delete an image analysis + tags: + - Images + x-anchore-authz-action: deleteImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + get: + operationId: get_image + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Image lookup success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get image metadata + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/artifacts/file_content_search": + get: + operationId: list_file_content_search_results + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FileContentSearchList" + description: List of file metadata objects + "404": + description: Image not found in this service + summary: Return a list of analyzer artifacts of the specified type + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/artifacts/retrieved_files": + get: + operationId: list_retrieved_files + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RetrievedFileList" + description: List of file metadata objects + "404": + description: Image not found in this service + summary: Return a list of analyzer artifacts of the specified type + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/artifacts/secret_search": + get: + operationId: list_secret_search_results + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SecretSearchList" + description: List of file metadata objects + "404": + description: Image not found in this service + summary: Return a list of analyzer artifacts of the specified type + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/check": + get: + description: Get the policy evaluation for the given image + operationId: get_image_policy_check + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: query + name: policyId + required: false + schema: + type: string + - in: query + name: tag + required: true + schema: + type: string + - in: query + name: detail + required: false + schema: + type: boolean + - in: query + name: history + required: false + schema: + type: boolean + - in: query + name: interactive + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyEvaluationList" + description: Policy evaluation success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Check policy evaluation status for image + tags: + - Images + x-anchore-authz-action: getImageEvaluation + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content": + get: + operationId: list_image_content + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: Content listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List image content types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/files": + get: + operationId: get_image_content_by_type_files + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentFilesResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type files + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/java": + get: + operationId: get_image_content_by_type_javapackage + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentJAVAPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type java + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/malware": + get: + operationId: get_image_content_by_type_malware + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentMalwareResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type malware + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/{ctype}": + get: + operationId: get_image_content_by_type + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: path + name: ctype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/metadata": + get: + operationId: list_image_metadata + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: Metadata listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List image metadata types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/metadata/{mtype}": + get: + operationId: get_image_metadata_by_type + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: path + name: mtype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MetadataResponse" + description: Metadata of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the metadata of an image by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/vuln": + get: + operationId: get_image_vulnerability_types + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + enum: + - all + - os + - non-os + type: string + type: array + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerability types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/vuln/{vtype}": + get: + operationId: get_image_vulnerabilities_by_type + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: path + name: vtype + required: true + schema: + type: string + - in: query + name: force_refresh + required: false + schema: + type: boolean + - in: query + name: vendor_only + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VulnerabilityResponse" + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerabilities by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /import/images: + post: + operationId: import_image_archive + requestBody: + content: + multipart/form-data: + schema: + properties: + archive_file: + description: anchore image tar archive. + format: binary + type: string + required: + - archive_file + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Successfully imported image to the engine + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Import an anchore image tar.gz archive file. This is a deprecated API replaced by the "/imports/images" route + tags: + - Import + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /imports/images: + get: + operationId: list_operations + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImports" + description: success + "500": + description: Internal Error + summary: Lists in-progress imports + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: create_operation + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportOperation" + description: success + "500": + description: Internal Error + summary: Begin the import of an image analyzed by Syft into the system + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}": + delete: + operationId: invalidate_operation + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportOperation" + description: success + "500": + description: Internal Error + summary: Invalidate operation ID so it can be garbage collected + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + get: + operationId: get_operation + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportOperation" + description: success + "500": + description: Internal Error + summary: Get detail on a single import + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/dockerfile": + get: + operationId: list_import_dockerfiles + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded dockerfiles + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_dockerfile + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + text/plain; utf-8: + schema: + type: string + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Begin the import of an image analyzed by Syft into the system + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/image_config": + get: + operationId: list_import_image_configs + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded image configs + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_config + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Import a docker or OCI image config to associate with the image + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/manifest": + get: + operationId: list_import_image_manifests + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded image manifests + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_manifest + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/vnd.docker.distribution.manifest.v1+json: + schema: + type: object + application/vnd.docker.distribution.manifest.v1+prettyjws: + schema: + type: object + application/vnd.docker.distribution.manifest.v2+json: + schema: + type: object + application/vnd.oci.image.manifest.v1+json: + schema: + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Import a docker or OCI distribution manifest to associate with the image + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/packages": + get: + operationId: list_import_packages + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded package manifests + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_packages + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImagePackageManifest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Begin the import of an image analyzed by Syft into the system + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/parent_manifest": + get: + operationId: list_import_parent_manifests + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded parent manifests (manifest lists for a tag) + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_parent_manifest + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/vnd.docker.distribution.manifest.list.v2+json: + schema: + type: object + application/vnd.oci.image.index.v1+json: + schema: + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Import a docker or OCI distribution manifest list to associate with the image + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + /oauth/token: + post: + description: Request a jwt token for subsequent operations, this request is authenticated with normal HTTP auth + operationId: get_oauth_token + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + client_id: + default: anonymous + description: The type of client used for the OAuth token + type: string + grant_type: + default: password + description: OAuth Grant type for token + type: string + password: + description: Password for corresponding user + type: string + username: + description: User to assign OAuth token to + type: string + type: object + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TokenResponse" + description: Resulting JWT token + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.oauth + /policies: + get: + description: List all saved policy bundles + operationId: list_policies + parameters: + - description: Include policy bundle detail in the form of the full bundle content for each entry + in: query + name: detail + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleList" + description: Policy listing + summary: List policies + tags: + - Policies + x-anchore-authz-action: listPolicies + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + post: + description: Adds a new policy bundle to the system + operationId: add_policy + parameters: + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundle" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleRecord" + description: Saved bundle + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Add a new policy + tags: + - Policies + x-anchore-authz-action: createPolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + "/policies/{policyId}": + delete: + description: Delete the specified policy + operationId: delete_policy + parameters: + - in: path + name: policyId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Policy not found to delete + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete policy + tags: + - Policies + x-anchore-authz-action: deletePolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + get: + description: Get the policy bundle content + operationId: get_policy + parameters: + - in: path + name: policyId + required: true + schema: + type: string + - description: Include policy bundle detail in the form of the full bundle content for each entry + in: query + name: detail + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleList" + description: A list with a single fetched policy bundle record + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get specific policy + tags: + - Policies + x-anchore-authz-action: getPolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + put: + description: Update/replace and existing policy + operationId: update_policy + parameters: + - in: path + name: policyId + required: true + schema: + type: string + - description: Mark policy as active + in: query + name: active + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleRecord" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleList" + description: A list with a single updated policy bundle record + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Update policy + tags: + - Policies + x-anchore-authz-action: updatePolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + /query/images/by_package: + get: + description: Filterable query interface to search for images containing specified package + operationId: query_images_by_package + parameters: + - description: Name of package to search for (e.g. sed) + in: query + name: name + required: true + schema: + type: string + - description: Type of package to filter on (e.g. dpkg) + in: query + name: package_type + required: false + schema: + type: string + - description: Version of named package to filter on (e.g. 4.4-1) + in: query + name: version + required: false + schema: + type: string + - description: The page of results to fetch. Pages start at 1 + in: query + name: page + required: false + schema: + type: string + - description: Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page + in: query + name: limit + required: false + schema: + type: integer + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedImageList" + description: Image listing + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Bad filter parameters + summary: List of images containing given package + tags: + - Query + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.query + /query/images/by_vulnerability: + get: + description: Returns a listing of images and their respective packages vulnerable to the given vulnerability ID + operationId: query_images_by_vulnerability + parameters: + - description: The ID of the vulnerability to search for within all images stored in anchore-engine (e.g. CVE-1999-0001) + in: query + name: vulnerability_id + required: true + schema: + type: string + - description: Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04) + in: query + name: namespace + required: false + schema: + type: string + - description: Filter results to images with vulnable packages with the given package name (e.g. libssl) + in: query + name: affected_package + required: false + schema: + type: string + - description: Filter results to vulnerable package/vulnerability with the given severity + in: query + name: severity + required: false + schema: + enum: + - Unknown + - Negligible + - Low + - Medium + - High + - Critical + type: string + - description: Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data + in: query + name: vendor_only + required: false + schema: + default: true + type: boolean + - description: The page of results to fetch. Pages start at 1 + in: query + name: page + required: false + schema: + type: integer + - description: Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page + in: query + name: limit + required: false + schema: + type: integer + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedVulnerableImageList" + description: Image lookup success + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Invalid filter parameters + summary: List images vulnerable to the specific vulnerability ID. + tags: + - Query + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.query + /query/vulnerabilities: + get: + description: List (w/filters) vulnerability records known by the system, with affected packages information if present + operationId: query_vulnerabilities + parameters: + - description: The ID of the vulnerability (e.g. CVE-1999-0001) + explode: false + in: query + name: id + required: true + schema: + items: + type: string + type: array + style: form + - description: Filter results by specified package name (e.g. sed) + in: query + name: affected_package + required: false + schema: + type: string + - description: Filter results by specified package version (e.g. 4.4-1) + in: query + name: affected_package_version + required: false + schema: + type: string + - description: The page of results to fetch. Pages start at 1 + in: query + name: page + required: false + schema: + default: "1" + type: string + - description: Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page + in: query + name: limit + required: false + schema: + type: integer + - description: Namespace(s) to filter vulnerability records by + explode: false + in: query + name: namespace + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedVulnerabilityList" + description: Vulnerability listing paginated + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Invalid filter parameters + summary: Listing information about given vulnerability + tags: + - Query + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.query + /registries: + get: + description: List all configured registries the system can/will watch + operationId: list_registries + parameters: + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Registry listing + summary: List configured registries + tags: + - Registries + x-anchore-authz-action: listRegistries + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + post: + description: Adds a new registry to the system + operationId: create_registry + parameters: + - description: flag to determine whether or not to validate registry/credential at registry add time + in: query + name: validate + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + $ref: "#/components/requestBodies/RegistryConfigurationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Saved registry configuration + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Add a new registry + tags: + - Registries + x-anchore-authz-action: createRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + "/registries/{registry}": + delete: + description: Delete a registry configuration record from the system. Does not remove any images. + operationId: delete_registry + parameters: + - in: path + name: registry + required: true + schema: + format: path + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete a registry configuration + tags: + - Registries + x-anchore-authz-action: deleteRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + get: + description: Get information on a specific registry + operationId: get_registry + parameters: + - in: path + name: registry + required: true + schema: + format: path + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Registry configuration + summary: Get a specific registry configuration + tags: + - Registries + x-anchore-authz-action: getRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + put: + description: Replaces an existing registry record with the given record + operationId: update_registry + parameters: + - in: path + name: registry + required: true + schema: + format: path + type: string + - description: flag to determine whether or not to validate registry/credential at registry update time + in: query + name: validate + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + $ref: "#/components/requestBodies/RegistryConfigurationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Updated registry configuration + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Update/replace a registry configuration + tags: + - Registries + x-anchore-authz-action: updateRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + /repositories: + post: + operationId: add_repository + parameters: + - description: full repository to add e.g. docker.io/library/alpine + in: query + name: repository + required: true + schema: + type: string + - description: flag to enable/disable auto tag_update activation when new images from a repo are added + in: query + name: autosubscribe + required: false + schema: + type: boolean + - description: flag to return tags in the repository without actually watching the repository, default is false + in: query + name: dryrun + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Repository and discovered tags added + summary: Add repository to watch + tags: + - Repository Credentials + x-anchore-authz-action: createRepository + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /status: + get: + description: Get the API service status + operationId: get_status + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/StatusResponse" + description: Status listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Service status + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /subscriptions: + get: + operationId: list_subscriptions + parameters: + - description: filter only subscriptions matching key + in: query + name: subscription_key + required: false + schema: + type: string + - description: filter only subscriptions matching type + in: query + name: subscription_type + required: false + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Subscription listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List all subscriptions + tags: + - Subscriptions + x-anchore-authz-action: listSubscriptions + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + post: + description: Create a new subscription to watch a tag and get notifications of changes + operationId: add_subscription + parameters: + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Subscription add success + summary: Add a subscription of a specific type + tags: + - Subscriptions + x-anchore-authz-action: createSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + "/subscriptions/{subscriptionId}": + delete: + operationId: delete_subscription + parameters: + - in: path + name: subscriptionId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete subscriptions of a specific type + tags: + - Subscriptions + x-anchore-authz-action: deleteSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + get: + operationId: get_subscription + parameters: + - in: path + name: subscriptionId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Filtered subscription list by type + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get a specific subscription set + tags: + - Subscriptions + x-anchore-authz-action: getSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + put: + operationId: update_subscription + parameters: + - in: path + name: subscriptionId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionUpdate" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Subscription add success + summary: Update an existing and specific subscription + tags: + - Subscriptions + x-anchore-authz-action: updateSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + /summaries/imagetags: + get: + description: List all image tags visible to the user + operationId: list_imagetags + parameters: + - description: Filter images in one or more states such as active, deleting. Defaults to active images only if unspecified + explode: false + in: query + name: image_status + required: false + schema: + default: + - active + items: + enum: + - all + - active + - deleting + type: string + type: array + style: form + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageTagSummaryList" + description: successful operation + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List all visible image digests and tags + tags: + - Summaries + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /system: + get: + description: Get the system status including queue lengths + operationId: get_service_detail + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SystemStatusResponse" + description: Status listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: System status + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/error_codes: + get: + description: Describe anchore engine error codes. + operationId: describe_error_codes + responses: + "200": + content: + application/json: + schema: + description: List of Error Code Descriptions + items: + $ref: "#/components/schemas/AnchoreErrorCode" + type: array + description: Error Codes Description + summary: Describe anchore engine error codes. + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/feeds: + get: + description: Return a list of feed and their groups along with update and record count information. This data reflects the state of the policy engine, not the upstream feed service itself. + operationId: get_system_feeds + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FeedMetadata" + type: array + description: success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: list feeds operations and information + tags: + - System + x-anchore-authz-action: listFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + post: + description: Execute a synchronous feed sync operation. The response will block until complete, then return the result summary. + operationId: post_system_feeds + parameters: + - description: instruct system to flush existing data feeds records from anchore-engine + in: query + name: flush + required: false + schema: + type: boolean + - description: instruct system to re-sync data feeds + in: query + name: sync + required: false + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeedSyncResults" + description: Feeds operation success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: trigger feeds operations + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/feeds/{feed}": + delete: + description: Delete the groups and data for the feed and disable the feed itself + operationId: delete_feed + parameters: + - in: path + name: feed + required: true + schema: + type: string + responses: + "200": + description: Successfully deleted + "404": + description: Not found + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + put: + description: Disable the feed so that it does not sync on subsequent sync operations + operationId: toggle_feed_enabled + parameters: + - in: path + name: feed + required: true + schema: + type: string + - in: query + name: enabled + required: true + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeedMetadata" + description: FeedInfo + "400": + description: Bad request, fix and resend + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/feeds/{feed}/{group}": + delete: + description: Delete the group data and disable the group itself + operationId: delete_feed_group + parameters: + - in: path + name: feed + required: true + schema: + type: string + - in: path + name: group + required: true + schema: + type: string + responses: + "200": + description: Successfully deleted + "404": + description: Not found + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + put: + description: Disable a specific group within a feed to not sync + operationId: toggle_group_enabled + parameters: + - in: path + name: feed + required: true + schema: + type: string + - in: path + name: group + required: true + schema: + type: string + - in: query + name: enabled + required: true + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FeedMetadata" + type: array + description: FeedInfo listing + "400": + description: Bad request, fix and resend + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/policy_spec: + get: + description: Get the policy language spec for this service + operationId: describe_policy + responses: + "200": + content: + application/json: + schema: + description: List of Gate specifications + items: + $ref: "#/components/schemas/GateSpec" + type: array + description: Policy Language Description + summary: Describe the policy language spec implemented by this service. + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/services: + get: + operationId: list_services + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceList" + description: Service listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List system services + tags: + - System + x-anchore-authz-action: listServices + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/services/{servicename}": + get: + operationId: get_services_by_name + parameters: + - in: path + name: servicename + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceList" + description: Service Info + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get a service configuration and state + tags: + - System + x-anchore-authz-action: getService + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/services/{servicename}/{hostid}": + delete: + operationId: delete_service + parameters: + - in: path + name: servicename + required: true + schema: + type: string + - in: path + name: hostid + required: true + schema: + type: string + responses: + "200": + description: Delete success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete the service config + tags: + - System + x-anchore-authz-action: deleteService + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + get: + operationId: get_services_by_name_and_host + parameters: + - in: path + name: servicename + required: true + schema: + type: string + - in: path + name: hostid + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceList" + description: Listing of registered services + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get service config for a specific host + tags: + - System + x-anchore-authz-action: getService + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/webhooks/{webhook_type}/test": + post: + description: Loads the Webhook configuration for webhook_type, and sends the notification out as a test + operationId: test_webhook + parameters: + - description: The Webhook Type that we should test + in: path + name: webhook_type + required: true + schema: + type: string + - description: What kind of Notification to send + in: query + name: notification_type + required: false + schema: + default: tag_update + enum: + - tag_update + - analysis_update + - vuln_update + - policy_eval + type: string + responses: + "200": + description: The Webhook was sent successfully. Schemas may be found under Models (PolicyEvalNotification, TagUpdateNotification, VulnUpdateNotification, AnalysisUpdateNotification) + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: The Webhook failed to send due to misconfiguration + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: The Webhook failed to send due to an Internal Error + summary: Adds the capabilities to test a webhook delivery for the given notification type + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /user: + get: + operationId: get_user + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: User details for caller's user + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List authenticated user info + tags: + - Identity + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.user + /user/credentials: + get: + operationId: get_credentials + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialList" + description: User credential listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get current credential summary + tags: + - Identity + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.user + post: + operationId: add_credential + requestBody: + $ref: "#/components/requestBodies/AccessCredential" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Add a credential, overwritting if already exists + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: add/replace credential + tags: + - Identity + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.user + /version: + get: + description: Returns the version object for the service, including db schema version info + operationId: version_check + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceVersion" + description: Version object describing version state + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.apis.common +components: + parameters: + AsAccountParameter: + description: An account name to change the resource scope of the request to that account, if permissions allow (admin only) + in: header + name: x-anchore-account + required: false + schema: + type: string + requestBodies: + AccessCredential: + content: + application/json: + schema: + $ref: "#/components/schemas/AccessCredential" + required: true + RegistryConfigurationRequest: + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationRequest" + required: true + schemas: + AccessCredential: + description: A login credential mapped to a user identity. For password credentials, the username to present for Basic auth is the user's username from the user record + properties: + created_at: + description: The timestamp of creation of the credential + type: string + type: + description: The type of credential + enum: + - password + type: string + value: + description: The credential value (e.g. the password) + type: string + required: + - type + - value + type: object + Account: + description: Account information + properties: + created_at: + description: The timestamp when the account was created + format: date-time + type: string + email: + description: Optional email address associated with the account + type: string + last_updated: + description: The timestamp of the last update to the account metadata itself (not users or creds) + format: date-time + type: string + name: + description: The account identifier, not updatable after creation + type: string + state: + description: State of the account. Disabled accounts prevent member users from logging in, deleting accounts are disabled and pending deletion and will be removed once all owned resources are garbage collected by the system + enum: + - enabled + - disabled + - deleting + type: string + type: + description: The user type (admin vs user). If not specified in a POST request, 'user' is default + enum: + - user + - admin + - service + type: string + required: + - name + type: object + AccountCreationRequest: + description: An account to create/add to the system. If already exists will return 400. + properties: + email: + description: An optional email to associate with the account for contact purposes + pattern: "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" + type: string + name: + description: The account name to use. This will identify the account and must be globally unique in the system. + pattern: ^[a-zA-Z0-9][a-zA-Z0-9@.!#$+-=^_`~;]{1,126}[a-zA-Z0-9]$ + type: string + required: + - name + type: object + AccountList: + items: + $ref: "#/components/schemas/Account" + type: array + AccountStatus: + description: A summary of account status + properties: + state: + description: The status of the account + enum: + - enabled + - disabled + type: string + type: object + AddAnalysisArchiveResult: + description: List of analysis archive add results + items: + $ref: "#/components/schemas/AnalysisArchiveAddResult" + type: array + AnalysisArchiveAddResult: + description: The result of adding a single digest to the archive + properties: + detail: + description: Details on the status, e.g. the error message + type: string + digest: + description: The image digest requested to be added + type: string + status: + description: The status of the archive add operation. Typically either 'archived' or 'error' + enum: + - archived + - archiving + - error + type: string + type: object + AnalysisArchiveRules: + description: Rule set for automatic archiving of system objects and flushing of archived objects (permament delete). + items: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + type: array + AnalysisArchiveRulesSummary: + description: Summary of the transition rule set + properties: + count: + description: The number of rules for this account + type: integer + last_updated: + description: The newest last_updated timestamp from the set of rules + format: date-time + type: string + type: object + AnalysisArchiveSource: + description: An image reference in the analysis archive for the purposes of loading analysis from the archive into th working set + nullable: true + properties: + digest: + description: The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored. + pattern: ^sha256:[a-fA-F0-9]{64}$ + type: string + required: + - digest + type: object + AnalysisArchiveSummary: + description: A summarization of the analysis archive, including size, counts, etc. This archive stores image analysis only, never the actual image content or layers. + properties: + last_updated: + description: The timestamp of the most recent archived image + format: date-time + type: string + total_data_bytes: + description: The total sum of all the bytes stored to the backing storage. Accounts for anchore-applied compression, but not compression by the underlying storage system. + type: integer + total_image_count: + description: The number of unique images (digests) in the archive + type: integer + total_tag_count: + description: The number of tag records (registry/repo:tag pull strings) in the archive. This may include repeated tags but will always have a unique tag->digest mapping per record. + type: integer + type: object + AnalysisArchiveTransitionHistory: + description: A rule for auto-archiving image analysis by time and/or tag-history + properties: + created_at: + format: date-time + type: string + imageDigest: + type: string + last_updated: + format: date-time + type: string + rule_id: + type: string + transition: + enum: + - archive + - delete + type: string + transition_task_id: + description: The task that created & updated this entry + type: string + type: object + AnalysisArchiveTransitionRule: + description: A rule for auto-archiving image analysis by time and/or tag-history + properties: + analysis_age_days: + description: Matches if the analysis is strictly older than this number of days + type: integer + created_at: + format: date-time + type: string + exclude: + $ref: "#/components/schemas/AnalysisArchiveTransitionRuleExclude" + last_updated: + format: date-time + type: string + max_images_per_account: + description: This is the maximum number of image analyses an account can have. Can only be set on system_global rules + type: integer + rule_id: + description: Unique identifier for archive rule + type: string + selector: + $ref: "#/components/schemas/ImageSelector" + system_global: + description: True if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them + type: boolean + tag_versions_newer: + description: Number of images mapped to the tag that are newer + type: integer + transition: + description: The type of transition to make. If "archive", then archive an image from the working set and remove it from the working set. If "delete", then match against archived images and delete from the archive if match. + enum: + - archive + - delete + type: string + required: + - transition + type: object + AnalysisArchiveTransitionRuleExclude: + description: Which Images to exclude from auto-archiving logic + properties: + expiration_days: + default: -1 + description: How long the image selected will be excluded from the archive transition + type: integer + selector: + $ref: "#/components/schemas/ImageSelector" + type: object + AnalysisUpdateEval: + description: Evaluation Results for an entity (current or last) + properties: + analysis_status: + type: string + annotations: + type: object + image_digest: + type: string + type: object + AnalysisUpdateNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Tag Update Notifications + properties: + data: + $ref: "#/components/schemas/AnalysisUpdateNotificationData" + type: object + AnalysisUpdateNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/AnalysisUpdateNotificationPayload" + type: object + AnalysisUpdateNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + curr_eval: + $ref: "#/components/schemas/AnalysisUpdateEval" + last_eval: + $ref: "#/components/schemas/AnalysisUpdateEval" + type: object + AnchoreErrorCode: + description: A description of an anchore error code (name, description) + properties: + description: + description: Description of the error code + type: string + name: + description: Error code name + type: string + type: object + AnchoreImage: + description: A unique image in the engine. May have multiple tags or references. Unique to an image content across registries or repositories. + properties: + analysis_status: + description: A state value for the current status of the analysis progress of the image + enum: + - not_analyzed + - analyzing + - analyzed + - analysis_failed + type: string + annotations: + type: object + created_at: + format: date-time + type: string + imageDigest: + type: string + image_content: + $ref: "#/components/schemas/ImageContent" + image_detail: + description: Details specific to an image reference and type such as tag and image source + items: + $ref: "#/components/schemas/ImageDetail" + type: array + image_status: + description: State of the image + enum: + - active + - inactive + - disabled + type: string + last_updated: + format: date-time + type: string + userId: + type: string + type: object + AnchoreImageList: + description: A list of Anchore Images + items: + $ref: "#/components/schemas/AnchoreImage" + type: array + AnchoreImageTagSummary: + description: A unique image in the engine. + properties: + analysis_status: + type: string + analyzed_at: + type: integer + created_at: + type: integer + fulltag: + type: string + imageDigest: + type: string + imageId: + type: string + image_status: + type: string + parentDigest: + type: string + tag_detected_at: + type: integer + type: object + AnchoreImageTagSummaryList: + description: a list of AnchoreImageTagSummary objects + items: + $ref: "#/components/schemas/AnchoreImageTagSummary" + type: array + Annotations: + description: Simple key/value pairs where the value may be optional + type: object + ApiErrorResponse: + description: Generic HTTP API error response + properties: + code: + format: int32 + type: integer + detail: + description: Details structure for additional information about the error if available. Content and structure will be error specific. + type: object + error_type: + type: string + message: + type: string + type: object + ArchiveSummary: + description: A summarization of the available archives, a place to for long-term storage of audit, analysis, or other data to remove it from the system's working set but keep it available. + properties: + images: + $ref: "#/components/schemas/AnalysisArchiveSummary" + rules: + $ref: "#/components/schemas/AnalysisArchiveRulesSummary" + type: object + ArchivedAnalyses: + description: List of archived analyses + items: + $ref: "#/components/schemas/ArchivedAnalysis" + type: array + ArchivedAnalysis: + properties: + analyzed_at: + format: date-time + type: string + annotations: + description: User provided annotations as key-value pairs + type: object + archive_size_bytes: + description: The size, in bytes, of the analysis archive file + type: integer + created_at: + format: date-time + type: string + imageDigest: + description: The image digest (digest of the manifest describing the image, per docker spec) + type: string + image_detail: + description: List of tags associated with the image digest + items: + $ref: "#/components/schemas/TagEntry" + type: array + last_updated: + format: date-time + type: string + parentDigest: + description: The digest of a parent manifest (for manifest-list images) + type: string + status: + description: The archival status + enum: + - archiving + - archived + - deleting + - deleted + type: string + type: object + BaseNotificationData: + description: Every notification has a payload, which follows this basic structure + properties: + notification_type: + type: string + notification_user: + type: string + notification_user_email: + type: string + type: object + CVSSV2Scores: + properties: + base_score: + nullable: true + type: number + exploitability_score: + nullable: true + type: number + impact_score: + nullable: true + type: number + type: object + CVSSV3Scores: + properties: + base_score: + nullable: true + type: number + exploitability_score: + nullable: true + type: number + impact_score: + nullable: true + type: number + type: object + ContentFilesResponse: + description: File content listings from images + properties: + content: + items: + properties: + filename: + type: string + gid: + type: integer + linkdest: + nullable: true + type: string + mode: + type: string + sha256: + nullable: true + type: string + size: + type: integer + type: + type: string + uid: + type: integer + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentJAVAPackageResponse: + description: Java package content listings from images + properties: + content: + items: + properties: + cpes: + description: A list of Common Platform Enumerations that may uniquely identify the package + items: + type: string + type: array + implementation-version: + type: string + location: + type: string + maven-version: + type: string + origin: + type: string + package: + type: string + specification-version: + type: string + type: + type: string + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentMalwareResponse: + description: Malware listing response + properties: + content: + description: List of malware scan results, one per scanner configured to run + items: + $ref: "#/components/schemas/MalwareScan" + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentPackageResponse: + description: Package content listings from images + properties: + content: + items: + properties: + cpes: + description: A list of Common Platform Enumerations that may uniquely identify the package + items: + type: string + type: array + license: + description: Deprecated in favor of the 'licenses' field" + type: string + licenses: + items: + type: string + type: array + location: + type: string + origin: + type: string + package: + type: string + size: + type: string + type: + type: string + version: + type: string + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentResponse: + description: Generic wrapper for content listings from images + properties: + content: + items: + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + CredentialList: + items: + $ref: "#/components/schemas/AccessCredential" + type: array + DeleteImageResponse: + description: Image deletion response containing status and details + properties: + detail: + type: string + digest: + type: string + status: + description: Current status of the image deletion + enum: + - not_found + - deleting + - delete_failed + type: string + required: + - digest + - status + type: object + DeleteImageResponseList: + description: A list of delete image responses + items: + $ref: "#/components/schemas/DeleteImageResponse" + type: array + EventCategory: + description: A collection of event subcategories + properties: + category: + type: string + description: + type: string + subcategories: + items: + $ref: "#/components/schemas/EventSubcategory" + type: array + type: object + EventDescription: + description: A description of an event type + properties: + message: + description: The message associated with the event type + type: string + name: + description: The event type. The last component of the fully-qualified event_type (category.subcategory.event) + type: string + resource_type: + description: The type of resource this event is generated from + type: string + type: + description: The fully qualified event type as would be seen in the event payload + type: string + type: object + EventResponse: + description: A record of occurance of an asynchronous event triggered either by system or by user activity + properties: + created_at: + format: date-time + type: string + event: + properties: + category: + type: string + details: + type: object + level: + type: string + message: + type: string + resource: + properties: + id: + type: string + type: + type: string + user_id: + type: string + type: object + source: + properties: + base_url: + type: string + hostid: + type: string + request_id: + type: string + servicename: + type: string + type: object + timestamp: + format: date-time + type: string + type: + type: string + type: object + generated_uuid: + type: string + type: object + EventSubcategory: + description: A collection of events related to each other + properties: + description: + type: string + events: + items: + $ref: "#/components/schemas/EventDescription" + type: array + name: + type: string + type: object + EventTypesList: + description: Array of EventCategory objects + items: + $ref: "#/components/schemas/EventCategory" + type: array + EventsList: + description: Response envelope for paginated listing of events + properties: + item_count: + description: Number of events in this page + type: integer + next_page: + description: Boolean flag, True indicates there are more events and False otherwise + type: boolean + page: + description: Page number of this result set + type: integer + results: + description: List of events + items: + $ref: "#/components/schemas/EventResponse" + type: array + type: object + FeedGroupMetadata: + properties: + created_at: + format: date-time + type: string + last_sync: + format: date-time + type: string + name: + type: string + record_count: + type: integer + type: object + FeedMetadata: + description: Metadata on a single feed based on what the engine finds from querying the endpoints + properties: + created_at: + description: Date the metadata record was created in engine (first seen on source) + format: date-time + type: string + groups: + items: + $ref: "#/components/schemas/FeedGroupMetadata" + type: array + last_full_sync: + format: date-time + type: string + name: + description: name of the feed + type: string + updated_at: + description: Date the metadata was last updated + format: date-time + type: string + type: object + FeedSyncResult: + description: The result of a sync of a single feed + properties: + feed: + description: The name of the feed synced + type: string + groups: + description: Array of group sync results + items: + $ref: "#/components/schemas/GroupSyncResult" + type: array + status: + description: The result of the sync operations, either co + enum: + - success + - failure + type: string + total_time_seconds: + description: The duratin, in seconds, of the sync of the feed, the sum of all the group syncs + type: number + type: object + FeedSyncResults: + description: An array of feed sync summaries representing the result of an explicit feed sync operation + items: + $ref: "#/components/schemas/FeedSyncResult" + type: array + FileContentSearchList: + description: Simple array of RetrievedFileMetadata objects + items: + $ref: "#/components/schemas/FileContentSearchResult" + type: array + FileContentSearchResult: + description: The retrieved file entry including content (b64 encoded) + properties: + matches: + items: + $ref: "#/components/schemas/RegexContentMatch" + type: array + path: + type: string + type: object + GateSpec: + description: A description of the set of gates available in this engine and the triggers and parameters supported + properties: + description: + description: Description of the gate + type: string + name: + description: Gate name, as it would appear in a policy document + type: string + state: + description: State of the gate and transitively all triggers it contains if not 'active' + enum: + - active + - deprecated + - eol + type: string + superceded_by: + description: The name of another trigger that supercedes this on functionally if this is deprecated + nullable: true + type: string + triggers: + description: List of the triggers that can fire for this Gate + items: + $ref: "#/components/schemas/TriggerSpec" + type: array + type: object + GenericNotificationPayload: + description: Parent class for Notification Payloads + properties: + notificationId: + type: string + subscription_key: + type: string + subscription_type: + type: string + userId: + type: string + type: object + GroupSyncResult: + properties: + group: + description: The name of the group + type: string + status: + enum: + - success + - failure + type: string + total_time_seconds: + description: The duration of the group sync in seconds + type: number + updated_image_count: + description: The number of images updated by the this group sync, across all accounts. This is typically only non-zero for vulnerability feeds which update images' vulnerability results during the sync. + type: integer + updated_record_count: + description: The number of feed data records synced down as either updates or new records + type: integer + type: object + ImageAnalysisReferences: + description: List of image digests to archive + items: + description: Image digest + type: string + type: array + ImageAnalysisReport: + description: Analysis report json to be imported + type: object + ImageAnalysisRequest: + description: A request to add an image to be watched and analyzed by the engine. Optionally include the dockerfile content. Either source, digest or tag must be present. + properties: + annotations: + description: Annotations to be associated with the added image in key/value form + type: object + created_at: + description: Optional override of the image creation time, only honored when both tag and digest are also supplied e.g. 2018-10-17T18:14:00Z. Deprecated in favor of the 'source' field + format: date-time + type: string + digest: + description: A digest string for an image, maybe a pull string or just a digest. e.g. nginx@sha256:123 or sha256:abc123. If a pull string, it must have same regisry/repo as the tag field. Deprecated in favor of the 'source' field + type: string + dockerfile: + description: Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field. + pattern: ^[a-zA-Z0-9+/=]+$ + type: string + image_type: + description: Optional. The type of image this is adding, defaults to "docker". This can be ommitted until multiple image types are supported. + type: string + source: + $ref: "#/components/schemas/ImageSource" + tag: + description: Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field + type: string + type: object + ImageContent: + description: A metadata content record for a specific image, containing different content type entries + type: object + ImageContentDeleteResponse: + type: object + ImageDetail: + description: A metadata detail record for a specific image. Multiple detail records may map a single catalog image. + properties: + created_at: + format: date-time + type: string + dockerfile: + nullable: true + type: string + fulldigest: + description: Full docker-pullable digest string including the registry url and repository necessary get the image + type: string + fulltag: + description: Full docker-pullable tag string referencing the image + type: string + imageDigest: + description: The parent Anchore Image record to which this detail maps + type: string + imageId: + type: string + last_updated: + format: date-time + type: string + registry: + type: string + repo: + type: string + userId: + type: string + type: object + ImageFilter: + description: Filter for an image list by id, tag, or digest, but not both + properties: + digest: + type: string + tag: + type: string + type: object + ImageImportContentResponse: + properties: + created_at: + format: date-time + type: string + digest: + type: string + type: object + ImageImportManifest: + nullable: true + properties: + contents: + $ref: "#/components/schemas/ImportContentDigests" + digest: + type: string + local_image_id: + description: An "imageId" as used by Docker if available + type: string + operation_uuid: + type: string + parent_digest: + description: The digest of the images's manifest-list parent if it was accessed from a multi-arch tag where the tag pointed to a manifest-list. This allows preservation of that relationship in the data + type: string + tags: + items: + description: Full docker reference tags + example: docker.io/library/nginx:latest + type: string + type: array + type: object + ImageImportOperation: + description: An import record, creating a unique identifier for referencing the operation as well as its state + properties: + created_at: + format: date-time + type: string + expires_at: + format: date-time + type: string + status: + enum: + - pending + - queued + - processing + - complete + - failed + - expired + type: string + uuid: + type: string + type: object + ImageImports: + items: + $ref: "#/components/schemas/ImageImportOperation" + type: array + ImagePackageManifest: + additionalProperties: true + properties: + artifactRelationships: + items: + $ref: "#/components/schemas/ImportPackageRelationship" + type: array + artifacts: + items: + $ref: "#/components/schemas/ImportPackage" + type: array + descriptor: + $ref: "#/components/schemas/ImportDescriptor" + distro: + $ref: "#/components/schemas/ImportDistribution" + schema: + $ref: "#/components/schemas/ImportSchema" + source: + $ref: "#/components/schemas/ImportSource" + required: + - artifacts + - source + - distro + type: object + ImageRef: + description: A reference to an image + properties: + type: + enum: + - tag + - digest + - id + value: + type: string + required: + - type + - value + type: object + ImageReference: + description: A summary of an image identity, including digest, id (if available), and any tags known to have ever been mapped to the digest + properties: + analyzed_at: + description: Timestamp, in rfc3339 format, indicating when the image state became 'analyzed' in Anchore Engine. + type: string + digest: + description: The image digest + type: string + id: + description: The image id if available + type: string + tag_history: + items: + $ref: "#/components/schemas/TagEntry" + type: array + type: object + ImageSelectionRule: + properties: + id: + type: string + image: + $ref: "#/components/schemas/ImageRef" + name: + type: string + registry: + type: string + repository: + type: string + required: + - name + - registry + - repository + - image + type: object + ImageSelector: + description: A set of selection criteria to match an image by a tagged pullstring based on its components, with regex support in each field + properties: + registry: + description: The registry section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "docker.io" + type: string + repository: + description: The repository section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "anchore/anchore-engine" + type: string + tag: + description: The tag-only section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "latest" + type: string + type: object + ImageSource: + description: A set of analysis source types. Only one may be set in any given request. + properties: + archive: + $ref: "#/components/schemas/AnalysisArchiveSource" + digest: + $ref: "#/components/schemas/RegistryDigestSource" + import: + $ref: "#/components/schemas/ImageImportManifest" + tag: + $ref: "#/components/schemas/RegistryTagSource" + type: object + ImageWithPackages: + description: An image record that contains packages + properties: + image: + $ref: "#/components/schemas/ImageReference" + packages: + items: + $ref: "#/components/schemas/PackageReference" + type: array + type: object + ImportContentDigestList: + items: + description: String digest of an uploaded content + type: string + type: array + ImportContentDigests: + description: Digest of content to use in the final import + properties: + dockerfile: + description: Digest for reference content for dockerfile + type: string + image_config: + description: Digest for reference content for image config + type: string + manifest: + description: Digest to reference content for the image manifest + type: string + packages: + description: Digest to use for the packages content + type: string + parent_manifest: + description: Digest for reference content for parent manifest + type: string + required: + - packages + - manifest + - image_config + type: object + ImportDescriptor: + additionalProperties: true + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + ImportDistribution: + additionalProperties: true + properties: + idLike: + type: string + name: + type: string + version: + type: string + required: + - name + - version + - idLike + type: object + ImportPackage: + additionalProperties: true + properties: + cpes: + items: + type: string + type: array + foundBy: + type: string + id: + type: string + language: + type: string + licenses: + items: + type: string + type: array + locations: + items: + $ref: "#/components/schemas/ImportPackageLocation" + type: array + metadata: + type: object + metadataType: + type: string + name: + type: string + purl: + type: string + type: + type: string + version: + type: string + required: + - name + - version + - type + - locations + - licenses + - language + - cpes + - metadataType + type: object + ImportPackageLocation: + additionalProperties: true + properties: + layerID: + type: string + path: + type: string + required: + - path + type: object + ImportPackageRelationship: + additionalProperties: true + properties: + child: + type: string + metadata: + additionalProperties: true + type: object + parent: + type: string + type: + type: string + required: + - parent + - child + - type + type: object + ImportSchema: + additionalProperties: true + properties: + url: + type: string + version: + type: string + required: + - version + - url + type: object + ImportSource: + additionalProperties: true + properties: + target: + additionalProperties: true + type: + type: string + required: + - type + - target + type: object + LocalAnalysisSource: + properties: + digest: + type: string + type: object + MalwareScan: + description: A single scan from a scanner + properties: + enabled: + description: Indicates if the scanner is enabled + type: boolean + findings: + items: + properties: + path: + description: A path for a file in the image's rootfs + type: string + signature: + description: The malware signature found at the path + type: string + type: object + type: array + metadata: + description: Open schema for scanner-specific metadata related to the scan result + type: object + scanner: + description: The name of the scanner that produced the finding + type: string + type: object + MappingRule: + properties: + id: + type: string + image: + $ref: "#/components/schemas/ImageRef" + name: + type: string + policy_id: + description: Optional single policy to evalute, if set will override any value in policy_ids, for backwards compatibility. Generally, policy_ids should be used even with a array of length 1. + type: string + policy_ids: + description: List of policyIds to evaluate in order, to completion + items: + description: PolicyId to evaluate + type: string + type: array + registry: + type: string + repository: + type: string + whitelist_ids: + items: + type: string + type: array + required: + - name + - registry + - repository + - image + type: object + MetadataResponse: + description: Generic wrapper for metadata listings from images + properties: + imageDigest: + type: string + metadata: {} + metadata_type: + type: string + type: object + NotificationBase: + description: base object for Notifications (every notification has this basic structure) + properties: + created_at: + type: integer + dataId: + type: string + last_updated: + type: integer + max_tries: + type: integer + queueId: + type: string + record_state_key: + default: active + type: string + record_state_val: + nullable: true + type: string + tries: + type: integer + userId: + type: string + type: object + NvdDataList: + description: List of Nvd Data objects + items: + $ref: "#/components/schemas/NvdDataObject" + type: array + NvdDataObject: + properties: + cvss_v2: + $ref: "#/components/schemas/CVSSV2Scores" + cvss_v3: + $ref: "#/components/schemas/CVSSV3Scores" + id: + description: NVD Vulnerability ID + type: string + type: object + PackageReference: + description: A record of a software item which is vulnerable or carries a fix for a vulnerability + properties: + name: + description: Package name + type: string + type: + description: Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...) + type: string + version: + description: A version for the package. If null, then references all versions + nullable: true + type: string + type: object + PaginatedImageList: + allOf: + - $ref: "#/components/schemas/PaginationProperties" + - properties: + images: + items: + $ref: "#/components/schemas/ImageWithPackages" + type: array + type: object + description: Pagination wrapped list of images that match some filter + PaginatedVulnerabilityList: + allOf: + - $ref: "#/components/schemas/PaginationProperties" + - properties: + vulnerabilities: + description: The listing of matching vulnerabilities for the query subject to pagination + items: + $ref: "#/components/schemas/StandaloneVulnerability" + type: array + type: object + description: A paginated listing of vulnerability records sorted by ID in descending order + PaginatedVulnerableImageList: + allOf: + - $ref: "#/components/schemas/PaginationProperties" + - properties: + images: + items: + $ref: "#/components/schemas/VulnerableImage" + type: array + type: object + description: Pagination wrapped list of images with vulnerabilties that match some filter + PaginationProperties: + description: Properties for common pagination handling to be included in any wrapping object that needs pagination elements + properties: + next_page: + description: True if additional pages exist (page + 1) or False if this is the last page + type: string + page: + description: The page number returned (should match the requested page query string param) + type: string + returned_count: + description: The number of items sent in this response + type: integer + type: object + Policy: + properties: + comment: + type: string + id: + type: string + name: + type: string + rules: + items: + $ref: "#/components/schemas/PolicyRule" + type: array + version: + type: string + required: + - id + - version + type: object + PolicyBundle: + description: A bundle containing a set of policies, whitelists, and rules for mapping them to specific images + properties: + blacklisted_images: + description: List of mapping rules that define which images should always result in a STOP/FAIL policy result regardless of policy content or presence in whitelisted_images + items: + $ref: "#/components/schemas/ImageSelectionRule" + type: array + comment: + description: Description of the bundle, human readable + type: string + id: + description: Id of the bundle + type: string + mappings: + description: Mapping rules for defining which policy and whitelist(s) to apply to an image based on a match of the image tag or id. Evaluated in order. + items: + $ref: "#/components/schemas/MappingRule" + type: array + name: + description: Human readable name for the bundle + type: string + policies: + description: Policies which define the go/stop/warn status of an image using rule matches on image properties + items: + $ref: "#/components/schemas/Policy" + type: array + version: + description: Version id for this bundle format + type: string + whitelisted_images: + description: List of mapping rules that define which images should always be passed (unless also on the blacklist), regardless of policy result. + items: + $ref: "#/components/schemas/ImageSelectionRule" + type: array + whitelists: + description: Whitelists which define which policy matches to disregard explicitly in the final policy decision + items: + $ref: "#/components/schemas/Whitelist" + type: array + required: + - id + - version + - policies + - mappings + type: object + PolicyBundleList: + description: List of PolicyBundleRecord objects + items: + $ref: "#/components/schemas/PolicyBundleRecord" + type: array + PolicyBundleRecord: + description: A policy bundle plus some metadata + properties: + active: + description: True if the bundle is currently defined to be used automatically + type: boolean + created_at: + format: date-time + type: string + last_updated: + format: date-time + type: string + policyId: + description: The bundle's identifier + type: string + policy_source: + description: Source location of where the policy bundle originated + type: string + policybundle: + $ref: "#/components/schemas/PolicyBundle" + userId: + description: UserId of the user that owns the bundle + type: string + type: object + PolicyEvalNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Policy Eval Notifications + properties: + data: + $ref: "#/components/schemas/PolicyEvalNotificationData" + type: object + PolicyEvalNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/PolicyEvalNotificationPayload" + type: object + PolicyEvalNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + curr_eval: + description: The Current Policy Evaluation result + type: object + last_eval: + description: The Previous Policy Evaluation result + type: object + type: object + PolicyEvaluation: + description: Evaluation response object + type: object + PolicyEvaluationList: + description: Evaluation response object + items: + $ref: "#/components/schemas/PolicyEvaluation" + type: array + PolicyRule: + description: A rule that defines and decision value if the match is found true for a given image. + properties: + action: + enum: + - GO + - STOP + - WARN + gate: + type: string + id: + type: string + params: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + trigger: + type: string + required: + - gate + - trigger + - action + type: object + RegexContentMatch: + description: Match of a named regex on a file + properties: + lines: + description: A list of line numbers in the file that matched the regex + items: + type: integer + type: array + name: + description: The name associated with the regular expression + type: string + regex: + description: The regular expression used for the match + type: string + type: object + RegistryConfiguration: + description: A registry entry describing the endpoint and credentials for a registry to pull images from + properties: + created_at: + format: date-time + type: string + last_upated: + format: date-time + type: string + registry: + description: hostname:port string for accessing the registry, as would be used in a docker pull operation + type: string + registry_name: + description: human readable name associated with registry record + type: string + registry_type: + description: Type of registry + type: string + registry_user: + description: Username portion of credential to use for this registry + type: string + registry_verify: + description: Use TLS/SSL verification for the registry URL + type: boolean + userId: + description: Engine user that owns this registry entry + type: string + type: object + RegistryConfigurationList: + description: List of registry configurations + items: + $ref: "#/components/schemas/RegistryConfiguration" + type: array + RegistryConfigurationRequest: + description: A registry record describing the endpoint and credentials for a registry + properties: + registry: + description: hostname:port string for accessing the registry, as would be used in a docker pull operation. May include some or all of a repository and wildcards (e.g. docker.io/library/* or gcr.io/myproject/myrepository) + type: string + registry_name: + description: human readable name associated with registry record + type: string + registry_pass: + description: Password portion of credential to use for this registry + type: string + registry_type: + description: Type of registry + type: string + registry_user: + description: Username portion of credential to use for this registry + type: string + registry_verify: + description: Use TLS/SSL verification for the registry URL + type: boolean + type: object + RegistryDigestSource: + description: An image reference using a digest in a registry, includes some extra tag and timestamp info in addition to the pull string to allow proper tag history reconstruction. + nullable: true + properties: + creation_timestamp_override: + description: Optional override of the image creation time to support proper tag history construction in cases of out-of-order analysis compared to registry history for the tag + format: date-time + type: string + dockerfile: + description: Base64 encoded content of the dockerfile used to build the image, if available. + pattern: ^[a-zA-Z0-9+/=]+$ + type: string + pullstring: + description: A digest-based pullstring (e.g. docker.io/nginx@sha256:123abc) + type: string + tag: + description: A valid docker tag reference (e.g. docker.io/nginx:latest) that will be associated with the image but not used to pull the image. + type: string + required: + - pullstring + - tag + type: object + RegistryTagSource: + description: An image reference using a tag in a registry, this is the most common source type. + nullable: true + properties: + dockerfile: + description: Base64 encoded content of the dockerfile used to build the image, if available. + pattern: ^[a-zA-Z0-9+/=]+$ + type: string + pullstring: + description: A docker pull string (e.g. docker.io/nginx:latest, or docker.io/nginx@sha256:abd) to retrieve the image + type: string + required: + - pullstring + type: object + RepositoryTagList: + description: List of discovered tags in a repository + items: + type: string + type: array + RetrievedFile: + description: The retrieved file entry including content (b64 encoded) + properties: + b64_content: + type: string + path: + type: string + type: object + RetrievedFileList: + description: Simple array of RetrievedFileMetadata objects + items: + $ref: "#/components/schemas/RetrievedFile" + type: array + SecretSearchList: + description: Simple array of RetrievedFileMetadata objects + items: + $ref: "#/components/schemas/SecretSearchResult" + type: array + SecretSearchResult: + description: The retrieved file entry including content (b64 encoded) + properties: + matches: + items: + $ref: "#/components/schemas/RegexContentMatch" + type: array + path: + type: string + type: object + Service: + description: A service status record + properties: + base_url: + description: The url to reach the service, including port as needed + type: string + hostid: + description: The unique id of the host on which the service is executing + type: string + service_detail: + $ref: "#/components/schemas/StatusResponse" + servicename: + description: Registered service name + type: string + status: + type: boolean + status_message: + description: A state indicating the condition of the service. Normal operation is 'registered' + type: string + version: + description: The version of the service as reported by the service implementation on registration + type: string + type: object + ServiceList: + description: A list of service objects + items: + $ref: "#/components/schemas/Service" + type: array + ServiceVersion: + description: Version information for a service + properties: + api: + description: Api Version string + properties: + version: + description: Semantic version of the api + type: string + type: object + db: + properties: + schema_version: + description: Semantic version of the db schema + type: string + type: object + service: + properties: + version: + description: Semantic Version string of the service implementation + type: string + type: object + type: object + StandaloneVulnerability: + description: A single vulnerability record in a single namespace, the unique key is the combination of the id and namespace + properties: + affected_packages: + description: The array of packages (typically packages) that are vulnerable-to or provide fixes-for this vulnerability + items: + $ref: "#/components/schemas/PackageReference" + type: array + description: + description: Description of the vulnerability if available + type: string + id: + description: Vulnerability identifier. May be CVE-X, RHSA-X, etc. Not necessarily unique across namespaces + type: string + link: + description: URL for the upstream CVE record in the reporting source (e.g. ubuntu security tracker) + type: string + namespace: + description: The namespace for the vulnerability record to avoid conflicts for the same id in different distros or sources (e.g. deb vs ubuntu for same CVE) + type: string + nvd_data: + $ref: "#/components/schemas/NvdDataList" + references: + description: List of references including + items: + $ref: "#/components/schemas/VulnerabilityReference" + type: array + severity: + description: Severity label specific to the namepsace + enum: + - Unknown + - Negligible + - Low + - Medium + - High + - Critical + type: string + vendor_data: + $ref: "#/components/schemas/VendorDataList" + type: object + StatusResponse: + description: System status response + properties: + available: + type: boolean + busy: + type: boolean + db_version: + type: string + detail: + type: object + message: + type: string + up: + type: boolean + version: + type: string + type: object + Subscription: + description: Subscription entry + properties: + active: + description: Is the subscription currently active + type: boolean + subscription_id: + description: the unique id for this subscription record + type: string + subscription_key: + description: The key value that the subscription references. E.g. a tag value or a repo name. + type: string + subscription_type: + description: The type of the subscription + type: string + subscription_value: + description: The value of the subscription target + nullable: true + type: string + userId: + description: The userId of the subscribed user + type: string + type: object + SubscriptionList: + description: List of subscriptions + items: + $ref: "#/components/schemas/Subscription" + type: array + SubscriptionRequest: + description: A subscription entry to add to the system + properties: + subscription_key: + type: string + subscription_type: + type: string + subscription_value: + nullable: true + type: string + type: object + SubscriptionUpdate: + description: A modification to a subscription entry to change its status or value + properties: + active: + description: Toggle the subscription processing on or off + type: boolean + subscription_value: + description: The new subscription value, e.g. the new tag to be subscribed to + nullable: true + type: string + type: object + SystemStatusResponse: + description: System status response + properties: + service_states: + $ref: "#/components/schemas/ServiceList" + type: object + TagEntry: + description: A docker-pullable tag value as well as deconstructed components + properties: + detected_at: + description: The timestamp at which the Anchore Engine detected this tag was mapped to the image digest. Does not necessarily indicate when the tag was actually pushed to the registry. + format: date-time + type: string + pullstring: + description: The pullable string for the tag. E.g. "docker.io/library/node:latest" + type: string + registry: + description: The registry hostname:port section of the pull string + type: string + repository: + description: The repository section of the pull string + type: string + tag: + description: The tag-only section of the pull string + type: string + type: object + TagUpdateNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Tag Update Notifications + properties: + data: + $ref: "#/components/schemas/TagUpdateNotificationData" + type: object + TagUpdateNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/TagUpdateNotificationPayload" + type: object + TagUpdateNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + curr_eval: + description: A list containing the current image digest + items: {} + type: array + last_eval: + description: A list containing the previous image digests + items: {} + type: array + type: object + TokenResponse: + properties: + token: + description: The token content + type: string + required: + - token + type: object + TriggerParamSpec: + properties: + description: + type: string + example: + description: An example value for the parameter (encoded as a string if the parameter is an object or list type) + nullable: true + type: string + name: + description: Parameter name as it appears in policy document + type: string + required: + description: Is this a required parameter or optional + type: boolean + state: + description: State of the trigger parameter + enum: + - active + - deprecated + - eol + type: string + superceded_by: + description: The name of another trigger that supercedes this on functionally if this is deprecated + nullable: true + type: string + validator: + description: If present, a definition for validation of input. Typically a jsonschema object that can be used to validate an input against. + type: object + type: object + TriggerSpec: + description: Definition of a trigger and its parameters + properties: + description: + description: Trigger description for what it tests and when it will fire during evaluation + type: string + name: + description: Name of the trigger as it would appear in a policy document + type: string + parameters: + description: The list of parameters that are valid for this trigger + items: + $ref: "#/components/schemas/TriggerParamSpec" + type: array + state: + description: State of the trigger + enum: + - active + - deprecated + - eol + type: string + superceded_by: + description: The name of another trigger that supercedes this on functionally if this is deprecated + nullable: true + type: string + type: object + User: + description: A username for authenticating with one or more types of credentials. User type defines the expected credentials allowed for the user. Native users have passwords, External users have no credential internally. Internal users are service/system users for inter-service communication. + properties: + created_at: + description: The timestampt the user record was created + format: date-time + type: string + last_updated: + description: The timestamp of the last update to this record + format: date-time + type: string + source: + description: If the user is external, this is the source that the user was initialized from. All other user types have this set to null + type: string + type: + description: The user's type + enum: + - native + - internal + - external + type: string + username: + description: The username to authenticate with + type: string + required: + - username + type: object + UserCreationRequest: + description: A payload for creating a new user, includes the username and password in a single request + properties: + password: + description: The initial password for the user, must be at least 6 characters, up to 128 + pattern: .{6,128}$ + type: string + username: + description: The username to create + pattern: ^[a-zA-Z0-9][a-zA-Z0-9@.!#$+-=^_`~;]{1,126}[a-zA-Z0-9]$ + type: string + required: + - username + - password + type: object + UserList: + items: + $ref: "#/components/schemas/User" + type: array + VendorDataList: + description: List of Vendor Data objects + items: + $ref: "#/components/schemas/VendorDataObject" + type: array + VendorDataObject: + properties: + cvss_v2: + $ref: "#/components/schemas/CVSSV2Scores" + cvss_v3: + $ref: "#/components/schemas/CVSSV3Scores" + id: + description: Vendor Vulnerability ID + type: string + type: object + VulnDiffResult: + description: The results of the comparing two vulnerability records during an update + properties: + added: + items: {} + type: array + removed: + items: {} + type: array + updated: + items: {} + type: array + type: object + VulnUpdateNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Tag Update Notifications + properties: + data: + $ref: "#/components/schemas/VulnUpdateNotificationData" + type: object + VulnUpdateNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/VulnUpdateNotificationPayload" + type: object + VulnUpdateNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + diff_vulnerability_result: + $ref: "#/components/schemas/VulnDiffResult" + imageDigest: + type: string + type: object + Vulnerability: + properties: + feed: + description: The name of the feed where vulnerability match was made + type: string + feed_group: + description: The name of the feed group where vulnerability match was made + type: string + fix: + description: The package containing a fix, if available + type: string + nvd_data: + $ref: "#/components/schemas/NvdDataList" + package: + description: The package name and version that are vulnerable in the image + type: string + package_cpe: + description: The CPE string (if applicable) describing the package to vulnerability match + type: string + package_name: + description: The name of the vulnerable package artifact + type: string + package_path: + description: The location (if applicable) of the vulnerable package in the container filesystem + type: string + package_type: + description: The type of vulnerable package + type: string + package_version: + description: The version of the vulnerable package artifact + type: string + severity: + description: The severity of the vulnerability + type: string + url: + description: The url for more information about the vulnerability + type: string + vendor_data: + $ref: "#/components/schemas/VendorDataList" + vuln: + description: The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123 + type: string + type: object + VulnerabilityList: + description: List of Vulnerability objects + items: + $ref: "#/components/schemas/Vulnerability" + type: array + VulnerabilityReference: + description: An external link/reference + properties: + source: + description: The reference source + type: string + tags: + items: + type: string + type: array + url: + description: The reference url + type: string + type: object + VulnerabilityResponse: + description: envelope containing list of vulnerabilities + properties: + imageDigest: + type: string + vulnerabilities: + $ref: "#/components/schemas/VulnerabilityList" + vulnerability_type: + type: string + type: object + VulnerableImage: + description: A record of an image vulnerable to some known vulnerability. Includes vulnerable package information + properties: + affected_packages: + items: + $ref: "#/components/schemas/VulnerablePackageReference" + type: array + image: + $ref: "#/components/schemas/ImageReference" + type: object + VulnerablePackageReference: + description: A record of a software item which is vulnerable or carries a fix for a vulnerability + properties: + name: + description: Package name + type: string + namespace: + description: Vulnerability namespace of affected package + type: string + severity: + description: Severity of vulnerability affecting package + type: string + type: + description: Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...) + type: string + version: + description: A version for the package. If null, then references all versions + nullable: true + type: string + type: object + Whitelist: + description: A collection of whitelist items to match a policy evaluation against. + properties: + comment: + type: string + id: + type: string + items: + items: + $ref: "#/components/schemas/WhitelistItem" + type: array + name: + type: string + version: + type: string + required: + - id + - version + type: object + WhitelistItem: + description: Identifies a specific gate and trigger match from a policy against an image and indicates it should be ignored in final policy decisions + properties: + expires_on: + format: date-time + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:\:\d+)?[A-Z]?$ + type: string + gate: + type: string + id: + type: string + trigger_id: + type: string + required: + - gate + - trigger_id + type: object diff --git a/build/resources/main/api.gov.uk.vehicle-enquiry.1.1.0.yaml b/build/resources/main/api.gov.uk.vehicle-enquiry.1.1.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..08c396402bcc07812050626a29a2235157ca225a --- /dev/null +++ b/build/resources/main/api.gov.uk.vehicle-enquiry.1.1.0.yaml @@ -0,0 +1,229 @@ +openapi: 3.0.0 +servers: + - description: Production environment + url: https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry + - description: Test environment + url: https://uat.driver-vehicle-licensing.api.gov.uk/vehicle-enquiry +info: + contact: + email: dvlaapiaccess@dvla.gov.uk + name: DVLA API Team + x-twitter: GDSTeam + description: Interface specification for the DVLA Vehicle Enquiry API + title: Vehicle Enquiry API + version: 1.1.0 + x-apisguru-categories: + - open_data + x-logo: + url: https://twitter.com/GDSTeam/profile_image?size=original + x-origin: + - format: openapi + url: https://developer-portal.driver-vehicle-licensing.api.gov.uk/apis/vehicle-enquiry-service/v1.1.0-vehicle-enquiry-service.json + version: "3.0" + x-providerName: api.gov.uk + x-serviceName: vehicle-enquiry +tags: + - name: vehicle +paths: + /v1/vehicles: + post: + description: Returns vehicle details based on registration number + operationId: getVehicleDetailsByRegistrationNumber + parameters: + - description: Client Specific API Key + in: header + name: x-api-key + required: true + schema: + type: string + - description: Consumer Correlation ID + in: header + name: X-Correlation-Id + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/VehicleRequest" + description: Registration number of the vehicle to find details for + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Vehicle" + description: Successful response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Vehicle Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Service Unavailable + summary: Get vehicle details by registration number + tags: + - vehicle +components: + schemas: + ErrorResponse: + description: Error Response + properties: + errors: + items: + $ref: "#/components/schemas/Errors" + type: array + type: object + Errors: + properties: + code: + description: DVLA reference code + example: "105" + type: string + detail: + description: A meaningful description of the error which has occurred + example: Invalid format for field - vehicle registration number + type: string + status: + example: "400" + type: string + title: + description: Error title + example: Invalid vrn number + type: string + required: + - title + type: object + Vehicle: + properties: + artEndDate: + description: "Additional Rate of Tax End Date, format: YYYY-MM-DD" + example: 2007-12-25 + format: date + type: string + co2Emissions: + description: Carbon Dioxide emissions in grams per kilometre + example: 0 + format: int32 + type: integer + colour: + description: Vehicle colour + example: Blue + type: string + dateOfLastV5CIssued: + description: Date of last V5C issued + example: 2016-12-25 + format: date + type: string + engineCapacity: + description: Engine capacity in cubic centimetres + example: 1796 + format: int32 + type: integer + euroStatus: + description: Euro Status (Dealer / Customer Provided (new vehicles)) + example: Euro 5 + type: string + fuelType: + description: Fuel type (Method of Propulsion) + example: PETROL + type: string + make: + description: Vehicle make + example: ROVER + type: string + markedForExport: + description: True only if vehicle has been export marked + example: true + type: boolean + monthOfFirstDvlaRegistration: + description: Month of First DVLA Registration + example: 2011-11 + format: date + type: string + monthOfFirstRegistration: + description: Month of First Registration + example: 2012-12 + format: date + type: string + motExpiryDate: + description: Mot Expiry Date + example: 2008-12-25 + format: date + type: string + motStatus: + description: MOT Status of the vehicle + enum: + - No details held by DVLA + - No results returned + - Not valid + - Valid + example: No details held by DVLA + type: string + realDrivingEmissions: + description: Real Driving Emissions value + example: "1" + type: string + registrationNumber: + description: Registration number of the vehicle + example: WN67DSO + type: string + revenueWeight: + description: Revenue weight in kilograms + example: 1640 + format: int32 + type: integer + taxDueDate: + description: Date of tax liablity, Used in calculating licence information presented to user + example: 2017-12-25 + format: date + type: string + taxStatus: + description: Tax status of the vehicle + enum: + - Not Taxed for on Road Use + - SORN + - Taxed + - Untaxed + example: Untaxed + type: string + typeApproval: + description: Vehicle Type Approval Category + example: N1 + type: string + wheelplan: + description: Vehicle wheel plan + example: NON STANDARD + type: string + yearOfManufacture: + description: Year of Manufacture + example: 2004 + format: int32 + type: integer + required: + - registrationNumber + type: object + VehicleRequest: + properties: + registrationNumber: + type: string + type: object diff --git a/build/resources/main/api2pdf.com.1.0.0.yaml b/build/resources/main/api2pdf.com.1.0.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6298b4600438ad2e86991e8cc5bb62179b641d68 --- /dev/null +++ b/build/resources/main/api2pdf.com.1.0.0.yaml @@ -0,0 +1,557 @@ +openapi: 3.0.0 +servers: + - description: Api2Pdf.com API + url: https://v2018.api2pdf.com +info: + contact: + email: support@api2pdf.com + name: Support + x-twitter: api2pdf_status + description: | + + # Introduction + [Api2Pdf](https://www.api2pdf.com) is a powerful PDF generation API with no rate limits or file size constraints. Api2Pdf runs on AWS Lambda, a serverless architecture powered by Amazon to scale to millions of requests while being up to 90% cheaper than alternatives. **Supports wkhtmltopdf, Headless Chrome, LibreOffice, and PDF Merge.** You can also generate barcodes with ZXING (Zebra Crossing). + # SDKs & Client Libraries + We've made a number of open source libraries available for the API + - Python: [https://github.com/api2pdf/api2pdf.python](https://github.com/api2pdf/api2pdf.python) + - .NET: [https://github.com/api2pdf/api2pdf.dotnet](https://github.com/api2pdf/api2pdf.dotnet) + - Nodejs: [https://github.com/api2pdf/api2pdf.node](https://github.com/api2pdf/api2pdf.node) + - PHP: [https://github.com/Api2Pdf/api2pdf.php](https://github.com/Api2Pdf/api2pdf.php) + - Ruby: (Coming soon) + # Authorization + Create an account at [portal.api2pdf.com](https://portal.api2pdf.com/register) to get an API key. + + **Authorize your API calls** + - GET requests, include apikey=YOUR-API-KEY as a query string parameter + - POST requests, add **Authorization** to your header. + ``` Authorization: YOUR-API-KEY ``` + + # Quickstart + If you are looking for just a quick call to grab PDFs of a URL, you can do a GET request like: + ``` https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={YourApiKey} ``` + + For more advanced usage and settings, see the API specification below. + license: + name: Creative Commons + url: https://creativecommons.org/licenses/by/4.0/legalcode + title: Api2Pdf - PDF Generation, Powered by AWS Lambda + version: 1.0.0 + x-apisguru-categories: + - developer_tools + x-logo: + url: https://twitter.com/api2pdf_status/profile_image?size=original + x-origin: + - converter: + url: https://github.com/lucybot/api-spec-converter + version: 2.7.18 + format: openapi + url: https://app.swaggerhub.com/apiproxy/schema/file/api2pdf/api2pdf/1.0.0/swagger.json + version: "3.0" + x-providerName: api2pdf.com +externalDocs: + description: Find out more about Api2Pdf + url: https://www.api2pdf.com +security: + - HeaderApiKey: [] +paths: + /chrome/html: + post: + description: |- + Convert HTML to a PDF using Headless Chrome on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: chromeFromHtmlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChromeHtmlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `html` *(string, required)* - raw HTML to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced Headless Chrome options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-headless-chrome/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert raw HTML to PDF + tags: + - Headless Chrome + /chrome/url: + get: + description: |- + Convert a URL or Web Page to PDF using Headless Chrome on AWS Lambda. This GET request is for convenience and does not support advanced options. Use the POST request for more flexibility. + ### Authorize via Query String Parameter + **apikey=YOUR-API-KEY** + ### Example + ``` https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={YourApiKey} ``` + operationId: chromeFromUrlGET + parameters: + - description: Url of the page to convert to PDF. Must start with http:// or https://. + in: query + name: url + required: true + schema: + type: string + - description: Specify output=json to receive a JSON output. Defaults to PDF file. + in: query + name: output + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + application/pdf: + schema: + format: binary + type: string + description: A PDF file or a JSON object depending on the `output` query parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + security: + - QueryApiKey: [] + summary: Convert URL to PDF + tags: + - Headless Chrome + post: + description: |- + Convert a URL or Web Page to PDF using Headless Chrome on AWS Lambda.. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: chromeFromUrlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChromeUrlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `url` *(string, required)* - Url to the web page to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced Headless Chrome options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-headless-chrome/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert URL to PDF + tags: + - Headless Chrome + /libreoffice/convert: + post: + description: |- + Convert an office document (Word, Excel, Powerpoint) or an image (jpg, gif, png) to a PDF using LibreOffice on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: libreConvertPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LibreOfficeConvertRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `url` *(string, required)* - A direct URL to the file. Api2Pdf will consume the file at that URL and then convert it. + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert office document or image to PDF + tags: + - LibreOffice + /merge: + post: + description: |- + Merge two or more PDFs together on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: mergePost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MergeRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `urls` *(array of urls, required)* - A JSON array of direct URLs to PDFs. Api2Pdf will consume the PDF files in the list and then merge them all together.. + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Merge multiple PDFs together + tags: + - Merge / Combine Pdfs + /wkhtmltopdf/html: + post: + description: |- + Convert HTML to a PDF using WkHtmlToPdf on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: wkhtmltopdfFromHtmlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WkHtmlToPdfHtmlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `html` *(string, required)* - raw HTML to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced WkHtmlToPdf options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert raw HTML to PDF + tags: + - wkhtmltopdf + /wkhtmltopdf/url: + get: + description: |- + Convert a URL or Web Page to PDF using WkHtmlToPdf on AWS Lambda. This GET request is for convenience and does not support advanced options. Use the POST request for more flexibility. + ### Authorize via Query String Parameter + **apikey=YOUR-API-KEY** + ### Example + ``` https://v2018.api2pdf.com/wkhtmltopdf/url?url={UrlToConvert}&apikey={YourApiKey} ``` + operationId: wkhtmltopdfFromUrlGET + parameters: + - description: Url of the page to convert to PDF. Must start with http:// or https://. + in: query + name: url + required: true + schema: + type: string + - description: Specify output=json to receive a JSON output. Defaults to PDF file. + in: query + name: output + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + application/pdf: + schema: + format: binary + type: string + description: A PDF file or a JSON object depending on the `output` query parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + security: + - QueryApiKey: [] + summary: Convert URL to PDF + tags: + - wkhtmltopdf + post: + description: |- + Convert a URL or Web Page to PDF using WkHtmlToPdf on AWS Lambda.. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: wkhtmltopdfFromUrlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WkHtmlToPdfUrlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `url` *(string, required)* - Url to the web page to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced WkHtmlToPdf options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert URL to PDF + tags: + - wkhtmltopdf + /zebra: + get: + description: |- + See full list of options and documentation [here](https://www.api2pdf.com/documentation/advanced-options-zxing-zebra-crossing-barcodes/) + ### Authorize via Query String Parameter + **apikey=YOUR-API-KEY** + ### Example + ``` https://v2018.api2pdf.com/zebra?format={format}&apikey={YourApiKey}&value={YourText} ``` + operationId: zebraGET + parameters: + - description: Most common is CODE_39 or QR_CODE + in: query + name: format + required: true + schema: + type: string + - description: Specify the text value you want to convert + in: query + name: value + required: true + schema: + type: string + - description: Show label of text below barcode + in: query + name: showlabel + schema: + type: boolean + - description: Height of the barcode generated image + in: query + name: height + schema: + type: integer + - description: Width of the barcode generated image + in: query + name: width + schema: + type: integer + responses: + "200": + content: + image/png: + schema: + format: binary + type: string + description: An image of the generated barcode or QR code + security: + - QueryApiKey: [] + summary: Generate bar codes and QR codes with ZXING. + tags: + - ZXING (Zebra Crossing) Bar Codes +components: + schemas: + ApiResponseFailure: + properties: + reason: + description: The reason for the PDF generation failure + example: Source website could not be found + type: string + success: + description: Will be false if the operation failed + example: false + type: boolean + type: object + ApiResponseSuccess: + properties: + cost: + description: Cost of the operation (mbIn + mbOut) * $.001 + example: 0.0007979 + type: number + mbIn: + description: The amount of megabytes of bandwidth used to process the pdf + example: 0.06463 + type: number + mbOut: + description: The amount of megabytes of bandwidth generated from the resulting pdf + example: 0.73327 + type: number + pdf: + description: A url to the PDF that will exist only for 24 hours + example: https://link-to-your-pdf + type: string + success: + description: Will be true if the operation suceeded + example: true + type: boolean + type: object + ChromeAdvancedOptions: + properties: + landscape: + example: "true" + type: string + printBackground: + example: false + type: boolean + type: object + ChromeHtmlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + html: + example: <p>Hello World</p> + format: html + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/ChromeAdvancedOptions" + required: + - html + type: object + ChromeUrlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/ChromeAdvancedOptions" + url: + example: https://www.github.com + format: url + type: string + required: + - url + type: object + LibreOfficeConvertRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + url: + example: https://www.api2pdf.com/wp-content/themes/api2pdf/assets/samples/sample-word-doc.docx + format: url + type: string + required: + - url + type: object + MergeRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + urls: + example: + - link-to-pdf1 + - link-to-pdf2 + - link-to-pdf3 + items: + type: string + type: array + required: + - urls + type: object + WkHtmlToPdfAdvancedOptions: + properties: + orientation: + example: landscape + type: string + pageSize: + example: A4 + type: string + type: object + WkHtmlToPdfHtmlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + html: + example: <p>Hello World</p> + format: html + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/WkHtmlToPdfAdvancedOptions" + required: + - html + type: object + WkHtmlToPdfUrlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/WkHtmlToPdfAdvancedOptions" + url: + example: https://www.github.com + format: url + type: string + required: + - url + type: object + securitySchemes: + HeaderApiKey: + in: header + name: Authorization + type: apiKey + QueryApiKey: + in: query + name: apikey + type: apiKey diff --git a/build/resources/main/apicurio.local.registry.1.3.2.Final.yaml b/build/resources/main/apicurio.local.registry.1.3.2.Final.yaml new file mode 100644 index 0000000000000000000000000000000000000000..20657895455203d746ae8c8136c6755811328dd0 --- /dev/null +++ b/build/resources/main/apicurio.local.registry.1.3.2.Final.yaml @@ -0,0 +1,2124 @@ +openapi: 3.0.2 +servers: + - url: http://apicurio.local +info: + contact: + email: apicurio@lists.jboss.org + name: Apicurio + url: https://github.com/apicurio/apicurio-registry + description: | + Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. + + The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. + + The supported artifact types include: + - Apache Avro schema + - AsyncAPI specification + - Google protocol buffers (schema and file descriptor) + - GraphQL schema + - JSON Schema + - Kafka Connect schema + - OpenAPI specification + - Web Services Description Language + - XML Schema Definition + + + **Note**: The Apicurio Registry REST API is available from `http://MY-REGISTRY-URL/api`. You must prefix all API operation paths with `/api`, for example, `api/ids/{globalId}`. + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + title: Apicurio Registry API + version: 1.3.2.Final + x-apisguru-categories: + - developer_tools + x-origin: + - format: openapi + url: https://raw.githubusercontent.com/Apicurio/apicurio-registry/master/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/registry/v1/openapi.json + version: "3.0" + x-preferred: false + x-providerName: apicurio.local + x-serviceName: registry +tags: + - description: |- + The primary way to interact with the Apicurio Registry API is to add, update, + or delete artifacts. This section includes all of these primary operations. + name: Artifacts + - description: |- + Sometimes the metadata for an artifact is important. For example, metadata includes + when the artifact was created, last updated, and so on. This section contains + operations to access (and in some cases change) an artifact's metadata. + name: Metadata + - description: |- + Whenever an artifact's content is updated, the old versions of the artifact's content + are not lost. All versions can be listed and accessed if necessary. This section + describes the operations used to list and access all versions of an artifact's content + and metadata. + name: Versions + - description: |- + Rules can be configured on a per-artifact basis, allowing for different approaches + to content evolution for each artifact. These rules will override any global rules + that have been configured. This section contains the operations used to manage a + single artifact's rules. + name: Artifact rules + - description: |- + Global rules can be configured in the registry to govern how artifact content can + evolve over time (as artifact content is **updated**). Global rules will be applied + whenever an artifact is added to the registry, and also whenever an artifact's + content is updated (only if that artifact doesn't have its own specific rules + configured). This section describes the operations used to manage the global rules. + name: Global rules + - description: "The search API is used to browse or find artifacts in the registry. This section describes the operations for searching for artifacts and versions. " + name: Search +paths: + /artifacts: + get: + description: |- + Returns a list of IDs of all artifacts in the registry as a flat list. Typically the + server is configured to limit the number of artifact IDs returned when a large number + of artifacts exist. In this case, the result of this call may be non-deterministic. The + default limit is typically 1000 artifacts. + operationId: listArtifacts + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: |- + On a successful response, returns an array of artifact IDs - one for each artifact + in the registry. + "500": + $ref: "#/components/responses/ServerError" + summary: List all artifact IDs + tags: + - Artifacts + post: + description: | + Creates a new artifact by posting the artifact content. The body of the request should + be the raw content of the artifact. This is typically in JSON format for *most* of the + supported types, but may be in another format for a few (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the + following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or include a hint in the request's `Content-Type`. For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + An artifact is created using the content provided in the body of the request. This + content is created under a unique artifact ID that can be provided in the request + using the `X-Registry-ArtifactId` request header. If not provided in the request, + the server generates a unique ID for the artifact. It is typically recommended + that callers provide the ID, because this is typically a meaningful identifier, + and for most use cases should be supplied by the caller. + + If an artifact with the provided artifact ID already exists, the default behavior + is for the server to reject the content with a 409 error. However, the caller can + supply the `ifExists` query parameter to alter this default behavior. The `ifExists` + query parameter can have one of the following values: + + * `FAIL` (*default*) - server rejects the content with a 409 error + * `UPDATE` - server updates the existing artifact and returns the new metadata + * `RETURN` - server does not create or add content to the server, but instead + returns the metadata for the existing artifact + * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the + provided content if such a version exists, otherwise a new version is created + + This operation may fail for one of the following reasons: + + * An invalid `ArtifactType` was indicated (HTTP error `400`) + * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) + * Provided content (request body) was empty (HTTP error `400`) + * An artifact with the provided ID already exists (HTTP error `409`) + * The content violates one of the configured global rules (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: createArtifact + parameters: + - description: |- + Specifies the type of the artifact being added. Possible values include: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + - description: A client-provided, globally unique identifier for the new artifact. + in: header + name: X-Registry-ArtifactId + schema: + type: string + - description: Set this option to instruct the server on what to do if the artifact already exists. + in: query + name: ifExists + schema: + enum: + - FAIL + - UPDATE + - RETURN + - RETURN_OR_UPDATE + type: string + requestBody: + content: + "*/*": + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: | + The content of the artifact being created. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: Artifact was successfully created. + "400": + $ref: "#/components/responses/BadRequest" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Create artifact + tags: + - Artifacts + x-codegen-async: true + summary: Manage the collection of artifacts in the registry. + "/artifacts/{artifactId}": + delete: + description: |- + Deletes an artifact completely, resulting in all versions of the artifact also being + deleted. This may fail for one of the following reasons: + + * No artifact with the `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifact + responses: + "204": + description: Returned when the artifact was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact + tags: + - Artifacts + get: + description: | + Returns the latest version of the artifact in its raw form. The `Content-Type` of the + response depends on the artifact type. In most cases, this is `application/json`, but + for some types it may be different (for example, `PROTOBUF`). + + This operation may fail for one of the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getLatestArtifact + responses: + "200": + content: + application/graphql: {} + application/json: + examples: + OpenAPI: + value: + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.0 + openapi: 3.0.2 + application/x-protobuf: + examples: + Protobuf Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + application/x-protobuffer: + examples: + Protobuffer Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + description: The most recent version of the artifact. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get latest artifact + tags: + - Artifacts + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: |- + Updates an artifact by uploading new content. The body of the request should + be the raw content of the artifact. This is typically in JSON format for *most* + of the supported types, but may be in another format for a few (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the + following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or include a hint in the request's `Content-Type`. For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + The update could fail for a number of reasons including: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with the `artifactId` exists (HTTP error `404`) + * The new content violates one of the rules configured for the artifact (HTTP error `409`) + * The provided artifact type is not recognized (HTTP error `404`) + * A server error occurred (HTTP error `500`) + + When successful, this creates a new version of the artifact, making it the most recent + (and therefore official) version of the artifact. + operationId: updateArtifact + parameters: + - description: |- + Specifies the type of the artifact being added. Possible values include: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + required: false + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + requestBody: + content: + "*/*": + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: | + The new content of the artifact being updated. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: When successful, returns the updated artifact metadata. + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact + tags: + - Artifacts + x-codegen-async: true + summary: Manage a single artifact. + "/artifacts/{artifactId}/meta": + get: + description: |- + Gets the metadata for an artifact in the registry. The returned metadata includes + both generated (read-only) and editable metadata (such as name and description). + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactMetaData + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: The artifact's metadata. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact metadata + tags: + - Metadata + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + post: + description: | + Gets the metadata for an artifact that matches the raw content. Searches the registry + for a version of the given artifact matching the content provided in the body of the + POST. + + This operation can fail for the following reasons: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with the `artifactId` exists (HTTP error `404`) + * No artifact version matching the provided content exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactMetaDataByContent + requestBody: + content: + application/json: + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: The content of an artifact version. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: The metadata of the artifact version matching the provided content. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact metadata by content + tags: + - Metadata + put: + description: |- + Updates the editable parts of the artifact's metadata. Not all metadata fields can + be updated. For example, `createdOn` and `createdBy` are both read-only properties. + + This operation can fail for the following reasons: + + * No artifact with the `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactMetaData + requestBody: + content: + "*/*": + schema: + $ref: "#/components/schemas/EditableMetaData" + description: Updated artifact metadata. + required: true + responses: + "204": + description: The artifact's metadata was updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact metadata + tags: + - Metadata + summary: Manage the metadata of a single artifact. + "/artifacts/{artifactId}/rules": + delete: + description: |- + Deletes all of the rules configured for the artifact. After this is done, the global + rules apply to the artifact again. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifactRules + responses: + "204": + description: The rules were successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact rules + tags: + - Artifact rules + get: + description: |- + Returns a list of all rules configured for the artifact. The set of rules determines + how the content of an artifact can evolve over time. If no rules are configured for + an artifact, the set of globally configured rules are used. If no global rules + are defined, there are no restrictions on content evolution. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: listArtifactRules + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/RuleType" + type: array + description: Returns the names of the rules configured for the artifact. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: List artifact rules + tags: + - Artifact rules + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + post: + description: |- + Adds a rule to the list of rules that get applied to the artifact when adding new + versions. All configured rules must pass to successfully add a new artifact version. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * Rule (named in the request body) is unknown (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: createArtifactRule + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "204": + description: The rule was added. + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Create artifact rule + tags: + - Artifact rules + summary: Manage the rules for a single artifact. + "/artifacts/{artifactId}/rules/{rule}": + delete: + description: |- + Deletes a rule from the artifact. This results in the rule no longer applying for + this artifact. If this is the only rule configured for the artifact, this is the + same as deleting **all** rules, and the globally configured rules now apply to + this artifact. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No rule with this name/type is configured for this artifact (HTTP error `404`) + * Invalid rule type (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifactRule + responses: + "204": + description: The rule was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact rule + tags: + - Artifact rules + get: + description: |- + Returns information about a single rule configured for an artifact. This is useful + when you want to know what the current configuration settings are for a specific rule. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No rule with this name/type is configured for this artifact (HTTP error `404`) + * Invalid rule type (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactRuleConfig + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: Information about a rule. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact rule configuration + tags: + - Artifact rules + parameters: + - description: The unique name/type of a rule. + in: path + name: rule + required: true + schema: + enum: + - VALIDITY + - COMPATIBILITY + type: string + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the configuration of a single rule for the artifact. The configuration data + is specific to each rule type, so the configuration of the `COMPATIBILITY` rule + is in a different format from the configuration of the `VALIDITY` rule. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No rule with this name/type is configured for this artifact (HTTP error `404`) + * Invalid rule type (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactRuleConfig + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: Rule configuration was updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact rule configuration + tags: + - Artifact rules + summary: Manage the configuration of a single artifact rule. + "/artifacts/{artifactId}/state": + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the state of the artifact. For example, you can use this to mark the latest + version of an artifact as `DEPRECATED`. The operation changes the state of the latest + version of the artifact. If multiple versions exist, only the most recent is changed. + + The following state changes are supported: + + * Enabled -> Disabled + * Enabled -> Deprecated + * Enabled -> Deleted + * Disabled -> Enabled + * Disabled -> Deleted + * Disabled -> Deprecated + * Deprecated -> Deleted + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * Artifact cannot transition to the given state (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactState + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateState" + required: true + responses: + "204": + description: Returned when the operation was successful. + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact state + tags: + - Artifacts + summary: Manage the state of an artifact. + "/artifacts/{artifactId}/test": + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: |- + Tests whether an update to the artifact's content *would* succeed for the provided content. + Ultimately, this applies any rules configured for the artifact against the given content + to determine whether the rules would pass or fail, but without actually updating the artifact + content. + + The body of the request should be the raw content of the artifact. This is typically in + JSON format for *most* of the supported types, but may be in another format for a few + (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can explicitly specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or by including a hint in the request's `Content-Type`. For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + The update could fail for a number of reasons including: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with the `artifactId` exists (HTTP error `404`) + * The new content violates one of the rules configured for the artifact (HTTP error `409`) + * The provided artifact type is not recognized (HTTP error `404`) + * A server error occurred (HTTP error `500`) + + When successful, this operation simply returns a *No Content* response. + operationId: testUpdateArtifact + parameters: + - description: |- + This header parameter can be used to indicate the type of the artifact being added. Possible values include: + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + requestBody: + content: + "*/*": {} + description: | + The content of the artifact being tested. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "204": + description: |- + When successful, returns "No Content" to indicate that the rules passed, and the + content was not updated. + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Test update artifact + tags: + - Artifact rules + summary: Test whether content would pass update rules. + "/artifacts/{artifactId}/versions": + get: + description: | + Returns a list of all version numbers for the artifact. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: listArtifactVersions + responses: + "200": + content: + application/json: + examples: + All Versions: + value: + - 5 + - 6 + - 10 + - 103 + schema: + items: + format: int64 + type: integer + type: array + description: List of all artifact versions (just the version IDs). + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: List artifact versions + tags: + - Versions + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + post: + description: | + Creates a new version of the artifact by uploading new content. The configured rules for + the artifact are applied, and if they all pass, the new content is added as the most recent + version of the artifact. If any of the rules fail, an error is returned. + + The body of the request should be the raw content of the new artifact version. This + is typically in JSON format for *most* of the supported types, but may be in another + format for a few (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the + following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can explicitly specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or by including a hint in the request's `Content-Type`. + + For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + This operation can fail for the following reasons: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with this `artifactId` exists (HTTP error `404`) + * The new content violates one of the rules configured for the artifact (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: createArtifactVersion + parameters: + - description: |- + This header parameter can be used to indicate the type of the artifact being added. Possible values include: + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + requestBody: + content: + "*/*": + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: | + The content of the artifact version being created. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VersionMetaData" + description: The artifact version was successfully created. + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Create artifact version + tags: + - Versions + x-codegen-async: true + summary: Manage all the versions of an artifact in the registry. + "/artifacts/{artifactId}/versions/{version}": + get: + description: | + Retrieves a single version of the artifact content. Both the `artifactId` and the + unique `version` number must be provided. The `Content-Type` of the response depends + on the artifact type. In most cases, this is `application/json`, but for some types + it may be different (for example, `PROTOBUF`). + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactVersion + responses: + "200": + content: + application/graphql: {} + application/json: + examples: + OpenAPI: + value: + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.0 + openapi: 3.0.2 + application/x-protobuf: + examples: + Protobuf Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + application/x-protobuffer: + examples: + Protobuffer Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + description: The content of the artifact version. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact version + tags: + - Versions + parameters: + - description: The unique identifier of a specific version of the artifact content. + in: path + name: version + required: true + schema: + type: integer + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + summary: Manage a single version of a single artifact in the registry. + "/artifacts/{artifactId}/versions/{version}/meta": + delete: + description: | + Deletes the user-editable metadata properties of the artifact version. Any properties + that are not user-editable are preserved. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifactVersionMetaData + responses: + "204": + description: The artifact version's user-editable metadata was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact version metadata + tags: + - Metadata + get: + description: | + Retrieves the metadata for a single version of the artifact. The version metadata is + a subset of the artifact metadata and only includes the metadata that is specific to + the version (for example, this doesn't include `modifiedOn`). + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactVersionMetaData + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VersionMetaData" + description: The artifact version's metadata. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact version metadata + tags: + - Metadata + parameters: + - description: The unique identifier of a specific version of the artifact content. + in: path + name: version + required: true + schema: + type: integer + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the user-editable portion of the artifact version's metadata. Only some of + the metadata fields are editable by the user. For example, `description` is editable, + but `createdOn` is not. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactVersionMetaData + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EditableMetaData" + required: true + responses: + "204": + description: The artifact version's metadata was successfully updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact version metadata + tags: + - Metadata + summary: Manage the metadata for a single version of an artifact in the registry. + "/artifacts/{artifactId}/versions/{version}/state": + parameters: + - description: The unique identifier of a specific version of the artifact content. + in: path + name: version + required: true + schema: + type: integer + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the state of a specific version of an artifact. For example, you can use + this operation to disable a specific version. + + The following state changes are supported: + + * Enabled -> Disabled + * Enabled -> Deprecated + * Enabled -> Deleted + * Disabled -> Enabled + * Disabled -> Deleted + * Disabled -> Deprecated + * Deprecated -> Deleted + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * Artifact version cannot transition to the given state (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactVersionState + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateState" + required: true + responses: + "204": + description: Returned when the update was successful. + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact version state + tags: + - Versions + summary: Manage the state of a specific artifact version. + "/ids/{globalId}": + get: + description: | + Gets the content for an artifact version in the registry using its globally unique + identifier. + + This operation may fail for one of the following reasons: + + * No artifact version with this `globalId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactByGlobalId + responses: + "200": + content: + application/json: + examples: + OpenAPI Example: + value: + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.0 + openapi: 3.0.2 + application/x-protobuf: + examples: + Protobuf Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + application/x-protobuffer: + examples: + Protobuffer Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + description: The content of the artifact version. + summary: Get artifact by global ID + tags: + - Artifacts + parameters: + - description: Global identifier for an artifact version. + in: path + name: globalId + required: true + schema: + format: int64 + type: integer + summary: Access artifact content utilizing an artifact version's globally unique identifier. + "/ids/{globalId}/meta": + get: + description: | + Gets the metadata for an artifact version in the registry using its globally unique + identifier. The returned metadata includes both generated (read-only) and editable + metadata (such as name and description). + + This operation may fail for one of the following reasons: + + * No artifact version with this `globalId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactMetaDataByGlobalId + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: The artifact's metadata. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get global artifact metadata + tags: + - Metadata + parameters: + - description: Global identifier for an artifact version. + in: path + name: globalId + required: true + schema: + format: int64 + type: integer + summary: Access an artifact verison's metadata using its globally unique identifier. + /rules: + delete: + description: | + Deletes all globally configured rules. + + This operation can fail for the following reasons: + + * A server error occurred (HTTP error `500`) + operationId: deleteAllGlobalRules + responses: + "204": + description: All global rules have been removed successfully. + "500": + $ref: "#/components/responses/ServerError" + summary: Delete all global rules + tags: + - Global rules + get: + description: | + Gets a list of all the currently configured global rules (if any). + + This operation can fail for the following reasons: + + * A server error occurred (HTTP error `500`) + operationId: listGlobalRules + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/RuleType" + type: array + description: The list of names of the globally configured rules. + "500": + $ref: "#/components/responses/ServerError" + summary: List global rules + tags: + - Global rules + post: + description: | + Adds a rule to the list of globally configured rules. + + This operation can fail for the following reasons: + + * The rule type is unknown (HTTP error `400`) + * The rule already exists (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: createGlobalRule + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "204": + description: The global rule was added. + "400": + $ref: "#/components/responses/BadRequest" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Create global rule + tags: + - Global rules + summary: Manage the global rules that apply to all artifacts if not otherwise configured. + "/rules/{rule}": + delete: + description: | + Deletes a single global rule. If this is the only rule configured, this is the same + as deleting **all** rules. + + This operation can fail for the following reasons: + + * Invalid rule name/type (HTTP error `400`) + * No rule with name/type `rule` exists (HTTP error `404`) + * Rule cannot be deleted (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: deleteGlobalRule + responses: + "204": + description: The global rule was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete global rule + tags: + - Global rules + get: + description: | + Returns information about the named globally configured rule. + + This operation can fail for the following reasons: + + * Invalid rule name/type (HTTP error `400`) + * No rule with name/type `rule` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getGlobalRuleConfig + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: The global rule's configuration. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get global rule configuration + tags: + - Global rules + parameters: + - description: The unique name/type of a rule. + in: path + name: rule + required: true + schema: + enum: + - VALIDITY + - COMPATIBILITY + type: string + put: + description: | + Updates the configuration for a globally configured rule. + + This operation can fail for the following reasons: + + * Invalid rule name/type (HTTP error `400`) + * No rule with name/type `rule` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: updateGlobalRuleConfig + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: The global rule's configuration was successfully updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update global rule configuration + tags: + - Global rules + summary: Manage the configuration of a single global artifact rule. + /search/artifacts: + get: + description: | + Returns a paginated list of all artifacts that match the provided search criteria. + operationId: searchArtifacts + parameters: + - description: The text to search. + in: query + name: search + schema: + type: string + - description: The number of artifacts to skip before starting to collect the result set. + in: query + name: offset + required: true + schema: + default: 0 + type: integer + - description: The number of artifacts to return. + in: query + name: limit + required: true + schema: + default: 20 + type: integer + - description: What fields to search. + in: query + name: over + required: false + schema: + enum: + - everything + - name + - description + - labels + type: string + - description: Sort order, ascending or descending. + in: query + name: order + required: false + schema: + enum: + - asc + - desc + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactSearchResults" + description: |- + On a successful response, returns a result set of artifacts - one for each artifact + in the registry that matches the criteria. + "500": + $ref: "#/components/responses/ServerError" + summary: Search for artifacts + tags: + - Search + - Artifacts + summary: Search for content in the registry; artifacts in particular. + "/search/artifacts/{artifactId}/versions": + get: + description: |- + Searches for versions of a specific artifact. This is typically used to get a listing + of all versions of an artifact (for example, in a user interface). + operationId: searchVersions + parameters: + - description: The number of versions to skip before starting to collect the result set. + in: query + name: offset + required: true + schema: + type: integer + - description: The number of versions to return. + in: query + name: limit + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VersionSearchResults" + description: |- + On a successful response, returns a result set of versions - one for each version + of the artifact. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Search artifact versions + tags: + - Search + - Versions + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + summary: Search for all versions of an artifact. +components: + responses: + BadRequest: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Common response for all operations that can return a `400` error. + Conflict: + content: + application/json: + examples: + ConflictExample: + value: + error_code: 409 + message: The artifact content was invalid. + schema: + $ref: "#/components/schemas/Error" + description: Common response used when an input conflicts with existing data. + NotFound: + content: + application/json: + examples: + NotFoundExample: + value: + error_code: 404 + message: No artifact with id 'Topic-1/Inbound' could be found. + schema: + $ref: "#/components/schemas/Error" + description: Common response for all operations that can return a `404` error. + ServerError: + content: + application/json: + examples: + ErrorExample: + value: + error_code: 500 + message: Lost connection to the database. + schema: + $ref: "#/components/schemas/Error" + description: Common response for all operations that can fail with an unexpected server error. + schemas: + ArtifactMetaData: + example: + createdBy: user1 + createdOn: 2019-03-22T12:51:19Z + description: Description of the artifact + globalId: 12984719247 + id: Procurement-Invoice + labels: + - label-1 + - label-2 + modifiedBy: user2 + modifiedOn: 2019-07-19T15:09:00Z + name: Artifact Name + properties: + custom-1: foo + custom-2: bar + type: AVRO + version: 18 + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + globalId: + format: int64 + type: integer + id: + type: string + labels: + items: + type: string + type: array + modifiedBy: + type: string + modifiedOn: + format: date-time + type: string + name: + type: string + properties: + $ref: "#/components/schemas/Properties" + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + version: + format: int64 + type: integer + required: + - id + - createdBy + - createdOn + - modifiedBy + - modifiedOn + - version + - type + - globalId + - state + title: Root Type for ArtifactMetaData + type: object + ArtifactSearchResults: + description: Describes the response received when searching for artifacts. + properties: + artifacts: + description: The artifacts that matched the search criteria. + items: + $ref: "#/components/schemas/SearchedArtifact" + type: array + count: + description: The total number of artifacts that matched the search criteria. + type: integer + required: + - count + - artifacts + type: object + ArtifactState: + description: | + Describes the state of an artifact or artifact version. The following states + are possible: + + * ENABLED + * DISABLED + * DEPRECATED + enum: + - ENABLED + - DISABLED + - DEPRECATED + - DELETED + type: string + x-codegen-package: io.apicurio.registry.types + ArtifactType: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + example: AVRO + type: string + x-codegen-package: io.apicurio.registry.types + EditableMetaData: + example: + description: The description of the artifact. + labels: + - regional + - global + name: Artifact Name + properties: + custom-1: foo + custom-2: bar + properties: + description: + type: string + labels: + items: + type: string + type: array + name: + type: string + properties: + $ref: "#/components/schemas/Properties" + title: Root Type for EditableArtifactMetaData + type: object + Error: + description: |- + All error responses, whether `4xx` or `5xx` will include one of these as the response + body. + example: + error_code: 500 + message: An error occurred somewhere. + properties: + detail: + description: Full details about the error. This might contain a server stack trace, for example. + type: string + error_code: + description: The server-side error code. + format: int32 + type: integer + message: + description: The short error message. + type: string + title: Root Type for Error + type: object + Properties: + additionalProperties: + type: string + description: User-defined name-value pairs. Name and value must be strings. + type: object + Rule: + example: + config: FULL + type: VALIDITY + properties: + config: + type: string + type: + $ref: "#/components/schemas/RuleType" + required: + - config + title: Root Type for Rule + type: object + RuleType: + enum: + - VALIDITY + - COMPATIBILITY + example: VALIDITY + type: string + x-codegen-package: io.apicurio.registry.types + SearchOver: + enum: + - everything + - name + - description + - labels + type: string + SearchedArtifact: + description: Models a single artifact from the result set returned when searching for artifacts. + example: + createdBy: user1 + createdOn: 2019-03-22T12:51:19Z + description: Description of the artifact + id: Procurement-Invoice + labels: + - current + - internal + name: Artifact Name + state: ENABLED + type: AVRO + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + id: + type: string + labels: + items: + type: string + type: array + modifiedBy: + type: string + modifiedOn: + format: date-time + type: string + name: + type: string + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + required: + - createdBy + - createdOn + - id + - type + - state + type: object + SearchedVersion: + description: Models a single artifact from the result set returned when searching for artifacts. + example: + createdBy: user1 + createdOn: 2019-03-22T12:51:19Z + description: Description of the artifact version + globalId: 3849759283547 + labels: + - current + - internal + name: Artifact Version Name + state: ENABLED + type: AVRO + version: 17 + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + globalId: + format: int64 + type: integer + labels: + items: + type: string + type: array + name: + type: string + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + version: + format: int32 + type: integer + required: + - createdBy + - createdOn + - type + - state + - globalId + - version + type: object + SortOrder: + enum: + - asc + - desc + type: string + UpdateState: + example: + state: DISABLED + properties: + state: + $ref: "#/components/schemas/ArtifactState" + required: + - state + title: Root Type for UpdateState + type: object + VersionMetaData: + example: + createdBy: user1 + createdOn: 2019-05-17T12:00:00Z + description: The description of the artifact + globalId: 183282932983 + id: my-artifact-id + labels: + - label-1 + - label-2 + name: Artifact Name + properties: + custom-1: foo + custom-2: bar + type: PROTOBUF + version: 1221432 + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + globalId: + format: int64 + type: integer + id: + description: The artifact id. + type: string + labels: + items: + type: string + type: array + name: + type: string + properties: + $ref: "#/components/schemas/Properties" + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + version: + format: int64 + type: integer + required: + - createdOn + - createdBy + - version + - type + - globalId + - id + title: Root Type for ArtifactVersionMetaData + type: object + VersionSearchResults: + description: Describes the response received when searching for artifacts. + properties: + count: + description: The total number of artifacts that matched the search criteria. + type: integer + versions: + items: + $ref: "#/components/schemas/SearchedVersion" + type: array + required: + - count + - versions + type: object diff --git a/build/resources/main/apidapp.com.2019-02-14T164701Z.yaml b/build/resources/main/apidapp.com.2019-02-14T164701Z.yaml new file mode 100644 index 0000000000000000000000000000000000000000..98d6ba6fbc8fb3ed219d38428ebdeefee40fc623 --- /dev/null +++ b/build/resources/main/apidapp.com.2019-02-14T164701Z.yaml @@ -0,0 +1,1044 @@ +openapi: 3.0.0 +servers: + - url: https://ethereum.apidapp.com/1 +info: + contact: + x-twitter: api_dapp + title: ApiDapp + version: 2019-02-14T16:47:01Z + x-apisguru-categories: + - financial + x-logo: + url: https://i2.wp.com/apidapp.com/wp-content/uploads/2019/03/cropped-ApiDappIcon.png?fit=180%2C180&ssl=1 + x-origin: + - format: openapi + url: https://apidapp.s3.amazonaws.com/ApiDapp-Start-swagger-7/ApiDapp-Start-swagger+(7).json + version: "3.0" + x-providerName: apidapp.com +paths: + /: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + x-amazon-apigateway-any-method: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /account: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create new account + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + "/account/{id}": + get: + description: Get account balance + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /block: + get: + description: Access detailed block information + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/block/{id}": + get: + description: Get information about particular block + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/block/{id}/transaction": + get: + description: Get transaction count within block + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/block/{id}/transaction/{index}": + get: + description: Get information about particular transaction within block + parameters: + - in: path + name: index + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + - description: Automatically added + in: path + name: index + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /blockchain: + get: + description: Get a list of supported blockchains + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/blockchain/{id}": + get: + description: Get information about blockchain woth given id + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /contract: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create a new smart contract + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/contract/{id}": + get: + description: Get contract balance + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Call the contract + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + /echo: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + x-amazon-apigateway-any-method: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /erc20: + get: + description: Get token information such as name, total amount in circulation, etc + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/erc20/{address}": + get: + description: Get information amout token balance in the account + parameters: + - in: path + name: address + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + parameters: + - description: Automatically added + in: path + name: address + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Transfer tokens to another account + parameters: + - in: path + name: address + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /key: + get: + parameters: + - in: query + name: token + required: false + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/key/{key}": + delete: + parameters: + - in: path + name: key + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + parameters: + - description: Automatically added + in: path + name: key + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /transaction: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create a new transaction. Transfer Ether between accounts + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + "/transaction/{hash}": + get: + description: Get information about transaction by the transaction hash value + parameters: + - in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/transaction/{hash}/receipt": + get: + description: Get receipt detail information + parameters: + - in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /version: + get: + description: Get API version info + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /wallet: + get: + description: Get current account balance + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create personal wallet + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /wallet/account: + get: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/wallet/account/{id}": + get: + description: Get account balance + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/wallet/account/{id}/contract": + post: + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/wallet/account/{id}/erc20": + post: + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/wallet/account/{id}/pay": + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Send payment from the account held within the wallet + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response +components: + schemas: + Empty: + title: Empty Schema + type: object + securitySchemes: + Key2: + in: header + name: X-Api-Key + type: apiKey + x-amazon-apigateway-authtype: custom diff --git a/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml b/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml index ec977502b2813cba8fc182898e9929353f636519..e356c955eb21d7a0feb6299c00edf5a8c03d07dc 100644 --- a/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml +++ b/build/test-results/test/TEST-openapi.OpenAPIMain_test.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<testsuite name="openapi.OpenAPIMain_test" tests="1" skipped="0" failures="0" errors="0" timestamp="2021-08-15T19:01:25" hostname="DESKTOP-RAH69DT" time="1.581"> +<testsuite name="openapi.OpenAPIMain_test" tests="1" skipped="0" failures="0" errors="0" timestamp="2021-08-19T08:46:48" hostname="DESKTOP-RAH69DT" time="1.703"> <properties/> - <testcase name="test()" classname="openapi.OpenAPIMain_test" time="1.581"/> - <system-out><![CDATA[20 + <testcase name="test()" classname="openapi.OpenAPIMain_test" time="1.703"/> + <system-out><![CDATA[30 Loading expression DSL file '1password.com.yaml'. Loading expression DSL file '1password.local.yaml'. Loading expression DSL file '6-dot-authentiqio.appspot.com.yaml'. @@ -16,7 +16,17 @@ Loading expression DSL file 'adyen.com.AccountService.6.yaml'. Loading expression DSL file 'agco-ats.com.yaml'. Loading expression DSL file 'amazonaws.com.accessanalyzer.2019-11-01.yaml'. Loading expression DSL file 'amazonaws.com.acm.2015-12-08.yaml'. +Loading expression DSL file 'amentum.space.atmosphere.1.1.1.yaml'. +Loading expression DSL file 'amentum.space.aviation_radiation.1.5.0.yaml'. +Loading expression DSL file 'amentum.space.global-magnet.1.3.0.yaml'. +Loading expression DSL file 'amentum.space.gravity.1.1.1.yaml'. +Loading expression DSL file 'amentum.space.space_radiation.1.1.1.yaml'. +Loading expression DSL file 'anchore.io.0.1.18.yaml'. Loading expression DSL file 'api-with-examples.json'. +Loading expression DSL file 'api.gov.uk.vehicle-enquiry.1.1.0.yaml'. +Loading expression DSL file 'api2pdf.com.1.0.0.yaml'. +Loading expression DSL file 'apicurio.local.registry.1.3.2.Final.yaml'. +Loading expression DSL file 'apidapp.com.2019-02-14T164701Z.yaml'. Loading expression DSL file 'callback-example.json'. Loading expression DSL file 'link-example.json'. Loading expression DSL file 'petstore-expanded.json'. diff --git a/build/test-results/test/binary/output.bin b/build/test-results/test/binary/output.bin index cd846e6411660816661ad5435047fb1cb5a65806..e84b95f423937333c4f0a64f64c498bd2b3566ab 100644 --- a/build/test-results/test/binary/output.bin +++ b/build/test-results/test/binary/output.bin @@ -1,4 +1,4 @@ -20 +30 3Loading expression DSL file '1password.com.yaml'. 5Loading expression DSL file '1password.local.yaml'. CLoading expression DSL file '6-dot-authentiqio.appspot.com.yaml'. @@ -12,7 +12,17 @@ 2Loading expression DSL file 'agco-ats.com.yaml'. MLoading expression DSL file 'amazonaws.com.accessanalyzer.2019-11-01.yaml'. BLoading expression DSL file 'amazonaws.com.acm.2015-12-08.yaml'. +DLoading expression DSL file 'amentum.space.atmosphere.1.1.1.yaml'. +LLoading expression DSL file 'amentum.space.aviation_radiation.1.5.0.yaml'. +GLoading expression DSL file 'amentum.space.global-magnet.1.3.0.yaml'. +ALoading expression DSL file 'amentum.space.gravity.1.1.1.yaml'. +ILoading expression DSL file 'amentum.space.space_radiation.1.1.1.yaml'. +7Loading expression DSL file 'anchore.io.0.1.18.yaml'. 7Loading expression DSL file 'api-with-examples.json'. +FLoading expression DSL file 'api.gov.uk.vehicle-enquiry.1.1.0.yaml'. +7Loading expression DSL file 'api2pdf.com.1.0.0.yaml'. +ILoading expression DSL file 'apicurio.local.registry.1.3.2.Final.yaml'. +DLoading expression DSL file 'apidapp.com.2019-02-14T164701Z.yaml'. 6Loading expression DSL file 'callback-example.json'. 2Loading expression DSL file 'link-example.json'. 7Loading expression DSL file 'petstore-expanded.json'. diff --git a/build/test-results/test/binary/output.bin.idx b/build/test-results/test/binary/output.bin.idx index e1ac423fb9a8e91f6c6e2c2b258bc3848d275901..198bb710300e7d2c8fc467fc21bc21676ba73f8e 100644 Binary files a/build/test-results/test/binary/output.bin.idx and b/build/test-results/test/binary/output.bin.idx differ diff --git a/build/test-results/test/binary/results.bin b/build/test-results/test/binary/results.bin index c3071a590d7d89adacf91a3a605e7a05879f4e3a..438da8c3fac9996aa3635c296cbd7913f5f8ab3a 100644 Binary files a/build/test-results/test/binary/results.bin and b/build/test-results/test/binary/results.bin differ diff --git a/gen-api-ex/1password.local.yaml b/gen-api-ex/1password.local.yaml index 752f1af39823d8537df0d774dad87436876274ef..a7de576909b2641d84dba70480de1e89b39c0856 100644 --- a/gen-api-ex/1password.local.yaml +++ b/gen-api-ex/1password.local.yaml @@ -329,6 +329,75 @@ } }, "/vaults/{vaultUuid}/items" : { + "get" : { + "tags" : [ "Items" ], + "summary" : "Get all items for inside a Vault", + "operationId" : "GetVaultItems", + "parameters" : [ { + "description" : "The UUID of the Vault to fetch Items from", + "required" : true, + "schema" : { + "pattern" : "^[\\da-z]{26}$", + "type" : "string" + }, + "in" : "path", + "name" : "vaultUuid" + }, { + "description" : "Filter the Item collection based on Item name using SCIM eq filter", + "schema" : { + "example" : "title eq \"Some Item Name\"", + "type" : "string" + }, + "in" : "query", + "name" : "filter" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Item" + } + } + } + } + }, + "401" : { + "description" : "Invalid or missing token", + "content" : { + "application/json" : { + "example" : { + "message" : "Invalid token signature", + "status" : 401 + }, + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Vault not found", + "content" : { + "application/json" : { + "example" : { + "message" : "vault {vaultUuid} not found", + "status" : 404 + }, + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security" : [ { + "ConnectToken" : [ ] + } ] + }, "post" : { "tags" : [ "Items" ], "summary" : "Create a new Item", @@ -428,13 +497,15 @@ "security" : [ { "ConnectToken" : [ ] } ] - }, - "get" : { + } + }, + "/vaults/{vaultUuid}/items/{itemUuid}" : { + "put" : { "tags" : [ "Items" ], - "summary" : "Get all items for inside a Vault", - "operationId" : "GetVaultItems", + "summary" : "Update an Item", + "operationId" : "UpdateVaultItem", "parameters" : [ { - "description" : "The UUID of the Vault to fetch Items from", + "description" : "The UUID of the Item's Vault", "required" : true, "schema" : { "pattern" : "^[\\da-z]{26}$", @@ -443,35 +514,42 @@ "in" : "path", "name" : "vaultUuid" }, { - "description" : "Filter the Item collection based on Item name using SCIM eq filter", + "description" : "The UUID of the Item to update", + "required" : true, "schema" : { - "example" : "title eq \"Some Item Name\"", + "pattern" : "^[\\da-z]{26}$", "type" : "string" }, - "in" : "query", - "name" : "filter" + "in" : "path", + "name" : "itemUuid" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FullItem" + } + } + } + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Item" - } + "$ref" : "#/components/schemas/FullItem" } } } }, - "401" : { - "description" : "Invalid or missing token", + "400" : { + "description" : "Unable to create item due to invalid input", "content" : { "application/json" : { "example" : { - "message" : "Invalid token signature", - "status" : 401 + "message" : "The item doesn't have a {example field name} field.", + "status" : 400 }, "schema" : { "$ref" : "#/components/schemas/ErrorResponse" @@ -479,54 +557,6 @@ } } }, - "404" : { - "description" : "Vault not found", - "content" : { - "application/json" : { - "example" : { - "message" : "vault {vaultUuid} not found", - "status" : 404 - }, - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ { - "ConnectToken" : [ ] - } ] - } - }, - "/vaults/{vaultUuid}/items/{itemUuid}" : { - "delete" : { - "tags" : [ "Items" ], - "summary" : "Delete an Item", - "operationId" : "DeleteVaultItem", - "parameters" : [ { - "description" : "The UUID of the Vault the item is in", - "required" : true, - "schema" : { - "pattern" : "^[\\da-z]{26}$", - "type" : "string" - }, - "in" : "path", - "name" : "vaultUuid" - }, { - "description" : "The UUID of the Item to update", - "required" : true, - "schema" : { - "pattern" : "^[\\da-z]{26}$", - "type" : "string" - }, - "in" : "path", - "name" : "itemUuid" - } ], - "responses" : { - "204" : { - "description" : "Successfully deleted an item" - }, "401" : { "description" : "Invalid or missing token", "content" : { @@ -560,6 +590,13 @@ "content" : { "application/json" : { "examples" : { + "itemNotFound" : { + "summary" : "Item not found", + "value" : { + "message" : "item {itemUuid} not found", + "status" : 404 + } + }, "vaultNotFound" : { "summary" : "Vault not found", "value" : { @@ -579,12 +616,13 @@ "ConnectToken" : [ ] } ] }, - "put" : { + "patch" : { "tags" : [ "Items" ], - "summary" : "Update an Item", - "operationId" : "UpdateVaultItem", + "summary" : "Update a subset of Item attributes", + "description" : "Applies a modified [RFC6902 JSON Patch](https://tools.ietf.org/html/rfc6902) document to an Item or ItemField. This endpoint only supports `add`, `remove` and `replace` operations.\n\nWhen modifying a specific ItemField, the ItemField's ID in the `path` attribute of the operation object: `/fields/{fieldId}`\n", + "operationId" : "PatchVaultItem", "parameters" : [ { - "description" : "The UUID of the Item's Vault", + "description" : "The UUID of the Vault the item is in", "required" : true, "schema" : { "pattern" : "^[\\da-z]{26}$", @@ -605,15 +643,79 @@ "requestBody" : { "content" : { "application/json" : { + "examples" : { + "PatchItemAttr" : { + "summary" : "Update specific Item attributes", + "value" : [ { + "op" : "replace", + "path" : "/favorite", + "value" : true + }, { + "op" : "remove", + "path" : "/tags/1" + } ] + }, + "PatchItemField" : { + "summary" : "Add a new ItemField to the Item", + "value" : [ { + "op" : "add", + "path" : "/fields", + "value" : { + "label" : "New Field", + "type" : "string", + "value" : "hunter2" + } + } ] + }, + "PatchItemFieldAttr" : { + "summary" : "Modify a specific ItemField attribute.", + "value" : [ { + "op" : "add", + "path" : "/fields/s2ju540zlna8bdj4uro7sj64rk/label", + "value" : "New field name" + }, { + "op" : "remove", + "path" : "/fields/s2ju540zlna8bdj4uro7sj64rk/value" + } ] + }, + "PatchItemFieldWithID" : { + "summary" : "Modify or remove an ItemField.", + "value" : [ { + "op" : "replace", + "path" : "/fields/r9qxq7xnhfhukoxsc8ymqr0y11", + "value" : { + "label" : "Replacement Title", + "type" : "string", + "value" : "new value" + } + }, { + "op" : "remove", + "path" : "/fields/h2nl155dshi043yse7wa3u1hs7" + } ] + }, + "ReplaceAllAttributes" : { + "summary" : "Replace an entire Item with new fields. Equivalent to a PUT request.", + "value" : [ { + "op" : "replace", + "path" : "/", + "value" : { + "..." : "Any attr from FullItem schema", + "favorite" : true, + "tags" : [ "tag1", "tag2" ], + "title" : "New Title" + } + } ] + } + }, "schema" : { - "$ref" : "#/components/schemas/FullItem" + "$ref" : "#/components/schemas/Patch" } } } }, "responses" : { "200" : { - "description" : "OK", + "description" : "OK - Item updated. If no Patch operations were provided, Item is unmodified.", "content" : { "application/json" : { "schema" : { @@ -622,20 +724,6 @@ } } }, - "400" : { - "description" : "Unable to create item due to invalid input", - "content" : { - "application/json" : { - "example" : { - "message" : "The item doesn't have a {example field name} field.", - "status" : 400 - }, - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, "401" : { "description" : "Invalid or missing token", "content" : { @@ -788,11 +876,10 @@ "ConnectToken" : [ ] } ] }, - "patch" : { + "delete" : { "tags" : [ "Items" ], - "summary" : "Update a subset of Item attributes", - "description" : "Applies a modified [RFC6902 JSON Patch](https://tools.ietf.org/html/rfc6902) document to an Item or ItemField. This endpoint only supports `add`, `remove` and `replace` operations.\n\nWhen modifying a specific ItemField, the ItemField's ID in the `path` attribute of the operation object: `/fields/{fieldId}`\n", - "operationId" : "PatchVaultItem", + "summary" : "Delete an Item", + "operationId" : "DeleteVaultItem", "parameters" : [ { "description" : "The UUID of the Vault the item is in", "required" : true, @@ -812,89 +899,9 @@ "in" : "path", "name" : "itemUuid" } ], - "requestBody" : { - "content" : { - "application/json" : { - "examples" : { - "PatchItemAttr" : { - "summary" : "Update specific Item attributes", - "value" : [ { - "op" : "replace", - "path" : "/favorite", - "value" : true - }, { - "op" : "remove", - "path" : "/tags/1" - } ] - }, - "PatchItemField" : { - "summary" : "Add a new ItemField to the Item", - "value" : [ { - "op" : "add", - "path" : "/fields", - "value" : { - "label" : "New Field", - "type" : "string", - "value" : "hunter2" - } - } ] - }, - "PatchItemFieldAttr" : { - "summary" : "Modify a specific ItemField attribute.", - "value" : [ { - "op" : "add", - "path" : "/fields/s2ju540zlna8bdj4uro7sj64rk/label", - "value" : "New field name" - }, { - "op" : "remove", - "path" : "/fields/s2ju540zlna8bdj4uro7sj64rk/value" - } ] - }, - "PatchItemFieldWithID" : { - "summary" : "Modify or remove an ItemField.", - "value" : [ { - "op" : "replace", - "path" : "/fields/r9qxq7xnhfhukoxsc8ymqr0y11", - "value" : { - "label" : "Replacement Title", - "type" : "string", - "value" : "new value" - } - }, { - "op" : "remove", - "path" : "/fields/h2nl155dshi043yse7wa3u1hs7" - } ] - }, - "ReplaceAllAttributes" : { - "summary" : "Replace an entire Item with new fields. Equivalent to a PUT request.", - "value" : [ { - "op" : "replace", - "path" : "/", - "value" : { - "..." : "Any attr from FullItem schema", - "favorite" : true, - "tags" : [ "tag1", "tag2" ], - "title" : "New Title" - } - } ] - } - }, - "schema" : { - "$ref" : "#/components/schemas/Patch" - } - } - } - }, "responses" : { - "200" : { - "description" : "OK - Item updated. If no Patch operations were provided, Item is unmodified.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/FullItem" - } - } - } + "204" : { + "description" : "Successfully deleted an item" }, "401" : { "description" : "Invalid or missing token", @@ -929,13 +936,6 @@ "content" : { "application/json" : { "examples" : { - "itemNotFound" : { - "summary" : "Item not found", - "value" : { - "message" : "item {itemUuid} not found", - "status" : 404 - } - }, "vaultNotFound" : { "summary" : "Vault not found", "value" : { diff --git a/gen-api-ex/6-dot-authentiqio.appspot.com.yaml b/gen-api-ex/6-dot-authentiqio.appspot.com.yaml index e6fa354c031d2dba92923d05470e33a42dfbdbad..5760592e0f55018185ce6672600b25e01aced744 100644 --- a/gen-api-ex/6-dot-authentiqio.appspot.com.yaml +++ b/gen-api-ex/6-dot-authentiqio.appspot.com.yaml @@ -192,10 +192,10 @@ } } }, - "post" : { - "tags" : [ "key", "post" ], - "description" : "update properties of an Authentiq ID.\n(not operational in v4; use PUT for now)\n\nv5: POST issuer-signed email & phone scopes in\na self-signed JWT\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", - "operationId" : "key_update", + "put" : { + "tags" : [ "key", "put" ], + "description" : "Update Authentiq ID by replacing the object.\n\nv4: `JWT(sub,email,phone)` to bind email/phone hash; \n\nv5: POST issuer-signed email & phone scopes\nand PUT to update registration `JWT(sub, pk, devtoken, ...)`\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId" : "key_bind", "parameters" : [ { "$ref" : "#/components/parameters/PK" } ], @@ -229,45 +229,55 @@ } } }, + "409" : { + "description" : "Already bound to another key `duplicate-hash`", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + }, "default" : { "$ref" : "#/components/responses/ErrorResponse" } } }, - "delete" : { - "tags" : [ "key", "delete" ], - "description" : "Revoke an Identity (Key) with a revocation secret", - "operationId" : "key_revoke", + "get" : { + "tags" : [ "key", "get" ], + "description" : "Get public details of an Authentiq ID.\n", + "operationId" : "key_retrieve", "parameters" : [ { "$ref" : "#/components/parameters/PK" - }, { - "description" : "revokation secret", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "secret" } ], "responses" : { "200" : { - "description" : "Successful response", + "description" : "Successfully retrieved", "content" : { "application/json" : { "schema" : { "properties" : { + "since" : { + "format" : "date-time", + "type" : "string" + }, "status" : { - "description" : "done", + "type" : "string" + }, + "sub" : { + "description" : "base64safe encoded public signing key", "type" : "string" } }, - "type" : "object" + "type" : "object", + "title" : "JWT" } } } }, - "401" : { - "description" : "Key not found / wrong code `auth-error`", + "404" : { + "description" : "Unknown key `unknown-key`", "content" : { "application/json" : { "schema" : { @@ -276,8 +286,8 @@ } } }, - "404" : { - "description" : "Unknown key `unknown-key`", + "410" : { + "description" : "Key is revoked (gone). `revoked-key`", "content" : { "application/json" : { "schema" : { @@ -291,10 +301,10 @@ } } }, - "put" : { - "tags" : [ "key", "put" ], - "description" : "Update Authentiq ID by replacing the object.\n\nv4: `JWT(sub,email,phone)` to bind email/phone hash; \n\nv5: POST issuer-signed email & phone scopes\nand PUT to update registration `JWT(sub, pk, devtoken, ...)`\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", - "operationId" : "key_bind", + "post" : { + "tags" : [ "key", "post" ], + "description" : "update properties of an Authentiq ID.\n(not operational in v4; use PUT for now)\n\nv5: POST issuer-signed email & phone scopes in\na self-signed JWT\n\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId" : "key_update", "parameters" : [ { "$ref" : "#/components/parameters/PK" } ], @@ -328,55 +338,45 @@ } } }, - "409" : { - "description" : "Already bound to another key `duplicate-hash`", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - }, "default" : { "$ref" : "#/components/responses/ErrorResponse" } } }, - "get" : { - "tags" : [ "key", "get" ], - "description" : "Get public details of an Authentiq ID.\n", - "operationId" : "key_retrieve", + "delete" : { + "tags" : [ "key", "delete" ], + "description" : "Revoke an Identity (Key) with a revocation secret", + "operationId" : "key_revoke", "parameters" : [ { "$ref" : "#/components/parameters/PK" + }, { + "description" : "revokation secret", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "secret" } ], "responses" : { "200" : { - "description" : "Successfully retrieved", + "description" : "Successful response", "content" : { "application/json" : { "schema" : { "properties" : { - "since" : { - "format" : "date-time", - "type" : "string" - }, "status" : { - "type" : "string" - }, - "sub" : { - "description" : "base64safe encoded public signing key", + "description" : "done", "type" : "string" } }, - "type" : "object", - "title" : "JWT" + "type" : "object" } } } }, - "404" : { - "description" : "Unknown key `unknown-key`", + "401" : { + "description" : "Key not found / wrong code `auth-error`", "content" : { "application/json" : { "schema" : { @@ -385,8 +385,8 @@ } } }, - "410" : { - "description" : "Key is revoked (gone). `revoked-key`", + "404" : { + "description" : "Unknown key `unknown-key`", "content" : { "application/json" : { "schema" : { @@ -551,22 +551,26 @@ } } }, - "post" : { - "tags" : [ "scope", "post" ], - "description" : "this is a scope confirmation", - "operationId" : "sign_confirm", + "put" : { + "tags" : [ "scope", "put" ], + "description" : "authority updates a JWT with its signature\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", + "operationId" : "sign_update", "parameters" : [ { "$ref" : "#/components/parameters/JobID" } ], "responses" : { - "202" : { - "description" : "Successfully confirmed", + "200" : { + "description" : "Successfully updated", "content" : { - "application/json" : { + "application/jwt" : { "schema" : { "properties" : { + "jwt" : { + "description" : "result is JWT or JSON??", + "type" : "string" + }, "status" : { - "description" : "confirmed", + "description" : "ready", "type" : "string" } }, @@ -575,30 +579,20 @@ } } }, - "401" : { - "description" : "Confirmation error `auth-error`", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - }, "404" : { "description" : "Job not found `unknown-job`", "content" : { - "application/json" : { + "application/jwt" : { "schema" : { "$ref" : "#/components/schemas/Error" } } } }, - "405" : { - "description" : "JWT POSTed to scope `not-supported`", + "409" : { + "description" : "Job not confirmed yet `confirm-first`", "content" : { - "application/json" : { + "application/jwt" : { "schema" : { "$ref" : "#/components/schemas/Error" } @@ -610,30 +604,58 @@ } } }, - "delete" : { - "tags" : [ "scope", "delete" ], - "description" : "delete a verification job", - "operationId" : "sign_delete", + "get" : { + "tags" : [ "scope", "get" ], + "description" : "get the status / current content of a verification job", + "operationId" : "sign_retrieve", "parameters" : [ { "$ref" : "#/components/parameters/JobID" } ], "responses" : { "200" : { - "description" : "Successfully deleted", + "description" : "Successful response (JWT)", "content" : { "application/json" : { "schema" : { "properties" : { - "status" : { - "description" : "done", + "exp" : { + "type" : "integer" + }, + "field" : { + "type" : "string" + }, + "sub" : { + "description" : "base64safe encoded public signing key", "type" : "string" } }, - "type" : "object" + "type" : "object", + "title" : "JWT" + } + }, + "application/jwt" : { + "schema" : { + "properties" : { + "exp" : { + "type" : "integer" + }, + "field" : { + "type" : "string" + }, + "sub" : { + "description" : "base64safe encoded public signing key", + "type" : "string" + } + }, + "type" : "object", + "title" : "JWT" } } } }, + "204" : { + "description" : "Confirmed, waiting for signing" + }, "404" : { "description" : "Job not found `unknown-job`", "content" : { @@ -641,6 +663,11 @@ "schema" : { "$ref" : "#/components/schemas/Error" } + }, + "application/jwt" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } } } }, @@ -649,26 +676,22 @@ } } }, - "put" : { - "tags" : [ "scope", "put" ], - "description" : "authority updates a JWT with its signature\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\n", - "operationId" : "sign_update", + "post" : { + "tags" : [ "scope", "post" ], + "description" : "this is a scope confirmation", + "operationId" : "sign_confirm", "parameters" : [ { "$ref" : "#/components/parameters/JobID" } ], "responses" : { - "200" : { - "description" : "Successfully updated", + "202" : { + "description" : "Successfully confirmed", "content" : { - "application/jwt" : { + "application/json" : { "schema" : { "properties" : { - "jwt" : { - "description" : "result is JWT or JSON??", - "type" : "string" - }, "status" : { - "description" : "ready", + "description" : "confirmed", "type" : "string" } }, @@ -677,20 +700,30 @@ } } }, + "401" : { + "description" : "Confirmation error `auth-error`", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + }, "404" : { "description" : "Job not found `unknown-job`", "content" : { - "application/jwt" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } } } }, - "409" : { - "description" : "Job not confirmed yet `confirm-first`", + "405" : { + "description" : "JWT POSTed to scope `not-supported`", "content" : { - "application/jwt" : { + "application/json" : { "schema" : { "$ref" : "#/components/schemas/Error" } @@ -702,58 +735,30 @@ } } }, - "get" : { - "tags" : [ "scope", "get" ], - "description" : "get the status / current content of a verification job", - "operationId" : "sign_retrieve", + "delete" : { + "tags" : [ "scope", "delete" ], + "description" : "delete a verification job", + "operationId" : "sign_delete", "parameters" : [ { "$ref" : "#/components/parameters/JobID" } ], "responses" : { "200" : { - "description" : "Successful response (JWT)", + "description" : "Successfully deleted", "content" : { "application/json" : { "schema" : { "properties" : { - "exp" : { - "type" : "integer" - }, - "field" : { - "type" : "string" - }, - "sub" : { - "description" : "base64safe encoded public signing key", - "type" : "string" - } - }, - "type" : "object", - "title" : "JWT" - } - }, - "application/jwt" : { - "schema" : { - "properties" : { - "exp" : { - "type" : "integer" - }, - "field" : { - "type" : "string" - }, - "sub" : { - "description" : "base64safe encoded public signing key", + "status" : { + "description" : "done", "type" : "string" } }, - "type" : "object", - "title" : "JWT" + "type" : "object" } } } }, - "204" : { - "description" : "Confirmed, waiting for signing" - }, "404" : { "description" : "Job not found `unknown-job`", "content" : { @@ -761,11 +766,6 @@ "schema" : { "$ref" : "#/components/schemas/Error" } - }, - "application/jwt" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } } } }, diff --git a/gen-api-ex/ably.io.yaml b/gen-api-ex/ably.io.yaml index 3c32c541a5bccf86267d07f8e83acbc9470ed210..3105caec068c4efccf585d16c721f5a0ada86120 100644 --- a/gen-api-ex/ably.io.yaml +++ b/gen-api-ex/ably.io.yaml @@ -154,6 +154,73 @@ }, { "$ref" : "#/components/parameters/responseFormat" } ], + "get" : { + "tags" : [ "History" ], + "summary" : "Get message history for a channel", + "description" : "Get message history for a channel", + "operationId" : "getMessagesByChannel", + "parameters" : [ { + "$ref" : "#/components/parameters/channelId" + }, { + "$ref" : "#/components/parameters/filterStart" + }, { + "$ref" : "#/components/parameters/filterLimit" + }, { + "$ref" : "#/components/parameters/filterEnd" + }, { + "$ref" : "#/components/parameters/filterDirection" + } ], + "responses" : { + "2XX" : { + "description" : "OK", + "headers" : { + "link" : { + "$ref" : "#/components/headers/Link" + }, + "x-ably-serverid" : { + "$ref" : "#/components/headers/ServerId" + } + }, + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Message" + } + } + }, + "application/x-msgpack" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Message" + } + } + }, + "text/html" : { + "schema" : { + "type" : "string" + } + } + } + }, + "default" : { + "description" : "Error", + "headers" : { + "x-ably-errorcode" : { + "$ref" : "#/components/headers/ErrorCode" + }, + "x-ably-errormessage" : { + "$ref" : "#/components/headers/ErrorMessage" + }, + "x-ably-serverid" : { + "$ref" : "#/components/headers/ServerId" + } + } + } + } + }, "post" : { "tags" : [ "Publishing" ], "summary" : "Publish a message to a channel", @@ -235,73 +302,6 @@ "$ref" : "#/components/responses/Error" } } - }, - "get" : { - "tags" : [ "History" ], - "summary" : "Get message history for a channel", - "description" : "Get message history for a channel", - "operationId" : "getMessagesByChannel", - "parameters" : [ { - "$ref" : "#/components/parameters/channelId" - }, { - "$ref" : "#/components/parameters/filterStart" - }, { - "$ref" : "#/components/parameters/filterLimit" - }, { - "$ref" : "#/components/parameters/filterEnd" - }, { - "$ref" : "#/components/parameters/filterDirection" - } ], - "responses" : { - "2XX" : { - "description" : "OK", - "headers" : { - "link" : { - "$ref" : "#/components/headers/Link" - }, - "x-ably-serverid" : { - "$ref" : "#/components/headers/ServerId" - } - }, - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Message" - } - } - }, - "application/x-msgpack" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Message" - } - } - }, - "text/html" : { - "schema" : { - "type" : "string" - } - } - } - }, - "default" : { - "description" : "Error", - "headers" : { - "x-ably-errorcode" : { - "$ref" : "#/components/headers/ErrorCode" - }, - "x-ably-errormessage" : { - "$ref" : "#/components/headers/ErrorMessage" - }, - "x-ably-serverid" : { - "$ref" : "#/components/headers/ServerId" - } - } - } - } } }, "/channels/{channel_id}/presence" : { @@ -501,6 +501,58 @@ }, { "$ref" : "#/components/parameters/responseFormat" } ], + "get" : { + "tags" : [ "Push" ], + "summary" : "List channel subscriptions", + "description" : "Get a list of push notification subscriptions to channels.", + "operationId" : "getPushSubscriptionsOnChannels", + "parameters" : [ { + "description" : "Filter to restrict to subscriptions associated with that channel.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "channel" + }, { + "description" : "Optional filter to restrict to devices associated with that deviceId. Cannot be used with clientId.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "deviceId" + }, { + "description" : "Optional filter to restrict to devices associated with that clientId. Cannot be used with deviceId.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "clientId" + }, { + "description" : "The maximum number of records to return.", + "schema" : { + "maximum" : 1000, + "type" : "integer", + "default" : 100 + }, + "in" : "query", + "name" : "limit" + } ], + "responses" : { + "2XX" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + } + } + }, + "default" : { + "$ref" : "#/components/responses/Error" + } + } + }, "post" : { "tags" : [ "Push" ], "summary" : "Subscribe a device to a channel", @@ -653,58 +705,6 @@ "$ref" : "#/components/responses/Error" } } - }, - "get" : { - "tags" : [ "Push" ], - "summary" : "List channel subscriptions", - "description" : "Get a list of push notification subscriptions to channels.", - "operationId" : "getPushSubscriptionsOnChannels", - "parameters" : [ { - "description" : "Filter to restrict to subscriptions associated with that channel.", - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "channel" - }, { - "description" : "Optional filter to restrict to devices associated with that deviceId. Cannot be used with clientId.", - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "deviceId" - }, { - "description" : "Optional filter to restrict to devices associated with that clientId. Cannot be used with deviceId.", - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "clientId" - }, { - "description" : "The maximum number of records to return.", - "schema" : { - "maximum" : 1000, - "type" : "integer", - "default" : 100 - }, - "in" : "query", - "name" : "limit" - } ], - "responses" : { - "2XX" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - } - } - }, - "default" : { - "$ref" : "#/components/responses/Error" - } - } } }, "/push/channels" : { @@ -760,6 +760,61 @@ }, { "$ref" : "#/components/parameters/responseFormat" } ], + "get" : { + "tags" : [ "Push" ], + "summary" : "List devices registered for receiving push notifications", + "description" : "List of device details of devices registed for push notifications.", + "operationId" : "getRegisteredPushDevices", + "parameters" : [ { + "description" : "Optional filter to restrict to devices associated with that deviceId.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "deviceId" + }, { + "description" : "Optional filter to restrict to devices associated with that clientId.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "clientId" + }, { + "description" : "The maximum number of records to return.", + "schema" : { + "maximum" : 1000, + "type" : "integer", + "default" : 100 + }, + "in" : "query", + "name" : "limit" + } ], + "responses" : { + "2XX" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + }, + "application/x-msgpack" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + }, + "text/html" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + } + } + }, + "default" : { + "$ref" : "#/components/responses/Error" + } + } + }, "post" : { "tags" : [ "Push" ], "summary" : "Register a device for receiving push notifications", @@ -833,36 +888,41 @@ "$ref" : "#/components/responses/Error" } } - }, - "get" : { + } + }, + "/push/deviceRegistrations/{device_id}" : { + "parameters" : [ { + "$ref" : "#/components/parameters/versionHeader" + }, { + "$ref" : "#/components/parameters/responseFormat" + } ], + "put" : { "tags" : [ "Push" ], - "summary" : "List devices registered for receiving push notifications", - "description" : "List of device details of devices registed for push notifications.", - "operationId" : "getRegisteredPushDevices", + "summary" : "Update a device registration", + "description" : "Device registrations can be upserted (the existing registration is replaced entirely) with a PUT operation. Only clientId, metadata and push.recipient are mutable.", + "operationId" : "putPushDeviceDetails", "parameters" : [ { - "description" : "Optional filter to restrict to devices associated with that deviceId.", - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "deviceId" - }, { - "description" : "Optional filter to restrict to devices associated with that clientId.", - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "clientId" - }, { - "description" : "The maximum number of records to return.", - "schema" : { - "maximum" : 1000, - "type" : "integer", - "default" : 100 - }, - "in" : "query", - "name" : "limit" + "$ref" : "#/components/parameters/deviceId" } ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + }, + "application/x-msgpack" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/DeviceDetails" + } + } + } + }, "responses" : { "2XX" : { "description" : "OK", @@ -888,36 +948,12 @@ "$ref" : "#/components/responses/Error" } } - } - }, - "/push/deviceRegistrations/{device_id}" : { - "parameters" : [ { - "$ref" : "#/components/parameters/versionHeader" - }, { - "$ref" : "#/components/parameters/responseFormat" - } ], - "delete" : { - "tags" : [ "Push" ], - "summary" : "Unregister a single device for push notifications", - "description" : "Unregisters a single device by its device ID. All its subscriptions for receiving push notifications through channels will also be deleted.", - "operationId" : "unregisterPushDevice", - "parameters" : [ { - "$ref" : "#/components/parameters/deviceId" - } ], - "responses" : { - "2XX" : { - "description" : "OK" - }, - "default" : { - "$ref" : "#/components/responses/Error" - } - } }, - "put" : { + "patch" : { "tags" : [ "Push" ], "summary" : "Update a device registration", - "description" : "Device registrations can be upserted (the existing registration is replaced entirely) with a PUT operation. Only clientId, metadata and push.recipient are mutable.", - "operationId" : "putPushDeviceDetails", + "description" : "Specific attributes of an existing registration can be updated. Only clientId, metadata and push.recipient are mutable.", + "operationId" : "patchPushDeviceDetails", "parameters" : [ { "$ref" : "#/components/parameters/deviceId" } ], @@ -1000,53 +1036,17 @@ } } }, - "patch" : { + "delete" : { "tags" : [ "Push" ], - "summary" : "Update a device registration", - "description" : "Specific attributes of an existing registration can be updated. Only clientId, metadata and push.recipient are mutable.", - "operationId" : "patchPushDeviceDetails", + "summary" : "Unregister a single device for push notifications", + "description" : "Unregisters a single device by its device ID. All its subscriptions for receiving push notifications through channels will also be deleted.", + "operationId" : "unregisterPushDevice", "parameters" : [ { "$ref" : "#/components/parameters/deviceId" } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - }, - "application/x-msgpack" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - } - } - }, "responses" : { "2XX" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - }, - "application/x-msgpack" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - }, - "text/html" : { - "schema" : { - "$ref" : "#/components/schemas/DeviceDetails" - } - } - } + "description" : "OK" }, "default" : { "$ref" : "#/components/responses/Error" diff --git a/gen-api-ex/adobe.com.yaml b/gen-api-ex/adobe.com.yaml index df0cd009f068b7f82c15adbd75d35f120313a763..d183e8e2a1eb20a441bb8e1a1617bc6733130e89 100644 --- a/gen-api-ex/adobe.com.yaml +++ b/gen-api-ex/adobe.com.yaml @@ -923,9 +923,9 @@ } }, "/bin/querybuilder.json" : { - "post" : { + "get" : { "tags" : [ "sling" ], - "operationId" : "postQuery", + "operationId" : "getQuery", "parameters" : [ { "required" : true, "schema" : { @@ -968,9 +968,9 @@ } } }, - "get" : { + "post" : { "tags" : [ "sling" ], - "operationId" : "getQuery", + "operationId" : "postQuery", "parameters" : [ { "required" : true, "schema" : { @@ -1423,6 +1423,30 @@ } }, "/etc/replication/agents.{runmode}/{name}" : { + "get" : { + "tags" : [ "sling" ], + "operationId" : "getAgent", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "runmode" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "name" + } ], + "responses" : { + "default" : { + "description" : "Default response" + } + } + }, "post" : { "tags" : [ "sling" ], "operationId" : "postAgent", @@ -1824,30 +1848,6 @@ "description" : "Default response" } } - }, - "get" : { - "tags" : [ "sling" ], - "operationId" : "getAgent", - "parameters" : [ { - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "runmode" - }, { - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "name" - } ], - "responses" : { - "default" : { - "description" : "Default response" - } - } } }, "/etc/replication/treeactivation.html" : { @@ -2817,6 +2817,30 @@ } }, "/{path}/{name}" : { + "get" : { + "tags" : [ "sling" ], + "operationId" : "getNode", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "path" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "name" + } ], + "responses" : { + "default" : { + "description" : "Default response" + } + } + }, "post" : { "tags" : [ "sling" ], "operationId" : "postNode", @@ -2893,30 +2917,6 @@ "description" : "Default response" } } - }, - "get" : { - "tags" : [ "sling" ], - "operationId" : "getNode", - "parameters" : [ { - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "path" - }, { - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "name" - } ], - "responses" : { - "default" : { - "description" : "Default response" - } - } } }, "/{path}/{name}.rw.html" : { diff --git a/gen-api-ex/agco-ats.com.yaml b/gen-api-ex/agco-ats.com.yaml index cccf63115ed86f83fc76e51b0715671f36022f68..ec3dfc7b14569aaae948af952ad5e61bd3e6a0d5 100644 --- a/gen-api-ex/agco-ats.com.yaml +++ b/gen-api-ex/agco-ats.com.yaml @@ -945,36 +945,69 @@ } }, "/api/v2/AuthorizationCategories" : { - "post" : { + "get" : { "tags" : [ "AuthorizationCategories" ], - "summary" : "Add an authorization category.", + "summary" : "Get authorization categories.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCategories_Post", - "requestBody" : { - "$ref" : "#/components/requestBodies/AuthorizationCodes.Shared.Models.Category" - }, + "operationId" : "AuthorizationCategories_Get", + "parameters" : [ { + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Optional. Filter by categories visible to the provided user with the provided userID.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "userID" + }, { + "description" : "Optional. Filter by categories containing a definition with the provided ID.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "definitionID" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" } }, "application/xml" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" } }, "text/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" } }, "text/xml" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" } } } @@ -1007,69 +1040,36 @@ }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "AuthorizationCategories" ], - "summary" : "Get authorization categories.", + "summary" : "Add an authorization category.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCategories_Get", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Optional. Filter by categories visible to the provided user with the provided userID.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "userID" - }, { - "description" : "Optional. Filter by categories containing a definition with the provided ID.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "definitionID" - } ], + "operationId" : "AuthorizationCategories_Post", + "requestBody" : { + "$ref" : "#/components/requestBodies/AuthorizationCodes.Shared.Models.Category" + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" + "type" : "string" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" + "type" : "string" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" + "type" : "string" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_AuthorizationCodes.Shared.Models.Category_" + "type" : "string" } } } @@ -1224,13 +1224,12 @@ } }, "/api/v2/AuthorizationCategories/{id}" : { - "delete" : { + "put" : { "tags" : [ "AuthorizationCategories" ], - "summary" : "Remove an authorization category.", + "summary" : "Update an authorization category.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCategories_Delete", + "operationId" : "AuthorizationCategories_Put", "parameters" : [ { - "description" : "The ID of the authorization category.", "required" : true, "schema" : { "type" : "string" @@ -1238,6 +1237,9 @@ "in" : "path", "name" : "id" } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/AuthorizationCodes.Shared.Models.Category" + }, "responses" : { "204" : { "description" : "No Content" @@ -1255,12 +1257,13 @@ }, "deprecated" : false }, - "put" : { + "delete" : { "tags" : [ "AuthorizationCategories" ], - "summary" : "Update an authorization category.", + "summary" : "Remove an authorization category.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCategories_Put", + "operationId" : "AuthorizationCategories_Delete", "parameters" : [ { + "description" : "The ID of the authorization category.", "required" : true, "schema" : { "type" : "string" @@ -1268,9 +1271,6 @@ "in" : "path", "name" : "id" } ], - "requestBody" : { - "$ref" : "#/components/requestBodies/AuthorizationCodes.Shared.Models.Category" - }, "responses" : { "204" : { "description" : "No Content" @@ -1368,68 +1368,6 @@ } }, "/api/v2/AuthorizationCodeDefinitions" : { - "post" : { - "tags" : [ "AuthorizationCodeDefinitions" ], - "summary" : "Add an authorization code definition.", - "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodeDefinitions_PostAuthorizationCodeDefinition", - "requestBody" : { - "$ref" : "#/components/requestBodies/AuthorizationCodes.Shared.Models.AuthorizationCodeDefinition" - }, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - }, - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "text/json" : { - "schema" : { - "type" : "string" - } - }, - "text/xml" : { - "schema" : { - "type" : "string" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "get" : { "tags" : [ "AuthorizationCodeDefinitions" ], "summary" : "Get authorization code definitions.", @@ -1549,6 +1487,68 @@ } }, "deprecated" : false + }, + "post" : { + "tags" : [ "AuthorizationCodeDefinitions" ], + "summary" : "Add an authorization code definition.", + "description" : "No Documentation Found.", + "operationId" : "AuthorizationCodeDefinitions_PostAuthorizationCodeDefinition", + "requestBody" : { + "$ref" : "#/components/requestBodies/AuthorizationCodes.Shared.Models.AuthorizationCodeDefinition" + }, + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + }, + "application/xml" : { + "schema" : { + "type" : "string" + } + }, + "text/json" : { + "schema" : { + "type" : "string" + } + }, + "text/xml" : { + "schema" : { + "type" : "string" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/AuthorizationCodeDefinitions/{ID}/Categories/{categoryID}" : { @@ -1630,42 +1630,11 @@ } }, "/api/v2/AuthorizationCodeDefinitions/{id}" : { - "delete" : { + "put" : { "tags" : [ "AuthorizationCodeDefinitions" ], - "summary" : "Disable an authorization code definition", + "summary" : "Update an authorization code definition", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodeDefinitions_DeleteAuthorizationCodeDefinition", - "parameters" : [ { - "description" : "The ID of the authorization code definition.", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "id" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, - "put" : { - "tags" : [ "AuthorizationCodeDefinitions" ], - "summary" : "Update an authorization code definition", - "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodeDefinitions_PutAuthorizationCodeDefinition", + "operationId" : "AuthorizationCodeDefinitions_PutAuthorizationCodeDefinition", "parameters" : [ { "description" : "The ID of the authorization code definition.", "required" : true, @@ -1761,94 +1730,29 @@ } }, "deprecated" : false - } - }, - "/api/v2/AuthorizationCodes" : { - "post" : { - "tags" : [ "AuthorizationCodes" ], - "summary" : "Generates an authorization code using the provided definition and parameters.", + }, + "delete" : { + "tags" : [ "AuthorizationCodeDefinitions" ], + "summary" : "Disable an authorization code definition", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodes_PostAuthorizationCode", - "requestBody" : { - "description" : "The model from which to generate an authorization code.", + "operationId" : "AuthorizationCodeDefinitions_DeleteAuthorizationCodeDefinition", + "parameters" : [ { + "description" : "The ID of the authorization code definition.", "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" - } - } - } - }, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "application/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - } - } + "204" : { + "description" : "No Content" }, "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -1857,7 +1761,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/AuthorizationCodes" : { "get" : { "tags" : [ "AuthorizationCodes" ], "summary" : "Get authorization codes.", @@ -1977,32 +1883,92 @@ } }, "deprecated" : false - } - }, - "/api/v2/AuthorizationCodes/{id}" : { - "delete" : { + }, + "post" : { "tags" : [ "AuthorizationCodes" ], - "summary" : "Hide an authorization code.", + "summary" : "Generates an authorization code using the provided definition and parameters.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodes_DeleteAuthorizationCode", - "parameters" : [ { - "description" : "The id of the authorization code.", + "operationId" : "AuthorizationCodes_PostAuthorizationCode", + "requestBody" : { + "description" : "The model from which to generate an authorization code.", "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "id" - } ], + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationCode" + } + } + } + }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -2011,7 +1977,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/AuthorizationCodes/{id}" : { "put" : { "tags" : [ "AuthorizationCodes" ], "summary" : "Update an authorization code.", @@ -2143,14 +2111,12 @@ } }, "deprecated" : false - } - }, - "/api/v2/AuthorizationCodes/{id}/ContactInformation" : { - "get" : { + }, + "delete" : { "tags" : [ "AuthorizationCodes" ], - "summary" : "Get contact information for an authorization code.", + "summary" : "Hide an authorization code.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodes_GetContactInformation", + "operationId" : "AuthorizationCodes_DeleteAuthorizationCode", "parameters" : [ { "description" : "The id of the authorization code.", "required" : true, @@ -2162,52 +2128,15 @@ "name" : "id" } ], "responses" : { - "200" : { - "description" : "OK", + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", "content" : { - "application/json" : { + "*/*" : { "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" + "$ref" : "#/components/schemas/API.Models.ApiError" } } } @@ -2216,13 +2145,14 @@ "deprecated" : false } }, - "/api/v2/AuthorizationCodes/{id}/Validate" : { + "/api/v2/AuthorizationCodes/{id}/ContactInformation" : { "get" : { "tags" : [ "AuthorizationCodes" ], - "summary" : "No Documentation Found.", + "summary" : "Get contact information for an authorization code.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationCodes_ValidateAuthorizationCode", + "operationId" : "AuthorizationCodes_GetContactInformation", "parameters" : [ { + "description" : "The id of the authorization code.", "required" : true, "schema" : { "format" : "int32", @@ -2237,22 +2167,22 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" } } } @@ -2286,69 +2216,43 @@ "deprecated" : false } }, - "/api/v2/AuthorizationContactInformation" : { - "post" : { - "tags" : [ "AuthorizationContactInformation" ], - "summary" : "Add contact information for authorization code.", + "/api/v2/AuthorizationCodes/{id}/Validate" : { + "get" : { + "tags" : [ "AuthorizationCodes" ], + "summary" : "No Documentation Found.", "description" : "No Documentation Found.", - "operationId" : "AuthorizationContactInformation_Post", - "requestBody" : { - "description" : "A contact information.", + "operationId" : "AuthorizationCodes_ValidateAuthorizationCode", + "parameters" : [ { "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" - } - } - } - }, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "id" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.CodeValidationModel" } } } @@ -2380,7 +2284,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/AuthorizationContactInformation" : { "get" : { "tags" : [ "AuthorizationContactInformation" ], "summary" : "Get contact information for authorization codes.", @@ -2492,48 +2398,69 @@ } }, "deprecated" : false - } - }, - "/api/v2/Brands" : { - "get" : { - "tags" : [ "Brands" ], - "summary" : "Gets a list of Brands.", + }, + "post" : { + "tags" : [ "AuthorizationContactInformation" ], + "summary" : "Add contact information for authorization code.", "description" : "No Documentation Found.", - "operationId" : "Brands_Brands", + "operationId" : "AuthorizationContactInformation_Post", + "requestBody" : { + "description" : "A contact information.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/AuthorizationCodes.Shared.Models.AuthorizationContactInformation" + } + } + } + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "type" : "array", - "items" : { - "type" : "string" - } + "format" : "int32", + "type" : "integer" } } } @@ -2567,65 +2494,46 @@ "deprecated" : false } }, - "/api/v2/Bundles" : { - "post" : { - "tags" : [ "Bundles" ], - "summary" : "Add a Bundle to the Update System.", + "/api/v2/Brands" : { + "get" : { + "tags" : [ "Brands" ], + "summary" : "Gets a list of Brands.", "description" : "No Documentation Found.", - "operationId" : "Bundles_PostBundle", - "requestBody" : { - "description" : "The bundle to add", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" - } - } - } - }, + "operationId" : "Brands_Brands", "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "type" : "string" + } } }, "application/xml" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "type" : "string" + } } }, "text/json" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "type" : "string" + } } }, "text/xml" : { "schema" : { - "type" : "string" + "type" : "array", + "items" : { + "type" : "string" + } } } } @@ -2657,7 +2565,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/Bundles" : { "get" : { "tags" : [ "Bundles" ], "summary" : "Get the list of bundles.", @@ -2731,31 +2641,88 @@ } }, "deprecated" : false - } - }, - "/api/v2/Bundles/{ID}" : { - "delete" : { + }, + "post" : { "tags" : [ "Bundles" ], - "summary" : "Delete a Bundle.", + "summary" : "Add a Bundle to the Update System.", "description" : "No Documentation Found.", - "operationId" : "Bundles_DeleteBundle", - "parameters" : [ { - "description" : "The Bundle ID to Delete", + "operationId" : "Bundles_PostBundle", + "requestBody" : { + "description" : "The bundle to add", "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "ID" - } ], + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.Bundle" + } + } + } + }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + }, + "application/xml" : { + "schema" : { + "type" : "string" + } + }, + "text/json" : { + "schema" : { + "type" : "string" + } + }, + "text/xml" : { + "schema" : { + "type" : "string" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -2764,7 +2731,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/Bundles/{ID}" : { "put" : { "tags" : [ "Bundles" ], "summary" : "Modify a Bundle in the Update System.", @@ -2894,6 +2863,37 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Bundles" ], + "summary" : "Delete a Bundle.", + "description" : "No Documentation Found.", + "operationId" : "Bundles_DeleteBundle", + "parameters" : [ { + "description" : "The Bundle ID to Delete", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/Clients" : { @@ -3587,38 +3587,6 @@ } }, "/api/v2/ContentDefinitionAttributes/{contentDefinitionAttributeID}" : { - "delete" : { - "tags" : [ "ContentDefinitions" ], - "summary" : "Remove an Attribute from a ContentDefinition", - "description" : "No Documentation Found.", - "operationId" : "ContentDefinitions_DeleteContentDefinitionAttribute", - "parameters" : [ { - "description" : "The ID of the Attribute to remove.", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "contentDefinitionAttributeID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "ContentDefinitions" ], "summary" : "Update an Attribute for a ContentDefinition", @@ -3681,94 +3649,30 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentDefinitions" : { - "post" : { + }, + "delete" : { "tags" : [ "ContentDefinitions" ], - "summary" : "Create a ContentDefinition", - "description" : "Creates a ContentDefinition. The body of the POST is the ContentDefinition to create.\r\n The ContentDefinitionID will be assigned on creation of the Job. When successful, the response\r\n is the JobID. If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "ContentDefinitions_PostContentDefinition", - "requestBody" : { - "description" : "The ContentDefinition to create.", + "summary" : "Remove an Attribute from a ContentDefinition", + "description" : "No Documentation Found.", + "operationId" : "ContentDefinitions_DeleteContentDefinitionAttribute", + "parameters" : [ { + "description" : "The ID of the Attribute to remove.", "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" - } - } - } - }, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "contentDefinitionAttributeID" + } ], "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "application/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - } - } + "204" : { + "description" : "No Content" }, "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -3777,7 +3681,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/ContentDefinitions" : { "get" : { "tags" : [ "ContentDefinitions" ], "summary" : "Get ContentDefinitions", @@ -3852,32 +3758,92 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentDefinitions/{contentDefinitionID}" : { - "delete" : { + }, + "post" : { "tags" : [ "ContentDefinitions" ], - "summary" : "Delete a ContentDefinition", - "description" : "Deletes an ContentDefinition. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "ContentDefinitions_DeleteContentDefinition", - "parameters" : [ { - "description" : "The ID of the ContentDefinition to delete", + "summary" : "Create a ContentDefinition", + "description" : "Creates a ContentDefinition. The body of the POST is the ContentDefinition to create.\r\n The ContentDefinitionID will be assigned on creation of the Job. When successful, the response\r\n is the JobID. If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "ContentDefinitions_PostContentDefinition", + "requestBody" : { + "description" : "The ContentDefinition to create.", "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "contentDefinitionID" - } ], + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinition" + } + } + } + }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -3886,7 +3852,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/ContentDefinitions/{contentDefinitionID}" : { "put" : { "tags" : [ "ContentDefinitions" ], "summary" : "Update a ContentDefinition", @@ -4026,16 +3994,14 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentDefinitions/{contentDefinitionID}/Attributes" : { - "post" : { + }, + "delete" : { "tags" : [ "ContentDefinitions" ], - "summary" : "Add an Attribute to a ContentDefinition", - "description" : "No Documentation Found.", - "operationId" : "ContentDefinitions_PostContentDefinitionAttribute", + "summary" : "Delete a ContentDefinition", + "description" : "Deletes an ContentDefinition. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "ContentDefinitions_DeleteContentDefinition", "parameters" : [ { - "description" : "The ID of the ContentDefinition", + "description" : "The ID of the ContentDefinition to delete", "required" : true, "schema" : { "format" : "int32", @@ -4044,86 +4010,14 @@ "in" : "path", "name" : "contentDefinitionID" } ], - "requestBody" : { - "description" : "The Attribute to add.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" - } - } - } - }, "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "application/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - } - } + "204" : { + "description" : "No Content" }, "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -4132,7 +4026,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/ContentDefinitions/{contentDefinitionID}/Attributes" : { "get" : { "tags" : [ "ContentDefinitions" ], "summary" : "Get Attributes for a ContentDefinition", @@ -4207,15 +4103,14 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentDefinitions/{contentDefinitionID}/Attributes/Batch" : { + }, "post" : { "tags" : [ "ContentDefinitions" ], - "summary" : "No Documentation Found.", + "summary" : "Add an Attribute to a ContentDefinition", "description" : "No Documentation Found.", - "operationId" : "ContentDefinitions_PostContentDefinitionAttributes", + "operationId" : "ContentDefinitions_PostContentDefinitionAttribute", "parameters" : [ { + "description" : "The ID of the ContentDefinition", "required" : true, "schema" : { "format" : "int32", @@ -4225,59 +4120,32 @@ "name" : "contentDefinitionID" } ], "requestBody" : { - "$ref" : "#/components/requestBodies/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttributeArray" - }, - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - } - }, - "/api/v2/ContentReleases" : { - "post" : { - "tags" : [ "ContentRelease" ], - "summary" : "Create a ContentReleaseVersion", - "description" : "Creates a ContentReleaseVersion. The body of the POST is the ContentReleaseVersion to create.\r\n The ContentReleaseId will be assigned on creation of the Job. When successful, the response\r\n is the contentReleaseId. If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "ContentRelease_PostContentRelease", - "requestBody" : { - "description" : "The ContentReleaseVersion to create.", + "description" : "The Attribute to add.", "required" : true, "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" } }, "application/x-www-form-urlencoded" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttribute" } } } @@ -4339,12 +4207,50 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "ContentRelease" ], - "summary" : "Get ContentReleaseVersion", - "description" : "Gets a collection of ContentReleaseVersion. When successful, the response is a PagedResponse of ContentReleaseVersion.\r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "ContentRelease_GetContentReleaseVersion", + } + }, + "/api/v2/ContentDefinitions/{contentDefinitionID}/Attributes/Batch" : { + "post" : { + "tags" : [ "ContentDefinitions" ], + "summary" : "No Documentation Found.", + "description" : "No Documentation Found.", + "operationId" : "ContentDefinitions_PostContentDefinitionAttributes", + "parameters" : [ { + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "contentDefinitionID" + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/ContentSubmission.Shared.BusinessEntities.ContentDefinitionAttributeArray" + }, + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/ContentReleases" : { + "get" : { + "tags" : [ "ContentRelease" ], + "summary" : "Get ContentReleaseVersion", + "description" : "Gets a collection of ContentReleaseVersion. When successful, the response is a PagedResponse of ContentReleaseVersion.\r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "ContentRelease_GetContentReleaseVersion", "parameters" : [ { "description" : "Optional. The page limit. If not specified, the default page limit is 10.", "required" : false, @@ -4441,32 +4347,92 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentReleases/{ContentReleaseId}" : { - "delete" : { + }, + "post" : { "tags" : [ "ContentRelease" ], - "summary" : "Delete a ContentReleaseVersion", - "description" : "Deletes an ContentReleaseVersion. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "ContentRelease_DeleteContentReleaseVersionn", - "parameters" : [ { - "description" : "The ID of the ContentReleaseVersion to delete", + "summary" : "Create a ContentReleaseVersion", + "description" : "Creates a ContentReleaseVersion. The body of the POST is the ContentReleaseVersion to create.\r\n The ContentReleaseId will be assigned on creation of the Job. When successful, the response\r\n is the contentReleaseId. If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "ContentRelease_PostContentRelease", + "requestBody" : { + "description" : "The ContentReleaseVersion to create.", "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "ContentReleaseId" - } ], + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentReleaseVersion" + } + } + } + }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -4475,7 +4441,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/ContentReleases/{ContentReleaseId}" : { "put" : { "tags" : [ "ContentRelease" ], "summary" : "Update a ContentReleaseVersion", @@ -4606,17 +4574,22 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentSubmissionAttributes/Batch" : { - "put" : { - "tags" : [ "ContentSubmissions" ], - "summary" : "No Documentation Found.", - "description" : "No Documentation Found.", - "operationId" : "ContentSubmissions_PutContentSubmissionAttributes", - "requestBody" : { - "$ref" : "#/components/requestBodies/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttributeArray" - }, + }, + "delete" : { + "tags" : [ "ContentRelease" ], + "summary" : "Delete a ContentReleaseVersion", + "description" : "Deletes an ContentReleaseVersion. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "ContentRelease_DeleteContentReleaseVersionn", + "parameters" : [ { + "description" : "The ID of the ContentReleaseVersion to delete", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "ContentReleaseId" + } ], "responses" : { "204" : { "description" : "No Content" @@ -4635,22 +4608,15 @@ "deprecated" : false } }, - "/api/v2/ContentSubmissionAttributes/{contentSubmissionAttributeID}" : { - "delete" : { + "/api/v2/ContentSubmissionAttributes/Batch" : { + "put" : { "tags" : [ "ContentSubmissions" ], - "summary" : "Remove an Attribute from a ContentSubmission", + "summary" : "No Documentation Found.", "description" : "No Documentation Found.", - "operationId" : "ContentSubmissions_DeleteContentSubmissionAttribute", - "parameters" : [ { - "description" : "The ID of the Attribute to remove.", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "contentSubmissionAttributeID" - } ], + "operationId" : "ContentSubmissions_PutContentSubmissionAttributes", + "requestBody" : { + "$ref" : "#/components/requestBodies/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttributeArray" + }, "responses" : { "204" : { "description" : "No Content" @@ -4667,7 +4633,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/ContentSubmissionAttributes/{contentSubmissionAttributeID}" : { "put" : { "tags" : [ "ContentSubmissions" ], "summary" : "Update an Attribute for a ContentSubmission", @@ -4730,43 +4698,88 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "ContentSubmissions" ], + "summary" : "Remove an Attribute from a ContentSubmission", + "description" : "No Documentation Found.", + "operationId" : "ContentSubmissions_DeleteContentSubmissionAttribute", + "parameters" : [ { + "description" : "The ID of the Attribute to remove.", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "contentSubmissionAttributeID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/ContentSubmissionTypes" : { - "post" : { + "get" : { "tags" : [ "ContentSubmissionTypes" ], - "summary" : "Add a Content Submission Type", + "summary" : "Returns available Content Submission Types.", "description" : "No Documentation Found.", - "operationId" : "ContentSubmissionTypes_PostContentSubmissionType", - "requestBody" : { - "$ref" : "#/components/requestBodies/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" - }, + "operationId" : "ContentSubmissionTypes_GetContentSubmissionTypes", + "parameters" : [ { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "enabled" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" + } } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" + } } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" + } + } + }, + "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" + } } } } @@ -4799,53 +4812,40 @@ }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "ContentSubmissionTypes" ], - "summary" : "Returns available Content Submission Types.", + "summary" : "Add a Content Submission Type", "description" : "No Documentation Found.", - "operationId" : "ContentSubmissionTypes_GetContentSubmissionTypes", - "parameters" : [ { - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "enabled" - } ], + "operationId" : "ContentSubmissionTypes_PostContentSubmissionType", + "requestBody" : { + "$ref" : "#/components/requestBodies/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" - } + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" - } + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" - } + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionType" - } + "format" : "int32", + "type" : "integer" } } } @@ -4880,38 +4880,6 @@ } }, "/api/v2/ContentSubmissionTypes/{id}" : { - "delete" : { - "tags" : [ "ContentSubmissionTypes" ], - "summary" : "Remove a Content Submission Type", - "description" : "No Documentation Found.", - "operationId" : "ContentSubmissionTypes_DeleteContentSubmissionType", - "parameters" : [ { - "description" : "The ID of the Content Submission Type", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "id" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "ContentSubmissionTypes" ], "summary" : "Update a Content Submission Type", @@ -5015,94 +4983,30 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentSubmissions" : { - "post" : { - "tags" : [ "ContentSubmissions" ], - "summary" : "Create a ContentSubmission", - "description" : "Creates a ContentSubmission. The body of the POST is the ContentSubmission to create.\r\n The ContentSubmissionID will be assigned on creation of the Job. When successful, the response\r\n is the ContentSubmissionID. If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "ContentSubmissions_PostContentSubmission", - "requestBody" : { - "description" : "The ContentSubmission to create.", + }, + "delete" : { + "tags" : [ "ContentSubmissionTypes" ], + "summary" : "Remove a Content Submission Type", + "description" : "No Documentation Found.", + "operationId" : "ContentSubmissionTypes_DeleteContentSubmissionType", + "parameters" : [ { + "description" : "The ID of the Content Submission Type", "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" - } - } - } - }, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "id" + } ], "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "application/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - } - } + "204" : { + "description" : "No Content" }, "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -5111,7 +5015,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/ContentSubmissions" : { "get" : { "tags" : [ "ContentSubmissions" ], "summary" : "Get ContentSubmissions", @@ -5230,58 +5136,14 @@ } }, "deprecated" : false - } - }, - "/api/v2/ContentSubmissions/{contentSubmissionID}" : { - "delete" : { - "tags" : [ "ContentSubmissions" ], - "summary" : "Delete a ContentSubmission", - "description" : "Deletes an ContentSubmission. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "ContentSubmissions_DeleteContentSubmission", - "parameters" : [ { - "description" : "The ID of the ContentSubmission to delete", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "contentSubmissionID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false }, - "put" : { + "post" : { "tags" : [ "ContentSubmissions" ], - "summary" : "Update a ContentSubmission", - "description" : "Updates a ContentSubmission. The body of the PUT is the updated ContentSubmission. \r\n When successful, the response is empty. If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "ContentSubmissions_PutContentSubmission", - "parameters" : [ { - "description" : "The ID of the ContentSubmission to update", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "contentSubmissionID" - } ], + "summary" : "Create a ContentSubmission", + "description" : "Creates a ContentSubmission. The body of the POST is the ContentSubmission to create.\r\n The ContentSubmissionID will be assigned on creation of the Job. When successful, the response\r\n is the ContentSubmissionID. If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "ContentSubmissions_PostContentSubmission", "requestBody" : { - "description" : "The updated ContentSubmission", + "description" : "The ContentSubmission to create.", "required" : true, "content" : { "application/json" : { @@ -5312,67 +5174,31 @@ } }, "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", + "200" : { + "description" : "OK", "content" : { - "*/*" : { + "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, - "get" : { - "tags" : [ "ContentSubmissions" ], - "summary" : "Get a ContentSubmission by ID", - "description" : "Gets a ContentSubmission by ID. When successful, the response is the requested ContentSubmission.\r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "ContentSubmissions_GetContentSubmission", - "parameters" : [ { - "description" : "The ID of the ContentSubmission to get.", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "contentSubmissionID" - }, { - "description" : "Names of Attributes to include when retrieving this submission. This should be a comma-separated list.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "includeAttributes" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" + "format" : "int32", + "type" : "integer" } } } @@ -5406,14 +5232,14 @@ "deprecated" : false } }, - "/api/v2/ContentSubmissions/{contentSubmissionID}/Attributes" : { - "post" : { + "/api/v2/ContentSubmissions/{contentSubmissionID}" : { + "put" : { "tags" : [ "ContentSubmissions" ], - "summary" : "Add an Attribute to a ContentSubmission", - "description" : "No Documentation Found.", - "operationId" : "ContentSubmissions_PostContentSubmissionAttribute", + "summary" : "Update a ContentSubmission", + "description" : "Updates a ContentSubmission. The body of the PUT is the updated ContentSubmission. \r\n When successful, the response is empty. If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "ContentSubmissions_PutContentSubmission", "parameters" : [ { - "description" : "The ID of the ContentSubmission", + "description" : "The ID of the ContentSubmission to update", "required" : true, "schema" : { "format" : "int32", @@ -5423,62 +5249,98 @@ "name" : "contentSubmissionID" } ], "requestBody" : { - "description" : "The Attribute to add.", + "description" : "The updated ContentSubmission", "required" : true, "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "application/x-www-form-urlencoded" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } } } }, + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, + "get" : { + "tags" : [ "ContentSubmissions" ], + "summary" : "Get a ContentSubmission by ID", + "description" : "Gets a ContentSubmission by ID. When successful, the response is the requested ContentSubmission.\r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "ContentSubmissions_GetContentSubmission", + "parameters" : [ { + "description" : "The ID of the ContentSubmission to get.", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "contentSubmissionID" + }, { + "description" : "Names of Attributes to include when retrieving this submission. This should be a comma-separated list.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "includeAttributes" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmission" } } } @@ -5511,6 +5373,40 @@ }, "deprecated" : false }, + "delete" : { + "tags" : [ "ContentSubmissions" ], + "summary" : "Delete a ContentSubmission", + "description" : "Deletes an ContentSubmission. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "ContentSubmissions_DeleteContentSubmission", + "parameters" : [ { + "description" : "The ID of the ContentSubmission to delete", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "contentSubmissionID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/ContentSubmissions/{contentSubmissionID}/Attributes" : { "get" : { "tags" : [ "ContentSubmissions" ], "summary" : "Get Attributes for a ContentSubmission", @@ -5585,6 +5481,110 @@ } }, "deprecated" : false + }, + "post" : { + "tags" : [ "ContentSubmissions" ], + "summary" : "Add an Attribute to a ContentSubmission", + "description" : "No Documentation Found.", + "operationId" : "ContentSubmissions_PostContentSubmissionAttribute", + "parameters" : [ { + "description" : "The ID of the ContentSubmission", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "contentSubmissionID" + } ], + "requestBody" : { + "description" : "The Attribute to add.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/ContentSubmission.Shared.BusinessEntities.ContentSubmissionAttribute" + } + } + } + }, + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/ContentSubmissions/{contentSubmissionID}/Attributes/Batch" : { @@ -5838,64 +5838,60 @@ } }, "/api/v2/Files" : { - "post" : { + "get" : { "tags" : [ "Files" ], - "summary" : "Create the metadata for a file before uploading. The State of the File should be 'Created'.", + "summary" : "Get a paged response of file metadata.", "description" : "No Documentation Found.", - "operationId" : "Files_PostFile", - "requestBody" : { - "description" : "The file's metadata.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" - } - } - } - }, + "operationId" : "Files_GetFiles", + "parameters" : [ { + "description" : "Indicates whether to include files marked as removed.", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "includeDeleted" + }, { + "description" : "Optional. The page limit. The default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. The default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" } }, "application/xml" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" } }, "text/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" } }, "text/xml" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" } } } @@ -5928,60 +5924,64 @@ }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "Files" ], - "summary" : "Get a paged response of file metadata.", + "summary" : "Create the metadata for a file before uploading. The State of the File should be 'Created'.", "description" : "No Documentation Found.", - "operationId" : "Files_GetFiles", - "parameters" : [ { - "description" : "Indicates whether to include files marked as removed.", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "includeDeleted" - }, { - "description" : "Optional. The page limit. The default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. The default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - } ], + "operationId" : "Files_PostFile", + "requestBody" : { + "description" : "The file's metadata.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.FileDownload" + } + } + } + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" + "type" : "string" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" + "type" : "string" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" + "type" : "string" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.FileDownload_" + "type" : "string" } } } @@ -6016,37 +6016,6 @@ } }, "/api/v2/Files/{ID}" : { - "delete" : { - "tags" : [ "Files" ], - "summary" : "Mark a file as 'Removed'. Disables download of the file and hides metadata from GET all method", - "description" : "No Documentation Found.", - "operationId" : "Files_DeleteFile", - "parameters" : [ { - "description" : "The file's id.", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "ID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Files" ], "summary" : "Update the metadata for a file. Size may not be modified by the client.", @@ -6175,6 +6144,37 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Files" ], + "summary" : "Mark a file as 'Removed'. Disables download of the file and hides metadata from GET all method", + "description" : "No Documentation Found.", + "operationId" : "Files_DeleteFile", + "parameters" : [ { + "description" : "The file's id.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/Files/{ID}/FileContents" : { @@ -6316,96 +6316,6 @@ } }, "/api/v2/GlobalImageCategories" : { - "post" : { - "tags" : [ "GlobalImageCategories" ], - "summary" : "Create the metadata for a file before uploading. The State should be 'Created'.", - "description" : "No Documentation Found.", - "operationId" : "GlobalImageCategories_PostFile", - "requestBody" : { - "description" : "The file's metadata.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" - } - } - } - }, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - }, - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "text/json" : { - "schema" : { - "type" : "string" - } - }, - "text/xml" : { - "schema" : { - "type" : "string" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "get" : { "tags" : [ "GlobalImageCategories" ], "summary" : "Get a paged response of file metadata.", @@ -6424,81 +6334,11 @@ "description" : "Optional. The page offset. The default page offset is 0.", "required" : false, "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - } - }, - "/api/v2/GlobalImageCategories/{ID}" : { - "get" : { - "tags" : [ "GlobalImageCategories" ], - "summary" : "Gets a file's metadata.", - "description" : "No Documentation Found.", - "operationId" : "GlobalImageCategories_GetFile", - "parameters" : [ { - "description" : "The file's id.", - "required" : true, - "schema" : { - "type" : "string" + "format" : "int32", + "type" : "integer" }, - "in" : "path", - "name" : "ID" + "in" : "query", + "name" : "offset" } ], "responses" : { "200" : { @@ -6506,22 +6346,22 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.GlobalImageCategory_" } } } @@ -6553,50 +6393,39 @@ } }, "deprecated" : false - } - }, - "/api/v2/GlobalImages" : { + }, "post" : { - "tags" : [ "GlobalImages" ], - "summary" : "Create the metadata for a GlobalImage before uploading. The State should be 'Created'.", + "tags" : [ "GlobalImageCategories" ], + "summary" : "Create the metadata for a file before uploading. The State should be 'Created'.", "description" : "No Documentation Found.", - "operationId" : "GlobalImages_PostGlobalImage", - "parameters" : [ { - "description" : "Whether to set the publisher and date to the provided values.", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "overridePublisherOrDate" - } ], + "operationId" : "GlobalImageCategories_PostFile", "requestBody" : { "description" : "The file's metadata.", "required" : true, "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" } }, "application/x-www-form-urlencoded" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" } } } @@ -6654,7 +6483,79 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/GlobalImageCategories/{ID}" : { + "get" : { + "tags" : [ "GlobalImageCategories" ], + "summary" : "Gets a file's metadata.", + "description" : "No Documentation Found.", + "operationId" : "GlobalImageCategories_GetFile", + "parameters" : [ { + "description" : "The file's id.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImageCategory" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/GlobalImages" : { "get" : { "tags" : [ "GlobalImages" ], "summary" : "Get a paged response of GlobalImage.", @@ -6762,31 +6663,97 @@ } }, "deprecated" : false - } - }, - "/api/v2/GlobalImages/{ID}" : { - "delete" : { + }, + "post" : { "tags" : [ "GlobalImages" ], - "summary" : "Mark a file as 'Removed'. Disables download of the image and hides metadata from GET all method", + "summary" : "Create the metadata for a GlobalImage before uploading. The State should be 'Created'.", "description" : "No Documentation Found.", - "operationId" : "GlobalImages_DeleteFile", + "operationId" : "GlobalImages_PostGlobalImage", "parameters" : [ { - "description" : "The GlobalImage's id.", - "required" : true, + "description" : "Whether to set the publisher and date to the provided values.", + "required" : false, "schema" : { - "type" : "string" + "type" : "boolean" }, - "in" : "path", - "name" : "ID" + "in" : "query", + "name" : "overridePublisherOrDate" } ], + "requestBody" : { + "description" : "The file's metadata.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/GlobalResources.Shared.Models.GlobalImage" + } + } + } + }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + }, + "application/xml" : { + "schema" : { + "type" : "string" + } + }, + "text/json" : { + "schema" : { + "type" : "string" + } + }, + "text/xml" : { + "schema" : { + "type" : "string" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -6795,7 +6762,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/GlobalImages/{ID}" : { "put" : { "tags" : [ "GlobalImages" ], "summary" : "Update the metadata for an image.", @@ -6909,22 +6878,53 @@ "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, + "delete" : { + "tags" : [ "GlobalImages" ], + "summary" : "Mark a file as 'Removed'. Disables download of the image and hides metadata from GET all method", + "description" : "No Documentation Found.", + "operationId" : "GlobalImages_DeleteFile", + "parameters" : [ { + "description" : "The GlobalImage's id.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -7090,40 +7090,60 @@ } }, "/api/v2/Languages" : { - "post" : { + "get" : { "tags" : [ "Languages" ], - "summary" : "Add a Language to support for translations. Accepts a Language object. Returns the Id of the created object.", + "summary" : "Get a list of the languages for which translations are supported. Returns a PagedResponse of Language objects.", "description" : "No Documentation Found.", - "operationId" : "Languages_CreateLanguage", - "requestBody" : { - "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.Language" - }, + "operationId" : "Languages_GetLanguages", + "parameters" : [ { + "description" : "limit the number of Language objects returned. Optional (defaults to 10).", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "the number of Language objects to skip. Optional (defaults to 0).", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "whether to include languages marked as deleted. Defaults to false", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "includeDeleted" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" } } } @@ -7156,60 +7176,40 @@ }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "Languages" ], - "summary" : "Get a list of the languages for which translations are supported. Returns a PagedResponse of Language objects.", + "summary" : "Add a Language to support for translations. Accepts a Language object. Returns the Id of the created object.", "description" : "No Documentation Found.", - "operationId" : "Languages_GetLanguages", - "parameters" : [ { - "description" : "limit the number of Language objects returned. Optional (defaults to 10).", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "the number of Language objects to skip. Optional (defaults to 0).", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "whether to include languages marked as deleted. Defaults to false", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "includeDeleted" - } ], + "operationId" : "Languages_CreateLanguage", + "requestBody" : { + "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.Language" + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.Language_" + "format" : "int32", + "type" : "integer" } } } @@ -7244,37 +7244,6 @@ } }, "/api/v2/Languages/{LocaleID}" : { - "delete" : { - "tags" : [ "Languages" ], - "summary" : "Remove a Language from those supported for translations. Marks language as deleted.", - "description" : "No Documentation Found.", - "operationId" : "Languages_DeleteLanguage", - "parameters" : [ { - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "LocaleID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Languages" ], "summary" : "Update a language��s description. Accepts a Language object.", @@ -7376,6 +7345,37 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Languages" ], + "summary" : "Remove a Language from those supported for translations. Marks language as deleted.", + "description" : "No Documentation Found.", + "operationId" : "Languages_DeleteLanguage", + "parameters" : [ { + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "LocaleID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/LicenseActivations" : { @@ -7882,19 +7882,29 @@ } }, "/api/v2/Logs" : { - "post" : { + "get" : { "tags" : [ "Logs" ], - "summary" : "Add a Log entry", + "summary" : "Get the API System logs, most recent first.", "description" : "No Documentation Found.", - "operationId" : "Logs_PostLog", + "operationId" : "Logs_GetLogs", "parameters" : [ { - "description" : "Message to enter into the log", - "required" : true, + "description" : "Optional. The page limit. The default page limit is 10.", + "required" : false, "schema" : { - "type" : "string" + "format" : "int32", + "type" : "integer" }, "in" : "query", - "name" : "Message" + "name" : "limit" + }, { + "description" : "Optional. The page offset. The default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" } ], "responses" : { "200" : { @@ -7902,22 +7912,12 @@ "content" : { "application/json" : { "schema" : { - "type" : "string" - } - }, - "application/xml" : { - "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Log_" } }, "text/json" : { "schema" : { - "type" : "string" - } - }, - "text/xml" : { - "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Log_" } } } @@ -7930,49 +7930,29 @@ "$ref" : "#/components/schemas/API.Models.ApiError" } }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } } } } }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "Logs" ], - "summary" : "Get the API System logs, most recent first.", + "summary" : "Add a Log entry", "description" : "No Documentation Found.", - "operationId" : "Logs_GetLogs", + "operationId" : "Logs_PostLog", "parameters" : [ { - "description" : "Optional. The page limit. The default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. The default page offset is 0.", - "required" : false, + "description" : "Message to enter into the log", + "required" : true, "schema" : { - "format" : "int32", - "type" : "integer" + "type" : "string" }, "in" : "query", - "name" : "offset" + "name" : "Message" } ], "responses" : { "200" : { @@ -7980,12 +7960,22 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Log_" + "type" : "string" + } + }, + "application/xml" : { + "schema" : { + "type" : "string" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Log_" + "type" : "string" + } + }, + "text/xml" : { + "schema" : { + "type" : "string" } } } @@ -7998,10 +7988,20 @@ "$ref" : "#/components/schemas/API.Models.ApiError" } }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } } } } @@ -8135,6 +8135,73 @@ } }, "/api/v2/PackageTypes" : { + "get" : { + "tags" : [ "PackageTypes" ], + "summary" : "Get all of the Package Types.", + "description" : "No Documentation Found.", + "operationId" : "PackageTypes_Get", + "parameters" : [ { + "description" : "Optional. The page limit. The default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. The default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Optional. The user ID to sort packageTypes by the user's access", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "userID" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageType_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageType_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, "post" : { "tags" : [ "PackageTypes" ], "summary" : "Add a Package Type.", @@ -8224,107 +8291,9 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "PackageTypes" ], - "summary" : "Get all of the Package Types.", - "description" : "No Documentation Found.", - "operationId" : "PackageTypes_Get", - "parameters" : [ { - "description" : "Optional. The page limit. The default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. The default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Optional. The user ID to sort packageTypes by the user's access", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "userID" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageType_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageType_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/PackageTypes/{ID}" : { - "delete" : { - "tags" : [ "PackageTypes" ], - "summary" : "Delete a Package Type.", - "description" : "No Documentation Found.", - "operationId" : "PackageTypes_Delete", - "parameters" : [ { - "description" : "The Package Type ID", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "ID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "PackageTypes" ], "summary" : "Modify a Package Type.", @@ -8453,6 +8422,37 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "PackageTypes" ], + "summary" : "Delete a Package Type.", + "description" : "No Documentation Found.", + "operationId" : "PackageTypes_Delete", + "parameters" : [ { + "description" : "The Package Type ID", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/PackageTypes/{id}/Users/{userID}" : { @@ -8538,13 +8538,13 @@ } }, "/api/v2/PackageTypetoBundles" : { - "post" : { + "put" : { "tags" : [ "PackageTypetoBundles" ], - "summary" : "Add a new Package Type ID to Bundle Relationship.", + "summary" : "Update a Package Type ID to Bundle Relationship.", "description" : "No Documentation Found.", - "operationId" : "PackageTypetoBundles_Post", + "operationId" : "PackageTypetoBundles_Put", "requestBody" : { - "description" : "The PackageTypeToBundle to add.", + "description" : "The PackageTypeToBundle to update.", "required" : true, "content" : { "application/json" : { @@ -8591,36 +8591,63 @@ }, "deprecated" : false }, - "delete" : { + "get" : { "tags" : [ "PackageTypetoBundles" ], - "summary" : "Delete a Package Type to Bundle Relationship.", + "summary" : "Get all of the Package Type to Bundle Relationships.", "description" : "No Documentation Found.", - "operationId" : "PackageTypetoBundles_Delete", + "operationId" : "PackageTypetoBundles_Get", "parameters" : [ { - "description" : "The BundleID", - "required" : true, + "description" : "Optional. Filter by BundleID.", + "required" : false, "schema" : { "type" : "string" }, "in" : "query", "name" : "BundleID" }, { - "description" : "The PackageTypeID", - "required" : true, + "description" : "Optional. The page limit. The default page limit is 10.", + "required" : false, "schema" : { - "type" : "string" + "format" : "int32", + "type" : "integer" }, "in" : "query", - "name" : "PackageTypeID" + "name" : "limit" + }, { + "description" : "Optional. The page offset. The default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" } ], "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageTypeIDtoBundle_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageTypeIDtoBundle_" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -8630,13 +8657,13 @@ }, "deprecated" : false }, - "put" : { + "post" : { "tags" : [ "PackageTypetoBundles" ], - "summary" : "Update a Package Type ID to Bundle Relationship.", + "summary" : "Add a new Package Type ID to Bundle Relationship.", "description" : "No Documentation Found.", - "operationId" : "PackageTypetoBundles_Put", + "operationId" : "PackageTypetoBundles_Post", "requestBody" : { - "description" : "The PackageTypeToBundle to update.", + "description" : "The PackageTypeToBundle to add.", "required" : true, "content" : { "application/json" : { @@ -8683,20 +8710,53 @@ }, "deprecated" : false }, - "get" : { + "delete" : { "tags" : [ "PackageTypetoBundles" ], - "summary" : "Get all of the Package Type to Bundle Relationships.", + "summary" : "Delete a Package Type to Bundle Relationship.", "description" : "No Documentation Found.", - "operationId" : "PackageTypetoBundles_Get", + "operationId" : "PackageTypetoBundles_Delete", "parameters" : [ { - "description" : "Optional. Filter by BundleID.", - "required" : false, + "description" : "The BundleID", + "required" : true, "schema" : { "type" : "string" }, "in" : "query", "name" : "BundleID" }, { + "description" : "The PackageTypeID", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "PackageTypeID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/Packages" : { + "get" : { + "tags" : [ "Packages" ], + "summary" : "List Packages.", + "description" : "No Documentation Found.", + "operationId" : "Packages_GetPackages", + "parameters" : [ { "description" : "Optional. The page limit. The default page limit is 10.", "required" : false, "schema" : { @@ -8721,12 +8781,12 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageTypeIDtoBundle_" + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.Package_" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PackageTypeIDtoBundle_" + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.Package_" } } } @@ -8748,9 +8808,7 @@ } }, "deprecated" : false - } - }, - "/api/v2/Packages" : { + }, "post" : { "tags" : [ "Packages" ], "summary" : "Add a Package to the Update System.", @@ -8840,98 +8898,9 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "Packages" ], - "summary" : "List Packages.", - "description" : "No Documentation Found.", - "operationId" : "Packages_GetPackages", - "parameters" : [ { - "description" : "Optional. The page limit. The default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. The default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.Package_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.Package_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/Packages/{ID}" : { - "delete" : { - "tags" : [ "Packages" ], - "summary" : "Delete a Package.", - "description" : "No Documentation Found.", - "operationId" : "Packages_DeletePackage", - "parameters" : [ { - "description" : "The Package ID to Delete", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "ID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Packages" ], "summary" : "Modify a Packge to the Update System.", @@ -9044,26 +9013,108 @@ }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, + "delete" : { + "tags" : [ "Packages" ], + "summary" : "Delete a Package.", + "description" : "No Documentation Found.", + "operationId" : "Packages_DeletePackage", + "parameters" : [ { + "description" : "The Package ID to Delete", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/Permissions" : { + "get" : { + "tags" : [ "Permissions" ], + "summary" : "List Permissions", + "description" : "No Documentation Found.", + "operationId" : "Permissions_GetPermissions", + "parameters" : [ { + "description" : "Optional. The page limit. The default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. The default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Filter by permission name. Supports ending wildcard (*). Optional.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "name" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Permission_" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" + "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Permission_" } } } } }, "deprecated" : false - } - }, - "/api/v2/Permissions" : { + }, "post" : { "tags" : [ "Permissions" ], "summary" : "Adds a Permission", @@ -9132,82 +9183,9 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "Permissions" ], - "summary" : "List Permissions", - "description" : "No Documentation Found.", - "operationId" : "Permissions_GetPermissions", - "parameters" : [ { - "description" : "Optional. The page limit. The default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. The default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Filter by permission name. Supports ending wildcard (*). Optional.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "name" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Permission_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Permission_" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/Permissions/{id}" : { - "delete" : { - "tags" : [ "Permissions" ], - "summary" : "Deletes a Permission", - "description" : "No Documentation Found.", - "operationId" : "Permissions_DeletePermission", - "parameters" : [ { - "description" : "Id of Permission", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "id" - } ], - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Permissions" ], "summary" : "Updates a Permission", @@ -9304,9 +9282,106 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Permissions" ], + "summary" : "Deletes a Permission", + "description" : "No Documentation Found.", + "operationId" : "Permissions_DeletePermission", + "parameters" : [ { + "description" : "Id of Permission", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "204" : { + "description" : "No Content" + } + }, + "deprecated" : false } }, "/api/v2/PriorityPackages" : { + "get" : { + "tags" : [ "PriorityPackages" ], + "summary" : "Get a list of Priority Packages by Client.", + "description" : "No Documentation Found.", + "operationId" : "PriorityPackages_GetPriorityPackages", + "parameters" : [ { + "description" : "Optional. Filter priority packages by ClientID.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "ClientID" + }, { + "description" : "Optional. Filter returned packages by status. By default only active packages will be returned.", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "Active", "Completed", "All" ] + }, + "in" : "query", + "name" : "Status" + }, { + "description" : "Optional. The page limit. The default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. The default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PriorityPackage_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PriorityPackage_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, "post" : { "tags" : [ "PriorityPackages" ], "summary" : "Add a Priority Package for a Client.", @@ -9396,47 +9471,22 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/PriorityPackages/{ID}" : { "get" : { "tags" : [ "PriorityPackages" ], - "summary" : "Get a list of Priority Packages by Client.", + "summary" : "Get a Priority Packages for a Client.", "description" : "No Documentation Found.", - "operationId" : "PriorityPackages_GetPriorityPackages", + "operationId" : "PriorityPackages_GetPriorityPackage", "parameters" : [ { - "description" : "Optional. Filter priority packages by ClientID.", - "required" : false, + "description" : "The Priority Package ID", + "required" : true, "schema" : { "type" : "string" }, - "in" : "query", - "name" : "ClientID" - }, { - "description" : "Optional. Filter returned packages by status. By default only active packages will be returned.", - "required" : false, - "schema" : { - "type" : "string", - "enum" : [ "Active", "Completed", "All" ] - }, - "in" : "query", - "name" : "Status" - }, { - "description" : "Optional. The page limit. The default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. The default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" + "in" : "path", + "name" : "ID" } ], "responses" : { "200" : { @@ -9444,12 +9494,22 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PriorityPackage_" + "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_UpdateSystem.Models.PriorityPackage_" + "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" } } } @@ -9462,18 +9522,26 @@ "$ref" : "#/components/schemas/API.Models.ApiError" } }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } } } } }, "deprecated" : false - } - }, - "/api/v2/PriorityPackages/{ID}" : { + }, "delete" : { "tags" : [ "PriorityPackages" ], "summary" : "Delete a Priority Package for a Client.", @@ -9504,20 +9572,48 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/Releases" : { "get" : { - "tags" : [ "PriorityPackages" ], - "summary" : "Get a Priority Packages for a Client.", - "description" : "No Documentation Found.", - "operationId" : "PriorityPackages_GetPriorityPackage", + "tags" : [ "Release" ], + "summary" : "Get Release", + "description" : "Gets a collection of Release. When successful, the response is a PagedResponse of Release.\r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "Release_GetReleases", "parameters" : [ { - "description" : "The Priority Package ID", - "required" : true, + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Optional. Filter by visible.", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "visible" + }, { + "description" : "Optional. Filter by BundleID.", + "required" : false, "schema" : { "type" : "string" }, - "in" : "path", - "name" : "ID" + "in" : "query", + "name" : "bundleID" } ], "responses" : { "200" : { @@ -9525,22 +9621,12 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" + "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.Release_" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.PriorityPackage" + "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.Release_" } } } @@ -9553,28 +9639,16 @@ "$ref" : "#/components/schemas/API.Models.ApiError" } }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } } } } }, "deprecated" : false - } - }, - "/api/v2/Releases" : { + }, "post" : { "tags" : [ "Release" ], "summary" : "Create a Release", @@ -9668,80 +9742,6 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "Release" ], - "summary" : "Get Release", - "description" : "Gets a collection of Release. When successful, the response is a PagedResponse of Release.\r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "Release_GetReleases", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Optional. Filter by visible.", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "visible" - }, { - "description" : "Optional. Filter by BundleID.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "bundleID" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.Release_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.Release_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/Releases/{ReleaseId}" : { @@ -10757,75 +10757,6 @@ } }, "/api/v2/Roles" : { - "post" : { - "tags" : [ "Roles" ], - "summary" : "Adds a User Role", - "description" : "No Documentation Found.", - "operationId" : "Roles_PostRole", - "requestBody" : { - "description" : "Role to add", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.Role" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.Role" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.Role" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.Role" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.Role" - } - } - } - }, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "application/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - } - } - } - }, - "deprecated" : false - }, "get" : { "tags" : [ "Roles" ], "summary" : "List Roles", @@ -10864,12 +10795,81 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Role_" + "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Role_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Role_" + } + } + } + } + }, + "deprecated" : false + }, + "post" : { + "tags" : [ "Roles" ], + "summary" : "Adds a User Role", + "description" : "No Documentation Found.", + "operationId" : "Roles_PostRole", + "requestBody" : { + "description" : "Role to add", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.Role" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.Role" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.Role" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.Role" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.Role" + } + } + } + }, + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_API.Models.Role_" + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" } } } @@ -10879,28 +10879,6 @@ } }, "/api/v2/Roles/{id}" : { - "delete" : { - "tags" : [ "Roles" ], - "summary" : "Deletes a User Role", - "description" : "No Documentation Found.", - "operationId" : "Roles_DeleteRole", - "parameters" : [ { - "description" : "The role's id", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "id" - } ], - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Roles" ], "summary" : "Updates a User Role", @@ -10997,6 +10975,28 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Roles" ], + "summary" : "Deletes a User Role", + "description" : "No Documentation Found.", + "operationId" : "Roles_DeleteRole", + "parameters" : [ { + "description" : "The role's id", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "204" : { + "description" : "No Content" + } + }, + "deprecated" : false } }, "/api/v2/Roles/{id}/Permissions" : { @@ -11419,13 +11419,13 @@ } }, "/api/v2/StringDefinitions/Batch" : { - "post" : { + "put" : { "tags" : [ "StringDefinitions" ], - "summary" : "Create StringDefinition object. The originating translation must be provided. Accepts an array of StringDefinition objects. Returns nothing.", + "summary" : "Update StringDefinition objects. Accepts an array of StringDefinition objects. This endpoint will add StringDefinitionChange objects to the database. The DescriptionForTranslator may not be modified after a String is submitted for translation.", "description" : "No Documentation Found.", - "operationId" : "StringDefinitions_PostDefinition", + "operationId" : "StringDefinitions_UpdateDefinitions", "requestBody" : { - "description" : "The StringDefinition Object array, along with originating translation.", + "description" : "The Array of Definitions to update", "required" : true, "content" : { "application/json" : { @@ -11487,13 +11487,13 @@ }, "deprecated" : false }, - "put" : { + "post" : { "tags" : [ "StringDefinitions" ], - "summary" : "Update StringDefinition objects. Accepts an array of StringDefinition objects. This endpoint will add StringDefinitionChange objects to the database. The DescriptionForTranslator may not be modified after a String is submitted for translation.", + "summary" : "Create StringDefinition object. The originating translation must be provided. Accepts an array of StringDefinition objects. Returns nothing.", "description" : "No Documentation Found.", - "operationId" : "StringDefinitions_UpdateDefinitions", + "operationId" : "StringDefinitions_PostDefinition", "requestBody" : { - "description" : "The Array of Definitions to update", + "description" : "The StringDefinition Object array, along with originating translation.", "required" : true, "content" : { "application/json" : { @@ -11943,40 +11943,57 @@ } }, "/api/v2/TranslationKeys" : { - "post" : { + "get" : { "tags" : [ "TranslationKeys" ], - "summary" : "Create a translationKey object.", - "description" : "No Documentation Found.", - "operationId" : "TranslationKeys_CreateTranslationKey", - "requestBody" : { - "$ref" : "#/components/requestBodies/OASSupport.Shared.Models.TranslationKey" - }, + "summary" : "Get a paged response of TranslationKeys.", + "operationId" : "TranslationKeys_Get", + "parameters" : [ { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Can filter by keyNames, a comma deliminated list.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "keyNames" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" } } } @@ -12009,57 +12026,40 @@ }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "TranslationKeys" ], - "summary" : "Get a paged response of TranslationKeys.", - "operationId" : "TranslationKeys_Get", - "parameters" : [ { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Can filter by keyNames, a comma deliminated list.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "keyNames" - } ], + "summary" : "Create a translationKey object.", + "description" : "No Documentation Found.", + "operationId" : "TranslationKeys_CreateTranslationKey", + "requestBody" : { + "$ref" : "#/components/requestBodies/OASSupport.Shared.Models.TranslationKey" + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_OASSupport.Shared.Models.TranslationKey_" + "format" : "int32", + "type" : "integer" } } } @@ -12198,40 +12198,50 @@ } }, "/api/v2/TranslationRequests" : { - "post" : { + "get" : { "tags" : [ "TranslationRequests" ], - "summary" : "Create a translation request. Accepts a TranslationRequest object. Returns the Id of the created object. The state of the TranslationRequest must be ��NotSubmitted��.", + "summary" : "Get all TranslationRequest objects. Returns a PagedResponse of TranslationRequest objects with their language ids and string ids.", "description" : "No Documentation Found.", - "operationId" : "TranslationRequests_CreateTranslationRequest", - "requestBody" : { - "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.TranslationRequest" - }, + "operationId" : "TranslationRequests_GetTranslationRequests", + "parameters" : [ { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" } } } @@ -12254,60 +12264,50 @@ "$ref" : "#/components/schemas/API.Models.ApiError" } }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, - "get" : { - "tags" : [ "TranslationRequests" ], - "summary" : "Get all TranslationRequest objects. Returns a PagedResponse of TranslationRequest objects with their language ids and string ids.", - "description" : "No Documentation Found.", - "operationId" : "TranslationRequests_GetTranslationRequests", - "parameters" : [ { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - } ], + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, + "post" : { + "tags" : [ "TranslationRequests" ], + "summary" : "Create a translation request. Accepts a TranslationRequest object. Returns the Id of the created object. The state of the TranslationRequest must be ��NotSubmitted��.", + "description" : "No Documentation Found.", + "operationId" : "TranslationRequests_CreateTranslationRequest", + "requestBody" : { + "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.TranslationRequest" + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationRequest_" + "format" : "int32", + "type" : "integer" } } } @@ -12558,11 +12558,11 @@ } }, "/api/v2/TranslationSetAttributes/{ID}" : { - "delete" : { + "put" : { "tags" : [ "TranslationSets" ], - "summary" : "Delete a set of TranslationSetAttribute object", + "summary" : "Update a TranslationSetAttribute object", "description" : "No Documentation Found.", - "operationId" : "TranslationSets_DeleteTranslationSetAttribute", + "operationId" : "TranslationSets_UpdateTranslationSetAttribute", "parameters" : [ { "required" : true, "schema" : { @@ -12572,6 +12572,9 @@ "in" : "path", "name" : "ID" } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.TranslationSetAttribute" + }, "responses" : { "204" : { "description" : "No Content" @@ -12589,11 +12592,11 @@ }, "deprecated" : false }, - "put" : { + "delete" : { "tags" : [ "TranslationSets" ], - "summary" : "Update a TranslationSetAttribute object", + "summary" : "Delete a set of TranslationSetAttribute object", "description" : "No Documentation Found.", - "operationId" : "TranslationSets_UpdateTranslationSetAttribute", + "operationId" : "TranslationSets_DeleteTranslationSetAttribute", "parameters" : [ { "required" : true, "schema" : { @@ -12603,9 +12606,6 @@ "in" : "path", "name" : "ID" } ], - "requestBody" : { - "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.TranslationSetAttribute" - }, "responses" : { "204" : { "description" : "No Content" @@ -12881,11 +12881,11 @@ } }, "/api/v2/TranslationSets/{ID}/Attributes" : { - "post" : { + "get" : { "tags" : [ "TranslationSets" ], - "summary" : "Create a TranslationSetAttribute object", + "summary" : "Get a PagedResponse of TranslationSetAttribute objects", "description" : "No Documentation Found.", - "operationId" : "TranslationSets_PostTranslationSetAttribute", + "operationId" : "TranslationSets_GetTranslationSetAttributes", "parameters" : [ { "required" : true, "schema" : { @@ -12894,36 +12894,52 @@ }, "in" : "path", "name" : "ID" + }, { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "name" } ], - "requestBody" : { - "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.TranslationSetAttribute" - }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" } } } @@ -12956,11 +12972,11 @@ }, "deprecated" : false }, - "get" : { + "post" : { "tags" : [ "TranslationSets" ], - "summary" : "Get a PagedResponse of TranslationSetAttribute objects", + "summary" : "Create a TranslationSetAttribute object", "description" : "No Documentation Found.", - "operationId" : "TranslationSets_GetTranslationSetAttributes", + "operationId" : "TranslationSets_PostTranslationSetAttribute", "parameters" : [ { "required" : true, "schema" : { @@ -12969,52 +12985,36 @@ }, "in" : "path", "name" : "ID" - }, { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "name" } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/GlobalResources.Shared.Models.TranslationSetAttribute" + }, "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" + "format" : "int32", + "type" : "integer" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" + "format" : "int32", + "type" : "integer" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetAttribute_" + "format" : "int32", + "type" : "integer" } } } @@ -13319,148 +13319,56 @@ }, "get" : { "tags" : [ "TranslationSets" ], - "summary" : "Get a PagedResponse of TranslationSetString objects", - "description" : "No Documentation Found.", - "operationId" : "TranslationSets_GetTranslationSetStrings", - "parameters" : [ { - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "ID" - }, { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - } - }, - "/api/v2/UpdateGroupClientRelationships" : { - "post" : { - "tags" : [ "UpdateGroupClientRelationships" ], - "summary" : "Add a subscription", - "description" : "No Documentation Found.", - "operationId" : "UpdateGroupClientRelationships_PostSubscription", - "requestBody" : { - "description" : "The UpdateGroupClientRelationship to add.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" - } - } - } - }, + "summary" : "Get a PagedResponse of TranslationSetString objects", + "description" : "No Documentation Found.", + "operationId" : "TranslationSets_GetTranslationSetStrings", + "parameters" : [ { + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "ID" + }, { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" } }, "application/xml" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" } }, "text/json" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" } }, "text/xml" : { "schema" : { - "type" : "string" + "$ref" : "#/components/schemas/API.IPagedResponse_GlobalResources.Shared.Models.TranslationSetString_" } } } @@ -13492,7 +13400,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/UpdateGroupClientRelationships" : { "put" : { "tags" : [ "UpdateGroupClientRelationships" ], "summary" : "DEPRECATED. Set client subscription status for an update group.", @@ -13613,25 +13523,14 @@ } }, "deprecated" : false - } - }, - "/api/v2/UpdateGroupClientRelationships/{RelationshipID}" : { - "put" : { + }, + "post" : { "tags" : [ "UpdateGroupClientRelationships" ], - "summary" : "Updates a Subscription", + "summary" : "Add a subscription", "description" : "No Documentation Found.", - "operationId" : "UpdateGroupClientRelationships_PutSubscription", - "parameters" : [ { - "description" : "The relationship id of the UpdateGroupClientRelationship", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "RelationshipID" - } ], + "operationId" : "UpdateGroupClientRelationships_PostSubscription", "requestBody" : { - "description" : "The updated UpdateGroupClientRelationship", + "description" : "The UpdateGroupClientRelationship to add.", "required" : true, "content" : { "application/json" : { @@ -13661,59 +13560,28 @@ } } }, - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, - "get" : { - "tags" : [ "UpdateGroupClientRelationships" ], - "summary" : "Get a subscription by RelationshipID", - "description" : "No Documentation Found.", - "operationId" : "UpdateGroupClientRelationships_GetSubscription", - "parameters" : [ { - "description" : "The RelationshipID.", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "RelationshipID" - } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" + "type" : "string" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" + "type" : "string" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" + "type" : "string" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" + "type" : "string" } } } @@ -13747,69 +13615,105 @@ "deprecated" : false } }, - "/api/v2/UpdateGroupSubscriptions" : { - "post" : { - "tags" : [ "UpdateGroupSubscriptions" ], - "summary" : "Add an Update Group Subscription", + "/api/v2/UpdateGroupClientRelationships/{RelationshipID}" : { + "put" : { + "tags" : [ "UpdateGroupClientRelationships" ], + "summary" : "Updates a Subscription", "description" : "No Documentation Found.", - "operationId" : "UpdateGroupSubscriptions_PostUpdateGroupSubscription", + "operationId" : "UpdateGroupClientRelationships_PutSubscription", + "parameters" : [ { + "description" : "The relationship id of the UpdateGroupClientRelationship", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "RelationshipID" + } ], "requestBody" : { - "description" : "The Update Group Subscription to add", + "description" : "The updated UpdateGroupClientRelationship", "required" : true, "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "application/x-www-form-urlencoded" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" + } + } + } + }, + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } } } } }, + "deprecated" : false + }, + "get" : { + "tags" : [ "UpdateGroupClientRelationships" ], + "summary" : "Get a subscription by RelationshipID", + "description" : "No Documentation Found.", + "operationId" : "UpdateGroupClientRelationships_GetSubscription", + "parameters" : [ { + "description" : "The RelationshipID.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "RelationshipID" + } ], "responses" : { "200" : { "description" : "OK", "content" : { "application/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "application/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "text/json" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } }, "text/xml" : { "schema" : { - "format" : "int32", - "type" : "integer" + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupClientRelationship" } } } @@ -13841,7 +13745,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/UpdateGroupSubscriptions" : { "get" : { "tags" : [ "UpdateGroupSubscriptions" ], "summary" : "Get Update Group Subscriptions", @@ -13923,25 +13829,92 @@ } }, "deprecated" : false - } - }, - "/api/v2/UpdateGroupSubscriptions/Batch" : { + }, "post" : { "tags" : [ "UpdateGroupSubscriptions" ], - "summary" : "No Documentation Found.", + "summary" : "Add an Update Group Subscription", "description" : "No Documentation Found.", - "operationId" : "UpdateGroupSubscriptions_PostUpdateGroupSubscriptions", + "operationId" : "UpdateGroupSubscriptions_PostUpdateGroupSubscription", "requestBody" : { - "$ref" : "#/components/requestBodies/UpdateSystem.Models.UpdateGroupSubscriptionArray" + "description" : "The Update Group Subscription to add", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroupSubscription" + } + } + } }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -13950,7 +13923,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/UpdateGroupSubscriptions/Batch" : { "put" : { "tags" : [ "UpdateGroupSubscriptions" ], "summary" : "No Documentation Found.", @@ -13975,24 +13950,15 @@ } }, "deprecated" : false - } - }, - "/api/v2/UpdateGroupSubscriptions/{UpdateGroupSubscriptionID}" : { - "delete" : { + }, + "post" : { "tags" : [ "UpdateGroupSubscriptions" ], - "summary" : "Delete an Update Group Subscription", + "summary" : "No Documentation Found.", "description" : "No Documentation Found.", - "operationId" : "UpdateGroupSubscriptions_DeleteUpdateGroupSubscription", - "parameters" : [ { - "description" : "The Update Group Subscription ID to delete", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "UpdateGroupSubscriptionID" - } ], + "operationId" : "UpdateGroupSubscriptions_PostUpdateGroupSubscriptions", + "requestBody" : { + "$ref" : "#/components/requestBodies/UpdateSystem.Models.UpdateGroupSubscriptionArray" + }, "responses" : { "204" : { "description" : "No Content" @@ -14009,7 +13975,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/UpdateGroupSubscriptions/{UpdateGroupSubscriptionID}" : { "put" : { "tags" : [ "UpdateGroupSubscriptions" ], "summary" : "Update an Update Group Subscription", @@ -14141,89 +14109,30 @@ } }, "deprecated" : false - } - }, - "/api/v2/UpdateGroups" : { - "post" : { - "tags" : [ "UpdateGroups" ], - "summary" : "Add a new Update Group. The report field is a string that has a dot based request for a specific piece of submitted data.", + }, + "delete" : { + "tags" : [ "UpdateGroupSubscriptions" ], + "summary" : "Delete an Update Group Subscription", "description" : "No Documentation Found.", - "operationId" : "UpdateGroups_Post", - "requestBody" : { + "operationId" : "UpdateGroupSubscriptions_DeleteUpdateGroupSubscription", + "parameters" : [ { + "description" : "The Update Group Subscription ID to delete", "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" - } - } - } - }, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "UpdateGroupSubscriptionID" + } ], "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - }, - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "text/json" : { - "schema" : { - "type" : "string" - } - }, - "text/xml" : { - "schema" : { - "type" : "string" - } - } - } + "204" : { + "description" : "No Content" }, "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -14232,7 +14141,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/UpdateGroups" : { "get" : { "tags" : [ "UpdateGroups" ], "summary" : "Get a list of Update Groups. Update Groups are used by the client to register for a specific type of update.", @@ -14299,31 +14210,87 @@ } }, "deprecated" : false - } - }, - "/api/v2/UpdateGroups/{ID}" : { - "delete" : { + }, + "post" : { "tags" : [ "UpdateGroups" ], - "summary" : "Delete an Update Group.", + "summary" : "Add a new Update Group. The report field is a string that has a dot based request for a specific piece of submitted data.", "description" : "No Documentation Found.", - "operationId" : "UpdateGroups_Delete", - "parameters" : [ { - "description" : "The ID of the Update Group to Delete", + "operationId" : "UpdateGroups_Post", + "requestBody" : { "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "ID" - } ], + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateSystem.Models.UpdateGroup" + } + } + } + }, "responses" : { - "204" : { - "description" : "No Content" + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + }, + "application/xml" : { + "schema" : { + "type" : "string" + } + }, + "text/json" : { + "schema" : { + "type" : "string" + } + }, + "text/xml" : { + "schema" : { + "type" : "string" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -14332,7 +14299,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/UpdateGroups/{ID}" : { "put" : { "tags" : [ "UpdateGroups" ], "summary" : "Modify an Update Group.", @@ -14461,6 +14430,37 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "UpdateGroups" ], + "summary" : "Delete an Update Group.", + "description" : "No Documentation Found.", + "operationId" : "UpdateGroups_Delete", + "parameters" : [ { + "description" : "The ID of the Update Group to Delete", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/UpdateGroups/{ID}/Bundles" : { @@ -14700,6 +14700,82 @@ } }, "/api/v2/UserContentDefinitions" : { + "get" : { + "tags" : [ "UserContentDefinitions" ], + "summary" : "Get UserContentDefinitions", + "description" : "Gets a collection of UserContentDefinitions. When successful, the response is a PagedResponse of UserContentDefinitions.\r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "UserContentDefinitions_GetUserContentDefinitions", + "parameters" : [ { + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Optional. Filter by UserID.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "userID" + }, { + "description" : "Optional. Filter by ContentDefinitionID", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "contentDefinitionID" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.UserContentDefinition_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.UserContentDefinition_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, "post" : { "tags" : [ "UserContentDefinitions" ], "summary" : "Create a UserContentDefinition", @@ -14793,117 +14869,9 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "UserContentDefinitions" ], - "summary" : "Get UserContentDefinitions", - "description" : "Gets a collection of UserContentDefinitions. When successful, the response is a PagedResponse of UserContentDefinitions.\r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "UserContentDefinitions_GetUserContentDefinitions", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Optional. Filter by UserID.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "userID" - }, { - "description" : "Optional. Filter by ContentDefinitionID", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "contentDefinitionID" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.UserContentDefinition_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_ContentSubmission.Shared.BusinessEntities.UserContentDefinition_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/UserContentDefinitions/{userContentDefinitionID}" : { - "delete" : { - "tags" : [ "UserContentDefinitions" ], - "summary" : "Delete a UserContentDefinition", - "description" : "Deletes an UserContentDefinition. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "UserContentDefinitions_DeleteUserContentDefinition", - "parameters" : [ { - "description" : "The ID of the UserContentDefinition to delete", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "userContentDefinitionID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "get" : { "tags" : [ "UserContentDefinitions" ], "summary" : "Get a UserContentDefinition by ID", @@ -14955,84 +14923,17 @@ }, "application/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - } - }, - "/api/v2/Users" : { - "post" : { - "tags" : [ "Users" ], - "summary" : "Create a user", - "description" : "No Documentation Found.", - "operationId" : "Users_Post", - "requestBody" : { - "description" : "The user to create.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" - } - } - } - }, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.User" + "$ref" : "#/components/schemas/API.Models.ApiError" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.Models.User" + "$ref" : "#/components/schemas/API.Models.ApiError" } }, "text/xml" : { "schema" : { - "$ref" : "#/components/schemas/API.Models.User" + "$ref" : "#/components/schemas/API.Models.ApiError" } } } @@ -15040,6 +14941,40 @@ }, "deprecated" : false }, + "delete" : { + "tags" : [ "UserContentDefinitions" ], + "summary" : "Delete a UserContentDefinition", + "description" : "Deletes an UserContentDefinition. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "UserContentDefinitions_DeleteUserContentDefinition", + "parameters" : [ { + "description" : "The ID of the UserContentDefinition to delete", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "userContentDefinitionID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/Users" : { "get" : { "tags" : [ "Users" ], "summary" : "Get users", @@ -15114,6 +15049,71 @@ } }, "deprecated" : false + }, + "post" : { + "tags" : [ "Users" ], + "summary" : "Create a user", + "description" : "No Documentation Found.", + "operationId" : "Users_Post", + "requestBody" : { + "description" : "The user to create.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + } + } + }, + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.User" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/Users/Current" : { @@ -15303,28 +15303,6 @@ } }, "/api/v2/Users/{id}" : { - "delete" : { - "tags" : [ "Users" ], - "summary" : "Delete a user", - "description" : "No Documentation Found.", - "operationId" : "Users_Delete", - "parameters" : [ { - "description" : "The user id", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "id" - } ], - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Users" ], "summary" : "Update a user", @@ -15392,6 +15370,28 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Users" ], + "summary" : "Delete a user", + "description" : "No Documentation Found.", + "operationId" : "Users_Delete", + "parameters" : [ { + "description" : "The user id", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "204" : { + "description" : "No Content" + } + }, + "deprecated" : false } }, "/api/v2/Users/{id}/Permissions" : { @@ -15698,71 +15698,6 @@ } }, "/api/v2/Vouchers" : { - "post" : { - "tags" : [ "Vouchers" ], - "summary" : "Create a voucher", - "description" : "No Documentation Found.", - "operationId" : "Vouchers_Post", - "requestBody" : { - "description" : "The voucher to add.", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DealerDB.Models.Voucher" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/DealerDB.Models.Voucher" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/DealerDB.Models.Voucher" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/DealerDB.Models.Voucher" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/DealerDB.Models.Voucher" - } - } - } - }, - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - }, - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "text/json" : { - "schema" : { - "type" : "string" - } - }, - "text/xml" : { - "schema" : { - "type" : "string" - } - } - } - } - }, - "deprecated" : false - }, "get" : { "tags" : [ "Vouchers" ], "summary" : "Gets a list of vouchers", @@ -15921,12 +15856,77 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_DealerDB.Models.Voucher_" + "$ref" : "#/components/schemas/API.PagedResponse_DealerDB.Models.Voucher_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_DealerDB.Models.Voucher_" + } + } + } + } + }, + "deprecated" : false + }, + "post" : { + "tags" : [ "Vouchers" ], + "summary" : "Create a voucher", + "description" : "No Documentation Found.", + "operationId" : "Vouchers_Post", + "requestBody" : { + "description" : "The voucher to add.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DealerDB.Models.Voucher" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/DealerDB.Models.Voucher" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/DealerDB.Models.Voucher" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/DealerDB.Models.Voucher" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/DealerDB.Models.Voucher" + } + } + } + }, + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + }, + "application/xml" : { + "schema" : { + "type" : "string" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_DealerDB.Models.Voucher_" + "type" : "string" + } + }, + "text/xml" : { + "schema" : { + "type" : "string" } } } @@ -15936,27 +15936,6 @@ } }, "/api/v2/Vouchers/{VoucherCode}" : { - "delete" : { - "tags" : [ "Vouchers" ], - "summary" : "Delete a voucher", - "description" : "No Documentation Found.", - "operationId" : "Vouchers_Delete", - "parameters" : [ { - "description" : "The voucher code of the voucher to delete.", - "required" : true, - "schema" : { - "type" : "string" - }, - "in" : "path", - "name" : "VoucherCode" - } ], - "responses" : { - "204" : { - "description" : "No Content" - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Vouchers" ], "summary" : "Update a voucher", @@ -16059,6 +16038,27 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Vouchers" ], + "summary" : "Delete a voucher", + "description" : "No Documentation Found.", + "operationId" : "Vouchers_Delete", + "parameters" : [ { + "description" : "The voucher code of the voucher to delete.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "VoucherCode" + } ], + "responses" : { + "204" : { + "description" : "No Content" + } + }, + "deprecated" : false } }, "/api/v2/Vouchers/{VoucherCode}/VoucherHistory" : { @@ -16115,6 +16115,72 @@ } }, "/api/v2/activities" : { + "get" : { + "tags" : [ "Activities" ], + "summary" : "Get Activities", + "description" : "Gets a collection of Activities. When successful, the response is a PagedResponse of Activities. \r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "Activities_GetActivities", + "parameters" : [ { + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Does it include deleted activity, or not", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "isIncludeDeleted" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Activity_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Activity_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, "post" : { "tags" : [ "Activities" ], "summary" : "Create an Activity", @@ -16208,107 +16274,9 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "Activities" ], - "summary" : "Get Activities", - "description" : "Gets a collection of Activities. When successful, the response is a PagedResponse of Activities. \r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "Activities_GetActivities", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Does it include deleted activity, or not", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "isIncludeDeleted" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Activity_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Activity_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/activities/{activityID}" : { - "delete" : { - "tags" : [ "Activities" ], - "summary" : "Mark the delete flag for the Activity", - "description" : "Deletes an Activity. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "Activities_DeleteActivity", - "parameters" : [ { - "description" : "The id of the activity to delete", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "activityID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Activities" ], "summary" : "Update an Activity", @@ -16448,6 +16416,38 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Activities" ], + "summary" : "Mark the delete flag for the Activity", + "description" : "Deletes an Activity. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "Activities_DeleteActivity", + "parameters" : [ { + "description" : "The id of the activity to delete", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "activityID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/activityRuns" : { @@ -16788,6 +16788,64 @@ } }, "/api/v2/agents" : { + "get" : { + "tags" : [ "Agents" ], + "summary" : "Get Agents", + "description" : "Gets a collection of Agents. When successful, the response is a PagedResponse of Agents. \r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "Agents_GetAgents", + "parameters" : [ { + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Agent_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Agent_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, "post" : { "tags" : [ "Agents" ], "summary" : "Create an Agent", @@ -16881,64 +16939,6 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "Agents" ], - "summary" : "Get Agents", - "description" : "Gets a collection of Agents. When successful, the response is a PagedResponse of Agents. \r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "Agents_GetAgents", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Agent_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Agent_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/agents/Current" : { @@ -17064,38 +17064,6 @@ } }, "/api/v2/agents/{agentID}" : { - "delete" : { - "tags" : [ "Agents" ], - "summary" : "Delete an Agent", - "description" : "Deletes an Agent. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "Agents_DeleteAgent", - "parameters" : [ { - "description" : "The id of the Agent to delete.", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "agentID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "Agents" ], "summary" : "Update an Agent", @@ -17227,6 +17195,38 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Agents" ], + "summary" : "Delete an Agent", + "description" : "Deletes an Agent. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "Agents_DeleteAgent", + "parameters" : [ { + "description" : "The id of the Agent to delete.", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "agentID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/agents/{agentID}/ActivityRun" : { @@ -17408,16 +17408,84 @@ "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.AgentStatus" } } - } - }, - "responses" : { - "204" : { - "description" : "No Content" + } + }, + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + } + }, + "/api/v2/jobRuns" : { + "get" : { + "tags" : [ "JobRuns" ], + "summary" : "Get JobRuns", + "description" : "Gets a collection of JobRuns. When successful, the response is a PagedResponse of JobRuns.\r\n If unsuccessful, an appropriate ApiError is returned.", + "operationId" : "JobRuns_GetJobRuns", + "parameters" : [ { + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Optional. Indicates whether to include ActivityRun details. Defaults to false.", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "includeActivityRunDetails" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.JobRun_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.JobRun_" + } + } + } }, "default" : { "description" : "API Error Response", "content" : { - "*/*" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -17426,9 +17494,7 @@ } }, "deprecated" : false - } - }, - "/api/v2/jobRuns" : { + }, "post" : { "tags" : [ "JobRuns" ], "summary" : "Create a JobRun", @@ -17522,107 +17588,9 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "JobRuns" ], - "summary" : "Get JobRuns", - "description" : "Gets a collection of JobRuns. When successful, the response is a PagedResponse of JobRuns.\r\n If unsuccessful, an appropriate ApiError is returned.", - "operationId" : "JobRuns_GetJobRuns", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Optional. Indicates whether to include ActivityRun details. Defaults to false.", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "includeActivityRunDetails" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.JobRun_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.JobRun_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/jobRuns/{jobRunID}" : { - "delete" : { - "tags" : [ "JobRuns" ], - "summary" : "Delete a JobRun", - "description" : "Deletes a JobRun. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "JobRuns_DeleteJobRun", - "parameters" : [ { - "description" : "The id of the JobRun to delete", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "jobRunID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false - }, "put" : { "tags" : [ "JobRuns" ], "summary" : "Update a JobRun", @@ -17762,94 +17730,30 @@ } }, "deprecated" : false - } - }, - "/api/v2/jobs" : { - "post" : { - "tags" : [ "Jobs" ], - "summary" : "Create a Job", - "description" : "Creates a Job. The body of the POST is the Job to create. The JobID will be assigned on\r\n creation of the Job. When successful, the response is the JobID. If unsuccessful, an \r\n appropriate ApiError is returned.", - "operationId" : "Jobs_PostJob", - "requestBody" : { - "description" : "The job to create. The JobID will be assigned on creation of the Job.", + }, + "delete" : { + "tags" : [ "JobRuns" ], + "summary" : "Delete a JobRun", + "description" : "Deletes a JobRun. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "JobRuns_DeleteJobRun", + "parameters" : [ { + "description" : "The id of the JobRun to delete", "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" - } - }, - "application/x-www-form-urlencoded" : { - "schema" : { - "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" - } - }, - "text/xml" : { - "schema" : { - "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" - } - } - } - }, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "jobRunID" + } ], "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "application/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/json" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - }, - "text/xml" : { - "schema" : { - "format" : "int32", - "type" : "integer" - } - } - } + "204" : { + "description" : "No Content" }, "default" : { "description" : "API Error Response", "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/xml" : { + "*/*" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -17858,7 +17762,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/jobs" : { "get" : { "tags" : [ "Jobs" ], "summary" : "Get Jobs", @@ -17897,12 +17803,96 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Job_" + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Job_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Job_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, + "post" : { + "tags" : [ "Jobs" ], + "summary" : "Create a Job", + "description" : "Creates a Job. The body of the POST is the Job to create. The JobID will be assigned on\r\n creation of the Job. When successful, the response is the JobID. If unsuccessful, an \r\n appropriate ApiError is returned.", + "operationId" : "Jobs_PostJob", + "requestBody" : { + "description" : "The job to create. The JobID will be assigned on creation of the Job.", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" + } + }, + "application/x-www-form-urlencoded" : { + "schema" : { + "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" + } + }, + "text/xml" : { + "schema" : { + "$ref" : "#/components/schemas/BuildSystem.Shared.DTO.Job" + } + } + } + }, + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "format" : "int32", + "type" : "integer" + } + }, + "application/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" } }, "text/json" : { "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Job_" + "format" : "int32", + "type" : "integer" + } + }, + "text/xml" : { + "schema" : { + "format" : "int32", + "type" : "integer" } } } @@ -17915,41 +17905,17 @@ "$ref" : "#/components/schemas/API.Models.ApiError" } }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, "text/json" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } - } - } - } - }, - "deprecated" : false - } - }, - "/api/v2/jobs/{jobID}" : { - "delete" : { - "tags" : [ "Jobs" ], - "summary" : "Mark the delete flag for the Job", - "description" : "Deletes a Job. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", - "operationId" : "Jobs_DeleteJob", - "parameters" : [ { - "description" : "The id of the job to delete", - "required" : true, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "path", - "name" : "jobID" - } ], - "responses" : { - "204" : { - "description" : "No Content" - }, - "default" : { - "description" : "API Error Response", - "content" : { - "*/*" : { + }, + "text/xml" : { "schema" : { "$ref" : "#/components/schemas/API.Models.ApiError" } @@ -17958,7 +17924,9 @@ } }, "deprecated" : false - }, + } + }, + "/api/v2/jobs/{jobID}" : { "put" : { "tags" : [ "Jobs" ], "summary" : "Update a Job", @@ -18098,9 +18066,107 @@ } }, "deprecated" : false + }, + "delete" : { + "tags" : [ "Jobs" ], + "summary" : "Mark the delete flag for the Job", + "description" : "Deletes a Job. When successful, the response is empty. If unsuccessful, an appropriate\r\n ApiError is returned.", + "operationId" : "Jobs_DeleteJob", + "parameters" : [ { + "description" : "The id of the job to delete", + "required" : true, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "path", + "name" : "jobID" + } ], + "responses" : { + "204" : { + "description" : "No Content" + }, + "default" : { + "description" : "API Error Response", + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false } }, "/api/v2/steps" : { + "get" : { + "tags" : [ "Steps" ], + "summary" : "Get Steps", + "description" : "Gets a collection of Steps. When successful, the response is a PagedResponse of Steps.\r\n If unsuccessful, an appropriate ApiError is returned. Steps.Read permission is required.", + "operationId" : "Steps_GetSteps", + "parameters" : [ { + "description" : "Optional. The page limit. If not specified, the default page limit is 10.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Optional. The page offset. If not specified, the default page offset is 0.", + "required" : false, + "schema" : { + "format" : "int32", + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "Does it include deleted step, or not", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "includeDeleted" + } ], + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Step_" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Step_" + } + } + } + }, + "default" : { + "description" : "API Error Response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + }, + "text/json" : { + "schema" : { + "$ref" : "#/components/schemas/API.Models.ApiError" + } + } + } + } + }, + "deprecated" : false + }, "post" : { "tags" : [ "Steps" ], "summary" : "Create a Step", @@ -18194,72 +18260,6 @@ } }, "deprecated" : false - }, - "get" : { - "tags" : [ "Steps" ], - "summary" : "Get Steps", - "description" : "Gets a collection of Steps. When successful, the response is a PagedResponse of Steps.\r\n If unsuccessful, an appropriate ApiError is returned. Steps.Read permission is required.", - "operationId" : "Steps_GetSteps", - "parameters" : [ { - "description" : "Optional. The page limit. If not specified, the default page limit is 10.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "limit" - }, { - "description" : "Optional. The page offset. If not specified, the default page offset is 0.", - "required" : false, - "schema" : { - "format" : "int32", - "type" : "integer" - }, - "in" : "query", - "name" : "offset" - }, { - "description" : "Does it include deleted step, or not", - "required" : false, - "schema" : { - "type" : "boolean" - }, - "in" : "query", - "name" : "includeDeleted" - } ], - "responses" : { - "200" : { - "description" : "OK", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Step_" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.PagedResponse_BuildSystem.Shared.DTO.Step_" - } - } - } - }, - "default" : { - "description" : "API Error Response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - }, - "text/json" : { - "schema" : { - "$ref" : "#/components/schemas/API.Models.ApiError" - } - } - } - } - }, - "deprecated" : false } }, "/api/v2/steps/{stepID}" : { diff --git a/gen-api-ex/amazonaws.com.accessanalyzer.2019-11-01.yaml b/gen-api-ex/amazonaws.com.accessanalyzer.2019-11-01.yaml index f86212865e8a58f62c767540a7eccd0ca2ff507d..bc414578565a8b86e080370f5b76598bb95029e8 100644 --- a/gen-api-ex/amazonaws.com.accessanalyzer.2019-11-01.yaml +++ b/gen-api-ex/amazonaws.com.accessanalyzer.2019-11-01.yaml @@ -937,11 +937,11 @@ }, { "$ref" : "#/components/parameters/X-Amz-SignedHeaders" } ], - "delete" : { - "description" : "Deletes the specified analyzer. When you delete an analyzer, Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.", - "operationId" : "DeleteAnalyzer", + "get" : { + "description" : "Retrieves information about the specified analyzer.", + "operationId" : "GetAnalyzer", "parameters" : [ { - "description" : "The name of the analyzer to delete.", + "description" : "The name of the analyzer retrieved.", "required" : true, "schema" : { "maxLength" : 255, @@ -951,18 +951,17 @@ }, "in" : "path", "name" : "analyzerName" - }, { - "description" : "A client token.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "clientToken" } ], "responses" : { "200" : { - "description" : "Success" + "description" : "Success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetAnalyzerResponse" + } + } + } }, "480" : { "description" : "ResourceNotFoundException", @@ -1016,11 +1015,11 @@ } } }, - "get" : { - "description" : "Retrieves information about the specified analyzer.", - "operationId" : "GetAnalyzer", + "delete" : { + "description" : "Deletes the specified analyzer. When you delete an analyzer, Access Analyzer is disabled for the account or organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.", + "operationId" : "DeleteAnalyzer", "parameters" : [ { - "description" : "The name of the analyzer retrieved.", + "description" : "The name of the analyzer to delete.", "required" : true, "schema" : { "maxLength" : 255, @@ -1030,17 +1029,18 @@ }, "in" : "path", "name" : "analyzerName" + }, { + "description" : "A client token.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "clientToken" } ], "responses" : { "200" : { - "description" : "Success", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetAnalyzerResponse" - } - } - } + "description" : "Success" }, "480" : { "description" : "ResourceNotFoundException", @@ -1111,11 +1111,11 @@ }, { "$ref" : "#/components/parameters/X-Amz-SignedHeaders" } ], - "delete" : { - "description" : "Deletes the specified archive rule.", - "operationId" : "DeleteArchiveRule", + "put" : { + "description" : "Updates the criteria and values for the specified archive rule.", + "operationId" : "UpdateArchiveRule", "parameters" : [ { - "description" : "The name of the analyzer that associated with the archive rule to delete.", + "description" : "The name of the analyzer to update the archive rules for.", "required" : true, "schema" : { "maxLength" : 255, @@ -1126,15 +1126,7 @@ "in" : "path", "name" : "analyzerName" }, { - "description" : "A client token.", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "clientToken" - }, { - "description" : "The name of the rule to delete.", + "description" : "The name of the rule to update.", "required" : true, "schema" : { "maxLength" : 255, @@ -1145,6 +1137,30 @@ "in" : "path", "name" : "ruleName" } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "properties" : { + "clientToken" : { + "description" : "A client token.", + "type" : "string" + }, + "filter" : { + "description" : "A filter to match for the rules to update. Only rules that match the filter are updated.", + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Criterion" + } + } + }, + "type" : "object", + "required" : [ "filter" ] + } + } + } + }, "responses" : { "200" : { "description" : "Success" @@ -1201,11 +1217,11 @@ } } }, - "put" : { - "description" : "Updates the criteria and values for the specified archive rule.", - "operationId" : "UpdateArchiveRule", + "get" : { + "description" : "<p>Retrieves information about an archive rule.</p> <p>To learn about filter keys that you can use to create an archive rule, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html\">Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>", + "operationId" : "GetArchiveRule", "parameters" : [ { - "description" : "The name of the analyzer to update the archive rules for.", + "description" : "The name of the analyzer to retrieve rules from.", "required" : true, "schema" : { "maxLength" : 255, @@ -1216,7 +1232,7 @@ "in" : "path", "name" : "analyzerName" }, { - "description" : "The name of the rule to update.", + "description" : "The name of the rule to retrieve.", "required" : true, "schema" : { "maxLength" : 255, @@ -1227,33 +1243,16 @@ "in" : "path", "name" : "ruleName" } ], - "requestBody" : { - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "properties" : { - "clientToken" : { - "description" : "A client token.", - "type" : "string" - }, - "filter" : { - "description" : "A filter to match for the rules to update. Only rules that match the filter are updated.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/Criterion" - } - } - }, - "type" : "object", - "required" : [ "filter" ] - } - } - } - }, "responses" : { "200" : { - "description" : "Success" + "description" : "Success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/GetArchiveRuleResponse" + } + } + } }, "480" : { "description" : "ResourceNotFoundException", @@ -1307,11 +1306,11 @@ } } }, - "get" : { - "description" : "<p>Retrieves information about an archive rule.</p> <p>To learn about filter keys that you can use to create an archive rule, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html\">Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>", - "operationId" : "GetArchiveRule", + "delete" : { + "description" : "Deletes the specified archive rule.", + "operationId" : "DeleteArchiveRule", "parameters" : [ { - "description" : "The name of the analyzer to retrieve rules from.", + "description" : "The name of the analyzer that associated with the archive rule to delete.", "required" : true, "schema" : { "maxLength" : 255, @@ -1322,7 +1321,15 @@ "in" : "path", "name" : "analyzerName" }, { - "description" : "The name of the rule to retrieve.", + "description" : "A client token.", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "clientToken" + }, { + "description" : "The name of the rule to delete.", "required" : true, "schema" : { "maxLength" : 255, @@ -1335,14 +1342,7 @@ } ], "responses" : { "200" : { - "description" : "Success", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetArchiveRuleResponse" - } - } - } + "description" : "Success" }, "480" : { "description" : "ResourceNotFoundException", @@ -2110,26 +2110,9 @@ }, { "$ref" : "#/components/parameters/X-Amz-SignedHeaders" } ], - "post" : { - "description" : "<p>Retrieves a list of findings generated by the specified analyzer.</p> <p>To learn about filter keys that you can use to retrieve a list of findings, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html\">Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>", - "operationId" : "ListFindings", - "parameters" : [ { - "description" : "Pagination limit", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "maxResults" - }, { - "description" : "Pagination token", - "required" : false, - "schema" : { - "type" : "string" - }, - "in" : "query", - "name" : "nextToken" - } ], + "put" : { + "description" : "Updates the status for the specified findings.", + "operationId" : "UpdateFindings", "requestBody" : { "required" : true, "content" : { @@ -2137,62 +2120,41 @@ "schema" : { "properties" : { "analyzerArn" : { - "description" : "The <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources\">ARN of the analyzer</a> to retrieve findings from.", + "description" : "The <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources\">ARN of the analyzer</a> that generated the findings to update.", "pattern" : "^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:analyzer/.{1,255}$", "type" : "string" }, - "filter" : { - "description" : "A filter to match for the findings to return.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/Criterion" - } + "clientToken" : { + "description" : "A client token.", + "type" : "string" }, - "maxResults" : { - "description" : "The maximum number of results to return in the response.", - "type" : "integer" + "ids" : { + "description" : "The IDs of the findings to update.", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FindingId" + } }, - "nextToken" : { - "description" : "A token used for pagination of results returned.", + "resourceArn" : { + "description" : "The ARN of the resource identified in the finding.", + "pattern" : "arn:[^:]*:[^:]*:[^:]*:[^:]*:.*$", "type" : "string" }, - "sort" : { - "description" : "The criteria used to sort.", - "properties" : { - "attributeName" : { - "allOf" : [ { - "$ref" : "#/components/schemas/String" - }, { - "description" : "The name of the attribute to sort on." - } ] - }, - "orderBy" : { - "allOf" : [ { - "$ref" : "#/components/schemas/OrderBy" - }, { - "description" : "The sort order, ascending or descending." - } ] - } - }, - "type" : "object" + "status" : { + "description" : "The state represents the action to take to update the finding Status. Use <code>ARCHIVE</code> to change an Active finding to an Archived finding. Use <code>ACTIVE</code> to change an Archived finding to an Active finding.", + "type" : "string", + "enum" : [ "ACTIVE", "ARCHIVED" ] } }, "type" : "object", - "required" : [ "analyzerArn" ] + "required" : [ "analyzerArn", "status" ] } } } }, "responses" : { "200" : { - "description" : "Success", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ListFindingsResponse" - } - } - } + "description" : "Success" }, "480" : { "description" : "ResourceNotFoundException", @@ -2246,9 +2208,26 @@ } } }, - "put" : { - "description" : "Updates the status for the specified findings.", - "operationId" : "UpdateFindings", + "post" : { + "description" : "<p>Retrieves a list of findings generated by the specified analyzer.</p> <p>To learn about filter keys that you can use to retrieve a list of findings, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html\">Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>", + "operationId" : "ListFindings", + "parameters" : [ { + "description" : "Pagination limit", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "maxResults" + }, { + "description" : "Pagination token", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "nextToken" + } ], "requestBody" : { "required" : true, "content" : { @@ -2256,41 +2235,62 @@ "schema" : { "properties" : { "analyzerArn" : { - "description" : "The <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources\">ARN of the analyzer</a> that generated the findings to update.", + "description" : "The <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources\">ARN of the analyzer</a> to retrieve findings from.", "pattern" : "^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:analyzer/.{1,255}$", "type" : "string" }, - "clientToken" : { - "description" : "A client token.", - "type" : "string" - }, - "ids" : { - "description" : "The IDs of the findings to update.", - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/FindingId" + "filter" : { + "description" : "A filter to match for the findings to return.", + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Criterion" } }, - "resourceArn" : { - "description" : "The ARN of the resource identified in the finding.", - "pattern" : "arn:[^:]*:[^:]*:[^:]*:[^:]*:.*$", + "maxResults" : { + "description" : "The maximum number of results to return in the response.", + "type" : "integer" + }, + "nextToken" : { + "description" : "A token used for pagination of results returned.", "type" : "string" }, - "status" : { - "description" : "The state represents the action to take to update the finding Status. Use <code>ARCHIVE</code> to change an Active finding to an Archived finding. Use <code>ACTIVE</code> to change an Archived finding to an Active finding.", - "type" : "string", - "enum" : [ "ACTIVE", "ARCHIVED" ] + "sort" : { + "description" : "The criteria used to sort.", + "properties" : { + "attributeName" : { + "allOf" : [ { + "$ref" : "#/components/schemas/String" + }, { + "description" : "The name of the attribute to sort on." + } ] + }, + "orderBy" : { + "allOf" : [ { + "$ref" : "#/components/schemas/OrderBy" + }, { + "description" : "The sort order, ascending or descending." + } ] + } + }, + "type" : "object" } }, "type" : "object", - "required" : [ "analyzerArn", "status" ] + "required" : [ "analyzerArn" ] } } } }, "responses" : { "200" : { - "description" : "Success" + "description" : "Success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ListFindingsResponse" + } + } + } }, "480" : { "description" : "ResourceNotFoundException", @@ -2601,11 +2601,11 @@ }, { "$ref" : "#/components/parameters/X-Amz-SignedHeaders" } ], - "post" : { - "description" : "Adds a tag to the specified resource.", - "operationId" : "TagResource", + "get" : { + "description" : "Retrieves a list of tags applied to the specified resource.", + "operationId" : "ListTagsForResource", "parameters" : [ { - "description" : "The ARN of the resource to add the tag to.", + "description" : "The ARN of the resource to retrieve tags from.", "required" : true, "schema" : { "type" : "string" @@ -2613,33 +2613,13 @@ "in" : "path", "name" : "resourceArn" } ], - "requestBody" : { - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "properties" : { - "tags" : { - "description" : "The tags to add to the resource.", - "type" : "object", - "additionalProperties" : { - "$ref" : "#/components/schemas/String" - } - } - }, - "type" : "object", - "required" : [ "tags" ] - } - } - } - }, "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TagResourceResponse" + "$ref" : "#/components/schemas/ListTagsForResourceResponse" } } } @@ -2696,11 +2676,11 @@ } } }, - "get" : { - "description" : "Retrieves a list of tags applied to the specified resource.", - "operationId" : "ListTagsForResource", + "post" : { + "description" : "Adds a tag to the specified resource.", + "operationId" : "TagResource", "parameters" : [ { - "description" : "The ARN of the resource to retrieve tags from.", + "description" : "The ARN of the resource to add the tag to.", "required" : true, "schema" : { "type" : "string" @@ -2708,13 +2688,33 @@ "in" : "path", "name" : "resourceArn" } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "properties" : { + "tags" : { + "description" : "The tags to add to the resource.", + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/String" + } + } + }, + "type" : "object", + "required" : [ "tags" ] + } + } + } + }, "responses" : { "200" : { "description" : "Success", "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ListTagsForResourceResponse" + "$ref" : "#/components/schemas/TagResourceResponse" } } } diff --git a/gen-api-ex/amentum.space.atmosphere.1.1.1.yaml b/gen-api-ex/amentum.space.atmosphere.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7914af2acf5e3f7a391d8e10fdc0ab6bf4d2f548 --- /dev/null +++ b/gen-api-ex/amentum.space.atmosphere.1.1.1.yaml @@ -0,0 +1,492 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "x-twitter" : "amentumspace" + }, + "description" : "Instantly access empirical models of atmospheric density and composition that are recommended by the Committee on Space Research (COSPAR) for satellite drag calculations. <br><br>\nAPI requests must contain a key \"API-Key\" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> \nHelp us improve the quality of our web APIs by completing our 2 minute survey <a href=\"https://www.surveymonkey.com/r/CTDTRBN\">here</a>.<br><br>\nAmentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br>\nCopyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021.\n", + "title" : "Atmosphere API", + "version" : "1.1.1", + "x-providerName" : "amentum.space", + "x-logo" : { + "altText" : "Amentum Aerospace", + "backgroundColor" : "#FFFFFF", + "url" : "https://twitter.com/amentumspace/profile_image?size=original" + }, + "x-apisguru-categories" : [ "location" ], + "x-serviceName" : "atmosphere", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://atmosphere.amentum.space/openapi.json", + "version" : "3.0" + } ] + }, + "tags" : [ { + "name" : "nrlmsise00", + "description" : "The <a href='https://ccmc.gsfc.nasa.gov/modelweb/atmos/nrlmsise00.html'>NRLMSISE-00</a> model was developed by the US Naval Research Laboratory. It is based on mass spectrometry and incoherent radar scatter data, includes drag and accelerometer data, and accounts for anomalous oxygen at high altitudes. It is recommended by the International Committee on Space Resarch (COSPAR) as the standard for atmospheric composition. <br><br> The API now automatically updates the Ap and F10.7 cm radio flux indices unless provided by the user.\n", + "x-displayName" : "NRLMSISE-00" + }, { + "name" : "jb2008", + "description" : "The <a href='https://sol.spacenvironment.net/jb2008/'>JB2008</a> (Jacchia-Bowman) model is a newer model developed by Space Environment Technologies and the US Air Force Space Command.\n The model accounts for various phenomena related to EUV heating of \n the thermosphere and uses the DST index as the driver of global \n density changes. The model is complementary to the NRLMSISE00 model \n and is more accurate during times of high solar activity and \n geomagnetic storms. It is recommended by COSPAR as the standard \n for thermospheric density in satellite drag calculations.<br><br>\n The API now automatically updates the indices needed to account \n for global density variations due to geomagnetic storms and EUV heating. \n", + "x-displayName" : "JB2008" + } ], + "paths" : { + "/jb2008" : { + "get" : { + "tags" : [ "jb2008" ], + "summary" : "Compute atmospheric density and temperatures\n", + "description" : "under given conditions.\n", + "operationId" : "app.api.endpoints.JB2008.sample_atmosphere", + "parameters" : [ { + "$ref" : "#/components/parameters/Year" + }, { + "$ref" : "#/components/parameters/Month" + }, { + "$ref" : "#/components/parameters/Day" + }, { + "$ref" : "#/components/parameters/Altitude" + }, { + "$ref" : "#/components/parameters/GeodeticLatitude" + }, { + "$ref" : "#/components/parameters/GeodeticLongitude" + }, { + "$ref" : "#/components/parameters/UTC" + } ], + "responses" : { + "200" : { + "description" : "Successful atmospheric density calculation", + "content" : { + "application/json" : { + "example" : { + "at_alt_temp" : { + "units" : "K", + "value" : 667.005615234375 + }, + "exospheric_temp" : { + "units" : "K", + "value" : 666.522705078125 + }, + "total_mass_density" : { + "units" : "kg/m3", + "value" : 5.201439105817496E-12 + } + }, + "schema" : { + "properties" : { + "at_alt_temp" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "exospheric_temp" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "total_mass_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://atmosphere.amentum.io/jb2008?year=2020&month=5&day=21&altitude=300&geodetic_latitude=42&geodetic_longitude=42&utc=2\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import json\nimport requests\n\nurl = \"https://atmosphere.amentum.io/jb2008\"\n\nparams = {\n 'year' : 2020,\n 'month' : 5,\n 'day' : 21,\n 'geodetic_latitude' : 42,\n 'geodetic_longitude' : 42,\n 'altitude' : 300, # km\n 'utc' : 2, # hours\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n# handle exceptions\nresponse = requests.get(url, params=params, headers=headers)\njson_payload = response.json()\n\nprint(json.dumps(json_payload, indent=4, sort_keys=True))\n" + } ] + } + }, + "/nrlmsise00" : { + "get" : { + "tags" : [ "nrlmsise00" ], + "summary" : "Compute atmospheric composition, density, and temperatures\n", + "description" : "at specified conditions.\n", + "operationId" : "app.api.endpoints.NRLMSISE00.sample_atmosphere", + "parameters" : [ { + "$ref" : "#/components/parameters/Year" + }, { + "$ref" : "#/components/parameters/Month" + }, { + "$ref" : "#/components/parameters/Day" + }, { + "$ref" : "#/components/parameters/Altitude" + }, { + "$ref" : "#/components/parameters/GeodeticLatitude" + }, { + "$ref" : "#/components/parameters/GeodeticLongitude" + }, { + "$ref" : "#/components/parameters/UTC" + }, { + "$ref" : "#/components/parameters/F107A" + }, { + "$ref" : "#/components/parameters/F107" + }, { + "$ref" : "#/components/parameters/AP" + } ], + "responses" : { + "200" : { + "description" : "Successful atmospheric density calculation", + "content" : { + "application/json" : { + "example" : { + "Ar_density" : { + "units" : "/m3", + "value" : 345221344 + }, + "H_density" : { + "units" : "/m3", + "value" : 846266302464 + }, + "He_density" : { + "units" : "/m3", + "value" : 14137357762560 + }, + "N2_density" : { + "units" : "/m3", + "value" : 7370196910080 + }, + "N_density" : { + "units" : "/m3", + "value" : 424038367232 + }, + "O2_density" : { + "units" : "/m3", + "value" : 285386670080 + }, + "O_density" : { + "units" : "/m3", + "value" : 160525593870336 + }, + "anomalous_O_density" : { + "units" : "/m3", + "value" : 2940371.25 + }, + "ap" : { + "value" : 3 + }, + "at_alt_temp" : { + "units" : "K", + "value" : 590.3972778320312 + }, + "exospheric_temp" : { + "units" : "K", + "value" : 590.4319458007812 + }, + "f107" : { + "units" : "sfu", + "value" : 70 + }, + "f107a" : { + "units" : "sfu", + "value" : 69.35802469135803 + }, + "total_mass_density" : { + "units" : "kg/m3", + "value" : 4.7264410267533474E-12 + } + }, + "schema" : { + "properties" : { + "Ar_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "H_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "He_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "N2_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "N_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "O2_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "O_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "anomalous_O_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "ap" : { + "properties" : { + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "at_alt_temp" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "exospheric_temp" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "f107" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "f107a" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "total_mass_density" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://atmosphere.amentum.io/nrlmsise00?year=2020&month=5&day=21&altitude=300&geodetic_latitude=42&geodetic_longitude=42&utc=2\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import json\nimport requests\n\nurl = \"https://atmosphere.amentum.io/nrlmsise00\"\n\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n\nparams = {\n 'year' : 2020,\n 'month' : 5,\n 'day' : 21,\n 'geodetic_latitude' : 42,\n 'geodetic_longitude' : 42,\n 'altitude' : 300, # km\n 'utc' : 2, # hours\n}\n# handle exceptions\nresponse = requests.get(url, params=params, headers=headers)\njson_payload = response.json()\n\nprint(json.dumps(json_payload, indent=4, sort_keys=True))\n" + } ] + } + } + }, + "components" : { + "parameters" : { + "AP" : { + "description" : "(Optional) The Ap-index provides a daily average level for geomagnetic activity F107, F107A, AP effects can be neglected below 80 km. If unspecified, the average of values in the 24 hours preceding the date-time are automatically calculated from data provided by GFZ German Research Centre for Geosciences.\n", + "required" : false, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "ap" + }, + "Altitude" : { + "description" : "Altitude in (km)", + "required" : true, + "schema" : { + "example" : 300, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, + "Day" : { + "description" : "Day in DD format", + "required" : true, + "schema" : { + "example" : 21, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, + "F107" : { + "description" : "(Optional) Daily F10.7 cm radio flux for previous day (SFU). F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and Atmospheric Administration are retrieved automatically.\n", + "required" : false, + "schema" : { + "example" : 120, + "type" : "number" + }, + "in" : "query", + "name" : "f107" + }, + "F107A" : { + "description" : "(Optional) 81 day average of F10.7 flux (SFU) centered on the specified day. F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and Atmospheric Administration are retrieved automatically.\n", + "required" : false, + "schema" : { + "example" : 120, + "type" : "number" + }, + "in" : "query", + "name" : "f107a" + }, + "GeodeticLatitude" : { + "description" : "GeodeticLatitude (deg) -90 to 90 deg", + "required" : true, + "schema" : { + "example" : 42, + "type" : "number" + }, + "in" : "query", + "name" : "geodetic_latitude" + }, + "GeodeticLongitude" : { + "description" : "GeodeticLongitude (deg) 0 to 360 deg", + "required" : true, + "schema" : { + "example" : 42, + "type" : "number" + }, + "in" : "query", + "name" : "geodetic_longitude" + }, + "Month" : { + "description" : "Month in MM format", + "required" : true, + "schema" : { + "example" : 5, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, + "UTC" : { + "description" : "Coordinated Universal Time (hrs)", + "required" : true, + "schema" : { + "example" : 2, + "type" : "number" + }, + "in" : "query", + "name" : "utc" + }, + "Year" : { + "description" : "Year in YYYY format", + "required" : true, + "schema" : { + "example" : 2020, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + } + } + }, + "x-tagGroups" : [ { + "name" : "Density and composition", + "tags" : [ "nrlmsise00", "jb2008" ] + } ] +} \ No newline at end of file diff --git a/gen-api-ex/amentum.space.aviation_radiation.1.5.0.yaml b/gen-api-ex/amentum.space.aviation_radiation.1.5.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..afe73f9b6a73c34a7294fafea0a871a791763f1e --- /dev/null +++ b/gen-api-ex/amentum.space.aviation_radiation.1.5.0.yaml @@ -0,0 +1,920 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "x-twitter" : "amentumspace" + }, + "description" : "Our atmosphere protects us from a hostile space radiation environment comprising high energy particles of solar and intergalactic origin. Solar radiation is significant during unpredictable and short lived solar flares and coronal mass ejections (CMEs); however, galactic cosmic radiation (GCR) is omnipresent. The GCR intensity varies with latitude, longitude, and time due to effects of solar activity on the interplanetary magnetic field, as well as the Earth's magnetic field. Space radiation collides with gases in the atmosphere, leading to a complex shower of high energy radiation, the intensity and composition of which varies spatially and temporally. Excessive exposure to radiation can damage DNA and lead to long-term health effects such as an increased risk of cancer. <br><br> Resulting radiation levels at commercial aircraft altitudes are greater than at sea level due. Aircrew are classified as radiation workers in some countries; however, planning to limit their exposure, and monitoring, is generally lacking. Both real-time measurements and predictive models of radiation in the atmosphere are important to mitigate the radiation risk crew. <br><br>\nWe host a RESTful API to models of cosmic ray induced ionising radiation in the atmosphere. The PARMA or CARI7 endpoints can be used to calculate Effective Dose or Ambient Dose Equivalent at a point. \nThe Route Dose API calculates the same quantities along a great circle route between two airports using CARI7. <br><br>\nAPI requests must contain a key \"API-Key\" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> \nHelp us improve the quality of our web APIs by completing our 2 minute survey <a href=\"https://www.surveymonkey.com/r/CTDTRBN\">here</a>.<br><br>\nAmentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br>\nCopyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021.\n", + "title" : "Aviation Radiation API", + "version" : "1.5.0", + "x-providerName" : "amentum.space", + "x-logo" : { + "altText" : "Amentum Aerospace", + "backgroundColor" : "#FFFFFF", + "url" : "https://twitter.com/amentumspace/profile_image?size=original" + }, + "x-apisguru-categories" : [ "location", "open_data" ], + "x-serviceName" : "aviation_radiation", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://cosmicrays.amentum.space//openapi.json", + "version" : "3.0" + } ] + }, + "tags" : [ { + "name" : "cari7", + "description" : "Developed by the US Federal Aviation Administration's Civil Aerospace Medical Institute, CARI7 calculates cosmic ray doses in the atmosphere. See <a href=\"https://academic.oup.com/rpd/article/175/4/419/2884614\">here</a> for a complete description of CARI-7. The original source code and Terms and Conditions can be found <a href=\"https://www.faa.gov/data_research/research/med_humanfacs/aeromedical/radiobiology/cari7/\">here</a><br><br> <br><br> Note: The dose is considered a monthly average. It accounts for for heliocentric potential modulation only, minor geomagnetic storm and forbush decreases are ignored.\n", + "x-displayName" : "CARI7 API" + }, { + "name" : "routedose", + "description" : "The Route Dose API estimates radiation doses along a flight route between two airports with known ICAO or IATA codes or coordinates as latitude/longitude. Waypoints are calculated assuming a great circle route, a constant altitude (in kilometers) and a user-defined flight duration (in hours). Dose rates are calculated at each waypoint using CARI-7. The dose rate profile is integrated along the route to obtain the total dose for the flight. <br><br> Note: Dose is considered a monthly average accounting for heliocentric potential (HP) modulation only, minor geomagnetic storm and forbush decrease corrections are ignored. The calculation relies on HP data from the US Federal Aviation Administration that is released monthly. Doses can be calculated on the current date and short-range forecasting of several weeks is supported (the exact forecast horizon depends on the release date of the FAA data).\n", + "x-displayName" : "Route Dose API" + }, { + "name" : "parma", + "description" : "The PARMA model was developed by the Japan Atomic Energy Agency (JAEA) and estimates fluxes of neutrons, protons, ions, muons, electrons, positrons, and photons on a given date, latitude, longitude, and altitude. A comprehensive description of PARMA can be found in the publications <a href=\"https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0160390\">here</a> and <a href=\"https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144679\">here</a>.<br><br> <br><br> Note: the PARMA API only accounts for heliocentric potential modulation, minor geomagnetic storm and forbush decreases are ignored.\n", + "x-displayName" : "PARMA API" + } ], + "paths" : { + "/cari7/ambient_dose" : { + "get" : { + "tags" : [ "cari7" ], + "summary" : "The ambient dose equivalent rate calculated for a single particle type, or accumulated over all particle types.\n", + "description" : "The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. \nUse this endpoint if you are comparing model predictions to measurements.\n", + "operationId" : "app.api_cari7.endpoints.CARI7.ambient_dose", + "parameters" : [ { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere).", + "required" : true, + "schema" : { + "example" : 11, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "Latitude. -90 (S) to 90 (N).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, { + "description" : "Longitude. -180 (W) to 180 (E).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 12, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, { + "description" : "Hour in 24 hour time.", + "required" : true, + "schema" : { + "example" : 3, + "type" : "integer" + }, + "in" : "query", + "name" : "utc" + }, { + "description" : "The particle type as a string. Specifying 'total' returns the dose for all particle types.\n", + "required" : true, + "schema" : { + "example" : "total", + "type" : "string", + "enum" : [ "total", "neutron", "photon", "e-", "e+", "mu-", "mu+", "proton", "pi-", "pi+", "deuteron", "triton", "helion", "alpha", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe" ] + }, + "in" : "query", + "name" : "particle" + } ], + "responses" : { + "200" : { + "description" : "Successful dose calculation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "dose rate" : { + "units" : "uSv/hr", + "value" : 2.322303291477743 + } + }, + "properties" : { + "dose rate" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/cari7/ambient_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&utc=3&particle=total\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = {\n \"altitude\" : 11, #km \n \"latitude\" : 30, #degrees (N)\n \"longitude\" : 30, #degrees (E)\n \"year\" : 2019, \n \"month\" : 12,\n \"day\" : 1,\n \"particle\" : \"total\",\n \"utc\" : 3\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\nurl = \"https://avrad.amentum.io/cari7/ambient_dose\"\ntry:\n response = requests.get(url, params=params, headers=headers) \n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e: \n print(\"HTTP error\", e)\nexcept requests.exceptions.RequestException as e: \n print(\"Request error\", e)\nelse:\n # retrieve and return the dose rate\n dose_rate = response.json() \n dose_rate_val = dose_rate['dose rate']['value']\n units = dose_rate['dose rate']['units']\n\n print(f\"Dose rate is {dose_rate_val} {units}\")\n" + } ] + } + }, + "/cari7/effective_dose" : { + "get" : { + "tags" : [ "cari7" ], + "summary" : "The effective dose rate calculated for a single particle type, or accumulated over all particle types.\n", + "description" : "Effective Dose is a radiation protection quantity defined by the International Commission on\n Radiological Protection (ICRP) and represents the stochastic health\n risk to the human body at low levels of radiation.\nIt accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation.\nUse this endpoint if you need to estimate radiation exposures of personnel.\n", + "operationId" : "app.api_cari7.endpoints.CARI7.effective_dose", + "parameters" : [ { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere).", + "required" : true, + "schema" : { + "example" : 11, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "Latitude. -90 (S) to 90 (N).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, { + "description" : "Longitude. -180 (W) to 180 (E).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 12, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, { + "description" : "Hour in 24 hour time.", + "required" : true, + "schema" : { + "example" : 3, + "type" : "integer" + }, + "in" : "query", + "name" : "utc" + }, { + "description" : "The particle type as a string. Specifying 'total' returns the dose for all particle types.\n", + "required" : true, + "schema" : { + "example" : "total", + "type" : "string", + "enum" : [ "total", "neutron", "photon", "e-", "e+", "mu-", "mu+", "proton", "pi-", "pi+", "deuteron", "triton", "helion", "alpha", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe" ] + }, + "in" : "query", + "name" : "particle" + } ], + "responses" : { + "200" : { + "description" : "Successful dose calculation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "dose rate" : { + "units" : "uSv/hr", + "value" : 2.1532952875056712 + } + }, + "properties" : { + "dose rate" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/cari7/effective_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&utc=3&particle=total\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = {\n \"altitude\" : 11, #km \n \"latitude\" : 30, #degrees (N)\n \"longitude\" : 30, #degrees (E)\n \"year\" : 2019, \n \"month\" : 12,\n \"day\" : 1,\n \"particle\" : \"total\",\n \"utc\" : 3\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\nurl = \"https://avrad.amentum.io/cari7/effective_dose\"\ntry:\n response = requests.get(url, params=params, headers=headers) \n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e: \n print(\"HTTP error\", e)\nexcept requests.exceptions.RequestException as e: \n print(\"Request error\", e)\nelse:\n # retrieve and return the dose rate\n dose_rate = response.json() \n dose_rate_val = dose_rate['dose rate']['value']\n units = dose_rate['dose rate']['units']\n\n print(f\"Dose rate is {dose_rate_val} {units}\")\n" + } ] + } + }, + "/parma/ambient_dose" : { + "get" : { + "tags" : [ "parma" ], + "summary" : "The ambient dose equivalent rate calculated for a single particle type, or accumulated over all particle types.\n", + "description" : "The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. \nUse this endpoint if you are comparing model predictions to measurements.\n", + "operationId" : "app.api_parma.endpoints.PARMA.ambient_dose", + "parameters" : [ { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere).", + "required" : false, + "schema" : { + "example" : 11, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both.\n", + "required" : false, + "schema" : { + "example" : 0.92, + "type" : "number" + }, + "in" : "query", + "name" : "atmospheric_depth" + }, { + "description" : "Latitude. -90 (S) to 90 (N).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, { + "description" : "Longitude. -180 (W) to 180 (E).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 12, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, { + "description" : "The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types.\n", + "required" : true, + "schema" : { + "example" : "proton", + "type" : "string", + "enum" : [ "total", "e-", "e+", "mu+", "mu-", "gamma", "neutron", "proton", "alpha" ] + }, + "in" : "query", + "name" : "particle" + } ], + "responses" : { + "200" : { + "description" : "Successful dose read operation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "dose rate" : { + "units" : "uSv/hr", + "value" : 0.26835067168474125 + } + }, + "properties" : { + "dose rate" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/parma/ambient_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=proton\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = {\n \"altitude\" : 11, #km \n \"latitude\" : 30, #degrees (N)\n \"longitude\" : 30, #degrees (E)\n \"year\" : 2019, \n \"month\" : 12,\n \"day\" : 1,\n \"particle\" : \"proton\"\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\nurl = \"https://avrad.amentum.io/parma/ambient_dose\"\ntry:\n response = requests.get(url, params=params, headers=headers) \n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e: \n print(\"HTTP error\", e)\nexcept requests.exceptions.RequestException as e: \n print(\"Request error\", e)\nelse:\n # retrieve and return the dose rate\n dose_rate = response.json() \n dose_rate_val = dose_rate['dose rate']['value']\n units = dose_rate['dose rate']['units']\n\n print(f\"Dose rate is {dose_rate_val} {units}\")\n" + } ] + } + }, + "/parma/differential_intensity" : { + "get" : { + "tags" : [ "parma" ], + "summary" : "The energy differential intensity of a particle at a given zenith angle.", + "description" : "The differential intensity of a particle is a directional quantity that describes the number of particles per unit area, per unit solid angle, per unit energy, and per unit time. The API leverages the functionality of PARMA to calculate differential intensity distributions with energies in units of MeV and Intensity in units of /cm2/sr/MeV/s.\n", + "operationId" : "app.api_parma.endpoints.PARMA.differential_intensity", + "parameters" : [ { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere).", + "required" : false, + "schema" : { + "example" : 11, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both.\n", + "required" : false, + "schema" : { + "example" : 0.92, + "type" : "number" + }, + "in" : "query", + "name" : "atmospheric_depth" + }, { + "description" : "Latitude. -90 (S) to 90 (N).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, { + "description" : "Longitude. -180 (W) to 180 (E).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 12, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, { + "description" : "The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types.\n", + "required" : true, + "schema" : { + "example" : "proton", + "type" : "string", + "enum" : [ "total", "e-", "e+", "mu+", "mu-", "gamma", "neutron", "proton", "alpha" ] + }, + "in" : "query", + "name" : "particle" + }, { + "description" : "Direction cosine. 1.0 is in the downward direction.", + "required" : true, + "schema" : { + "example" : 1, + "type" : "number" + }, + "in" : "query", + "name" : "angle" + } ], + "responses" : { + "200" : { + "description" : "Successful read of intensity operation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "energies" : { + "data" : [ 10.592537251772889, 11.885022274370186, 13.335214321633243, 14.96235656094434, 16.78804018122561, 18.836490894898017, 21.134890398366483, 23.71373705661657, 26.60725059798812, 29.853826189179625, 33.4965439157828, 37.583740428844465, 42.16965034285828, 47.31512589614811, 53.08844442309891, 59.56621435290114, 66.83439175686158, 74.98942093324571, 84.13951416451967, 94.40608762859253, 105.92537251772909, 118.85022274370202, 133.35214321633254, 149.62356560944343, 167.88040181225605, 188.36490894898, 211.34890398366454, 237.1373705661653, 266.0725059798806, 298.5382618917954, 334.9654391578269, 375.83740428844317, 421.69650342858097, 473.1512589614788, 530.8844442309862, 595.662143529008, 668.3439175686115, 749.894209332452, 841.3951416451905, 944.0608762859177, 1059.2537251772821, 1188.5022274370106, 1333.5214321633146, 1496.2356560944222, 1678.804018122547, 1883.6490894897847, 2113.4890398366283, 2371.3737056616337, 2660.725059798784, 2985.38261891793, 3349.6543915782418, 3758.374042884401, 4216.965034285775, 4731.512589614749, 5308.84444230982, 5956.621435290031, 6683.4391756860605, 7498.942093324459, 8413.951416451835, 9440.6087628591, 10592.537251772736, 11885.022274370007, 13335.214321633035, 14962.356560944098, 16788.04018122533, 18836.49089489769, 21134.890398366108, 23713.737056616137, 26607.250597987622, 29853.82618917905, 33496.543915782146, 37583.74042884371, 42169.65034285741, 47315.12589614711, 53088.44442309776, 59566.21435289981, 66834.39175686006, 74989.42093324398, 84139.51416451768, 94406.08762859023 ], + "units" : "MeV" + }, + "intensities" : { + "data" : [ 1.5126557258481497E-5, 1.599438328728434E-5, 1.689468409778281E-5, 1.782700110028125E-5, 1.8789989894315395E-5, 1.9781312921179226E-5, 2.079773698769471E-5, 2.1835319990199245E-5, 2.288931588809045E-5, 2.3953698331015904E-5, 2.5020740419725837E-5, 2.608079723261754E-5, 2.712202346190026E-5, 2.8129941429425255E-5, 2.9086999403906575E-5, 2.9972245159538348E-5, 3.076112412042979E-5, 3.142535794905927E-5, 3.1932955656189876E-5, 3.2248618858073125E-5, 3.2334985958519275E-5, 3.2155208240777106E-5, 3.1677197295996437E-5, 3.0879552903400744E-5, 2.9726220825502388E-5, 2.8234425803141926E-5, 2.650516406182499E-5, 2.4602269634120444E-5, 2.2594819983033717E-5, 2.0552475431477016E-5, 1.853662594721251E-5, 1.6596094572091987E-5, 1.476576885147725E-5, 1.3067285256001253E-5, 1.1511187862538484E-5, 1.0100122716208363E-5, 8.83240101591408E-6, 7.703733932387032E-6, 6.70576631351448E-6, 5.822881145729626E-6, 5.046340372076868E-6, 4.369966582442526E-6, 3.781202020752834E-6, 3.2689518931964352E-6, 2.8234311080639376E-6, 2.436034648930342E-6, 2.0992258398508115E-6, 1.8064235849092022E-6, 1.5518898432506667E-6, 1.331051662285105E-6, 1.1394488995132188E-6, 9.726057340258263E-7, 8.265824310558272E-7, 6.998212586927555E-7, 5.894224376580005E-7, 4.93568138996158E-7, 4.116922090268701E-7, 3.460236317178158E-7, 3.037548828699797E-7, 2.9135185653116735E-7, 2.82520391784604E-7, 2.3785220594554244E-7, 1.7791153699257012E-7, 1.2924247345559558E-7, 9.48243126183575E-8, 7.043455232978242E-8, 5.2623996885656347E-8, 3.935459373084662E-8, 2.939334162588793E-8, 2.1909771678801793E-8, 1.6297871509147514E-8, 1.2099955678192665E-8, 8.967477745797399E-9, 6.635335072413951E-9, 4.902621621420823E-9, 3.6176621571186638E-9, 2.6663515657204105E-9, 1.963121398302903E-9, 1.4439864047128638E-9, 1.0612233263106733E-9 ], + "units" : "/cm2/s/sr/MeV" + } + }, + "properties" : { + "energies" : { + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "number" + } + }, + "units" : { + "type" : "string" + } + }, + "type" : "object" + }, + "intensities" : { + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "number" + } + }, + "units" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/parma/differential_intensity?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=proton&angle=1.0\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = {\n \"altitude\" : 11, # km \n \"latitude\" : 30, # degrees (N)\n \"longitude\" : 30, # degrees (E)\n \"year\" : 2019, # \n \"month\" : 12,\n \"day\" : 1,\n \"particle\" : \"proton\",\n \"angle\" : 1.0\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n\nurl = \"https://avrad.amentum.io/parma/differential_intensity\"\n\n# make the call and handle errors\ntry:\n response = requests.get(url, params=params, headers=headers) \n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e: \n print(\"HTTP error\", e)\nexcept requests.exceptions.RequestException as e: \n print(\"Request error\", e)\nelse:\n # retrieve and return the flux\n json_payload = response.json()\n\n kes = json_payload[\"energies\"][\"data\"] # MeV\n flux = json_payload[\"intensities\"][\"data\"] # /cm2/s/sr/MeV\n\n print(f\"Kinetic energies: {kes} MeV\")\n print(f\"Intensities: {flux} /cm2/s/sr/MeV\")\n" + } ] + } + }, + "/parma/effective_dose" : { + "get" : { + "tags" : [ "parma" ], + "summary" : "The effective dose rate calculated for a single particle type, or accumulated over all particle types.\n", + "description" : "Effective dose is a radiation protection quantity defined by the International Commission on Radiological Protection (ICRP) and represents the stochastic health risk to the human body at low levels of radiation. It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation.\nUse this endpoint if you need to estimate radiation exposures of personnel.\n", + "operationId" : "app.api_parma.endpoints.PARMA.effective_dose", + "parameters" : [ { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere).", + "required" : false, + "schema" : { + "example" : 11, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both.\n", + "required" : false, + "schema" : { + "example" : 0.92, + "type" : "number" + }, + "in" : "query", + "name" : "atmospheric_depth" + }, { + "description" : "Latitude. -90 (S) to 90 (N).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, { + "description" : "Longitude. -180 (W) to 180 (E).", + "required" : true, + "schema" : { + "example" : 30, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 12, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, { + "description" : "The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types.\n", + "required" : true, + "schema" : { + "example" : "proton", + "type" : "string", + "enum" : [ "total", "e-", "e+", "mu+", "mu-", "gamma", "neutron", "proton", "alpha" ] + }, + "in" : "query", + "name" : "particle" + } ], + "responses" : { + "200" : { + "description" : "Successful dose read operation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "dose rate" : { + "units" : "uSv/hr", + "value" : 1.9456004308224644 + } + }, + "properties" : { + "dose rate" : { + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/parma/effective_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=total\" -H \"API-Key: <your_key>\" -H \"accept: application/json\" \n" + }, { + "lang" : "Python", + "source" : "import requests\nparams = {\n \"altitude\" : 11, #km \n \"latitude\" : 30, #degrees (N)\n \"longitude\" : 30, #degrees (E)\n \"year\" : 2019, \n \"month\" : 12,\n \"day\" : 1,\n \"particle\" : \"total\"\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\nurl = \"https://avrad.amentum.io/parma/effective_dose\"\ntry:\n response = requests.get(url, params=params, headers=headers) \n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e: \n print(\"HTTP error\", e)\nexcept requests.exceptions.RequestException as e: \n print(\"Request error\", e)\nelse:\n # retrieve and return the dose rate\n dose_rate = response.json() \n dose_rate_val = dose_rate['dose rate']['value']\n units = dose_rate['dose rate']['units']\n\n print(f\"Dose rate is {dose_rate_val} {units}\")\n" + } ] + } + }, + "/route/ambient_dose" : { + "get" : { + "tags" : [ "routedose" ], + "summary" : "Calculate the ambient equivalent dose along a great circle flight route.\n", + "description" : "The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. <br> <br> Use this endpoint if you are comparing model predictions to measurements. <br> <br> Note: the airport codes or coordinates (depending on which was specified), and the date in DD/MM/YYYY format, are echoed in the json response as strings.\n", + "operationId" : "app.api_icaro.endpoints.ICARO.ambient_dose", + "parameters" : [ { + "description" : "The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the origin airport.", + "required" : true, + "schema" : { + "example" : "YSSY", + "type" : "string" + }, + "in" : "query", + "name" : "origin" + }, { + "description" : "The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the destination airport.", + "required" : true, + "schema" : { + "example" : "33.94250107,-118.4079971", + "type" : "string" + }, + "in" : "query", + "name" : "destination" + }, { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 20 km.", + "required" : true, + "schema" : { + "example" : 10.1, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "The flight duration in hours. The minimum is 0, the maximum is 20 hrs.", + "required" : true, + "schema" : { + "example" : 5, + "type" : "number" + }, + "in" : "query", + "name" : "duration" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 5, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 21, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + } ], + "responses" : { + "200" : { + "description" : "Successful dose calculation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "dose" : { + "date" : "21/05/2019", + "destination" : "33.94250107,-118.4079971", + "origin" : "YSSY", + "units" : "uSv", + "value" : 10.911498908287665 + } + }, + "properties" : { + "dose" : { + "properties" : { + "date" : { + "type" : "string" + }, + "destination" : { + "type" : "string" + }, + "origin" : { + "type" : "string" + }, + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/route/ambient_dose?origin=YSSY&destination=33.94250107,-118.4079971&altitude=10.1&duration=5&year=2019&month=5&day=21\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = {\n \"origin\" : \"YSSY\", # can be ICAO or iATA codes\n \"destination\" : \"33.94250107,-118.4079971\",\n \"altitude\" : 10.1, # km,\n \"duration\" : 5, # hours\n \"year\" : 2019,\n \"month\" : 5,\n \"day\" : 21\n}\nheaders = {\"API-Key\" : \"<add_your_key>\"}\ntry:\n response = requests.get(\"https://avrad.amentum.io/route/ambient_dose\",\n params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n dose = response_json['dose']['value']\n print(f\"Total Ambient Dose was {dose:.2f} uSv\")\n" + } ] + } + }, + "/route/effective_dose" : { + "get" : { + "tags" : [ "routedose" ], + "summary" : "Calculate the total effective dose along a great circle flight route.\n", + "description" : "Effective Dose is a radiation protection quantity defined by the International Commission on\n Radiological Protection (ICRP) and represents the stochastic health\n risk to the human body at low levels of radiation.\nIt accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. <br> <br> Use this endpoint if you need to estimate radiation exposures of personnel. <br> <br> Note: the airport codes or coordinates (depending on which was specified), and the date in DD/MM/YYYY format, are echoed in the json response as strings.\n", + "operationId" : "app.api_icaro.endpoints.ICARO.effective_dose", + "parameters" : [ { + "description" : "The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the origin airport.", + "required" : true, + "schema" : { + "example" : "YSSY", + "type" : "string" + }, + "in" : "query", + "name" : "origin" + }, { + "description" : "The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the destination airport.", + "required" : true, + "schema" : { + "example" : "33.94250107,-118.4079971", + "type" : "string" + }, + "in" : "query", + "name" : "destination" + }, { + "description" : "Altitude (in km). The minimum is 0 m, the maximum is 20 km.", + "required" : true, + "schema" : { + "example" : 10.1, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, { + "description" : "The flight duration in hours. The minimum is 0, the maximum is 20 hrs.", + "required" : true, + "schema" : { + "example" : 5, + "type" : "number" + }, + "in" : "query", + "name" : "duration" + }, { + "description" : "Year in YYYY.", + "required" : true, + "schema" : { + "example" : 2019, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, { + "description" : "Month in MM.", + "required" : true, + "schema" : { + "example" : 5, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, { + "description" : "Day in DD.", + "required" : true, + "schema" : { + "example" : 21, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + } ], + "responses" : { + "200" : { + "description" : "Successful dose calculation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "dose" : { + "date" : "21/05/2019", + "destination" : "33.94250107,-118.4079971", + "origin" : "YSSY", + "units" : "uSv", + "value" : 9.90406659800017 + } + }, + "properties" : { + "dose" : { + "properties" : { + "date" : { + "type" : "string" + }, + "destination" : { + "type" : "string" + }, + "origin" : { + "type" : "string" + }, + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://avrad.amentum.io/route/effective_dose?origin=YSSY&destination=33.94250107,-118.4079971&altitude=10.1&duration=5&year=2019&month=5&day=21\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = {\n \"origin\" : \"YSSY\", # can be ICAO or iATA codes\n \"destination\" : \"33.94250107,-118.4079971\",\n \"altitude\" : 10.1, # km,\n \"duration\" : 5, # hours\n \"year\" : 2019,\n \"month\" : 5,\n \"day\" : 21\n} \nheaders = {\"API-Key\" : \"<add_your_key>\"}\ntry:\n response = requests.get(\"https://avrad.amentum.io/route/effective_dose\",\n params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n # Extract the dose\n dose = response_json['dose']['value']\n print(f\"Total Effective Dose was {dose:.2f} uSv\")\n" + } ] + } + } + }, + "x-tagGroups" : [ { + "name" : "Calculate radiation dose along a great circle flight route", + "tags" : [ "routedose" ] + }, { + "name" : "Calculate radiation intensity or dose at a point", + "tags" : [ "cari7", "parma" ] + } ] +} \ No newline at end of file diff --git a/gen-api-ex/amentum.space.global-magnet.1.3.0.yaml b/gen-api-ex/amentum.space.global-magnet.1.3.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2211a3d5a6e7117f7ef9d0c1d3f420974ed575ef --- /dev/null +++ b/gen-api-ex/amentum.space.global-magnet.1.3.0.yaml @@ -0,0 +1,176 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "x-twitter" : "amentumspace" + }, + "description" : "\nThe World Magnetic Model calculates the intensity and direction of the Earth's magnetic field on a specific date-time, geodetic altitude, latitude, and longitude. It is relied upon throughout the world for navigation, mineral exploration, atmospheric and space science, and is installed on billions of devices. <br><br>\nA comprehensive description of the World Magnetic Model, including its limitations, can be found <a href='https://www.ngdc.noaa.gov/geomag/WMM/'>here</a>. <br><br>\nWe provide a RESTful API to access the out-of-cycle World Magnetic Model (WMM2015v2) valid for years 2015.0 - 2020.0 and WMM2020 valid for years 2020.0 - 2025.0<br><br>\nAPI requests must contain a key \"API-Key\" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> \nAmentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br>\nHelp us improve the quality of our web APIs by completing our 2 minute survey <a href=\"https://www.surveymonkey.com/r/CTDTRBN\">here</a>.<br><br>\nCopyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021.\n", + "title" : "Geomag API", + "version" : "1.3.0", + "x-providerName" : "amentum.space", + "x-logo" : { + "altText" : "Amentum Aerospace", + "backgroundColor" : "#FFFFFF", + "url" : "https://twitter.com/amentumspace/profile_image?size=original" + }, + "x-apisguru-categories" : [ "location" ], + "x-serviceName" : "global-magnet", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://globalmagnet.amentum.space/wmm/openapi.json", + "version" : "3.0" + } ] + }, + "servers" : [ { + "url" : "/wmm" + } ], + "paths" : { + "/magnetic_field" : { + "get" : { + "summary" : "Calculate magnetic declination, inclination, total field intensity, and grid variation\n", + "description" : "at specified conditions.\n", + "operationId" : "app.api_wmm.endpoints.WMM.magnetic_field", + "parameters" : [ { + "$ref" : "#/components/parameters/Altitude" + }, { + "$ref" : "#/components/parameters/Latitude" + }, { + "$ref" : "#/components/parameters/Longitude" + }, { + "$ref" : "#/components/parameters/Year" + } ], + "responses" : { + "200" : { + "description" : "Successful magnetic field intensity calculation", + "content" : { + "application/json" : { + "schema" : { + "example" : { + "declination" : { + "units" : "Deg", + "value" : 34.144142150878906 + }, + "grid_variation" : { + "units" : -65.8558578491211, + "value" : "Deg" + }, + "inclination" : { + "units" : "Deg", + "value" : 87.98262786865234 + }, + "total_intensity" : { + "units" : "nT", + "value" : 58421.87109375 + } + }, + "properties" : { + "declination" : { + "description" : "The angle in the horizontal plane between magnetic north and true north. Declination is positive when magnetic north is east of true north.\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "grid_variation" : { + "description" : "Referenced to grid north, referenced to 0 deg meridian of a polar stereographic projection. Only defined for latitudes greater than 55 degrees and less than -55 degrees (arctic and antarctic).\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "inclination" : { + "description" : "Also known as 'dip', is the angle made between the horizontal plane and the magnetic field vector at some position. Positive inclination corresponds to a downward pointing. \n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "total_intensity" : { + "description" : "Total magnetic field intensity in nano Teslas.\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://geomag.amentum.io/wmm/magnetic_field?altitude=10&latitude=80&longitude=100&year=2020.5\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import json\nimport requests\n\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n\nhostname = \"https://geomag.amentum.io/wmm/magnetic_field\"\n\nparams = dict(\n altitude = 10, # [km]\n longitude = 100, # [deg]\n latitude = 80, \n year = 2020.5 # decimal year, half-way through 2020\n)\n\ntry: \n response = requests.get(hostname, params=params, headers=headers)\n # extract JSON payload of response as Python dictionary\n json_payload = response.json()\n # raise an Exception if we encoutnered any HTTP error codes like 404 \n response.raise_for_status()\nexcept requests.exceptions.ConnectionError as e: \n # handle any typo errors in url or endpoint, or just patchy internet connection\n print(e)\nexcept requests.exceptions.HTTPError as e: \n # handle HTTP error codes in the response\n print(e, json_payload['error'])\nexcept requests.exceptions.RequestException as e: \n # general error handling\n print(e, json_payload['error'])\nelse:\n json_payload = response.json()\n print(json.dumps(json_payload, indent=4, sort_keys=True))\n" + } ] + } + } + }, + "components" : { + "parameters" : { + "Altitude" : { + "description" : "Geodetic Altitude 0 km to 600 km.", + "required" : true, + "schema" : { + "example" : 10, + "type" : "number" + }, + "in" : "query", + "name" : "altitude" + }, + "Latitude" : { + "description" : "Geodetic Latitude. -90 deg (S) to 90 deg (N).", + "required" : true, + "schema" : { + "example" : 80, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, + "Longitude" : { + "description" : "Geodetic Longitude. -180 deg (W) to 180 deg (E).", + "required" : true, + "schema" : { + "example" : 100, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + }, + "Year" : { + "description" : "Year as a decimal in the range 2015-2025 (2017.5 would be half way through 2017).", + "required" : true, + "schema" : { + "example" : 2020.5, + "type" : "number" + }, + "in" : "query", + "name" : "year" + } + } + } +} \ No newline at end of file diff --git a/gen-api-ex/amentum.space.gravity.1.1.1.yaml b/gen-api-ex/amentum.space.gravity.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..64d8cdebc399a2444a4667b55b92066fab3579ea --- /dev/null +++ b/gen-api-ex/amentum.space.gravity.1.1.1.yaml @@ -0,0 +1,199 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "x-twitter" : "amentumspace" + }, + "description" : "The gravitational field of the earth is non-uniform. The <a href='https://en.wikipedia.org/wiki/Geoid'>geoid</a> is the shape the\n ocean surface would take if only gravity and the rotation of the Earth\n were considered. The geoid is the surface that defines zero elevation.<br><br>\n\nThe geoid height is the difference between an ideal reference ellipsoid and the geoid.<br><br>\nThe gravity anomaly is the difference between the acceleration due to gravity on the Earth's surface and the value calculated assuming the reference ellipsoid.<br><br>\nThe official Earth Gravitational Model <a href=https://en.wikipedia.org/wiki/Earth_Gravitational_Model#EGM2008/>EGM2008</a> was developed and released to the public by the National Geospatial-Intelligence Agency (NGA).<br><br>\nOur EGM2008 API provides on-demand access to the EGM2008 model, as implemented by the open-source GeographicLib <a href=https://geographiclib.sourceforge.io/html/gravity.html>Gravity</a> library.<br><br>\nAPI requests must contain a key \"API-Key\" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> \nAmentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br>\nCopyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021.\n", + "title" : "Gravity API", + "version" : "1.1.1", + "x-providerName" : "amentum.space", + "x-logo" : { + "altText" : "Amentum Aerospace", + "backgroundColor" : "#FFFFFF", + "url" : "https://twitter.com/amentumspace/profile_image?size=original" + }, + "x-apisguru-categories" : [ "location", "open_data" ], + "x-serviceName" : "gravity", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://gravity.amentum.space//openapi.json", + "version" : "3.0" + } ] + }, + "tags" : [ { + "name" : "egm2008", + "description" : "Calculate geoid height and gravity anomaly values using the EGM2008 model\n", + "x-displayName" : "EGM2008 API" + } ], + "paths" : { + "/egm2008/geoid_height" : { + "get" : { + "tags" : [ "egm2008" ], + "summary" : "Calculate the geoid height\n", + "description" : "for a given latitude / longitude. \n", + "operationId" : "app.api_egm2008.endpoints.EGM2008.calculate_height", + "parameters" : [ { + "$ref" : "#/components/parameters/Latitude" + }, { + "$ref" : "#/components/parameters/Longitude" + } ], + "responses" : { + "200" : { + "description" : "Successful geoid height calculation", + "content" : { + "application/json" : { + "example" : { + "height" : { + "units" : "m", + "value" : 45.88107058892659 + } + }, + "schema" : { + "$ref" : "#/components/schemas/Height" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://gravity.amentum.io/egm2008/geoid_height?latitude=-45&longitude=45\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n\nparams = {\n \"latitude\" : \"-45\",\n \"longitude\" : \"45\"\n}\n\n# Make the API call\ntry:\n response = requests.get(\n \"https://gravity.amentum.io/egm2008/geoid_height\",\n params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n # Extract the height\n height = response_json['height']['value']\n h_unit = response_json['height']['units']\n print(\"Height: \", height, h_unit)\n" + } ] + } + }, + "/egm2008/gravity_anomaly" : { + "get" : { + "tags" : [ "egm2008" ], + "summary" : "Calculate gravity anomaly values\n", + "description" : "for a given latitude / longitude.\n", + "operationId" : "app.api_egm2008.endpoints.EGM2008.calculate_anomaly", + "parameters" : [ { + "$ref" : "#/components/parameters/Latitude" + }, { + "$ref" : "#/components/parameters/Longitude" + } ], + "responses" : { + "200" : { + "description" : "Successful anomaly calculation", + "content" : { + "application/json" : { + "example" : { + "eta" : { + "units" : "arcsec", + "value" : -0.9413662219916251 + }, + "gravity_anomaly" : { + "units" : "mGal", + "value" : 27.954737031742376 + }, + "xi" : { + "units" : "arcsec", + "value" : 1.371151956763653 + } + }, + "schema" : { + "$ref" : "#/components/schemas/Anomaly" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://gravity.amentum.io/egm2008/gravity_anomaly?latitude=-45&longitude=45\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n\nparams = {\n \"latitude\" : \"-45\",\n \"longitude\" : \"45\"\n}\n\n# Make the API call\ntry:\n response = requests.get(\n \"https://gravity.amentum.io/egm2008/gravity_anomaly\",\n params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n # Extract eta\n eta = response_json['eta']['value']\n e_unit = response_json['eta']['units']\n print(\"Eta: \", eta, e_unit)\n\n # Extract gravity anomaly\n ga = response_json['gravity_anomaly']['value']\n ga_unit = response_json['gravity_anomaly']['units']\n print(\"Gravity Anomaly: \", ga, ga_unit)\n\n # Extract xi\n xi = response_json['xi']['value']\n xi_unit = response_json['xi']['units']\n print(\"Xi: \", xi, xi_unit)\n" + } ] + } + } + }, + "components" : { + "parameters" : { + "Latitude" : { + "description" : "Geographic latitude (-90 to 90 deg).", + "required" : true, + "schema" : { + "example" : -45, + "type" : "number" + }, + "in" : "query", + "name" : "latitude" + }, + "Longitude" : { + "description" : "Geographic longitude (-180 to 180 deg).", + "required" : true, + "schema" : { + "example" : 45, + "type" : "number" + }, + "in" : "query", + "name" : "longitude" + } + }, + "schemas" : { + "Anomaly" : { + "properties" : { + "eta" : { + "description" : "Eta (arcsec) - easterly component of deflection of vertical.", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "gravity_anomaly" : { + "description" : "Gravity anomaly (mGal)\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + }, + "xi" : { + "description" : "Xi (arcsec) - northerly component of deflection of vertical.\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + }, + "Height" : { + "properties" : { + "height" : { + "description" : "Geoid height (m)\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + } +} \ No newline at end of file diff --git a/gen-api-ex/amentum.space.space_radiation.1.1.1.yaml b/gen-api-ex/amentum.space.space_radiation.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..aa29de6ab2d63ba221b0903c30104d14e0cb7201 --- /dev/null +++ b/gen-api-ex/amentum.space.space_radiation.1.1.1.yaml @@ -0,0 +1,432 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "x-twitter" : "amentumspace" + }, + "description" : "Space has a hostile radiation environment that increases the risk of cancers in humans and malfunctions in spacecraft electronics. The types of space radiation of primary concern are:\n <ul>\n <li>\n Galactic Cosmic Rays from outside our solar system generated by \n supernovae and other phenomena;\n </li>\n <li>\n Solar Energetic Particles produced by the Sun during intense and\n sporadic bursts of activity; and\n </li>\n <li>\n Trapped Radiation: energetic particles confined by Earth's magnetic\n field, usually comprising an inner belt of mostly high energy protons \n and an outer belt dominated by lower energy electrons and plasma.\n </li>\n </ul> \n\nUnderstanding the space radiation environment for a particular mission profile is becoming increasingly important. Commercial off-the-shelf electronic components that aren't resilient to space radiation are now prevalent. Longer duration missions to cislunar space, Mars, and beyond are placing astronauts at greater risk of radiation exposure. <br><br>\nAPI requests must contain a key \"API-Key\" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> \nHelp us improve the quality of our web APIs by completing our 2 minute survey <a href=\"https://www.surveymonkey.com/r/CTDTRBN\">here</a>.<br><br>\nAmentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br>\nCopyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021.\n", + "title" : "Space Radiation API", + "version" : "1.1.1", + "x-providerName" : "amentum.space", + "x-logo" : { + "altText" : "Amentum Aerospace", + "backgroundColor" : "#FFFFFF", + "url" : "https://twitter.com/amentumspace/profile_image?size=original" + }, + "x-apisguru-categories" : [ "location", "open_data" ], + "x-serviceName" : "space_radiation", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://spaceradiation.amentum.space/openapi.json", + "version" : "3.0" + } ] + }, + "tags" : [ { + "name" : "trapped", + "description" : "AE9/AP9/SPM is a set of models developed by the US Air Force Research Laboratory that calculates the fluxes of trapped radiation (radiation belt and plasma particles in near-Earth space) for use in space system design, mission planning, and other climatological applications. <br><br>\nA description of the AE9/AP9/SPM models, including energy ranges for which the respective models are valid, can be found <a href='https://www.vdl.afrl.af.mil/programs/ae9ap9/'>here</a>. The model is valid for dates between decimal years 2015.0 and 2020.0<br><br>\nThe following endpoints wrap the original Ae9Ap9 code (version 1.50.001) which is available <a href='https://www.vdl.afrl.af.mil/programs/ae9ap9/downloads.php'>here</a>. <br><br>\n", + "x-displayName" : "AE9/AP9/SPM trapped radiation models" + }, { + "name" : "gcr", + "description" : "This endpoint provides access to Amentum's implementation of the DLR Galactic Cosmic Radiation model. <br><br> A description of the model can be found in the scientific article <a href=\"https://www.sciencedirect.com/science/article/abs/pii/S0273117712005947\">\"A ready-to-use galactic cosmic ray model\"</a>, Matthi?, Daniel, et al., Advances in Space Research 51.3 (2013): 329-338. <br><br> It accounts for solar modulation using a single parameter, <i>W</i>, derived from measurements of carbon flux by the Cosmic Ray Isotope Spectrometer aboard the Advanced Composition Explorer spacecraft.<br><br> A linear relationship between <i>W</i> and terrestrial based neutron monitor count rates (measured at the Oulu station in Finland) has been established:<br> W = -0.093 cr + 638.7 <br> Our implementation uses Oulu station count rates as input, calculating galactic cosmic ray flux on a particular date. \n", + "x-displayName" : "DLR galactic cosmic radiation model" + } ], + "paths" : { + "/gcr/flux_dlr" : { + "get" : { + "tags" : [ "gcr" ], + "summary" : "Calculate particle flux \n", + "description" : "for the given energy, atomic number, and date.\n", + "operationId" : "app.api.endpoints.GCR.calculate_dlr_flux", + "parameters" : [ { + "$ref" : "#/components/parameters/Year" + }, { + "$ref" : "#/components/parameters/Month" + }, { + "$ref" : "#/components/parameters/Day" + }, { + "$ref" : "#/components/parameters/Z" + }, { + "$ref" : "#/components/parameters/Energy" + } ], + "responses" : { + "200" : { + "description" : "Successful flux calculation", + "content" : { + "application/json" : { + "example" : { + "flux" : { + "units" : "/m^2/s/sr/(MeV/n)", + "value" : 0.006709578488527858 + } + }, + "schema" : { + "$ref" : "#/components/schemas/FluxAtEnergy" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://spacerad.amentum.io/gcr/flux_dlr?year=2017&month=1&day=1&z=6&energy=100\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = dict(\n year=2017,\n month=1,\n day=1, \n z=6,\n energy=100\n)\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n# Make the API call\ntry:\n response = requests.get(\"https://spacerad.amentum.io/gcr/flux_dlr\", params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n # Extract the flux\n flux = response_json['flux']['value']\n f_unit = response_json['flux']['units']\n print(\"Flux: \", flux, f_unit)\n" + } ] + } + }, + "/trapped/flux_mean" : { + "get" : { + "tags" : [ "trapped" ], + "summary" : "Calculate mean particle flux\n", + "description" : "at given coordinates and date-time.\n", + "operationId" : "app.api.endpoints.TrappedRadiation.calculate_flux_mean", + "parameters" : [ { + "$ref" : "#/components/parameters/Model" + }, { + "$ref" : "#/components/parameters/CoordSystem" + }, { + "$ref" : "#/components/parameters/CoordUnits" + }, { + "$ref" : "#/components/parameters/Coord1" + }, { + "$ref" : "#/components/parameters/Coord2" + }, { + "$ref" : "#/components/parameters/Coord3" + }, { + "$ref" : "#/components/parameters/Year" + }, { + "$ref" : "#/components/parameters/Month" + }, { + "$ref" : "#/components/parameters/Day" + }, { + "$ref" : "#/components/parameters/Hour" + }, { + "$ref" : "#/components/parameters/Minute" + }, { + "$ref" : "#/components/parameters/Second" + } ], + "responses" : { + "200" : { + "description" : "Successful flux calculation", + "content" : { + "application/json" : { + "example" : { + "energies" : { + "data" : [ 0.04, 0.07, 0.1, 0.25, 0.5, 0.75, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 8.5, 10 ], + "units" : "MeV" + }, + "flux" : { + "data" : [ 8.546358983161561E8, 5.646859055669771E8, 1.7849011791626602E8, 4.764357194054352E7, 1.2254101813260391E7, 4549350.837767644, 1803653.1511005901, 654692.4848865604, 207898.83220077943, 64091.642036893325, 21119.72803543081, 7526.08326415376, 2847.94993909225, 1117.8011168229402, 490.68560475708034, 269.114292404757, 177.84563745629936, 128.22793816827138, 78.49896611035479, 43.74101815451732, 30.335272788461896 ], + "units" : "/cm^2/s/MeV" + } + }, + "schema" : { + "$ref" : "#/components/schemas/Flux" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://spacerad.amentum.io/trapped/flux_mean?model=AE9&coord_sys=GEI&coord_units=KM&coord1=3216.6&coord2=35426&coord3=603.4&year=2017&month=1&day=1&hour=0&minute=0&second=0\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = dict(\n model=\"AE9\", # proton flux\n coord_sys=\"GEI\", # Geocentric equatorial inertial\n coord_units=\"KM\", # kilometers\n coord1=3216.6, # in KM\n coord2=35426,\n coord3=603.4,\n year=2017,\n month=1,\n day=1, \n hour=0,\n minute=0,\n second=0,\n)\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n# Make the API call\ntry:\n response = requests.get(\"https://spacerad.amentum.io/trapped/flux_mean\", params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n # Extract the flux\n energies = response_json['energies']['data']\n e_unit = response_json['energies']['units']\n flux = response_json['flux']['data']\n f_unit = response_json['flux']['units']\n print(\"Energies: \", energies, e_unit)\n print(\"Mean Fluxes: \", flux, f_unit)\n" + } ] + } + }, + "/trapped/flux_percentile" : { + "get" : { + "tags" : [ "trapped" ], + "summary" : "Calculate percentile particle flux\n", + "description" : "at given coordinates and date-time.\n", + "operationId" : "app.api.endpoints.TrappedRadiation.calculate_flux_percentile", + "parameters" : [ { + "$ref" : "#/components/parameters/Model" + }, { + "$ref" : "#/components/parameters/CoordSystem" + }, { + "$ref" : "#/components/parameters/CoordUnits" + }, { + "$ref" : "#/components/parameters/Coord1" + }, { + "$ref" : "#/components/parameters/Coord2" + }, { + "$ref" : "#/components/parameters/Coord3" + }, { + "$ref" : "#/components/parameters/Year" + }, { + "$ref" : "#/components/parameters/Month" + }, { + "$ref" : "#/components/parameters/Day" + }, { + "$ref" : "#/components/parameters/Hour" + }, { + "$ref" : "#/components/parameters/Minute" + }, { + "$ref" : "#/components/parameters/Second" + }, { + "$ref" : "#/components/parameters/Percentile" + } ], + "responses" : { + "200" : { + "description" : "Successful flux calculation", + "content" : { + "application/json" : { + "example" : { + "energies" : { + "data" : [ 0.04, 0.07, 0.1, 0.25, 0.5, 0.75, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 8.5, 10 ], + "units" : "MeV" + }, + "flux" : { + "data" : [ 4.486677844812672E8, 3.2213908668134594E8, 1.1678589333177781E8, 3.2665389706181422E7, 7991547.299112285, 2586068.6893010717, 839339.9184292991, 251004.07802610364, 69547.20063526293, 19974.510921688125, 6379.793949894077, 2089.794228005704, 779.5936616445822, 313.1551441702104, 141.5097428322324, 71.78622535090953, 40.65088904584258, 25.06786549513947, 12.794710202598523, 5.620209093649994, 3.319852121012902 ], + "units" : "/cm^2/s/MeV" + } + }, + "schema" : { + "$ref" : "#/components/schemas/Flux" + } + } + } + } + }, + "x-codeSamples" : [ { + "lang" : "Shell", + "source" : "curl -X GET \"https://spacerad.amentum.io/trapped/flux_percentile?model=AE9&coord_sys=GEI&coord_units=KM&coord1=3216.6&coord2=35426&coord3=603.4&year=2017&month=1&day=1&hour=0&minute=0&second=0&percentile=50\" -H \"API-Key: <your_key>\" -H \"accept: application/json\"\n" + }, { + "lang" : "Python", + "source" : "import requests\n\nparams = dict(\n model=\"AE9\", # proton flux\n coord_sys=\"GEI\", # Geocentric equatorial inertial\n coord_units=\"KM\", # kilometers\n coord1=3216.6, # in KM\n coord2=35426,\n coord3=603.4,\n year=2017,\n month=1,\n day=1, \n hour=0,\n minute=0,\n second=0,\n percentile=50 # median flux\n)\n\nheaders = {\"API-Key\" : \"<add_your_key>\"}\n\n# Make the API call\ntry:\n response = requests.get(\"https://spacerad.amentum.io/trapped/flux_percentile\", params=params, headers=headers)\n response_json = response.json()\n response.raise_for_status()\nexcept requests.exceptions.HTTPError as e:\n print(response_json['error'])\nelse:\n # Extract the flux\n energies = response_json['energies']['data']\n e_unit = response_json['energies']['units']\n flux = response_json['flux']['data']\n f_unit = response_json['flux']['units']\n print(\"Energies: \", energies, e_unit)\n print(\"Median Fluxes: \", flux, f_unit)\n \n" + } ] + } + } + }, + "components" : { + "parameters" : { + "Coord1" : { + "description" : "<br>First coordinate value to specify position. <br><br> Ordering for GEI, GEO coords:X, Y, Z<br> Ordering for GDZ coords: Alt, Lat, Long<br> Valid ranges for latitude: -90, 90<br> Valid ranges for longitude: 0, 360<br> \n", + "required" : true, + "schema" : { + "example" : 3216.6, + "type" : "number" + }, + "in" : "query", + "name" : "coord1" + }, + "Coord2" : { + "description" : "<br>Second coordinate value.", + "required" : true, + "schema" : { + "example" : 35426, + "type" : "number" + }, + "in" : "query", + "name" : "coord2" + }, + "Coord3" : { + "description" : "<br>Third coordinate value.", + "required" : true, + "schema" : { + "example" : 603.4, + "type" : "number" + }, + "in" : "query", + "name" : "coord3" + }, + "CoordSystem" : { + "description" : "<br>Coordinate system to use: <br><br> - Geodetic/WGS84 (GDZ) <br> - Geocentric Cartesian (GEO) <br> - Geocentric Earth Inertial (GEI) <br> See \"Bhavnani, K. H., & Vancour, R. P. (1991). Coordinate systems for space and geophysical applications\" for coord system definitions.\n", + "required" : true, + "schema" : { + "example" : "GEI", + "type" : "string", + "enum" : [ "GDZ", "GEO", "GEI" ] + }, + "in" : "query", + "name" : "coord_sys" + }, + "CoordUnits" : { + "description" : "<br>Coordinate units to use: km (KM) or Earth Radii (RE)\n", + "required" : true, + "schema" : { + "example" : "KM", + "type" : "string", + "enum" : [ "KM", "RE" ] + }, + "in" : "query", + "name" : "coord_units" + }, + "Date" : { + "description" : "<br>Decimal year (eg 1997.65)", + "required" : true, + "schema" : { + "type" : "number" + }, + "in" : "query", + "name" : "date" + }, + "Day" : { + "description" : "<br>", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "day" + }, + "Energy" : { + "description" : "<br>Particle energy in MeV/n<br> Valid range: [0, 10<sup>6</sup>] MeV/n<br> \n", + "required" : true, + "schema" : { + "example" : 100, + "type" : "number" + }, + "in" : "query", + "name" : "energy" + }, + "Hour" : { + "description" : "<br>", + "required" : true, + "schema" : { + "example" : "0", + "type" : "integer" + }, + "in" : "query", + "name" : "hour" + }, + "Minute" : { + "description" : "<br>", + "required" : true, + "schema" : { + "example" : "0", + "type" : "integer" + }, + "in" : "query", + "name" : "minute" + }, + "Model" : { + "description" : "<br>Which model to use: <br><br> - Energetic electrons (AE9) <br> - Energetic protons (AP9) <br> - Space plasma model for electrons (SPME) <br> - for hydrogen (SPMH) <br> - for helium (SPMHE) <br> - for oxygen (SPMO) \n", + "required" : true, + "schema" : { + "example" : "AE9", + "type" : "string", + "enum" : [ "AE9", "AP9", "SPME", "SPMH", "SPMHE", "SPMO" ] + }, + "in" : "query", + "name" : "model" + }, + "Month" : { + "description" : "<br>", + "required" : true, + "schema" : { + "example" : 1, + "type" : "integer" + }, + "in" : "query", + "name" : "month" + }, + "Percentile" : { + "description" : "<br>Integer percentile at which to calc flux (50 is the median value).\n", + "required" : true, + "schema" : { + "example" : 50, + "type" : "integer" + }, + "in" : "query", + "name" : "percentile" + }, + "Second" : { + "description" : "<br>", + "required" : true, + "schema" : { + "example" : "0", + "type" : "integer" + }, + "in" : "query", + "name" : "second" + }, + "Year" : { + "description" : "<br>", + "required" : true, + "schema" : { + "example" : 2017, + "type" : "integer" + }, + "in" : "query", + "name" : "year" + }, + "Z" : { + "description" : "<br>Particle atomic number", + "required" : true, + "schema" : { + "example" : 6, + "type" : "number" + }, + "in" : "query", + "name" : "z" + } + }, + "schemas" : { + "Flux" : { + "properties" : { + "energies" : { + "description" : "Particle energies at which omnidirectional flux values are calculated, and their units.\n", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "number" + } + }, + "units" : { + "type" : "string" + } + }, + "type" : "object" + }, + "flux" : { + "description" : "Corresponding omnidirectional flux values, and their units.\n", + "properties" : { + "data" : { + "type" : "array", + "items" : { + "type" : "number" + } + }, + "units" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "type" : "object" + }, + "FluxAtEnergy" : { + "properties" : { + "flux" : { + "description" : "Particle flux value and units.\n", + "properties" : { + "units" : { + "type" : "string" + }, + "value" : { + "type" : "number" + } + }, + "type" : "object" + } + }, + "type" : "object" + } + } + }, + "x-tagGroups" : [ { + "name" : "Trapped Radiation", + "tags" : [ "trapped" ] + }, { + "name" : "Galactic Cosmic Radiation", + "tags" : [ "gcr" ] + } ] +} \ No newline at end of file diff --git a/gen-api-ex/anchore.io.0.1.18.yaml b/gen-api-ex/anchore.io.0.1.18.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7a6846684fef1545a59aa1b97f7af9017510aeab --- /dev/null +++ b/gen-api-ex/anchore.io.0.1.18.yaml @@ -0,0 +1,7723 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "email" : "nurmi@anchore.com", + "x-twitter" : "anchore" + }, + "description" : "This is the Anchore Engine API. Provides the primary external API for users of the service.", + "license" : { + "name" : "Apache 2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "title" : "Anchore Engine API Server", + "version" : "0.1.18", + "x-providerName" : "anchore.io", + "x-logo" : { + "url" : "https://twitter.com/anchore/profile_image?size=original" + }, + "x-apisguru-categories" : [ "developer_tools" ], + "x-origin" : [ { + "format" : "openapi", + "url" : "https://raw.githubusercontent.com/anchore/anchore-engine/master/anchore_engine/services/apiext/swagger/swagger.yaml", + "version" : "3.0" + } ] + }, + "servers" : [ { + "url" : "/" + }, { + "url" : "http://anchore.local" + } ], + "tags" : [ { + "name" : "Subscriptions", + "description" : "Subscription Management" + }, { + "name" : "Policies", + "description" : "Policy Management" + }, { + "name" : "Images", + "description" : "Image Management" + }, { + "name" : "Image Content", + "description" : "View Image Content" + }, { + "name" : "Vulnerabilities", + "description" : "Vulnerability checks and reports" + }, { + "name" : "Policy Evaluation", + "description" : "Evaluate images against policies" + }, { + "name" : "Registries", + "description" : "Registry Management" + }, { + "name" : "Repository Credentials", + "description" : "Repository Credential Management" + }, { + "name" : "System", + "description" : "System Management" + }, { + "name" : "Services", + "description" : "Service Management" + }, { + "name" : "Summaries", + "description" : "Resource Summaries" + }, { + "name" : "Events", + "description" : "View and delete events" + }, { + "name" : "Queries", + "description" : "Resource Queries" + }, { + "name" : "User Management", + "description" : "Manage Accounts, Users, and Credentials" + }, { + "name" : "Identity", + "description" : "Get and operate on the authenticated user's identity" + }, { + "name" : "Archives", + "description" : "Data Archiving Management" + } ], + "paths" : { + "/" : { + "get" : { + "description" : "Simple status check", + "operationId" : "ping", + "responses" : { + "200" : { + "description" : "Version check response, returns the api version prefix (e.g. 'v1')", + "content" : { + "application/json" : { + "schema" : { + "type" : "string" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "None" + } + }, + "/account" : { + "get" : { + "tags" : [ "Identity" ], + "summary" : "List the account for the authenticated user", + "operationId" : "get_users_account", + "responses" : { + "200" : { + "description" : "User details for caller's user", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Account" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "getAccount" + } + }, + "/accounts" : { + "get" : { + "tags" : [ "User Management" ], + "summary" : "List user summaries. Only available to the system admin user.", + "operationId" : "list_accounts", + "parameters" : [ { + "description" : "Filter accounts by state", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "enabled", "disabled", "deleting" ] + }, + "in" : "query", + "name" : "state" + } ], + "responses" : { + "200" : { + "description" : "Accound summary listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AccountList" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "listAccounts" + }, + "post" : { + "tags" : [ "User Management" ], + "summary" : "Create a new user. Only avaialble to admin user.", + "operationId" : "create_account", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AccountCreationRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Account Record", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Account" + } + } + } + }, + "409" : { + "description" : "Conflicting user information. User already exists.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "createAccount" + } + }, + "/accounts/{accountname}" : { + "get" : { + "tags" : [ "User Management" ], + "summary" : "Get info about an user. Only available to admin user. Uses the main user Id, not a username.", + "operationId" : "get_account", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + } ], + "responses" : { + "200" : { + "description" : "Get user information", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Account" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "getAccount" + }, + "delete" : { + "tags" : [ "User Management" ], + "summary" : "Delete the specified account, only allowed if the account is in the disabled state. All users will be deleted along with the account and all resources will be garbage collected", + "operationId" : "delete_account", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + } ], + "responses" : { + "204" : { + "description" : "Successful deletion" + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "deleteAccount" + } + }, + "/accounts/{accountname}/state" : { + "put" : { + "tags" : [ "User Management" ], + "summary" : "Update the state of an account to either enabled or disabled. For deletion use the DELETE route", + "operationId" : "update_account_state", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AccountStatus" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Updated state of the account", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AccountStatus" + } + } + } + }, + "400" : { + "description" : "State requested is invalid based on current state of the account", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "updateAccount" + } + }, + "/accounts/{accountname}/users" : { + "get" : { + "tags" : [ "User Management" ], + "summary" : "List accounts for the user", + "operationId" : "list_users", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + } ], + "responses" : { + "200" : { + "description" : "User listing", + "content" : { + "application/json" : { + "schema" : { + "description" : "List of user credential records", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/User" + } + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "listUsers" + }, + "post" : { + "tags" : [ "User Management" ], + "summary" : "Create a new user", + "operationId" : "create_user", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UserCreationRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Credential summary", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "createUser" + } + }, + "/accounts/{accountname}/users/{username}" : { + "get" : { + "tags" : [ "User Management" ], + "summary" : "Get a specific user in the specified account", + "operationId" : "get_account_user", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "username" + } ], + "responses" : { + "200" : { + "description" : "User record", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "getUser" + }, + "delete" : { + "tags" : [ "User Management" ], + "summary" : "Delete a specific user credential by username of the credential. Cannot be the credential used to authenticate the request.", + "operationId" : "delete_user", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "username" + } ], + "responses" : { + "204" : { + "description" : "Deleted credential" + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "deleteUser" + } + }, + "/accounts/{accountname}/users/{username}/credentials" : { + "get" : { + "tags" : [ "User Management" ], + "summary" : "Get current credential summary", + "operationId" : "list_user_credentials", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "username" + } ], + "responses" : { + "200" : { + "description" : "User credential listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CredentialList" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "getUser" + }, + "post" : { + "tags" : [ "User Management" ], + "summary" : "add/replace credential", + "operationId" : "create_user_credential", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "username" + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/AccessCredential" + }, + "responses" : { + "200" : { + "description" : "Add a credential, overwritting if already exists", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "updateUser" + }, + "delete" : { + "tags" : [ "User Management" ], + "summary" : "Delete a credential by type", + "operationId" : "delete_user_credential", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "accountname" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "username" + }, { + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "password" ] + }, + "in" : "query", + "name" : "credential_type" + } ], + "responses" : { + "204" : { + "description" : "Successful deletion" + }, + "400" : { + "description" : "Conflict, cannot delete the credential used to authenticate this request" + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.accounts", + "x-anchore-authz-action" : "updateUser" + } + }, + "/archives" : { + "get" : { + "tags" : [ "Archives" ], + "operationId" : "list_archives", + "responses" : { + "200" : { + "description" : "Archive summary listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArchiveSummary" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "listArchives" + } + }, + "/archives/images" : { + "get" : { + "tags" : [ "Archives" ], + "operationId" : "list_analysis_archive", + "responses" : { + "200" : { + "description" : "Image analysis archive listing for the requesting account (not the whole system)", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArchivedAnalyses" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "listArchivedImageAnalysis" + }, + "post" : { + "tags" : [ "Archives" ], + "operationId" : "archive_image_analysis", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageAnalysisReferences" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Archive statuses", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AddAnalysisArchiveResult" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "createArchivedImageAnalysis" + } + }, + "/archives/images/{imageDigest}" : { + "get" : { + "tags" : [ "Archives" ], + "description" : "Returns the archive metadata record identifying the image and tags for the analysis in the archive.", + "operationId" : "get_archived_analysis", + "parameters" : [ { + "description" : "The image digest to identify the image analysis", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + } ], + "responses" : { + "200" : { + "description" : "Archived Image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArchivedAnalysis" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "getArchivedImageAnalysis" + }, + "delete" : { + "tags" : [ "Archives" ], + "description" : "Performs a synchronous archive deletion", + "operationId" : "delete_archived_analysis", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "force" + } ], + "responses" : { + "200" : { + "description" : "ArchivdImageAnalysis successfully deleted" + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "deleteArchivedImageAnalysis" + } + }, + "/archives/rules" : { + "get" : { + "tags" : [ "Archives" ], + "operationId" : "list_analysis_archive_rules", + "parameters" : [ { + "description" : "If true include system global rules (owned by admin) even for non-admin users. Defaults to true if not set. Can be set to false to exclude globals", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "system_global" + } ], + "responses" : { + "200" : { + "description" : "Archive transition rules", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnalysisArchiveRules" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "listArchiveTransitionRules" + }, + "post" : { + "tags" : [ "Archives" ], + "operationId" : "create_analysis_archive_rule", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnalysisArchiveTransitionRule" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Archive transition rule", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnalysisArchiveTransitionRule" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "createArchiveTransitionRule" + } + }, + "/archives/rules/{ruleId}" : { + "get" : { + "tags" : [ "Archives" ], + "operationId" : "get_analysis_archive_rule", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ruleId" + } ], + "responses" : { + "200" : { + "description" : "Archive transition rule", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnalysisArchiveTransitionRule" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "getArchiveTransitionRule" + }, + "delete" : { + "tags" : [ "Archives" ], + "operationId" : "delete_analysis_archive_rule", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ruleId" + } ], + "responses" : { + "200" : { + "description" : "Analysis archive rule succesfuly deleted" + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.archive", + "x-anchore-authz-action" : "deleteArchiveTransitionRule" + } + }, + "/event_types" : { + "get" : { + "tags" : [ "Events" ], + "summary" : "List Event Types", + "description" : "Returns list of event types in the category hierarchy", + "operationId" : "list_event_types", + "responses" : { + "200" : { + "description" : "List of event types", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EventTypesList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.events", + "x-anchore-authz-action" : "listEvents" + } + }, + "/events" : { + "get" : { + "tags" : [ "Events" ], + "summary" : "List Events", + "description" : "Returns a paginated list of events in the descending order of their occurrence. Optional query parameters may be used for filtering results", + "operationId" : "list_events", + "parameters" : [ { + "description" : "Filter events by the originating service", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "source_servicename" + }, { + "description" : "Filter events by the originating host ID", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "source_hostid" + }, { + "description" : "Filter events by a prefix match on the event type (e.g. \"user.image.\")", + "required" : false, + "schema" : { + "pattern" : "^[a-z0-9-_.*]+$", + "type" : "string" + }, + "in" : "query", + "name" : "event_type" + }, { + "description" : "Filter events by the type of resource - tag, imageDigest, repository etc", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "resource_type" + }, { + "description" : "Filter events by the id of the resource", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "resource_id" + }, { + "description" : "Filter events by the level - INFO or ERROR", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "level" + }, { + "description" : "Return events that occurred after the timestamp", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "since" + }, { + "description" : "Return events that occurred before the timestamp", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "before" + }, { + "description" : "Pagination controls - return the nth page of results. Defaults to first page if left empty", + "required" : false, + "schema" : { + "type" : "integer", + "default" : 1 + }, + "in" : "query", + "name" : "page" + }, { + "description" : "Number of events in the result set. Defaults to 100 if left empty", + "required" : false, + "schema" : { + "type" : "integer", + "default" : 100 + }, + "in" : "query", + "name" : "limit" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Paginated list of event records and the next token", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EventsList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.events", + "x-anchore-authz-action" : "listEvents" + }, + "delete" : { + "tags" : [ "Events" ], + "summary" : "Delete Events", + "description" : "Delete all or a subset of events filtered using the optional query parameters", + "operationId" : "delete_events", + "parameters" : [ { + "description" : "Delete events that occurred before the timestamp", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "before" + }, { + "description" : "Delete events that occurred after the timestamp", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "since" + }, { + "description" : "Delete events that match the level - INFO or ERROR", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "level" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "List of deleted event IDs", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.events", + "x-anchore-authz-action" : "deleteEvents" + } + }, + "/events/{eventId}" : { + "get" : { + "tags" : [ "Events" ], + "summary" : "Get Event", + "description" : "Lookup an event by its event ID", + "operationId" : "get_event", + "parameters" : [ { + "description" : "Event ID of the event for lookup", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "eventId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Single event record", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EventResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.events", + "x-anchore-authz-action" : "getEvent" + }, + "delete" : { + "tags" : [ "Events" ], + "summary" : "Delete Event", + "description" : "Delete an event by its event ID", + "operationId" : "delete_event", + "parameters" : [ { + "description" : "Event ID of the event to be deleted", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "eventId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Delete success" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.events", + "x-anchore-authz-action" : "getEvent" + } + }, + "/health" : { + "get" : { + "description" : "Health check, returns 200 and no body if service is running", + "operationId" : "health_check", + "responses" : { + "200" : { + "description" : "Empty body on success" + } + }, + "x-swagger-router-controller" : "anchore_engine.apis.common", + "x-anchore-authz-action" : "None" + } + }, + "/images" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "List all visible images", + "description" : "List all images visible to the user", + "operationId" : "list_images", + "parameters" : [ { + "description" : "Include image history in the response", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "history" + }, { + "description" : "Full docker-pull string to filter results by (e.g. docker.io/library/nginx:latest, or myhost.com:5000/testimages:v1.1.1)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "fulltag" + }, { + "description" : "Filter by image_status value on the record. Default if omitted is 'active'.", + "required" : false, + "schema" : { + "type" : "string", + "default" : "active", + "enum" : [ "all", "active", "deleting" ] + }, + "in" : "query", + "name" : "image_status" + }, { + "description" : "Filter by analysis_status value on the record.", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "not_analyzed", "analyzed", "analyzing", "analysis_failed" ] + }, + "in" : "query", + "name" : "analysis_status" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnchoreImageList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "listImages" + }, + "post" : { + "tags" : [ "Images" ], + "summary" : "Submit a new image for analysis by the engine", + "description" : "Creates a new analysis task that is executed asynchronously", + "operationId" : "add_image", + "parameters" : [ { + "description" : "Override any existing entry in the system", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "force" + }, { + "description" : "Instruct engine to automatically begin watching the added tag for updates from registry", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "autosubscribe" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageAnalysisRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Successfully added image to analysis queue", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnchoreImageList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "createImage" + }, + "delete" : { + "tags" : [ "Images" ], + "summary" : "Bulk mark images for deletion", + "description" : "Delete analysis for image digests in the list asynchronously", + "operationId" : "delete_images_async", + "parameters" : [ { + "explode" : false, + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "in" : "query", + "name" : "imageDigests", + "x-nullable" : false + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "force" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeleteImageResponseList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "deleteImage" + } + }, + "/images/by_id/{imageId}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Lookup image by docker imageId", + "operationId" : "get_image_by_imageId", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Image lookup success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnchoreImageList" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + }, + "delete" : { + "tags" : [ "Images" ], + "summary" : "Delete image by docker imageId", + "operationId" : "delete_image_by_imageId", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "force" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Image deletion success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeleteImageResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "deleteImage" + } + }, + "/images/by_id/{imageId}/check" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Check policy evaluation status for image", + "description" : "Get the policy evaluation for the given image", + "operationId" : "get_image_policy_check_by_imageId", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "policyId" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "tag" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "detail" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "history" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Policy evaluation success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyEvaluationList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImageEvaluation" + } + }, + "/images/by_id/{imageId}/content" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "List image content types", + "operationId" : "list_image_content_by_imageid", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/by_id/{imageId}/content/files" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type files", + "operationId" : "get_image_content_by_type_imageId_files", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentFilesResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/by_id/{imageId}/content/java" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type java", + "operationId" : "get_image_content_by_type_imageId_javapackage", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentJAVAPackageResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/by_id/{imageId}/content/{ctype}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type", + "operationId" : "get_image_content_by_type_imageId", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ctype" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentPackageResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/by_id/{imageId}/vuln" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get vulnerability types", + "operationId" : "get_image_vulnerability_types_by_imageId", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Vulnerability listing for the image", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "all", "os", "non-os" ] + } + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/by_id/{imageId}/vuln/{vtype}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get vulnerabilities by type", + "operationId" : "get_image_vulnerabilities_by_type_imageId", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageId" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "vtype" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Vulnerability listing for the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VulnerabilityResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get image metadata", + "operationId" : "get_image", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Image lookup success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnchoreImageList" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + }, + "delete" : { + "tags" : [ "Images" ], + "summary" : "Delete an image analysis", + "operationId" : "delete_image", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "force" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Image deletion success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeleteImageResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "deleteImage" + } + }, + "/images/{imageDigest}/artifacts/file_content_search" : { + "get" : { + "summary" : "Return a list of analyzer artifacts of the specified type", + "operationId" : "list_file_content_search_results", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + } ], + "responses" : { + "200" : { + "description" : "List of file metadata objects", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FileContentSearchList" + } + } + } + }, + "404" : { + "description" : "Image not found in this service" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/artifacts/retrieved_files" : { + "get" : { + "summary" : "Return a list of analyzer artifacts of the specified type", + "operationId" : "list_retrieved_files", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + } ], + "responses" : { + "200" : { + "description" : "List of file metadata objects", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RetrievedFileList" + } + } + } + }, + "404" : { + "description" : "Image not found in this service" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/artifacts/secret_search" : { + "get" : { + "summary" : "Return a list of analyzer artifacts of the specified type", + "operationId" : "list_secret_search_results", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + } ], + "responses" : { + "200" : { + "description" : "List of file metadata objects", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SecretSearchList" + } + } + } + }, + "404" : { + "description" : "Image not found in this service" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/check" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Check policy evaluation status for image", + "description" : "Get the policy evaluation for the given image", + "operationId" : "get_image_policy_check", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "policyId" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "tag" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "detail" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "history" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "interactive" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Policy evaluation success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyEvaluationList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImageEvaluation" + } + }, + "/images/{imageDigest}/content" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "List image content types", + "operationId" : "list_image_content", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content listing for the image", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/content/files" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type files", + "operationId" : "get_image_content_by_type_files", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentFilesResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/content/java" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type java", + "operationId" : "get_image_content_by_type_javapackage", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentJAVAPackageResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/content/malware" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type malware", + "operationId" : "get_image_content_by_type_malware", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentMalwareResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/content/{ctype}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the content of an image by type", + "operationId" : "get_image_content_by_type", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "ctype" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Content of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ContentPackageResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/metadata" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "List image metadata types", + "operationId" : "list_image_metadata", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Metadata listing for the image", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/metadata/{mtype}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get the metadata of an image by type", + "operationId" : "get_image_metadata_by_type", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "mtype" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Metadata of specified type from the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MetadataResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/vuln" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get vulnerability types", + "operationId" : "get_image_vulnerability_types", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Vulnerability listing for the image", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "all", "os", "non-os" ] + } + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/images/{imageDigest}/vuln/{vtype}" : { + "get" : { + "tags" : [ "Images" ], + "summary" : "Get vulnerabilities by type", + "operationId" : "get_image_vulnerabilities_by_type", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "imageDigest" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "vtype" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "force_refresh" + }, { + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "vendor_only" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Vulnerability listing for the image", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VulnerabilityResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "getImage" + } + }, + "/import/images" : { + "post" : { + "tags" : [ "Import" ], + "summary" : "Import an anchore image tar.gz archive file. This is a deprecated API replaced by the \"/imports/images\" route", + "operationId" : "import_image_archive", + "requestBody" : { + "required" : true, + "content" : { + "multipart/form-data" : { + "schema" : { + "properties" : { + "archive_file" : { + "description" : "anchore image tar archive.", + "format" : "binary", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "archive_file" ] + } + } + } + }, + "responses" : { + "200" : { + "description" : "Successfully imported image to the engine", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnchoreImageList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "Lists in-progress imports", + "operationId" : "list_operations", + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImports" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "post" : { + "tags" : [ "Imports" ], + "summary" : "Begin the import of an image analyzed by Syft into the system", + "operationId" : "create_operation", + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportOperation" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images/{operation_id}" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "Get detail on a single import", + "operationId" : "get_operation", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportOperation" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "delete" : { + "tags" : [ "Imports" ], + "summary" : "Invalidate operation ID so it can be garbage collected", + "operationId" : "invalidate_operation", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportOperation" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images/{operation_id}/dockerfile" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "List uploaded dockerfiles", + "operationId" : "list_import_dockerfiles", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImportContentDigestList" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "post" : { + "tags" : [ "Imports" ], + "summary" : "Begin the import of an image analyzed by Syft into the system", + "operationId" : "import_image_dockerfile", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "requestBody" : { + "required" : true, + "content" : { + "text/plain; utf-8" : { + "schema" : { + "type" : "string" + } + } + } + }, + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportContentResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images/{operation_id}/image_config" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "List uploaded image configs", + "operationId" : "list_import_image_configs", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImportContentDigestList" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "post" : { + "tags" : [ "Imports" ], + "summary" : "Import a docker or OCI image config to associate with the image", + "operationId" : "import_image_config", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "type" : "object" + } + } + } + }, + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportContentResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images/{operation_id}/manifest" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "List uploaded image manifests", + "operationId" : "list_import_image_manifests", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImportContentDigestList" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "post" : { + "tags" : [ "Imports" ], + "summary" : "Import a docker or OCI distribution manifest to associate with the image", + "operationId" : "import_image_manifest", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/vnd.docker.distribution.manifest.v1+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.docker.distribution.manifest.v1+prettyjws" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.docker.distribution.manifest.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.oci.image.manifest.v1+json" : { + "schema" : { + "type" : "object" + } + } + } + }, + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportContentResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images/{operation_id}/packages" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "List uploaded package manifests", + "operationId" : "list_import_packages", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImportContentDigestList" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "post" : { + "tags" : [ "Imports" ], + "summary" : "Begin the import of an image analyzed by Syft into the system", + "operationId" : "import_image_packages", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImagePackageManifest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportContentResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/imports/images/{operation_id}/parent_manifest" : { + "get" : { + "tags" : [ "Imports" ], + "summary" : "List uploaded parent manifests (manifest lists for a tag)", + "operationId" : "list_import_parent_manifests", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImportContentDigestList" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + }, + "post" : { + "tags" : [ "Imports" ], + "summary" : "Import a docker or OCI distribution manifest list to associate with the image", + "operationId" : "import_image_parent_manifest", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "operation_id" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/vnd.docker.distribution.manifest.list.v2+json" : { + "schema" : { + "type" : "object" + } + }, + "application/vnd.oci.image.index.v1+json" : { + "schema" : { + "type" : "object" + } + } + } + }, + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ImageImportContentResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.image_imports", + "x-anchore-authz-action" : "importImage" + } + }, + "/oauth/token" : { + "post" : { + "description" : "Request a jwt token for subsequent operations, this request is authenticated with normal HTTP auth", + "operationId" : "get_oauth_token", + "requestBody" : { + "content" : { + "application/x-www-form-urlencoded" : { + "schema" : { + "properties" : { + "client_id" : { + "description" : "The type of client used for the OAuth token", + "type" : "string", + "default" : "anonymous" + }, + "grant_type" : { + "description" : "OAuth Grant type for token", + "type" : "string", + "default" : "password" + }, + "password" : { + "description" : "Password for corresponding user", + "type" : "string" + }, + "username" : { + "description" : "User to assign OAuth token to", + "type" : "string" + } + }, + "type" : "object" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Resulting JWT token", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/TokenResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.oauth", + "x-anchore-authz-action" : "None" + } + }, + "/policies" : { + "get" : { + "tags" : [ "Policies" ], + "summary" : "List policies", + "description" : "List all saved policy bundles", + "operationId" : "list_policies", + "parameters" : [ { + "description" : "Include policy bundle detail in the form of the full bundle content for each entry", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "detail" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Policy listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyBundleList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.policies", + "x-anchore-authz-action" : "listPolicies" + }, + "post" : { + "tags" : [ "Policies" ], + "summary" : "Add a new policy", + "description" : "Adds a new policy bundle to the system", + "operationId" : "add_policy", + "parameters" : [ { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyBundle" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Saved bundle", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyBundleRecord" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.policies", + "x-anchore-authz-action" : "createPolicy" + } + }, + "/policies/{policyId}" : { + "put" : { + "tags" : [ "Policies" ], + "summary" : "Update policy", + "description" : "Update/replace and existing policy", + "operationId" : "update_policy", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "policyId" + }, { + "description" : "Mark policy as active", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "active" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyBundleRecord" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A list with a single updated policy bundle record", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyBundleList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.policies", + "x-anchore-authz-action" : "updatePolicy" + }, + "get" : { + "tags" : [ "Policies" ], + "summary" : "Get specific policy", + "description" : "Get the policy bundle content", + "operationId" : "get_policy", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "policyId" + }, { + "description" : "Include policy bundle detail in the form of the full bundle content for each entry", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "detail" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "A list with a single fetched policy bundle record", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PolicyBundleList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.policies", + "x-anchore-authz-action" : "getPolicy" + }, + "delete" : { + "tags" : [ "Policies" ], + "summary" : "Delete policy", + "description" : "Delete the specified policy", + "operationId" : "delete_policy", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "policyId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Delete success" + }, + "404" : { + "description" : "Policy not found to delete", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.policies", + "x-anchore-authz-action" : "deletePolicy" + } + }, + "/query/images/by_package" : { + "get" : { + "tags" : [ "Query" ], + "summary" : "List of images containing given package", + "description" : "Filterable query interface to search for images containing specified package", + "operationId" : "query_images_by_package", + "parameters" : [ { + "description" : "Name of package to search for (e.g. sed)", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "name" + }, { + "description" : "Type of package to filter on (e.g. dpkg)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "package_type" + }, { + "description" : "Version of named package to filter on (e.g. 4.4-1)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "version" + }, { + "description" : "The page of results to fetch. Pages start at 1", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "page" + }, { + "description" : "Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page", + "required" : false, + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Image listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaginatedImageList" + } + } + } + }, + "400" : { + "description" : "Bad filter parameters", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.query", + "x-anchore-authz-action" : "listImages" + } + }, + "/query/images/by_vulnerability" : { + "get" : { + "tags" : [ "Query" ], + "summary" : "List images vulnerable to the specific vulnerability ID.", + "description" : "Returns a listing of images and their respective packages vulnerable to the given vulnerability ID", + "operationId" : "query_images_by_vulnerability", + "parameters" : [ { + "description" : "The ID of the vulnerability to search for within all images stored in anchore-engine (e.g. CVE-1999-0001)", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "vulnerability_id" + }, { + "description" : "Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "namespace" + }, { + "description" : "Filter results to images with vulnable packages with the given package name (e.g. libssl)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "affected_package" + }, { + "description" : "Filter results to vulnerable package/vulnerability with the given severity", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "Unknown", "Negligible", "Low", "Medium", "High", "Critical" ] + }, + "in" : "query", + "name" : "severity" + }, { + "description" : "Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data", + "required" : false, + "schema" : { + "type" : "boolean", + "default" : true + }, + "in" : "query", + "name" : "vendor_only" + }, { + "description" : "The page of results to fetch. Pages start at 1", + "required" : false, + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "page" + }, { + "description" : "Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page", + "required" : false, + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Image lookup success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaginatedVulnerableImageList" + } + } + } + }, + "400" : { + "description" : "Invalid filter parameters", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.query", + "x-anchore-authz-action" : "listImages" + } + }, + "/query/vulnerabilities" : { + "get" : { + "tags" : [ "Query" ], + "summary" : "Listing information about given vulnerability", + "description" : "List (w/filters) vulnerability records known by the system, with affected packages information if present", + "operationId" : "query_vulnerabilities", + "parameters" : [ { + "description" : "The ID of the vulnerability (e.g. CVE-1999-0001)", + "explode" : false, + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "in" : "query", + "name" : "id" + }, { + "description" : "Filter results by specified package name (e.g. sed)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "affected_package" + }, { + "description" : "Filter results by specified package version (e.g. 4.4-1)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "affected_package_version" + }, { + "description" : "The page of results to fetch. Pages start at 1", + "required" : false, + "schema" : { + "type" : "string", + "default" : "1" + }, + "in" : "query", + "name" : "page" + }, { + "description" : "Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page", + "required" : false, + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "Namespace(s) to filter vulnerability records by", + "explode" : false, + "required" : false, + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "style" : "form", + "in" : "query", + "name" : "namespace" + } ], + "responses" : { + "200" : { + "description" : "Vulnerability listing paginated", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/PaginatedVulnerabilityList" + } + } + } + }, + "400" : { + "description" : "Invalid filter parameters", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.query", + "x-anchore-authz-action" : "None" + } + }, + "/registries" : { + "get" : { + "tags" : [ "Registries" ], + "summary" : "List configured registries", + "description" : "List all configured registries the system can/will watch", + "operationId" : "list_registries", + "parameters" : [ { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Registry listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryConfigurationList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.registries", + "x-anchore-authz-action" : "listRegistries" + }, + "post" : { + "tags" : [ "Registries" ], + "summary" : "Add a new registry", + "description" : "Adds a new registry to the system", + "operationId" : "create_registry", + "parameters" : [ { + "description" : "flag to determine whether or not to validate registry/credential at registry add time", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "validate" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/RegistryConfigurationRequest" + }, + "responses" : { + "200" : { + "description" : "Saved registry configuration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryConfigurationList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.registries", + "x-anchore-authz-action" : "createRegistry" + } + }, + "/registries/{registry}" : { + "put" : { + "tags" : [ "Registries" ], + "summary" : "Update/replace a registry configuration", + "description" : "Replaces an existing registry record with the given record", + "operationId" : "update_registry", + "parameters" : [ { + "required" : true, + "schema" : { + "format" : "path", + "type" : "string" + }, + "in" : "path", + "name" : "registry" + }, { + "description" : "flag to determine whether or not to validate registry/credential at registry update time", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "validate" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/RegistryConfigurationRequest" + }, + "responses" : { + "200" : { + "description" : "Updated registry configuration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryConfigurationList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.registries", + "x-anchore-authz-action" : "updateRegistry" + }, + "get" : { + "tags" : [ "Registries" ], + "summary" : "Get a specific registry configuration", + "description" : "Get information on a specific registry", + "operationId" : "get_registry", + "parameters" : [ { + "required" : true, + "schema" : { + "format" : "path", + "type" : "string" + }, + "in" : "path", + "name" : "registry" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Registry configuration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryConfigurationList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.registries", + "x-anchore-authz-action" : "getRegistry" + }, + "delete" : { + "tags" : [ "Registries" ], + "summary" : "Delete a registry configuration", + "description" : "Delete a registry configuration record from the system. Does not remove any images.", + "operationId" : "delete_registry", + "parameters" : [ { + "required" : true, + "schema" : { + "format" : "path", + "type" : "string" + }, + "in" : "path", + "name" : "registry" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Delete success" + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.registries", + "x-anchore-authz-action" : "deleteRegistry" + } + }, + "/repositories" : { + "post" : { + "tags" : [ "Repository Credentials" ], + "summary" : "Add repository to watch", + "operationId" : "add_repository", + "parameters" : [ { + "description" : "full repository to add e.g. docker.io/library/alpine", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "repository" + }, { + "description" : "flag to enable/disable auto tag_update activation when new images from a repo are added", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "autosubscribe" + }, { + "description" : "flag to return tags in the repository without actually watching the repository, default is false", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "dryrun" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Repository and discovered tags added", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "createRepository" + } + }, + "/status" : { + "get" : { + "tags" : [ "System" ], + "summary" : "Service status", + "description" : "Get the API service status", + "operationId" : "get_status", + "responses" : { + "200" : { + "description" : "Status listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StatusResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "None" + } + }, + "/subscriptions" : { + "get" : { + "tags" : [ "Subscriptions" ], + "summary" : "List all subscriptions", + "operationId" : "list_subscriptions", + "parameters" : [ { + "description" : "filter only subscriptions matching key", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "subscription_key" + }, { + "description" : "filter only subscriptions matching type", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "subscription_type" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Subscription listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.subscriptions", + "x-anchore-authz-action" : "listSubscriptions" + }, + "post" : { + "tags" : [ "Subscriptions" ], + "summary" : "Add a subscription of a specific type", + "description" : "Create a new subscription to watch a tag and get notifications of changes", + "operationId" : "add_subscription", + "parameters" : [ { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Subscription add success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.subscriptions", + "x-anchore-authz-action" : "createSubscription" + } + }, + "/subscriptions/{subscriptionId}" : { + "put" : { + "tags" : [ "Subscriptions" ], + "summary" : "Update an existing and specific subscription", + "operationId" : "update_subscription", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "subscriptionId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionUpdate" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Subscription add success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionList" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.subscriptions", + "x-anchore-authz-action" : "updateSubscription" + }, + "get" : { + "tags" : [ "Subscriptions" ], + "summary" : "Get a specific subscription set", + "operationId" : "get_subscription", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "subscriptionId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Filtered subscription list by type", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SubscriptionList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.subscriptions", + "x-anchore-authz-action" : "getSubscription" + }, + "delete" : { + "tags" : [ "Subscriptions" ], + "summary" : "Delete subscriptions of a specific type", + "operationId" : "delete_subscription", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "subscriptionId" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "Delete success" + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.subscriptions", + "x-anchore-authz-action" : "deleteSubscription" + } + }, + "/summaries/imagetags" : { + "get" : { + "tags" : [ "Summaries" ], + "summary" : "List all visible image digests and tags", + "description" : "List all image tags visible to the user", + "operationId" : "list_imagetags", + "parameters" : [ { + "description" : "Filter images in one or more states such as active, deleting. Defaults to active images only if unspecified", + "explode" : false, + "required" : false, + "schema" : { + "type" : "array", + "default" : [ "active" ], + "items" : { + "type" : "string", + "enum" : [ "all", "active", "deleting" ] + } + }, + "style" : "form", + "in" : "query", + "name" : "image_status" + }, { + "$ref" : "#/components/parameters/AsAccountParameter" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AnchoreImageTagSummaryList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.images", + "x-anchore-authz-action" : "listImages" + } + }, + "/system" : { + "get" : { + "tags" : [ "System" ], + "summary" : "System status", + "description" : "Get the system status including queue lengths", + "operationId" : "get_service_detail", + "responses" : { + "200" : { + "description" : "Status listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/SystemStatusResponse" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "None" + } + }, + "/system/error_codes" : { + "get" : { + "tags" : [ "System" ], + "summary" : "Describe anchore engine error codes.", + "description" : "Describe anchore engine error codes.", + "operationId" : "describe_error_codes", + "responses" : { + "200" : { + "description" : "Error Codes Description", + "content" : { + "application/json" : { + "schema" : { + "description" : "List of Error Code Descriptions", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AnchoreErrorCode" + } + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "None" + } + }, + "/system/feeds" : { + "get" : { + "tags" : [ "System" ], + "summary" : "list feeds operations and information", + "description" : "Return a list of feed and their groups along with update and record count information. This data reflects the state of the policy engine, not the upstream feed service itself.", + "operationId" : "get_system_feeds", + "responses" : { + "200" : { + "description" : "success", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FeedMetadata" + } + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "listFeeds" + }, + "post" : { + "tags" : [ "System" ], + "summary" : "trigger feeds operations", + "description" : "Execute a synchronous feed sync operation. The response will block until complete, then return the result summary.", + "operationId" : "post_system_feeds", + "parameters" : [ { + "description" : "instruct system to flush existing data feeds records from anchore-engine", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "flush" + }, { + "description" : "instruct system to re-sync data feeds", + "required" : false, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "sync" + } ], + "responses" : { + "200" : { + "description" : "Feeds operation success", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FeedSyncResults" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "updateFeeds" + } + }, + "/system/feeds/{feed}" : { + "put" : { + "tags" : [ "System" ], + "description" : "Disable the feed so that it does not sync on subsequent sync operations", + "operationId" : "toggle_feed_enabled", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "feed" + }, { + "required" : true, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "enabled" + } ], + "responses" : { + "200" : { + "description" : "FeedInfo", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/FeedMetadata" + } + } + } + }, + "400" : { + "description" : "Bad request, fix and resend" + }, + "500" : { + "description" : "Internal server error processing the request. Retry expected" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "updateFeeds" + }, + "delete" : { + "tags" : [ "System" ], + "description" : "Delete the groups and data for the feed and disable the feed itself", + "operationId" : "delete_feed", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "feed" + } ], + "responses" : { + "200" : { + "description" : "Successfully deleted" + }, + "404" : { + "description" : "Not found" + }, + "500" : { + "description" : "Internal server error processing the request. Retry expected" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "updateFeeds" + } + }, + "/system/feeds/{feed}/{group}" : { + "put" : { + "tags" : [ "System" ], + "description" : "Disable a specific group within a feed to not sync", + "operationId" : "toggle_group_enabled", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "feed" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "group" + }, { + "required" : true, + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "enabled" + } ], + "responses" : { + "200" : { + "description" : "FeedInfo listing", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FeedMetadata" + } + } + } + } + }, + "400" : { + "description" : "Bad request, fix and resend" + }, + "500" : { + "description" : "Internal server error processing the request. Retry expected" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "updateFeeds" + }, + "delete" : { + "tags" : [ "System" ], + "description" : "Delete the group data and disable the group itself", + "operationId" : "delete_feed_group", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "feed" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "group" + } ], + "responses" : { + "200" : { + "description" : "Successfully deleted" + }, + "404" : { + "description" : "Not found" + }, + "500" : { + "description" : "Internal server error processing the request. Retry expected" + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "updateFeeds" + } + }, + "/system/policy_spec" : { + "get" : { + "tags" : [ "System" ], + "summary" : "Describe the policy language spec implemented by this service.", + "description" : "Get the policy language spec for this service", + "operationId" : "describe_policy", + "responses" : { + "200" : { + "description" : "Policy Language Description", + "content" : { + "application/json" : { + "schema" : { + "description" : "List of Gate specifications", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/GateSpec" + } + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "None" + } + }, + "/system/services" : { + "get" : { + "tags" : [ "System" ], + "summary" : "List system services", + "operationId" : "list_services", + "responses" : { + "200" : { + "description" : "Service listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ServiceList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "listServices" + } + }, + "/system/services/{servicename}" : { + "get" : { + "tags" : [ "System" ], + "summary" : "Get a service configuration and state", + "operationId" : "get_services_by_name", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "servicename" + } ], + "responses" : { + "200" : { + "description" : "Service Info", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ServiceList" + } + } + } + }, + "500" : { + "description" : "Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "getService" + } + }, + "/system/services/{servicename}/{hostid}" : { + "get" : { + "tags" : [ "System" ], + "summary" : "Get service config for a specific host", + "operationId" : "get_services_by_name_and_host", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "servicename" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "hostid" + } ], + "responses" : { + "200" : { + "description" : "Listing of registered services", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ServiceList" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "getService" + }, + "delete" : { + "tags" : [ "System" ], + "summary" : "Delete the service config", + "operationId" : "delete_service", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "servicename" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "hostid" + } ], + "responses" : { + "200" : { + "description" : "Delete success" + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "deleteService" + } + }, + "/system/webhooks/{webhook_type}/test" : { + "post" : { + "tags" : [ "System" ], + "summary" : "Adds the capabilities to test a webhook delivery for the given notification type", + "description" : "Loads the Webhook configuration for webhook_type, and sends the notification out as a test", + "operationId" : "test_webhook", + "parameters" : [ { + "description" : "The Webhook Type that we should test", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "webhook_type" + }, { + "description" : "What kind of Notification to send", + "required" : false, + "schema" : { + "type" : "string", + "default" : "tag_update", + "enum" : [ "tag_update", "analysis_update", "vuln_update", "policy_eval" ] + }, + "in" : "query", + "name" : "notification_type" + } ], + "responses" : { + "200" : { + "description" : "The Webhook was sent successfully. Schemas may be found under Models (PolicyEvalNotification, TagUpdateNotification, VulnUpdateNotification, AnalysisUpdateNotification)" + }, + "400" : { + "description" : "The Webhook failed to send due to misconfiguration", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + }, + "500" : { + "description" : "The Webhook failed to send due to an Internal Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.system", + "x-anchore-authz-action" : "None" + } + }, + "/user" : { + "get" : { + "tags" : [ "Identity" ], + "summary" : "List authenticated user info", + "operationId" : "get_user", + "responses" : { + "200" : { + "description" : "User details for caller's user", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.user", + "x-anchore-authz-action" : "None" + } + }, + "/user/credentials" : { + "get" : { + "tags" : [ "Identity" ], + "summary" : "Get current credential summary", + "operationId" : "get_credentials", + "responses" : { + "200" : { + "description" : "User credential listing", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CredentialList" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.user", + "x-anchore-authz-action" : "None" + }, + "post" : { + "tags" : [ "Identity" ], + "summary" : "add/replace credential", + "operationId" : "add_credential", + "requestBody" : { + "$ref" : "#/components/requestBodies/AccessCredential" + }, + "responses" : { + "200" : { + "description" : "Add a credential, overwritting if already exists", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/User" + } + } + } + }, + "500" : { + "description" : "Internal error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorResponse" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.services.apiext.api.controllers.user", + "x-anchore-authz-action" : "None" + } + }, + "/version" : { + "get" : { + "description" : "Returns the version object for the service, including db schema version info", + "operationId" : "version_check", + "responses" : { + "200" : { + "description" : "Version object describing version state", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ServiceVersion" + } + } + } + } + }, + "x-swagger-router-controller" : "anchore_engine.apis.common", + "x-anchore-authz-action" : "None" + } + } + }, + "components" : { + "parameters" : { + "AsAccountParameter" : { + "description" : "An account name to change the resource scope of the request to that account, if permissions allow (admin only)", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "header", + "name" : "x-anchore-account" + } + }, + "requestBodies" : { + "AccessCredential" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/AccessCredential" + } + } + } + }, + "RegistryConfigurationRequest" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RegistryConfigurationRequest" + } + } + } + } + }, + "schemas" : { + "AccessCredential" : { + "description" : "A login credential mapped to a user identity. For password credentials, the username to present for Basic auth is the user's username from the user record", + "properties" : { + "created_at" : { + "description" : "The timestamp of creation of the credential", + "type" : "string" + }, + "type" : { + "description" : "The type of credential", + "type" : "string", + "enum" : [ "password" ] + }, + "value" : { + "description" : "The credential value (e.g. the password)", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "type", "value" ] + }, + "Account" : { + "description" : "Account information", + "properties" : { + "created_at" : { + "description" : "The timestamp when the account was created", + "format" : "date-time", + "type" : "string" + }, + "email" : { + "description" : "Optional email address associated with the account", + "type" : "string" + }, + "last_updated" : { + "description" : "The timestamp of the last update to the account metadata itself (not users or creds)", + "format" : "date-time", + "type" : "string" + }, + "name" : { + "description" : "The account identifier, not updatable after creation", + "type" : "string" + }, + "state" : { + "description" : "State of the account. Disabled accounts prevent member users from logging in, deleting accounts are disabled and pending deletion and will be removed once all owned resources are garbage collected by the system", + "type" : "string", + "enum" : [ "enabled", "disabled", "deleting" ] + }, + "type" : { + "description" : "The user type (admin vs user). If not specified in a POST request, 'user' is default", + "type" : "string", + "enum" : [ "user", "admin", "service" ] + } + }, + "type" : "object", + "required" : [ "name" ] + }, + "AccountCreationRequest" : { + "description" : "An account to create/add to the system. If already exists will return 400.", + "properties" : { + "email" : { + "description" : "An optional email to associate with the account for contact purposes", + "pattern" : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", + "type" : "string" + }, + "name" : { + "description" : "The account name to use. This will identify the account and must be globally unique in the system.", + "pattern" : "^[a-zA-Z0-9][a-zA-Z0-9@.!#$+-=^_`~;]{1,126}[a-zA-Z0-9]$", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "name" ] + }, + "AccountList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Account" + } + }, + "AccountStatus" : { + "description" : "A summary of account status", + "properties" : { + "state" : { + "description" : "The status of the account", + "type" : "string", + "enum" : [ "enabled", "disabled" ] + } + }, + "type" : "object" + }, + "AddAnalysisArchiveResult" : { + "description" : "List of analysis archive add results", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AnalysisArchiveAddResult" + } + }, + "AnalysisArchiveAddResult" : { + "description" : "The result of adding a single digest to the archive", + "properties" : { + "detail" : { + "description" : "Details on the status, e.g. the error message", + "type" : "string" + }, + "digest" : { + "description" : "The image digest requested to be added", + "type" : "string" + }, + "status" : { + "description" : "The status of the archive add operation. Typically either 'archived' or 'error'", + "type" : "string", + "enum" : [ "archived", "archiving", "error" ] + } + }, + "type" : "object" + }, + "AnalysisArchiveRules" : { + "description" : "Rule set for automatic archiving of system objects and flushing of archived objects (permament delete).", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AnalysisArchiveTransitionRule" + } + }, + "AnalysisArchiveRulesSummary" : { + "description" : "Summary of the transition rule set", + "properties" : { + "count" : { + "description" : "The number of rules for this account", + "type" : "integer" + }, + "last_updated" : { + "description" : "The newest last_updated timestamp from the set of rules", + "format" : "date-time", + "type" : "string" + } + }, + "type" : "object" + }, + "AnalysisArchiveSource" : { + "description" : "An image reference in the analysis archive for the purposes of loading analysis from the archive into th working set", + "nullable" : true, + "properties" : { + "digest" : { + "description" : "The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored.", + "pattern" : "^sha256:[a-fA-F0-9]{64}$", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "digest" ] + }, + "AnalysisArchiveSummary" : { + "description" : "A summarization of the analysis archive, including size, counts, etc. This archive stores image analysis only, never the actual image content or layers.", + "properties" : { + "last_updated" : { + "description" : "The timestamp of the most recent archived image", + "format" : "date-time", + "type" : "string" + }, + "total_data_bytes" : { + "description" : "The total sum of all the bytes stored to the backing storage. Accounts for anchore-applied compression, but not compression by the underlying storage system.", + "type" : "integer" + }, + "total_image_count" : { + "description" : "The number of unique images (digests) in the archive", + "type" : "integer" + }, + "total_tag_count" : { + "description" : "The number of tag records (registry/repo:tag pull strings) in the archive. This may include repeated tags but will always have a unique tag->digest mapping per record.", + "type" : "integer" + } + }, + "type" : "object" + }, + "AnalysisArchiveTransitionHistory" : { + "description" : "A rule for auto-archiving image analysis by time and/or tag-history", + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + }, + "last_updated" : { + "format" : "date-time", + "type" : "string" + }, + "rule_id" : { + "type" : "string" + }, + "transition" : { + "type" : "string", + "enum" : [ "archive", "delete" ] + }, + "transition_task_id" : { + "description" : "The task that created & updated this entry", + "type" : "string" + } + }, + "type" : "object" + }, + "AnalysisArchiveTransitionRule" : { + "description" : "A rule for auto-archiving image analysis by time and/or tag-history", + "properties" : { + "analysis_age_days" : { + "description" : "Matches if the analysis is strictly older than this number of days", + "type" : "integer" + }, + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "exclude" : { + "$ref" : "#/components/schemas/AnalysisArchiveTransitionRuleExclude" + }, + "last_updated" : { + "format" : "date-time", + "type" : "string" + }, + "max_images_per_account" : { + "description" : "This is the maximum number of image analyses an account can have. Can only be set on system_global rules", + "type" : "integer" + }, + "rule_id" : { + "description" : "Unique identifier for archive rule", + "type" : "string" + }, + "selector" : { + "$ref" : "#/components/schemas/ImageSelector" + }, + "system_global" : { + "description" : "True if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them", + "type" : "boolean" + }, + "tag_versions_newer" : { + "description" : "Number of images mapped to the tag that are newer", + "type" : "integer" + }, + "transition" : { + "description" : "The type of transition to make. If \"archive\", then archive an image from the working set and remove it from the working set. If \"delete\", then match against archived images and delete from the archive if match.", + "type" : "string", + "enum" : [ "archive", "delete" ] + } + }, + "type" : "object", + "required" : [ "transition" ] + }, + "AnalysisArchiveTransitionRuleExclude" : { + "description" : "Which Images to exclude from auto-archiving logic", + "properties" : { + "expiration_days" : { + "description" : "How long the image selected will be excluded from the archive transition", + "type" : "integer", + "default" : -1 + }, + "selector" : { + "$ref" : "#/components/schemas/ImageSelector" + } + }, + "type" : "object" + }, + "AnalysisUpdateEval" : { + "description" : "Evaluation Results for an entity (current or last)", + "properties" : { + "analysis_status" : { + "type" : "string" + }, + "annotations" : { + "type" : "object" + }, + "image_digest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "AnalysisUpdateNotification" : { + "allOf" : [ { + "$ref" : "#/components/schemas/NotificationBase" + }, { + "description" : "The Notification Object definition for Tag Update Notifications", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/AnalysisUpdateNotificationData" + } + }, + "type" : "object" + } ] + }, + "AnalysisUpdateNotificationData" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BaseNotificationData" + }, { + "properties" : { + "notification_payload" : { + "$ref" : "#/components/schemas/AnalysisUpdateNotificationPayload" + } + }, + "type" : "object" + } ] + }, + "AnalysisUpdateNotificationPayload" : { + "allOf" : [ { + "$ref" : "#/components/schemas/GenericNotificationPayload" + }, { + "properties" : { + "annotations" : { + "description" : "List of Corresponding Image Annotations", + "nullable" : true, + "type" : "object" + }, + "curr_eval" : { + "$ref" : "#/components/schemas/AnalysisUpdateEval" + }, + "last_eval" : { + "$ref" : "#/components/schemas/AnalysisUpdateEval" + } + }, + "type" : "object" + } ] + }, + "AnchoreErrorCode" : { + "description" : "A description of an anchore error code (name, description)", + "properties" : { + "description" : { + "description" : "Description of the error code", + "type" : "string" + }, + "name" : { + "description" : "Error code name", + "type" : "string" + } + }, + "type" : "object" + }, + "AnchoreImage" : { + "description" : "A unique image in the engine. May have multiple tags or references. Unique to an image content across registries or repositories.", + "properties" : { + "analysis_status" : { + "description" : "A state value for the current status of the analysis progress of the image", + "type" : "string", + "enum" : [ "not_analyzed", "analyzing", "analyzed", "analysis_failed" ] + }, + "annotations" : { + "type" : "object" + }, + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + }, + "image_content" : { + "$ref" : "#/components/schemas/ImageContent" + }, + "image_detail" : { + "description" : "Details specific to an image reference and type such as tag and image source", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImageDetail" + } + }, + "image_status" : { + "description" : "State of the image", + "type" : "string", + "enum" : [ "active", "inactive", "disabled" ] + }, + "last_updated" : { + "format" : "date-time", + "type" : "string" + }, + "userId" : { + "type" : "string" + } + }, + "type" : "object" + }, + "AnchoreImageList" : { + "description" : "A list of Anchore Images", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AnchoreImage" + } + }, + "AnchoreImageTagSummary" : { + "description" : "A unique image in the engine.", + "properties" : { + "analysis_status" : { + "type" : "string" + }, + "analyzed_at" : { + "type" : "integer" + }, + "created_at" : { + "type" : "integer" + }, + "fulltag" : { + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + }, + "imageId" : { + "type" : "string" + }, + "image_status" : { + "type" : "string" + }, + "parentDigest" : { + "type" : "string" + }, + "tag_detected_at" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "AnchoreImageTagSummaryList" : { + "description" : "a list of AnchoreImageTagSummary objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AnchoreImageTagSummary" + } + }, + "Annotations" : { + "description" : "Simple key/value pairs where the value may be optional", + "type" : "object" + }, + "ApiErrorResponse" : { + "description" : "Generic HTTP API error response", + "properties" : { + "code" : { + "format" : "int32", + "type" : "integer" + }, + "detail" : { + "description" : "Details structure for additional information about the error if available. Content and structure will be error specific.", + "type" : "object" + }, + "error_type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ArchiveSummary" : { + "description" : "A summarization of the available archives, a place to for long-term storage of audit, analysis, or other data to remove it from the system's working set but keep it available.", + "properties" : { + "images" : { + "$ref" : "#/components/schemas/AnalysisArchiveSummary" + }, + "rules" : { + "$ref" : "#/components/schemas/AnalysisArchiveRulesSummary" + } + }, + "type" : "object" + }, + "ArchivedAnalyses" : { + "description" : "List of archived analyses", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ArchivedAnalysis" + } + }, + "ArchivedAnalysis" : { + "properties" : { + "analyzed_at" : { + "format" : "date-time", + "type" : "string" + }, + "annotations" : { + "description" : "User provided annotations as key-value pairs", + "type" : "object" + }, + "archive_size_bytes" : { + "description" : "The size, in bytes, of the analysis archive file", + "type" : "integer" + }, + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "imageDigest" : { + "description" : "The image digest (digest of the manifest describing the image, per docker spec)", + "type" : "string" + }, + "image_detail" : { + "description" : "List of tags associated with the image digest", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TagEntry" + } + }, + "last_updated" : { + "format" : "date-time", + "type" : "string" + }, + "parentDigest" : { + "description" : "The digest of a parent manifest (for manifest-list images)", + "type" : "string" + }, + "status" : { + "description" : "The archival status", + "type" : "string", + "enum" : [ "archiving", "archived", "deleting", "deleted" ] + } + }, + "type" : "object" + }, + "BaseNotificationData" : { + "description" : "Every notification has a payload, which follows this basic structure", + "properties" : { + "notification_type" : { + "type" : "string" + }, + "notification_user" : { + "type" : "string" + }, + "notification_user_email" : { + "type" : "string" + } + }, + "type" : "object" + }, + "CVSSV2Scores" : { + "properties" : { + "base_score" : { + "nullable" : true, + "type" : "number" + }, + "exploitability_score" : { + "nullable" : true, + "type" : "number" + }, + "impact_score" : { + "nullable" : true, + "type" : "number" + } + }, + "type" : "object" + }, + "CVSSV3Scores" : { + "properties" : { + "base_score" : { + "nullable" : true, + "type" : "number" + }, + "exploitability_score" : { + "nullable" : true, + "type" : "number" + }, + "impact_score" : { + "nullable" : true, + "type" : "number" + } + }, + "type" : "object" + }, + "ContentFilesResponse" : { + "description" : "File content listings from images", + "properties" : { + "content" : { + "type" : "array", + "items" : { + "properties" : { + "filename" : { + "type" : "string" + }, + "gid" : { + "type" : "integer" + }, + "linkdest" : { + "nullable" : true, + "type" : "string" + }, + "mode" : { + "type" : "string" + }, + "sha256" : { + "nullable" : true, + "type" : "string" + }, + "size" : { + "type" : "integer" + }, + "type" : { + "type" : "string" + }, + "uid" : { + "type" : "integer" + } + }, + "type" : "object" + } + }, + "content_type" : { + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ContentJAVAPackageResponse" : { + "description" : "Java package content listings from images", + "properties" : { + "content" : { + "type" : "array", + "items" : { + "properties" : { + "cpes" : { + "description" : "A list of Common Platform Enumerations that may uniquely identify the package", + "type" : "array", + "items" : { + "type" : "string" + } + }, + "implementation-version" : { + "type" : "string" + }, + "location" : { + "type" : "string" + }, + "maven-version" : { + "type" : "string" + }, + "origin" : { + "type" : "string" + }, + "package" : { + "type" : "string" + }, + "specification-version" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "content_type" : { + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ContentMalwareResponse" : { + "description" : "Malware listing response", + "properties" : { + "content" : { + "description" : "List of malware scan results, one per scanner configured to run", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MalwareScan" + } + }, + "content_type" : { + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ContentPackageResponse" : { + "description" : "Package content listings from images", + "properties" : { + "content" : { + "type" : "array", + "items" : { + "properties" : { + "cpes" : { + "description" : "A list of Common Platform Enumerations that may uniquely identify the package", + "type" : "array", + "items" : { + "type" : "string" + } + }, + "license" : { + "description" : "Deprecated in favor of the 'licenses' field\"", + "type" : "string" + }, + "licenses" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "location" : { + "type" : "string" + }, + "origin" : { + "type" : "string" + }, + "package" : { + "type" : "string" + }, + "size" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "content_type" : { + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ContentResponse" : { + "description" : "Generic wrapper for content listings from images", + "properties" : { + "content" : { + "type" : "array", + "items" : { + "type" : "object" + } + }, + "content_type" : { + "type" : "string" + }, + "imageDigest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "CredentialList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AccessCredential" + } + }, + "DeleteImageResponse" : { + "description" : "Image deletion response containing status and details", + "properties" : { + "detail" : { + "type" : "string" + }, + "digest" : { + "type" : "string" + }, + "status" : { + "description" : "Current status of the image deletion", + "type" : "string", + "enum" : [ "not_found", "deleting", "delete_failed" ] + } + }, + "type" : "object", + "required" : [ "digest", "status" ] + }, + "DeleteImageResponseList" : { + "description" : "A list of delete image responses", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DeleteImageResponse" + } + }, + "EventCategory" : { + "description" : "A collection of event subcategories", + "properties" : { + "category" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "subcategories" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventSubcategory" + } + } + }, + "type" : "object" + }, + "EventDescription" : { + "description" : "A description of an event type", + "properties" : { + "message" : { + "description" : "The message associated with the event type", + "type" : "string" + }, + "name" : { + "description" : "The event type. The last component of the fully-qualified event_type (category.subcategory.event)", + "type" : "string" + }, + "resource_type" : { + "description" : "The type of resource this event is generated from", + "type" : "string" + }, + "type" : { + "description" : "The fully qualified event type as would be seen in the event payload", + "type" : "string" + } + }, + "type" : "object" + }, + "EventResponse" : { + "description" : "A record of occurance of an asynchronous event triggered either by system or by user activity", + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "event" : { + "properties" : { + "category" : { + "type" : "string" + }, + "details" : { + "type" : "object" + }, + "level" : { + "type" : "string" + }, + "message" : { + "type" : "string" + }, + "resource" : { + "properties" : { + "id" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "user_id" : { + "type" : "string" + } + }, + "type" : "object" + }, + "source" : { + "properties" : { + "base_url" : { + "type" : "string" + }, + "hostid" : { + "type" : "string" + }, + "request_id" : { + "type" : "string" + }, + "servicename" : { + "type" : "string" + } + }, + "type" : "object" + }, + "timestamp" : { + "format" : "date-time", + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "generated_uuid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "EventSubcategory" : { + "description" : "A collection of events related to each other", + "properties" : { + "description" : { + "type" : "string" + }, + "events" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventDescription" + } + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" + }, + "EventTypesList" : { + "description" : "Array of EventCategory objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventCategory" + } + }, + "EventsList" : { + "description" : "Response envelope for paginated listing of events", + "properties" : { + "item_count" : { + "description" : "Number of events in this page", + "type" : "integer" + }, + "next_page" : { + "description" : "Boolean flag, True indicates there are more events and False otherwise", + "type" : "boolean" + }, + "page" : { + "description" : "Page number of this result set", + "type" : "integer" + }, + "results" : { + "description" : "List of events", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EventResponse" + } + } + }, + "type" : "object" + }, + "FeedGroupMetadata" : { + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "last_sync" : { + "format" : "date-time", + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "record_count" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "FeedMetadata" : { + "description" : "Metadata on a single feed based on what the engine finds from querying the endpoints", + "properties" : { + "created_at" : { + "description" : "Date the metadata record was created in engine (first seen on source)", + "format" : "date-time", + "type" : "string" + }, + "groups" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FeedGroupMetadata" + } + }, + "last_full_sync" : { + "format" : "date-time", + "type" : "string" + }, + "name" : { + "description" : "name of the feed", + "type" : "string" + }, + "updated_at" : { + "description" : "Date the metadata was last updated", + "format" : "date-time", + "type" : "string" + } + }, + "type" : "object" + }, + "FeedSyncResult" : { + "description" : "The result of a sync of a single feed", + "properties" : { + "feed" : { + "description" : "The name of the feed synced", + "type" : "string" + }, + "groups" : { + "description" : "Array of group sync results", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/GroupSyncResult" + } + }, + "status" : { + "description" : "The result of the sync operations, either co", + "type" : "string", + "enum" : [ "success", "failure" ] + }, + "total_time_seconds" : { + "description" : "The duratin, in seconds, of the sync of the feed, the sum of all the group syncs", + "type" : "number" + } + }, + "type" : "object" + }, + "FeedSyncResults" : { + "description" : "An array of feed sync summaries representing the result of an explicit feed sync operation", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FeedSyncResult" + } + }, + "FileContentSearchList" : { + "description" : "Simple array of RetrievedFileMetadata objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/FileContentSearchResult" + } + }, + "FileContentSearchResult" : { + "description" : "The retrieved file entry including content (b64 encoded)", + "properties" : { + "matches" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RegexContentMatch" + } + }, + "path" : { + "type" : "string" + } + }, + "type" : "object" + }, + "GateSpec" : { + "description" : "A description of the set of gates available in this engine and the triggers and parameters supported", + "properties" : { + "description" : { + "description" : "Description of the gate", + "type" : "string" + }, + "name" : { + "description" : "Gate name, as it would appear in a policy document", + "type" : "string" + }, + "state" : { + "description" : "State of the gate and transitively all triggers it contains if not 'active'", + "type" : "string", + "enum" : [ "active", "deprecated", "eol" ] + }, + "superceded_by" : { + "description" : "The name of another trigger that supercedes this on functionally if this is deprecated", + "nullable" : true, + "type" : "string" + }, + "triggers" : { + "description" : "List of the triggers that can fire for this Gate", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TriggerSpec" + } + } + }, + "type" : "object" + }, + "GenericNotificationPayload" : { + "description" : "Parent class for Notification Payloads", + "properties" : { + "notificationId" : { + "type" : "string" + }, + "subscription_key" : { + "type" : "string" + }, + "subscription_type" : { + "type" : "string" + }, + "userId" : { + "type" : "string" + } + }, + "type" : "object" + }, + "GroupSyncResult" : { + "properties" : { + "group" : { + "description" : "The name of the group", + "type" : "string" + }, + "status" : { + "type" : "string", + "enum" : [ "success", "failure" ] + }, + "total_time_seconds" : { + "description" : "The duration of the group sync in seconds", + "type" : "number" + }, + "updated_image_count" : { + "description" : "The number of images updated by the this group sync, across all accounts. This is typically only non-zero for vulnerability feeds which update images' vulnerability results during the sync.", + "type" : "integer" + }, + "updated_record_count" : { + "description" : "The number of feed data records synced down as either updates or new records", + "type" : "integer" + } + }, + "type" : "object" + }, + "ImageAnalysisReferences" : { + "description" : "List of image digests to archive", + "type" : "array", + "items" : { + "description" : "Image digest", + "type" : "string" + } + }, + "ImageAnalysisReport" : { + "description" : "Analysis report json to be imported", + "type" : "object" + }, + "ImageAnalysisRequest" : { + "description" : "A request to add an image to be watched and analyzed by the engine. Optionally include the dockerfile content. Either source, digest or tag must be present.", + "properties" : { + "annotations" : { + "description" : "Annotations to be associated with the added image in key/value form", + "type" : "object" + }, + "created_at" : { + "description" : "Optional override of the image creation time, only honored when both tag and digest are also supplied e.g. 2018-10-17T18:14:00Z. Deprecated in favor of the 'source' field", + "format" : "date-time", + "type" : "string" + }, + "digest" : { + "description" : "A digest string for an image, maybe a pull string or just a digest. e.g. nginx@sha256:123 or sha256:abc123. If a pull string, it must have same regisry/repo as the tag field. Deprecated in favor of the 'source' field", + "type" : "string" + }, + "dockerfile" : { + "description" : "Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field.", + "pattern" : "^[a-zA-Z0-9+/=]+$", + "type" : "string" + }, + "image_type" : { + "description" : "Optional. The type of image this is adding, defaults to \"docker\". This can be ommitted until multiple image types are supported.", + "type" : "string" + }, + "source" : { + "$ref" : "#/components/schemas/ImageSource" + }, + "tag" : { + "description" : "Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field", + "type" : "string" + } + }, + "type" : "object" + }, + "ImageContent" : { + "description" : "A metadata content record for a specific image, containing different content type entries", + "type" : "object" + }, + "ImageContentDeleteResponse" : { + "type" : "object" + }, + "ImageDetail" : { + "description" : "A metadata detail record for a specific image. Multiple detail records may map a single catalog image.", + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "dockerfile" : { + "nullable" : true, + "type" : "string" + }, + "fulldigest" : { + "description" : "Full docker-pullable digest string including the registry url and repository necessary get the image", + "type" : "string" + }, + "fulltag" : { + "description" : "Full docker-pullable tag string referencing the image", + "type" : "string" + }, + "imageDigest" : { + "description" : "The parent Anchore Image record to which this detail maps", + "type" : "string" + }, + "imageId" : { + "type" : "string" + }, + "last_updated" : { + "format" : "date-time", + "type" : "string" + }, + "registry" : { + "type" : "string" + }, + "repo" : { + "type" : "string" + }, + "userId" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ImageFilter" : { + "description" : "Filter for an image list by id, tag, or digest, but not both", + "properties" : { + "digest" : { + "type" : "string" + }, + "tag" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ImageImportContentResponse" : { + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "digest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ImageImportManifest" : { + "nullable" : true, + "properties" : { + "contents" : { + "$ref" : "#/components/schemas/ImportContentDigests" + }, + "digest" : { + "type" : "string" + }, + "local_image_id" : { + "description" : "An \"imageId\" as used by Docker if available", + "type" : "string" + }, + "operation_uuid" : { + "type" : "string" + }, + "parent_digest" : { + "description" : "The digest of the images's manifest-list parent if it was accessed from a multi-arch tag where the tag pointed to a manifest-list. This allows preservation of that relationship in the data", + "type" : "string" + }, + "tags" : { + "type" : "array", + "items" : { + "description" : "Full docker reference tags", + "example" : "docker.io/library/nginx:latest", + "type" : "string" + } + } + }, + "type" : "object" + }, + "ImageImportOperation" : { + "description" : "An import record, creating a unique identifier for referencing the operation as well as its state", + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "expires_at" : { + "format" : "date-time", + "type" : "string" + }, + "status" : { + "type" : "string", + "enum" : [ "pending", "queued", "processing", "complete", "failed", "expired" ] + }, + "uuid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "ImageImports" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImageImportOperation" + } + }, + "ImagePackageManifest" : { + "properties" : { + "artifactRelationships" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImportPackageRelationship" + } + }, + "artifacts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImportPackage" + } + }, + "descriptor" : { + "$ref" : "#/components/schemas/ImportDescriptor" + }, + "distro" : { + "$ref" : "#/components/schemas/ImportDistribution" + }, + "schema" : { + "$ref" : "#/components/schemas/ImportSchema" + }, + "source" : { + "$ref" : "#/components/schemas/ImportSource" + } + }, + "type" : "object", + "required" : [ "artifacts", "source", "distro" ], + "additionalProperties" : true + }, + "ImageRef" : { + "description" : "A reference to an image", + "properties" : { + "type" : { + "enum" : [ "tag", "digest", "id" ] + }, + "value" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "type", "value" ] + }, + "ImageReference" : { + "description" : "A summary of an image identity, including digest, id (if available), and any tags known to have ever been mapped to the digest", + "properties" : { + "analyzed_at" : { + "description" : "Timestamp, in rfc3339 format, indicating when the image state became 'analyzed' in Anchore Engine.", + "type" : "string" + }, + "digest" : { + "description" : "The image digest", + "type" : "string" + }, + "id" : { + "description" : "The image id if available", + "type" : "string" + }, + "tag_history" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TagEntry" + } + } + }, + "type" : "object" + }, + "ImageSelectionRule" : { + "properties" : { + "id" : { + "type" : "string" + }, + "image" : { + "$ref" : "#/components/schemas/ImageRef" + }, + "name" : { + "type" : "string" + }, + "registry" : { + "type" : "string" + }, + "repository" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "name", "registry", "repository", "image" ] + }, + "ImageSelector" : { + "description" : "A set of selection criteria to match an image by a tagged pullstring based on its components, with regex support in each field", + "properties" : { + "registry" : { + "description" : "The registry section of a pull string. e.g. with \"docker.io/anchore/anchore-engine:latest\", this is \"docker.io\"", + "type" : "string" + }, + "repository" : { + "description" : "The repository section of a pull string. e.g. with \"docker.io/anchore/anchore-engine:latest\", this is \"anchore/anchore-engine\"", + "type" : "string" + }, + "tag" : { + "description" : "The tag-only section of a pull string. e.g. with \"docker.io/anchore/anchore-engine:latest\", this is \"latest\"", + "type" : "string" + } + }, + "type" : "object" + }, + "ImageSource" : { + "description" : "A set of analysis source types. Only one may be set in any given request.", + "properties" : { + "archive" : { + "$ref" : "#/components/schemas/AnalysisArchiveSource" + }, + "digest" : { + "$ref" : "#/components/schemas/RegistryDigestSource" + }, + "import" : { + "$ref" : "#/components/schemas/ImageImportManifest" + }, + "tag" : { + "$ref" : "#/components/schemas/RegistryTagSource" + } + }, + "type" : "object" + }, + "ImageWithPackages" : { + "description" : "An image record that contains packages", + "properties" : { + "image" : { + "$ref" : "#/components/schemas/ImageReference" + }, + "packages" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PackageReference" + } + } + }, + "type" : "object" + }, + "ImportContentDigestList" : { + "type" : "array", + "items" : { + "description" : "String digest of an uploaded content", + "type" : "string" + } + }, + "ImportContentDigests" : { + "description" : "Digest of content to use in the final import", + "properties" : { + "dockerfile" : { + "description" : "Digest for reference content for dockerfile", + "type" : "string" + }, + "image_config" : { + "description" : "Digest for reference content for image config", + "type" : "string" + }, + "manifest" : { + "description" : "Digest to reference content for the image manifest", + "type" : "string" + }, + "packages" : { + "description" : "Digest to use for the packages content", + "type" : "string" + }, + "parent_manifest" : { + "description" : "Digest for reference content for parent manifest", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "packages", "manifest", "image_config" ] + }, + "ImportDescriptor" : { + "properties" : { + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "name", "version" ], + "additionalProperties" : true + }, + "ImportDistribution" : { + "properties" : { + "idLike" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "name", "version", "idLike" ], + "additionalProperties" : true + }, + "ImportPackage" : { + "properties" : { + "cpes" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "foundBy" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "language" : { + "type" : "string" + }, + "licenses" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "locations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImportPackageLocation" + } + }, + "metadata" : { + "type" : "object" + }, + "metadataType" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "purl" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "name", "version", "type", "locations", "licenses", "language", "cpes", "metadataType" ], + "additionalProperties" : true + }, + "ImportPackageLocation" : { + "properties" : { + "layerID" : { + "type" : "string" + }, + "path" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "path" ], + "additionalProperties" : true + }, + "ImportPackageRelationship" : { + "properties" : { + "child" : { + "type" : "string" + }, + "metadata" : { + "type" : "object", + "additionalProperties" : true + }, + "parent" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "parent", "child", "type" ], + "additionalProperties" : true + }, + "ImportSchema" : { + "properties" : { + "url" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "version", "url" ], + "additionalProperties" : true + }, + "ImportSource" : { + "properties" : { + "target" : { + "additionalProperties" : true + }, + "type" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "type", "target" ], + "additionalProperties" : true + }, + "LocalAnalysisSource" : { + "properties" : { + "digest" : { + "type" : "string" + } + }, + "type" : "object" + }, + "MalwareScan" : { + "description" : "A single scan from a scanner", + "properties" : { + "enabled" : { + "description" : "Indicates if the scanner is enabled", + "type" : "boolean" + }, + "findings" : { + "type" : "array", + "items" : { + "properties" : { + "path" : { + "description" : "A path for a file in the image's rootfs", + "type" : "string" + }, + "signature" : { + "description" : "The malware signature found at the path", + "type" : "string" + } + }, + "type" : "object" + } + }, + "metadata" : { + "description" : "Open schema for scanner-specific metadata related to the scan result", + "type" : "object" + }, + "scanner" : { + "description" : "The name of the scanner that produced the finding", + "type" : "string" + } + }, + "type" : "object" + }, + "MappingRule" : { + "properties" : { + "id" : { + "type" : "string" + }, + "image" : { + "$ref" : "#/components/schemas/ImageRef" + }, + "name" : { + "type" : "string" + }, + "policy_id" : { + "description" : "Optional single policy to evalute, if set will override any value in policy_ids, for backwards compatibility. Generally, policy_ids should be used even with a array of length 1.", + "type" : "string" + }, + "policy_ids" : { + "description" : "List of policyIds to evaluate in order, to completion", + "type" : "array", + "items" : { + "description" : "PolicyId to evaluate", + "type" : "string" + } + }, + "registry" : { + "type" : "string" + }, + "repository" : { + "type" : "string" + }, + "whitelist_ids" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + }, + "type" : "object", + "required" : [ "name", "registry", "repository", "image" ] + }, + "MetadataResponse" : { + "description" : "Generic wrapper for metadata listings from images", + "properties" : { + "imageDigest" : { + "type" : "string" + }, + "metadata" : { }, + "metadata_type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "NotificationBase" : { + "description" : "base object for Notifications (every notification has this basic structure)", + "properties" : { + "created_at" : { + "type" : "integer" + }, + "dataId" : { + "type" : "string" + }, + "last_updated" : { + "type" : "integer" + }, + "max_tries" : { + "type" : "integer" + }, + "queueId" : { + "type" : "string" + }, + "record_state_key" : { + "type" : "string", + "default" : "active" + }, + "record_state_val" : { + "nullable" : true, + "type" : "string" + }, + "tries" : { + "type" : "integer" + }, + "userId" : { + "type" : "string" + } + }, + "type" : "object" + }, + "NvdDataList" : { + "description" : "List of Nvd Data objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NvdDataObject" + } + }, + "NvdDataObject" : { + "properties" : { + "cvss_v2" : { + "$ref" : "#/components/schemas/CVSSV2Scores" + }, + "cvss_v3" : { + "$ref" : "#/components/schemas/CVSSV3Scores" + }, + "id" : { + "description" : "NVD Vulnerability ID", + "type" : "string" + } + }, + "type" : "object" + }, + "PackageReference" : { + "description" : "A record of a software item which is vulnerable or carries a fix for a vulnerability", + "properties" : { + "name" : { + "description" : "Package name", + "type" : "string" + }, + "type" : { + "description" : "Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...)", + "type" : "string" + }, + "version" : { + "description" : "A version for the package. If null, then references all versions", + "nullable" : true, + "type" : "string" + } + }, + "type" : "object" + }, + "PaginatedImageList" : { + "description" : "Pagination wrapped list of images that match some filter", + "allOf" : [ { + "$ref" : "#/components/schemas/PaginationProperties" + }, { + "properties" : { + "images" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImageWithPackages" + } + } + }, + "type" : "object" + } ] + }, + "PaginatedVulnerabilityList" : { + "description" : "A paginated listing of vulnerability records sorted by ID in descending order", + "allOf" : [ { + "$ref" : "#/components/schemas/PaginationProperties" + }, { + "properties" : { + "vulnerabilities" : { + "description" : "The listing of matching vulnerabilities for the query subject to pagination", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/StandaloneVulnerability" + } + } + }, + "type" : "object" + } ] + }, + "PaginatedVulnerableImageList" : { + "description" : "Pagination wrapped list of images with vulnerabilties that match some filter", + "allOf" : [ { + "$ref" : "#/components/schemas/PaginationProperties" + }, { + "properties" : { + "images" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/VulnerableImage" + } + } + }, + "type" : "object" + } ] + }, + "PaginationProperties" : { + "description" : "Properties for common pagination handling to be included in any wrapping object that needs pagination elements", + "properties" : { + "next_page" : { + "description" : "True if additional pages exist (page + 1) or False if this is the last page", + "type" : "string" + }, + "page" : { + "description" : "The page number returned (should match the requested page query string param)", + "type" : "string" + }, + "returned_count" : { + "description" : "The number of items sent in this response", + "type" : "integer" + } + }, + "type" : "object" + }, + "Policy" : { + "properties" : { + "comment" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "rules" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PolicyRule" + } + }, + "version" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "id", "version" ] + }, + "PolicyBundle" : { + "description" : "A bundle containing a set of policies, whitelists, and rules for mapping them to specific images", + "properties" : { + "blacklisted_images" : { + "description" : "List of mapping rules that define which images should always result in a STOP/FAIL policy result regardless of policy content or presence in whitelisted_images", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImageSelectionRule" + } + }, + "comment" : { + "description" : "Description of the bundle, human readable", + "type" : "string" + }, + "id" : { + "description" : "Id of the bundle", + "type" : "string" + }, + "mappings" : { + "description" : "Mapping rules for defining which policy and whitelist(s) to apply to an image based on a match of the image tag or id. Evaluated in order.", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/MappingRule" + } + }, + "name" : { + "description" : "Human readable name for the bundle", + "type" : "string" + }, + "policies" : { + "description" : "Policies which define the go/stop/warn status of an image using rule matches on image properties", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Policy" + } + }, + "version" : { + "description" : "Version id for this bundle format", + "type" : "string" + }, + "whitelisted_images" : { + "description" : "List of mapping rules that define which images should always be passed (unless also on the blacklist), regardless of policy result.", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ImageSelectionRule" + } + }, + "whitelists" : { + "description" : "Whitelists which define which policy matches to disregard explicitly in the final policy decision", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Whitelist" + } + } + }, + "type" : "object", + "required" : [ "id", "version", "policies", "mappings" ] + }, + "PolicyBundleList" : { + "description" : "List of PolicyBundleRecord objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PolicyBundleRecord" + } + }, + "PolicyBundleRecord" : { + "description" : "A policy bundle plus some metadata", + "properties" : { + "active" : { + "description" : "True if the bundle is currently defined to be used automatically", + "type" : "boolean" + }, + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "last_updated" : { + "format" : "date-time", + "type" : "string" + }, + "policyId" : { + "description" : "The bundle's identifier", + "type" : "string" + }, + "policy_source" : { + "description" : "Source location of where the policy bundle originated", + "type" : "string" + }, + "policybundle" : { + "$ref" : "#/components/schemas/PolicyBundle" + }, + "userId" : { + "description" : "UserId of the user that owns the bundle", + "type" : "string" + } + }, + "type" : "object" + }, + "PolicyEvalNotification" : { + "allOf" : [ { + "$ref" : "#/components/schemas/NotificationBase" + }, { + "description" : "The Notification Object definition for Policy Eval Notifications", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/PolicyEvalNotificationData" + } + }, + "type" : "object" + } ] + }, + "PolicyEvalNotificationData" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BaseNotificationData" + }, { + "properties" : { + "notification_payload" : { + "$ref" : "#/components/schemas/PolicyEvalNotificationPayload" + } + }, + "type" : "object" + } ] + }, + "PolicyEvalNotificationPayload" : { + "allOf" : [ { + "$ref" : "#/components/schemas/GenericNotificationPayload" + }, { + "properties" : { + "annotations" : { + "description" : "List of Corresponding Image Annotations", + "nullable" : true, + "type" : "object" + }, + "curr_eval" : { + "description" : "The Current Policy Evaluation result", + "type" : "object" + }, + "last_eval" : { + "description" : "The Previous Policy Evaluation result", + "type" : "object" + } + }, + "type" : "object" + } ] + }, + "PolicyEvaluation" : { + "description" : "Evaluation response object", + "type" : "object" + }, + "PolicyEvaluationList" : { + "description" : "Evaluation response object", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PolicyEvaluation" + } + }, + "PolicyRule" : { + "description" : "A rule that defines and decision value if the match is found true for a given image.", + "properties" : { + "action" : { + "enum" : [ "GO", "STOP", "WARN" ] + }, + "gate" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "params" : { + "type" : "array", + "items" : { + "properties" : { + "name" : { + "type" : "string" + }, + "value" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "name", "value" ] + } + }, + "trigger" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "gate", "trigger", "action" ] + }, + "RegexContentMatch" : { + "description" : "Match of a named regex on a file", + "properties" : { + "lines" : { + "description" : "A list of line numbers in the file that matched the regex", + "type" : "array", + "items" : { + "type" : "integer" + } + }, + "name" : { + "description" : "The name associated with the regular expression", + "type" : "string" + }, + "regex" : { + "description" : "The regular expression used for the match", + "type" : "string" + } + }, + "type" : "object" + }, + "RegistryConfiguration" : { + "description" : "A registry entry describing the endpoint and credentials for a registry to pull images from", + "properties" : { + "created_at" : { + "format" : "date-time", + "type" : "string" + }, + "last_upated" : { + "format" : "date-time", + "type" : "string" + }, + "registry" : { + "description" : "hostname:port string for accessing the registry, as would be used in a docker pull operation", + "type" : "string" + }, + "registry_name" : { + "description" : "human readable name associated with registry record", + "type" : "string" + }, + "registry_type" : { + "description" : "Type of registry", + "type" : "string" + }, + "registry_user" : { + "description" : "Username portion of credential to use for this registry", + "type" : "string" + }, + "registry_verify" : { + "description" : "Use TLS/SSL verification for the registry URL", + "type" : "boolean" + }, + "userId" : { + "description" : "Engine user that owns this registry entry", + "type" : "string" + } + }, + "type" : "object" + }, + "RegistryConfigurationList" : { + "description" : "List of registry configurations", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RegistryConfiguration" + } + }, + "RegistryConfigurationRequest" : { + "description" : "A registry record describing the endpoint and credentials for a registry", + "properties" : { + "registry" : { + "description" : "hostname:port string for accessing the registry, as would be used in a docker pull operation. May include some or all of a repository and wildcards (e.g. docker.io/library/* or gcr.io/myproject/myrepository)", + "type" : "string" + }, + "registry_name" : { + "description" : "human readable name associated with registry record", + "type" : "string" + }, + "registry_pass" : { + "description" : "Password portion of credential to use for this registry", + "type" : "string" + }, + "registry_type" : { + "description" : "Type of registry", + "type" : "string" + }, + "registry_user" : { + "description" : "Username portion of credential to use for this registry", + "type" : "string" + }, + "registry_verify" : { + "description" : "Use TLS/SSL verification for the registry URL", + "type" : "boolean" + } + }, + "type" : "object" + }, + "RegistryDigestSource" : { + "description" : "An image reference using a digest in a registry, includes some extra tag and timestamp info in addition to the pull string to allow proper tag history reconstruction.", + "nullable" : true, + "properties" : { + "creation_timestamp_override" : { + "description" : "Optional override of the image creation time to support proper tag history construction in cases of out-of-order analysis compared to registry history for the tag", + "format" : "date-time", + "type" : "string" + }, + "dockerfile" : { + "description" : "Base64 encoded content of the dockerfile used to build the image, if available.", + "pattern" : "^[a-zA-Z0-9+/=]+$", + "type" : "string" + }, + "pullstring" : { + "description" : "A digest-based pullstring (e.g. docker.io/nginx@sha256:123abc)", + "type" : "string" + }, + "tag" : { + "description" : "A valid docker tag reference (e.g. docker.io/nginx:latest) that will be associated with the image but not used to pull the image.", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "pullstring", "tag" ] + }, + "RegistryTagSource" : { + "description" : "An image reference using a tag in a registry, this is the most common source type.", + "nullable" : true, + "properties" : { + "dockerfile" : { + "description" : "Base64 encoded content of the dockerfile used to build the image, if available.", + "pattern" : "^[a-zA-Z0-9+/=]+$", + "type" : "string" + }, + "pullstring" : { + "description" : "A docker pull string (e.g. docker.io/nginx:latest, or docker.io/nginx@sha256:abd) to retrieve the image", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "pullstring" ] + }, + "RepositoryTagList" : { + "description" : "List of discovered tags in a repository", + "type" : "array", + "items" : { + "type" : "string" + } + }, + "RetrievedFile" : { + "description" : "The retrieved file entry including content (b64 encoded)", + "properties" : { + "b64_content" : { + "type" : "string" + }, + "path" : { + "type" : "string" + } + }, + "type" : "object" + }, + "RetrievedFileList" : { + "description" : "Simple array of RetrievedFileMetadata objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RetrievedFile" + } + }, + "SecretSearchList" : { + "description" : "Simple array of RetrievedFileMetadata objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SecretSearchResult" + } + }, + "SecretSearchResult" : { + "description" : "The retrieved file entry including content (b64 encoded)", + "properties" : { + "matches" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RegexContentMatch" + } + }, + "path" : { + "type" : "string" + } + }, + "type" : "object" + }, + "Service" : { + "description" : "A service status record", + "properties" : { + "base_url" : { + "description" : "The url to reach the service, including port as needed", + "type" : "string" + }, + "hostid" : { + "description" : "The unique id of the host on which the service is executing", + "type" : "string" + }, + "service_detail" : { + "$ref" : "#/components/schemas/StatusResponse" + }, + "servicename" : { + "description" : "Registered service name", + "type" : "string" + }, + "status" : { + "type" : "boolean" + }, + "status_message" : { + "description" : "A state indicating the condition of the service. Normal operation is 'registered'", + "type" : "string" + }, + "version" : { + "description" : "The version of the service as reported by the service implementation on registration", + "type" : "string" + } + }, + "type" : "object" + }, + "ServiceList" : { + "description" : "A list of service objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Service" + } + }, + "ServiceVersion" : { + "description" : "Version information for a service", + "properties" : { + "api" : { + "description" : "Api Version string", + "properties" : { + "version" : { + "description" : "Semantic version of the api", + "type" : "string" + } + }, + "type" : "object" + }, + "db" : { + "properties" : { + "schema_version" : { + "description" : "Semantic version of the db schema", + "type" : "string" + } + }, + "type" : "object" + }, + "service" : { + "properties" : { + "version" : { + "description" : "Semantic Version string of the service implementation", + "type" : "string" + } + }, + "type" : "object" + } + }, + "type" : "object" + }, + "StandaloneVulnerability" : { + "description" : "A single vulnerability record in a single namespace, the unique key is the combination of the id and namespace", + "properties" : { + "affected_packages" : { + "description" : "The array of packages (typically packages) that are vulnerable-to or provide fixes-for this vulnerability", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PackageReference" + } + }, + "description" : { + "description" : "Description of the vulnerability if available", + "type" : "string" + }, + "id" : { + "description" : "Vulnerability identifier. May be CVE-X, RHSA-X, etc. Not necessarily unique across namespaces", + "type" : "string" + }, + "link" : { + "description" : "URL for the upstream CVE record in the reporting source (e.g. ubuntu security tracker)", + "type" : "string" + }, + "namespace" : { + "description" : "The namespace for the vulnerability record to avoid conflicts for the same id in different distros or sources (e.g. deb vs ubuntu for same CVE)", + "type" : "string" + }, + "nvd_data" : { + "$ref" : "#/components/schemas/NvdDataList" + }, + "references" : { + "description" : "List of references including", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/VulnerabilityReference" + } + }, + "severity" : { + "description" : "Severity label specific to the namepsace", + "type" : "string", + "enum" : [ "Unknown", "Negligible", "Low", "Medium", "High", "Critical" ] + }, + "vendor_data" : { + "$ref" : "#/components/schemas/VendorDataList" + } + }, + "type" : "object" + }, + "StatusResponse" : { + "description" : "System status response", + "properties" : { + "available" : { + "type" : "boolean" + }, + "busy" : { + "type" : "boolean" + }, + "db_version" : { + "type" : "string" + }, + "detail" : { + "type" : "object" + }, + "message" : { + "type" : "string" + }, + "up" : { + "type" : "boolean" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object" + }, + "Subscription" : { + "description" : "Subscription entry", + "properties" : { + "active" : { + "description" : "Is the subscription currently active", + "type" : "boolean" + }, + "subscription_id" : { + "description" : "the unique id for this subscription record", + "type" : "string" + }, + "subscription_key" : { + "description" : "The key value that the subscription references. E.g. a tag value or a repo name.", + "type" : "string" + }, + "subscription_type" : { + "description" : "The type of the subscription", + "type" : "string" + }, + "subscription_value" : { + "description" : "The value of the subscription target", + "nullable" : true, + "type" : "string" + }, + "userId" : { + "description" : "The userId of the subscribed user", + "type" : "string" + } + }, + "type" : "object" + }, + "SubscriptionList" : { + "description" : "List of subscriptions", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Subscription" + } + }, + "SubscriptionRequest" : { + "description" : "A subscription entry to add to the system", + "properties" : { + "subscription_key" : { + "type" : "string" + }, + "subscription_type" : { + "type" : "string" + }, + "subscription_value" : { + "nullable" : true, + "type" : "string" + } + }, + "type" : "object" + }, + "SubscriptionUpdate" : { + "description" : "A modification to a subscription entry to change its status or value", + "properties" : { + "active" : { + "description" : "Toggle the subscription processing on or off", + "type" : "boolean" + }, + "subscription_value" : { + "description" : "The new subscription value, e.g. the new tag to be subscribed to", + "nullable" : true, + "type" : "string" + } + }, + "type" : "object" + }, + "SystemStatusResponse" : { + "description" : "System status response", + "properties" : { + "service_states" : { + "$ref" : "#/components/schemas/ServiceList" + } + }, + "type" : "object" + }, + "TagEntry" : { + "description" : "A docker-pullable tag value as well as deconstructed components", + "properties" : { + "detected_at" : { + "description" : "The timestamp at which the Anchore Engine detected this tag was mapped to the image digest. Does not necessarily indicate when the tag was actually pushed to the registry.", + "format" : "date-time", + "type" : "string" + }, + "pullstring" : { + "description" : "The pullable string for the tag. E.g. \"docker.io/library/node:latest\"", + "type" : "string" + }, + "registry" : { + "description" : "The registry hostname:port section of the pull string", + "type" : "string" + }, + "repository" : { + "description" : "The repository section of the pull string", + "type" : "string" + }, + "tag" : { + "description" : "The tag-only section of the pull string", + "type" : "string" + } + }, + "type" : "object" + }, + "TagUpdateNotification" : { + "allOf" : [ { + "$ref" : "#/components/schemas/NotificationBase" + }, { + "description" : "The Notification Object definition for Tag Update Notifications", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/TagUpdateNotificationData" + } + }, + "type" : "object" + } ] + }, + "TagUpdateNotificationData" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BaseNotificationData" + }, { + "properties" : { + "notification_payload" : { + "$ref" : "#/components/schemas/TagUpdateNotificationPayload" + } + }, + "type" : "object" + } ] + }, + "TagUpdateNotificationPayload" : { + "allOf" : [ { + "$ref" : "#/components/schemas/GenericNotificationPayload" + }, { + "properties" : { + "annotations" : { + "description" : "List of Corresponding Image Annotations", + "nullable" : true, + "type" : "object" + }, + "curr_eval" : { + "description" : "A list containing the current image digest", + "type" : "array", + "items" : { } + }, + "last_eval" : { + "description" : "A list containing the previous image digests", + "type" : "array", + "items" : { } + } + }, + "type" : "object" + } ] + }, + "TokenResponse" : { + "properties" : { + "token" : { + "description" : "The token content", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "token" ] + }, + "TriggerParamSpec" : { + "properties" : { + "description" : { + "type" : "string" + }, + "example" : { + "description" : "An example value for the parameter (encoded as a string if the parameter is an object or list type)", + "nullable" : true, + "type" : "string" + }, + "name" : { + "description" : "Parameter name as it appears in policy document", + "type" : "string" + }, + "required" : { + "description" : "Is this a required parameter or optional", + "type" : "boolean" + }, + "state" : { + "description" : "State of the trigger parameter", + "type" : "string", + "enum" : [ "active", "deprecated", "eol" ] + }, + "superceded_by" : { + "description" : "The name of another trigger that supercedes this on functionally if this is deprecated", + "nullable" : true, + "type" : "string" + }, + "validator" : { + "description" : "If present, a definition for validation of input. Typically a jsonschema object that can be used to validate an input against.", + "type" : "object" + } + }, + "type" : "object" + }, + "TriggerSpec" : { + "description" : "Definition of a trigger and its parameters", + "properties" : { + "description" : { + "description" : "Trigger description for what it tests and when it will fire during evaluation", + "type" : "string" + }, + "name" : { + "description" : "Name of the trigger as it would appear in a policy document", + "type" : "string" + }, + "parameters" : { + "description" : "The list of parameters that are valid for this trigger", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TriggerParamSpec" + } + }, + "state" : { + "description" : "State of the trigger", + "type" : "string", + "enum" : [ "active", "deprecated", "eol" ] + }, + "superceded_by" : { + "description" : "The name of another trigger that supercedes this on functionally if this is deprecated", + "nullable" : true, + "type" : "string" + } + }, + "type" : "object" + }, + "User" : { + "description" : "A username for authenticating with one or more types of credentials. User type defines the expected credentials allowed for the user. Native users have passwords, External users have no credential internally. Internal users are service/system users for inter-service communication.", + "properties" : { + "created_at" : { + "description" : "The timestampt the user record was created", + "format" : "date-time", + "type" : "string" + }, + "last_updated" : { + "description" : "The timestamp of the last update to this record", + "format" : "date-time", + "type" : "string" + }, + "source" : { + "description" : "If the user is external, this is the source that the user was initialized from. All other user types have this set to null", + "type" : "string" + }, + "type" : { + "description" : "The user's type", + "type" : "string", + "enum" : [ "native", "internal", "external" ] + }, + "username" : { + "description" : "The username to authenticate with", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "username" ] + }, + "UserCreationRequest" : { + "description" : "A payload for creating a new user, includes the username and password in a single request", + "properties" : { + "password" : { + "description" : "The initial password for the user, must be at least 6 characters, up to 128", + "pattern" : ".{6,128}$", + "type" : "string" + }, + "username" : { + "description" : "The username to create", + "pattern" : "^[a-zA-Z0-9][a-zA-Z0-9@.!#$+-=^_`~;]{1,126}[a-zA-Z0-9]$", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "username", "password" ] + }, + "UserList" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/User" + } + }, + "VendorDataList" : { + "description" : "List of Vendor Data objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/VendorDataObject" + } + }, + "VendorDataObject" : { + "properties" : { + "cvss_v2" : { + "$ref" : "#/components/schemas/CVSSV2Scores" + }, + "cvss_v3" : { + "$ref" : "#/components/schemas/CVSSV3Scores" + }, + "id" : { + "description" : "Vendor Vulnerability ID", + "type" : "string" + } + }, + "type" : "object" + }, + "VulnDiffResult" : { + "description" : "The results of the comparing two vulnerability records during an update", + "properties" : { + "added" : { + "type" : "array", + "items" : { } + }, + "removed" : { + "type" : "array", + "items" : { } + }, + "updated" : { + "type" : "array", + "items" : { } + } + }, + "type" : "object" + }, + "VulnUpdateNotification" : { + "allOf" : [ { + "$ref" : "#/components/schemas/NotificationBase" + }, { + "description" : "The Notification Object definition for Tag Update Notifications", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/VulnUpdateNotificationData" + } + }, + "type" : "object" + } ] + }, + "VulnUpdateNotificationData" : { + "allOf" : [ { + "$ref" : "#/components/schemas/BaseNotificationData" + }, { + "properties" : { + "notification_payload" : { + "$ref" : "#/components/schemas/VulnUpdateNotificationPayload" + } + }, + "type" : "object" + } ] + }, + "VulnUpdateNotificationPayload" : { + "allOf" : [ { + "$ref" : "#/components/schemas/GenericNotificationPayload" + }, { + "properties" : { + "annotations" : { + "description" : "List of Corresponding Image Annotations", + "nullable" : true, + "type" : "object" + }, + "diff_vulnerability_result" : { + "$ref" : "#/components/schemas/VulnDiffResult" + }, + "imageDigest" : { + "type" : "string" + } + }, + "type" : "object" + } ] + }, + "Vulnerability" : { + "properties" : { + "feed" : { + "description" : "The name of the feed where vulnerability match was made", + "type" : "string" + }, + "feed_group" : { + "description" : "The name of the feed group where vulnerability match was made", + "type" : "string" + }, + "fix" : { + "description" : "The package containing a fix, if available", + "type" : "string" + }, + "nvd_data" : { + "$ref" : "#/components/schemas/NvdDataList" + }, + "package" : { + "description" : "The package name and version that are vulnerable in the image", + "type" : "string" + }, + "package_cpe" : { + "description" : "The CPE string (if applicable) describing the package to vulnerability match", + "type" : "string" + }, + "package_name" : { + "description" : "The name of the vulnerable package artifact", + "type" : "string" + }, + "package_path" : { + "description" : "The location (if applicable) of the vulnerable package in the container filesystem", + "type" : "string" + }, + "package_type" : { + "description" : "The type of vulnerable package", + "type" : "string" + }, + "package_version" : { + "description" : "The version of the vulnerable package artifact", + "type" : "string" + }, + "severity" : { + "description" : "The severity of the vulnerability", + "type" : "string" + }, + "url" : { + "description" : "The url for more information about the vulnerability", + "type" : "string" + }, + "vendor_data" : { + "$ref" : "#/components/schemas/VendorDataList" + }, + "vuln" : { + "description" : "The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123", + "type" : "string" + } + }, + "type" : "object" + }, + "VulnerabilityList" : { + "description" : "List of Vulnerability objects", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Vulnerability" + } + }, + "VulnerabilityReference" : { + "description" : "An external link/reference", + "properties" : { + "source" : { + "description" : "The reference source", + "type" : "string" + }, + "tags" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "url" : { + "description" : "The reference url", + "type" : "string" + } + }, + "type" : "object" + }, + "VulnerabilityResponse" : { + "description" : "envelope containing list of vulnerabilities", + "properties" : { + "imageDigest" : { + "type" : "string" + }, + "vulnerabilities" : { + "$ref" : "#/components/schemas/VulnerabilityList" + }, + "vulnerability_type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "VulnerableImage" : { + "description" : "A record of an image vulnerable to some known vulnerability. Includes vulnerable package information", + "properties" : { + "affected_packages" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/VulnerablePackageReference" + } + }, + "image" : { + "$ref" : "#/components/schemas/ImageReference" + } + }, + "type" : "object" + }, + "VulnerablePackageReference" : { + "description" : "A record of a software item which is vulnerable or carries a fix for a vulnerability", + "properties" : { + "name" : { + "description" : "Package name", + "type" : "string" + }, + "namespace" : { + "description" : "Vulnerability namespace of affected package", + "type" : "string" + }, + "severity" : { + "description" : "Severity of vulnerability affecting package", + "type" : "string" + }, + "type" : { + "description" : "Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...)", + "type" : "string" + }, + "version" : { + "description" : "A version for the package. If null, then references all versions", + "nullable" : true, + "type" : "string" + } + }, + "type" : "object" + }, + "Whitelist" : { + "description" : "A collection of whitelist items to match a policy evaluation against.", + "properties" : { + "comment" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/WhitelistItem" + } + }, + "name" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "id", "version" ] + }, + "WhitelistItem" : { + "description" : "Identifies a specific gate and trigger match from a policy against an image and indicates it should be ignored in final policy decisions", + "properties" : { + "expires_on" : { + "format" : "date-time", + "pattern" : "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:\\:\\d+)?[A-Z]?$", + "type" : "string" + }, + "gate" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "trigger_id" : { + "type" : "string" + } + }, + "type" : "object", + "required" : [ "gate", "trigger_id" ] + } + } + } +} \ No newline at end of file diff --git a/gen-api-ex/api.gov.uk.vehicle-enquiry.1.1.0.yaml b/gen-api-ex/api.gov.uk.vehicle-enquiry.1.1.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7e3b958815b0e6e3080673fb68307a96e88cc71e --- /dev/null +++ b/gen-api-ex/api.gov.uk.vehicle-enquiry.1.1.0.yaml @@ -0,0 +1,296 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "email" : "dvlaapiaccess@dvla.gov.uk", + "name" : "DVLA API Team", + "x-twitter" : "GDSTeam" + }, + "description" : "Interface specification for the DVLA Vehicle Enquiry API", + "title" : "Vehicle Enquiry API", + "version" : "1.1.0", + "x-providerName" : "api.gov.uk", + "x-logo" : { + "url" : "https://twitter.com/GDSTeam/profile_image?size=original" + }, + "x-apisguru-categories" : [ "open_data" ], + "x-serviceName" : "vehicle-enquiry", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://developer-portal.driver-vehicle-licensing.api.gov.uk/apis/vehicle-enquiry-service/v1.1.0-vehicle-enquiry-service.json", + "version" : "3.0" + } ] + }, + "servers" : [ { + "url" : "https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry", + "description" : "Production environment" + }, { + "url" : "https://uat.driver-vehicle-licensing.api.gov.uk/vehicle-enquiry", + "description" : "Test environment" + } ], + "tags" : [ { + "name" : "vehicle" + } ], + "paths" : { + "/v1/vehicles" : { + "post" : { + "tags" : [ "vehicle" ], + "summary" : "Get vehicle details by registration number", + "description" : "Returns vehicle details based on registration number", + "operationId" : "getVehicleDetailsByRegistrationNumber", + "parameters" : [ { + "description" : "Client Specific API Key", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "header", + "name" : "x-api-key" + }, { + "description" : "Consumer Correlation ID", + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "header", + "name" : "X-Correlation-Id" + } ], + "requestBody" : { + "description" : "Registration number of the vehicle to find details for", + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VehicleRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Successful response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Vehicle" + } + } + } + }, + "400" : { + "description" : "Bad Request", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "404" : { + "description" : "Vehicle Not Found", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "500" : { + "description" : "Internal Server Error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + }, + "503" : { + "description" : "Service Unavailable", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + } + }, + "components" : { + "schemas" : { + "ErrorResponse" : { + "description" : "Error Response", + "properties" : { + "errors" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Errors" + } + } + }, + "type" : "object" + }, + "Errors" : { + "properties" : { + "code" : { + "description" : "DVLA reference code", + "example" : "105", + "type" : "string" + }, + "detail" : { + "description" : "A meaningful description of the error which has occurred", + "example" : "Invalid format for field - vehicle registration number", + "type" : "string" + }, + "status" : { + "example" : "400", + "type" : "string" + }, + "title" : { + "description" : "Error title", + "example" : "Invalid vrn number", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "title" ] + }, + "Vehicle" : { + "properties" : { + "artEndDate" : { + "description" : "Additional Rate of Tax End Date, format: YYYY-MM-DD", + "example" : "2007-12-25", + "format" : "date", + "type" : "string" + }, + "co2Emissions" : { + "description" : "Carbon Dioxide emissions in grams per kilometre", + "example" : 0, + "format" : "int32", + "type" : "integer" + }, + "colour" : { + "description" : "Vehicle colour", + "example" : "Blue", + "type" : "string" + }, + "dateOfLastV5CIssued" : { + "description" : "Date of last V5C issued", + "example" : "2016-12-25", + "format" : "date", + "type" : "string" + }, + "engineCapacity" : { + "description" : "Engine capacity in cubic centimetres", + "example" : 1796, + "format" : "int32", + "type" : "integer" + }, + "euroStatus" : { + "description" : "Euro Status (Dealer / Customer Provided (new vehicles))", + "example" : "Euro 5", + "type" : "string" + }, + "fuelType" : { + "description" : "Fuel type (Method of Propulsion)", + "example" : "PETROL", + "type" : "string" + }, + "make" : { + "description" : "Vehicle make", + "example" : "ROVER", + "type" : "string" + }, + "markedForExport" : { + "description" : "True only if vehicle has been export marked", + "example" : true, + "type" : "boolean" + }, + "monthOfFirstDvlaRegistration" : { + "description" : "Month of First DVLA Registration", + "example" : "2011-11", + "format" : "date", + "type" : "string" + }, + "monthOfFirstRegistration" : { + "description" : "Month of First Registration", + "example" : "2012-12", + "format" : "date", + "type" : "string" + }, + "motExpiryDate" : { + "description" : "Mot Expiry Date", + "example" : "2008-12-25", + "format" : "date", + "type" : "string" + }, + "motStatus" : { + "description" : "MOT Status of the vehicle", + "example" : "No details held by DVLA", + "type" : "string", + "enum" : [ "No details held by DVLA", "No results returned", "Not valid", "Valid" ] + }, + "realDrivingEmissions" : { + "description" : "Real Driving Emissions value", + "example" : "1", + "type" : "string" + }, + "registrationNumber" : { + "description" : "Registration number of the vehicle", + "example" : "WN67DSO", + "type" : "string" + }, + "revenueWeight" : { + "description" : "Revenue weight in kilograms", + "example" : 1640, + "format" : "int32", + "type" : "integer" + }, + "taxDueDate" : { + "description" : "Date of tax liablity, Used in calculating licence information presented to user", + "example" : "2017-12-25", + "format" : "date", + "type" : "string" + }, + "taxStatus" : { + "description" : "Tax status of the vehicle", + "example" : "Untaxed", + "type" : "string", + "enum" : [ "Not Taxed for on Road Use", "SORN", "Taxed", "Untaxed" ] + }, + "typeApproval" : { + "description" : "Vehicle Type Approval Category", + "example" : "N1", + "type" : "string" + }, + "wheelplan" : { + "description" : "Vehicle wheel plan", + "example" : "NON STANDARD", + "type" : "string" + }, + "yearOfManufacture" : { + "description" : "Year of Manufacture", + "example" : 2004, + "format" : "int32", + "type" : "integer" + } + }, + "type" : "object", + "required" : [ "registrationNumber" ] + }, + "VehicleRequest" : { + "properties" : { + "registrationNumber" : { + "type" : "string" + } + }, + "type" : "object" + } + } + } +} \ No newline at end of file diff --git a/gen-api-ex/api.video.1.yaml b/gen-api-ex/api.video.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gen-api-ex/api2cart.com.1.1.yaml b/gen-api-ex/api2cart.com.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gen-api-ex/api2pdf.com.1.0.0.yaml b/gen-api-ex/api2pdf.com.1.0.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d66588ae0c8f69d9733dbfb4e772733e3a4dd12f --- /dev/null +++ b/gen-api-ex/api2pdf.com.1.0.0.yaml @@ -0,0 +1,667 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "email" : "support@api2pdf.com", + "name" : "Support", + "x-twitter" : "api2pdf_status" + }, + "description" : "\n# Introduction\n[Api2Pdf](https://www.api2pdf.com) is a powerful PDF generation API with no rate limits or file size constraints. Api2Pdf runs on AWS Lambda, a serverless architecture powered by Amazon to scale to millions of requests while being up to 90% cheaper than alternatives. **Supports wkhtmltopdf, Headless Chrome, LibreOffice, and PDF Merge.** You can also generate barcodes with ZXING (Zebra Crossing).\n# SDKs & Client Libraries\nWe've made a number of open source libraries available for the API\n- Python: [https://github.com/api2pdf/api2pdf.python](https://github.com/api2pdf/api2pdf.python)\n- .NET: [https://github.com/api2pdf/api2pdf.dotnet](https://github.com/api2pdf/api2pdf.dotnet)\n- Nodejs: [https://github.com/api2pdf/api2pdf.node](https://github.com/api2pdf/api2pdf.node)\n- PHP: [https://github.com/Api2Pdf/api2pdf.php](https://github.com/Api2Pdf/api2pdf.php)\n- Ruby: (Coming soon)\n# Authorization\nCreate an account at [portal.api2pdf.com](https://portal.api2pdf.com/register) to get an API key.\n\n**Authorize your API calls**\n- GET requests, include apikey=YOUR-API-KEY as a query string parameter\n- POST requests, add **Authorization** to your header.\n``` Authorization: YOUR-API-KEY ```\n\n# Quickstart\nIf you are looking for just a quick call to grab PDFs of a URL, you can do a GET request like:\n``` https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={YourApiKey} ```\n\nFor more advanced usage and settings, see the API specification below.\n", + "license" : { + "name" : "Creative Commons", + "url" : "https://creativecommons.org/licenses/by/4.0/legalcode" + }, + "title" : "Api2Pdf - PDF Generation, Powered by AWS Lambda", + "version" : "1.0.0", + "x-providerName" : "api2pdf.com", + "x-logo" : { + "url" : "https://twitter.com/api2pdf_status/profile_image?size=original" + }, + "x-apisguru-categories" : [ "developer_tools" ], + "x-origin" : [ { + "converter" : { + "url" : "https://github.com/lucybot/api-spec-converter", + "version" : "2.7.18" + }, + "format" : "openapi", + "url" : "https://app.swaggerhub.com/apiproxy/schema/file/api2pdf/api2pdf/1.0.0/swagger.json", + "version" : "3.0" + } ] + }, + "servers" : [ { + "url" : "https://v2018.api2pdf.com", + "description" : "Api2Pdf.com API" + } ], + "paths" : { + "/chrome/html" : { + "post" : { + "tags" : [ "Headless Chrome" ], + "summary" : "Convert raw HTML to PDF", + "description" : "Convert HTML to a PDF using Headless Chrome on AWS Lambda.\n### Authorize via Header of Request\n**Authorization: YOUR-API-KEY**", + "operationId" : "chromeFromHtmlPost", + "requestBody" : { + "description" : "A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below:\n- `html` *(string, required)* - raw HTML to convert to PDF\n- `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false.\n- `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified.\n- `options` *(object, optional)* - Include advanced Headless Chrome options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-headless-chrome/).", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ChromeHtmlToPdfRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A JSON object containing the url to the PDF and other meta data", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + } + } + }, + "/chrome/url" : { + "get" : { + "tags" : [ "Headless Chrome" ], + "summary" : "Convert URL to PDF", + "description" : "Convert a URL or Web Page to PDF using Headless Chrome on AWS Lambda. This GET request is for convenience and does not support advanced options. Use the POST request for more flexibility.\n### Authorize via Query String Parameter\n**apikey=YOUR-API-KEY**\n### Example\n``` https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={YourApiKey} ``` ", + "operationId" : "chromeFromUrlGET", + "parameters" : [ { + "description" : "Url of the page to convert to PDF. Must start with http:// or https://.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "url" + }, { + "description" : "Specify output=json to receive a JSON output. Defaults to PDF file.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "output" + } ], + "responses" : { + "200" : { + "description" : "A PDF file or a JSON object depending on the `output` query parameter", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + }, + "application/pdf" : { + "schema" : { + "format" : "binary", + "type" : "string" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + }, + "security" : [ { + "QueryApiKey" : [ ] + } ] + }, + "post" : { + "tags" : [ "Headless Chrome" ], + "summary" : "Convert URL to PDF", + "description" : "Convert a URL or Web Page to PDF using Headless Chrome on AWS Lambda..\n### Authorize via Header of Request\n**Authorization: YOUR-API-KEY**", + "operationId" : "chromeFromUrlPost", + "requestBody" : { + "description" : "A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below:\n- `url` *(string, required)* - Url to the web page to convert to PDF\n- `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false.\n- `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified.\n- `options` *(object, optional)* - Include advanced Headless Chrome options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-headless-chrome/).", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ChromeUrlToPdfRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A JSON object containing the url to the PDF and other meta data", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + } + } + }, + "/libreoffice/convert" : { + "post" : { + "tags" : [ "LibreOffice" ], + "summary" : "Convert office document or image to PDF", + "description" : "Convert an office document (Word, Excel, Powerpoint) or an image (jpg, gif, png) to a PDF using LibreOffice on AWS Lambda.\n### Authorize via Header of Request\n**Authorization: YOUR-API-KEY**", + "operationId" : "libreConvertPost", + "requestBody" : { + "description" : "A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below:\n- `url` *(string, required)* - A direct URL to the file. Api2Pdf will consume the file at that URL and then convert it.\n- `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false.\n- `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. ", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/LibreOfficeConvertRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A JSON object containing the url to the PDF and other meta data", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + } + } + }, + "/merge" : { + "post" : { + "tags" : [ "Merge / Combine Pdfs" ], + "summary" : "Merge multiple PDFs together", + "description" : "Merge two or more PDFs together on AWS Lambda.\n### Authorize via Header of Request\n**Authorization: YOUR-API-KEY**", + "operationId" : "mergePost", + "requestBody" : { + "description" : "A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below:\n- `urls` *(array of urls, required)* - A JSON array of direct URLs to PDFs. Api2Pdf will consume the PDF files in the list and then merge them all together..\n- `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false.\n- `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. ", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/MergeRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A JSON object containing the url to the PDF and other meta data", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + } + } + }, + "/wkhtmltopdf/html" : { + "post" : { + "tags" : [ "wkhtmltopdf" ], + "summary" : "Convert raw HTML to PDF", + "description" : "Convert HTML to a PDF using WkHtmlToPdf on AWS Lambda.\n### Authorize via Header of Request\n**Authorization: YOUR-API-KEY**", + "operationId" : "wkhtmltopdfFromHtmlPost", + "requestBody" : { + "description" : "A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below:\n- `html` *(string, required)* - raw HTML to convert to PDF\n- `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false.\n- `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified.\n- `options` *(object, optional)* - Include advanced WkHtmlToPdf options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf/).", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/WkHtmlToPdfHtmlToPdfRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A JSON object containing the url to the PDF and other meta data", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + } + } + }, + "/wkhtmltopdf/url" : { + "get" : { + "tags" : [ "wkhtmltopdf" ], + "summary" : "Convert URL to PDF", + "description" : "Convert a URL or Web Page to PDF using WkHtmlToPdf on AWS Lambda. This GET request is for convenience and does not support advanced options. Use the POST request for more flexibility.\n### Authorize via Query String Parameter\n**apikey=YOUR-API-KEY**\n### Example\n``` https://v2018.api2pdf.com/wkhtmltopdf/url?url={UrlToConvert}&apikey={YourApiKey} ``` ", + "operationId" : "wkhtmltopdfFromUrlGET", + "parameters" : [ { + "description" : "Url of the page to convert to PDF. Must start with http:// or https://.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "url" + }, { + "description" : "Specify output=json to receive a JSON output. Defaults to PDF file.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "output" + } ], + "responses" : { + "200" : { + "description" : "A PDF file or a JSON object depending on the `output` query parameter", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + }, + "application/pdf" : { + "schema" : { + "format" : "binary", + "type" : "string" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + }, + "security" : [ { + "QueryApiKey" : [ ] + } ] + }, + "post" : { + "tags" : [ "wkhtmltopdf" ], + "summary" : "Convert URL to PDF", + "description" : "Convert a URL or Web Page to PDF using WkHtmlToPdf on AWS Lambda..\n### Authorize via Header of Request\n**Authorization: YOUR-API-KEY**", + "operationId" : "wkhtmltopdfFromUrlPost", + "requestBody" : { + "description" : "A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below:\n- `url` *(string, required)* - Url to the web page to convert to PDF\n- `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false.\n- `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified.\n- `options` *(object, optional)* - Include advanced WkHtmlToPdf options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf/).", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/WkHtmlToPdfUrlToPdfRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "A JSON object containing the url to the PDF and other meta data", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseSuccess" + } + } + } + }, + "401" : { + "description" : "Failed to generate PDF", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ApiResponseFailure" + } + } + } + } + } + } + }, + "/zebra" : { + "get" : { + "tags" : [ "ZXING (Zebra Crossing) Bar Codes" ], + "summary" : "Generate bar codes and QR codes with ZXING.", + "description" : "See full list of options and documentation [here](https://www.api2pdf.com/documentation/advanced-options-zxing-zebra-crossing-barcodes/)\n### Authorize via Query String Parameter\n**apikey=YOUR-API-KEY**\n### Example\n``` https://v2018.api2pdf.com/zebra?format={format}&apikey={YourApiKey}&value={YourText} ``` ", + "operationId" : "zebraGET", + "parameters" : [ { + "description" : "Most common is CODE_39 or QR_CODE", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "format" + }, { + "description" : "Specify the text value you want to convert", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "value" + }, { + "description" : "Show label of text below barcode", + "schema" : { + "type" : "boolean" + }, + "in" : "query", + "name" : "showlabel" + }, { + "description" : "Height of the barcode generated image", + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "height" + }, { + "description" : "Width of the barcode generated image", + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "width" + } ], + "responses" : { + "200" : { + "description" : "An image of the generated barcode or QR code", + "content" : { + "image/png" : { + "schema" : { + "format" : "binary", + "type" : "string" + } + } + } + } + }, + "security" : [ { + "QueryApiKey" : [ ] + } ] + } + } + }, + "components" : { + "schemas" : { + "ApiResponseFailure" : { + "properties" : { + "reason" : { + "description" : "The reason for the PDF generation failure", + "example" : "Source website could not be found", + "type" : "string" + }, + "success" : { + "description" : "Will be false if the operation failed", + "example" : false, + "type" : "boolean" + } + }, + "type" : "object" + }, + "ApiResponseSuccess" : { + "properties" : { + "cost" : { + "description" : "Cost of the operation (mbIn + mbOut) * $.001", + "example" : 7.979E-4, + "type" : "number" + }, + "mbIn" : { + "description" : "The amount of megabytes of bandwidth used to process the pdf", + "example" : 0.06463, + "type" : "number" + }, + "mbOut" : { + "description" : "The amount of megabytes of bandwidth generated from the resulting pdf", + "example" : 0.73327, + "type" : "number" + }, + "pdf" : { + "description" : "A url to the PDF that will exist only for 24 hours", + "example" : "https://link-to-your-pdf", + "type" : "string" + }, + "success" : { + "description" : "Will be true if the operation suceeded", + "example" : true, + "type" : "boolean" + } + }, + "type" : "object" + }, + "ChromeAdvancedOptions" : { + "properties" : { + "landscape" : { + "example" : "true", + "type" : "string" + }, + "printBackground" : { + "example" : false, + "type" : "boolean" + } + }, + "type" : "object" + }, + "ChromeHtmlToPdfRequest" : { + "properties" : { + "fileName" : { + "example" : "test.pdf", + "type" : "string" + }, + "html" : { + "example" : "<p>Hello World</p>", + "format" : "html", + "type" : "string" + }, + "inlinePdf" : { + "example" : true, + "type" : "boolean" + }, + "options" : { + "$ref" : "#/components/schemas/ChromeAdvancedOptions" + } + }, + "type" : "object", + "required" : [ "html" ] + }, + "ChromeUrlToPdfRequest" : { + "properties" : { + "fileName" : { + "example" : "test.pdf", + "type" : "string" + }, + "inlinePdf" : { + "example" : true, + "type" : "boolean" + }, + "options" : { + "$ref" : "#/components/schemas/ChromeAdvancedOptions" + }, + "url" : { + "example" : "https://www.github.com", + "format" : "url", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "url" ] + }, + "LibreOfficeConvertRequest" : { + "properties" : { + "fileName" : { + "example" : "test.pdf", + "type" : "string" + }, + "inlinePdf" : { + "example" : true, + "type" : "boolean" + }, + "url" : { + "example" : "https://www.api2pdf.com/wp-content/themes/api2pdf/assets/samples/sample-word-doc.docx", + "format" : "url", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "url" ] + }, + "MergeRequest" : { + "properties" : { + "fileName" : { + "example" : "test.pdf", + "type" : "string" + }, + "inlinePdf" : { + "example" : true, + "type" : "boolean" + }, + "urls" : { + "example" : [ "link-to-pdf1", "link-to-pdf2", "link-to-pdf3" ], + "type" : "array", + "items" : { + "type" : "string" + } + } + }, + "type" : "object", + "required" : [ "urls" ] + }, + "WkHtmlToPdfAdvancedOptions" : { + "properties" : { + "orientation" : { + "example" : "landscape", + "type" : "string" + }, + "pageSize" : { + "example" : "A4", + "type" : "string" + } + }, + "type" : "object" + }, + "WkHtmlToPdfHtmlToPdfRequest" : { + "properties" : { + "fileName" : { + "example" : "test.pdf", + "type" : "string" + }, + "html" : { + "example" : "<p>Hello World</p>", + "format" : "html", + "type" : "string" + }, + "inlinePdf" : { + "example" : true, + "type" : "boolean" + }, + "options" : { + "$ref" : "#/components/schemas/WkHtmlToPdfAdvancedOptions" + } + }, + "type" : "object", + "required" : [ "html" ] + }, + "WkHtmlToPdfUrlToPdfRequest" : { + "properties" : { + "fileName" : { + "example" : "test.pdf", + "type" : "string" + }, + "inlinePdf" : { + "example" : true, + "type" : "boolean" + }, + "options" : { + "$ref" : "#/components/schemas/WkHtmlToPdfAdvancedOptions" + }, + "url" : { + "example" : "https://www.github.com", + "format" : "url", + "type" : "string" + } + }, + "type" : "object", + "required" : [ "url" ] + } + }, + "securitySchemes" : { + "HeaderApiKey" : { + "type" : "apiKey", + "name" : "Authorization", + "in" : "header" + }, + "QueryApiKey" : { + "type" : "apiKey", + "name" : "apikey", + "in" : "query" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Api2Pdf", + "url" : "https://www.api2pdf.com" + }, + "security" : [ { + "HeaderApiKey" : [ ] + } ] +} \ No newline at end of file diff --git a/gen-api-ex/apicurio.local.registry.1.3.2.Final.yaml b/gen-api-ex/apicurio.local.registry.1.3.2.Final.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cddd0c161fb5e6fcf37124549bc9dc0b43f82ec8 --- /dev/null +++ b/gen-api-ex/apicurio.local.registry.1.3.2.Final.yaml @@ -0,0 +1,1972 @@ +{ + "openapi" : "3.0.2", + "info" : { + "contact" : { + "email" : "apicurio@lists.jboss.org", + "name" : "Apicurio", + "url" : "https://github.com/apicurio/apicurio-registry" + }, + "description" : "Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility.\n\nThe Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. \n\nThe supported artifact types include:\n- Apache Avro schema\n- AsyncAPI specification\n- Google protocol buffers (schema and file descriptor)\n- GraphQL schema\n- JSON Schema\n- Kafka Connect schema\n- OpenAPI specification\n- Web Services Description Language\n- XML Schema Definition\n\n\n**Note**: The Apicurio Registry REST API is available from `http://MY-REGISTRY-URL/api`. You must prefix all API operation paths with `/api`, for example, `api/ids/{globalId}`.\n", + "license" : { + "name" : "Apache 2.0", + "url" : "https://www.apache.org/licenses/LICENSE-2.0" + }, + "title" : "Apicurio Registry API", + "version" : "1.3.2.Final", + "x-providerName" : "apicurio.local", + "x-preferred" : false, + "x-apisguru-categories" : [ "developer_tools" ], + "x-serviceName" : "registry", + "x-origin" : [ { + "format" : "openapi", + "url" : "https://raw.githubusercontent.com/Apicurio/apicurio-registry/master/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/registry/v1/openapi.json", + "version" : "3.0" + } ] + }, + "servers" : [ { + "url" : "http://apicurio.local" + } ], + "tags" : [ { + "name" : "Artifacts", + "description" : "The primary way to interact with the Apicurio Registry API is to add, update, \nor delete artifacts. This section includes all of these primary operations." + }, { + "name" : "Metadata", + "description" : "Sometimes the metadata for an artifact is important. For example, metadata includes \nwhen the artifact was created, last updated, and so on. This section contains \noperations to access (and in some cases change) an artifact's metadata." + }, { + "name" : "Versions", + "description" : "Whenever an artifact's content is updated, the old versions of the artifact's content\nare not lost. All versions can be listed and accessed if necessary. This section \ndescribes the operations used to list and access all versions of an artifact's content\nand metadata." + }, { + "name" : "Artifact rules", + "description" : "Rules can be configured on a per-artifact basis, allowing for different approaches\nto content evolution for each artifact. These rules will override any global rules\nthat have been configured. This section contains the operations used to manage a\nsingle artifact's rules." + }, { + "name" : "Global rules", + "description" : "Global rules can be configured in the registry to govern how artifact content can \nevolve over time (as artifact content is **updated**). Global rules will be applied \nwhenever an artifact is added to the registry, and also whenever an artifact's \ncontent is updated (only if that artifact doesn't have its own specific rules \nconfigured). This section describes the operations used to manage the global rules." + }, { + "name" : "Search", + "description" : "The search API is used to browse or find artifacts in the registry. This section describes the operations for searching for artifacts and versions. " + } ], + "paths" : { + "/artifacts" : { + "summary" : "Manage the collection of artifacts in the registry.", + "get" : { + "tags" : [ "Artifacts" ], + "summary" : "List all artifact IDs", + "description" : "Returns a list of IDs of all artifacts in the registry as a flat list. Typically the\nserver is configured to limit the number of artifact IDs returned when a large number \nof artifacts exist. In this case, the result of this call may be non-deterministic. The \ndefault limit is typically 1000 artifacts.", + "operationId" : "listArtifacts", + "responses" : { + "200" : { + "description" : "On a successful response, returns an array of artifact IDs - one for each artifact\nin the registry.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + } + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "post" : { + "tags" : [ "Artifacts" ], + "summary" : "Create artifact", + "description" : "Creates a new artifact by posting the artifact content. The body of the request should\nbe the raw content of the artifact. This is typically in JSON format for *most* of the \nsupported types, but may be in another format for a few (for example, `PROTOBUF`).\n\nThe registry attempts to figure out what kind of artifact is being added from the\nfollowing supported list:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n\nAlternatively, you can specify the artifact type using the `X-Registry-ArtifactType` \nHTTP request header, or include a hint in the request's `Content-Type`. For example:\n\n```\nContent-Type: application/json; artifactType=AVRO\n```\n\nAn artifact is created using the content provided in the body of the request. This\ncontent is created under a unique artifact ID that can be provided in the request\nusing the `X-Registry-ArtifactId` request header. If not provided in the request,\nthe server generates a unique ID for the artifact. It is typically recommended\nthat callers provide the ID, because this is typically a meaningful identifier, \nand for most use cases should be supplied by the caller.\n\nIf an artifact with the provided artifact ID already exists, the default behavior\nis for the server to reject the content with a 409 error. However, the caller can\nsupply the `ifExists` query parameter to alter this default behavior. The `ifExists`\nquery parameter can have one of the following values:\n\n* `FAIL` (*default*) - server rejects the content with a 409 error\n* `UPDATE` - server updates the existing artifact and returns the new metadata\n* `RETURN` - server does not create or add content to the server, but instead \nreturns the metadata for the existing artifact\n* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the \nprovided content if such a version exists, otherwise a new version is created\n\nThis operation may fail for one of the following reasons:\n\n* An invalid `ArtifactType` was indicated (HTTP error `400`)\n* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)\n* Provided content (request body) was empty (HTTP error `400`)\n* An artifact with the provided ID already exists (HTTP error `409`)\n* The content violates one of the configured global rules (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "createArtifact", + "parameters" : [ { + "description" : "Specifies the type of the artifact being added. Possible values include:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)", + "schema" : { + "type" : "string", + "enum" : [ "AVRO", "PROTOBUF", "PROTOBUF_FD", "JSON", "OPENAPI", "ASYNCAPI", "GRAPHQL", "KCONNECT", "WSDL", "XSD", "XML" ] + }, + "in" : "header", + "name" : "X-Registry-ArtifactType" + }, { + "description" : "A client-provided, globally unique identifier for the new artifact.", + "schema" : { + "type" : "string" + }, + "in" : "header", + "name" : "X-Registry-ArtifactId" + }, { + "description" : "Set this option to instruct the server on what to do if the artifact already exists.", + "schema" : { + "type" : "string", + "enum" : [ "FAIL", "UPDATE", "RETURN", "RETURN_OR_UPDATE" ] + }, + "in" : "query", + "name" : "ifExists" + } ], + "requestBody" : { + "description" : "The content of the artifact being created. This is often, but not always, JSON data\nrepresenting one of the supported artifact types:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n", + "required" : true, + "content" : { + "*/*" : { + "examples" : { + "OpenAPI Example" : { + "value" : { + "components" : { + "schemas" : { + "Widget" : { + "description" : "A sample data type.", + "example" : { + "property-1" : "value1", + "property-2" : true + }, + "properties" : { + "property-1" : { + "type" : "string" + }, + "property-2" : { + "type" : "boolean" + } + }, + "title" : "Root Type for Widget", + "type" : "object" + } + } + }, + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.7" + }, + "openapi" : "3.0.2", + "paths" : { + "/widgets" : { + "get" : { + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + } + }, + "description" : "All widgets" + } + }, + "summary" : "Get widgets" + } + } + } + } + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "Artifact was successfully created.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArtifactMetaData" + } + } + } + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + }, + "x-codegen-async" : true + } + }, + "/artifacts/{artifactId}" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage a single artifact.", + "put" : { + "tags" : [ "Artifacts" ], + "summary" : "Update artifact", + "description" : "Updates an artifact by uploading new content. The body of the request should\nbe the raw content of the artifact. This is typically in JSON format for *most*\nof the supported types, but may be in another format for a few (for example, `PROTOBUF`).\n\nThe registry attempts to figure out what kind of artifact is being added from the\nfollowing supported list:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n\nAlternatively, you can specify the artifact type using the `X-Registry-ArtifactType` \nHTTP request header, or include a hint in the request's `Content-Type`. For example:\n\n```\nContent-Type: application/json; artifactType=AVRO\n```\n\nThe update could fail for a number of reasons including:\n\n* Provided content (request body) was empty (HTTP error `400`)\n* No artifact with the `artifactId` exists (HTTP error `404`)\n* The new content violates one of the rules configured for the artifact (HTTP error `409`)\n* The provided artifact type is not recognized (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n\nWhen successful, this creates a new version of the artifact, making it the most recent\n(and therefore official) version of the artifact.", + "operationId" : "updateArtifact", + "parameters" : [ { + "description" : "Specifies the type of the artifact being added. Possible values include:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "AVRO", "PROTOBUF", "PROTOBUF_FD", "JSON", "OPENAPI", "ASYNCAPI", "GRAPHQL", "KCONNECT", "WSDL", "XSD", "XML" ] + }, + "in" : "header", + "name" : "X-Registry-ArtifactType" + } ], + "requestBody" : { + "description" : "The new content of the artifact being updated. This is often, but not always, JSON data\nrepresenting one of the supported artifact types:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n", + "required" : true, + "content" : { + "*/*" : { + "examples" : { + "OpenAPI Example" : { + "value" : { + "components" : { + "schemas" : { + "Widget" : { + "description" : "A sample data type.", + "example" : { + "property-1" : "value1", + "property-2" : true + }, + "properties" : { + "property-1" : { + "type" : "string" + }, + "property-2" : { + "type" : "boolean" + } + }, + "title" : "Root Type for Widget", + "type" : "object" + } + } + }, + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.7" + }, + "openapi" : "3.0.2", + "paths" : { + "/widgets" : { + "get" : { + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + } + }, + "description" : "All widgets" + } + }, + "summary" : "Get widgets" + } + } + } + } + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "When successful, returns the updated artifact metadata.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArtifactMetaData" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + }, + "x-codegen-async" : true + }, + "get" : { + "tags" : [ "Artifacts" ], + "summary" : "Get latest artifact", + "description" : "Returns the latest version of the artifact in its raw form. The `Content-Type` of the\nresponse depends on the artifact type. In most cases, this is `application/json`, but \nfor some types it may be different (for example, `PROTOBUF`).\n\nThis operation may fail for one of the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getLatestArtifact", + "responses" : { + "200" : { + "description" : "The most recent version of the artifact.", + "content" : { + "application/graphql" : { }, + "application/json" : { + "examples" : { + "OpenAPI" : { + "value" : { + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.0" + }, + "openapi" : "3.0.2" + } + } + } + }, + "application/x-protobuf" : { + "examples" : { + "Protobuf Example" : { + "value" : "message SearchResponse {\n repeated Result result = 1;\n}\n\nmessage Result {\n required string url = 1;\n optional string title = 2;\n repeated string snippets = 3;\n}" + } + } + }, + "application/x-protobuffer" : { + "examples" : { + "Protobuffer Example" : { + "value" : "message SearchResponse {\n repeated Result result = 1;\n}\n\nmessage Result {\n required string url = 1;\n optional string title = 2;\n repeated string snippets = 3;\n}" + } + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "delete" : { + "tags" : [ "Artifacts" ], + "summary" : "Delete artifact", + "description" : "Deletes an artifact completely, resulting in all versions of the artifact also being\ndeleted. This may fail for one of the following reasons:\n\n* No artifact with the `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "deleteArtifact", + "responses" : { + "204" : { + "description" : "Returned when the artifact was successfully deleted." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/meta" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage the metadata of a single artifact.", + "put" : { + "tags" : [ "Metadata" ], + "summary" : "Update artifact metadata", + "description" : "Updates the editable parts of the artifact's metadata. Not all metadata fields can\nbe updated. For example, `createdOn` and `createdBy` are both read-only properties.\n\nThis operation can fail for the following reasons:\n\n* No artifact with the `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "updateArtifactMetaData", + "requestBody" : { + "description" : "Updated artifact metadata.", + "required" : true, + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/EditableMetaData" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The artifact's metadata was updated." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "get" : { + "tags" : [ "Metadata" ], + "summary" : "Get artifact metadata", + "description" : "Gets the metadata for an artifact in the registry. The returned metadata includes\nboth generated (read-only) and editable metadata (such as name and description).\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "getArtifactMetaData", + "responses" : { + "200" : { + "description" : "The artifact's metadata.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArtifactMetaData" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "post" : { + "tags" : [ "Metadata" ], + "summary" : "Get artifact metadata by content", + "description" : "Gets the metadata for an artifact that matches the raw content. Searches the registry\nfor a version of the given artifact matching the content provided in the body of the\nPOST.\n\nThis operation can fail for the following reasons:\n\n* Provided content (request body) was empty (HTTP error `400`)\n* No artifact with the `artifactId` exists (HTTP error `404`)\n* No artifact version matching the provided content exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getArtifactMetaDataByContent", + "requestBody" : { + "description" : "The content of an artifact version.", + "required" : true, + "content" : { + "application/json" : { + "examples" : { + "OpenAPI Example" : { + "value" : { + "components" : { + "schemas" : { + "Widget" : { + "description" : "A sample data type.", + "example" : { + "property-1" : "value1", + "property-2" : true + }, + "properties" : { + "property-1" : { + "type" : "string" + }, + "property-2" : { + "type" : "boolean" + } + }, + "title" : "Root Type for Widget", + "type" : "object" + } + } + }, + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.7" + }, + "openapi" : "3.0.2", + "paths" : { + "/widgets" : { + "get" : { + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + } + }, + "description" : "All widgets" + } + }, + "summary" : "Get widgets" + } + } + } + } + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "The metadata of the artifact version matching the provided content.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArtifactMetaData" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/rules" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage the rules for a single artifact.", + "get" : { + "tags" : [ "Artifact rules" ], + "summary" : "List artifact rules", + "description" : "Returns a list of all rules configured for the artifact. The set of rules determines\nhow the content of an artifact can evolve over time. If no rules are configured for\nan artifact, the set of globally configured rules are used. If no global rules \nare defined, there are no restrictions on content evolution.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "listArtifactRules", + "responses" : { + "200" : { + "description" : "Returns the names of the rules configured for the artifact.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RuleType" + } + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "post" : { + "tags" : [ "Artifact rules" ], + "summary" : "Create artifact rule", + "description" : "Adds a rule to the list of rules that get applied to the artifact when adding new\nversions. All configured rules must pass to successfully add a new artifact version.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* Rule (named in the request body) is unknown (HTTP error `400`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "createArtifactRule", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The rule was added." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "delete" : { + "tags" : [ "Artifact rules" ], + "summary" : "Delete artifact rules", + "description" : "Deletes all of the rules configured for the artifact. After this is done, the global\nrules apply to the artifact again.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "deleteArtifactRules", + "responses" : { + "204" : { + "description" : "The rules were successfully deleted." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/rules/{rule}" : { + "parameters" : [ { + "description" : "The unique name/type of a rule.", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "VALIDITY", "COMPATIBILITY" ] + }, + "in" : "path", + "name" : "rule" + }, { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage the configuration of a single artifact rule.", + "put" : { + "tags" : [ "Artifact rules" ], + "summary" : "Update artifact rule configuration", + "description" : "Updates the configuration of a single rule for the artifact. The configuration data\nis specific to each rule type, so the configuration of the `COMPATIBILITY` rule \nis in a different format from the configuration of the `VALIDITY` rule.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No rule with this name/type is configured for this artifact (HTTP error `404`)\n* Invalid rule type (HTTP error `400`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "updateArtifactRuleConfig", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "responses" : { + "200" : { + "description" : "Rule configuration was updated.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "get" : { + "tags" : [ "Artifact rules" ], + "summary" : "Get artifact rule configuration", + "description" : "Returns information about a single rule configured for an artifact. This is useful\nwhen you want to know what the current configuration settings are for a specific rule.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No rule with this name/type is configured for this artifact (HTTP error `404`)\n* Invalid rule type (HTTP error `400`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "getArtifactRuleConfig", + "responses" : { + "200" : { + "description" : "Information about a rule.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "delete" : { + "tags" : [ "Artifact rules" ], + "summary" : "Delete artifact rule", + "description" : "Deletes a rule from the artifact. This results in the rule no longer applying for\nthis artifact. If this is the only rule configured for the artifact, this is the \nsame as deleting **all** rules, and the globally configured rules now apply to\nthis artifact.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No rule with this name/type is configured for this artifact (HTTP error `404`)\n* Invalid rule type (HTTP error `400`)\n* A server error occurred (HTTP error `500`)", + "operationId" : "deleteArtifactRule", + "responses" : { + "204" : { + "description" : "The rule was successfully deleted." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/state" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage the state of an artifact.", + "put" : { + "tags" : [ "Artifacts" ], + "summary" : "Update artifact state", + "description" : "Updates the state of the artifact. For example, you can use this to mark the latest\nversion of an artifact as `DEPRECATED`. The operation changes the state of the latest \nversion of the artifact. If multiple versions exist, only the most recent is changed.\n\nThe following state changes are supported:\n\n* Enabled -> Disabled\n* Enabled -> Deprecated\n* Enabled -> Deleted\n* Disabled -> Enabled\n* Disabled -> Deleted\n* Disabled -> Deprecated\n* Deprecated -> Deleted\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* Artifact cannot transition to the given state (HTTP error `400`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "updateArtifactState", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateState" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Returned when the operation was successful." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/test" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Test whether content would pass update rules.", + "put" : { + "tags" : [ "Artifact rules" ], + "summary" : "Test update artifact", + "description" : "Tests whether an update to the artifact's content *would* succeed for the provided content.\nUltimately, this applies any rules configured for the artifact against the given content\nto determine whether the rules would pass or fail, but without actually updating the artifact\ncontent.\n\nThe body of the request should be the raw content of the artifact. This is typically in \nJSON format for *most* of the supported types, but may be in another format for a few \n(for example, `PROTOBUF`).\n\nThe registry attempts to figure out what kind of artifact is being added from the following supported list: \n\n* Avro (`AVRO`) \n* Protobuf (`PROTOBUF`) \n* Protobuf File Descriptor (`PROTOBUF_FD`) \n* JSON Schema (`JSON`) \n* Kafka Connect (`KCONNECT`) \n* OpenAPI (`OPENAPI`) \n* AsyncAPI (`ASYNCAPI`) \n* GraphQL (`GRAPHQL`) \n* Web Services Description Language (`WSDL`) \n* XML Schema (`XSD`)\n\nAlternatively, you can explicitly specify the artifact type using the `X-Registry-ArtifactType` \nHTTP request header, or by including a hint in the request's `Content-Type`. For example:\n\n```\nContent-Type: application/json; artifactType=AVRO\n```\n\nThe update could fail for a number of reasons including:\n\n* Provided content (request body) was empty (HTTP error `400`)\n* No artifact with the `artifactId` exists (HTTP error `404`)\n* The new content violates one of the rules configured for the artifact (HTTP error `409`)\n* The provided artifact type is not recognized (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n\nWhen successful, this operation simply returns a *No Content* response.", + "operationId" : "testUpdateArtifact", + "parameters" : [ { + "description" : "This header parameter can be used to indicate the type of the artifact being added. Possible values include: \n* Avro (`AVRO`) \n* Protobuf (`PROTOBUF`) \n* Protobuf File Descriptor (`PROTOBUF_FD`) \n* JSON Schema (`JSON`) \n* Kafka Connect (`KCONNECT`) \n* OpenAPI (`OPENAPI`) \n* AsyncAPI (`ASYNCAPI`) \n* GraphQL (`GRAPHQL`) \n* Web Services Description Language (`WSDL`) \n* XML Schema (`XSD`)", + "schema" : { + "type" : "string", + "enum" : [ "AVRO", "PROTOBUF", "PROTOBUF_FD", "JSON", "OPENAPI", "ASYNCAPI", "GRAPHQL", "KCONNECT", "WSDL", "XSD", "XML" ] + }, + "in" : "header", + "name" : "X-Registry-ArtifactType" + } ], + "requestBody" : { + "description" : "The content of the artifact being tested. This is often, but not always, JSON data\nrepresenting one of the supported artifact types:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n", + "required" : true, + "content" : { + "*/*" : { } + } + }, + "responses" : { + "204" : { + "description" : "When successful, returns \"No Content\" to indicate that the rules passed, and the\ncontent was not updated." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/versions" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage all the versions of an artifact in the registry.", + "get" : { + "tags" : [ "Versions" ], + "summary" : "List artifact versions", + "description" : "Returns a list of all version numbers for the artifact.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "listArtifactVersions", + "responses" : { + "200" : { + "description" : "List of all artifact versions (just the version IDs).", + "content" : { + "application/json" : { + "examples" : { + "All Versions" : { + "value" : [ 5, 6, 10, 103 ] + } + }, + "schema" : { + "type" : "array", + "items" : { + "format" : "int64", + "type" : "integer" + } + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "post" : { + "tags" : [ "Versions" ], + "summary" : "Create artifact version", + "description" : "Creates a new version of the artifact by uploading new content. The configured rules for\nthe artifact are applied, and if they all pass, the new content is added as the most recent \nversion of the artifact. If any of the rules fail, an error is returned.\n\nThe body of the request should be the raw content of the new artifact version. This \nis typically in JSON format for *most* of the supported types, but may be in another \nformat for a few (for example, `PROTOBUF`).\n\nThe registry attempts to figure out what kind of artifact is being added from the\nfollowing supported list:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n\nAlternatively, you can explicitly specify the artifact type using the `X-Registry-ArtifactType` \nHTTP request header, or by including a hint in the request's `Content-Type`.\n\nFor example:\n\n```\nContent-Type: application/json; artifactType=AVRO\n```\n\nThis operation can fail for the following reasons:\n\n* Provided content (request body) was empty (HTTP error `400`)\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* The new content violates one of the rules configured for the artifact (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "createArtifactVersion", + "parameters" : [ { + "description" : "This header parameter can be used to indicate the type of the artifact being added. Possible values include: \n* Avro (`AVRO`) \n* Protobuf (`PROTOBUF`) \n* Protobuf File Descriptor (`PROTOBUF_FD`) \n* JSON Schema (`JSON`) \n* Kafka Connect (`KCONNECT`) \n* OpenAPI (`OPENAPI`) \n* AsyncAPI (`ASYNCAPI`) \n* GraphQL (`GRAPHQL`) \n* Web Services Description Language (`WSDL`) \n* XML Schema (`XSD`)", + "schema" : { + "type" : "string", + "enum" : [ "AVRO", "PROTOBUF", "PROTOBUF_FD", "JSON", "OPENAPI", "ASYNCAPI", "GRAPHQL", "KCONNECT", "WSDL", "XSD", "XML" ] + }, + "in" : "header", + "name" : "X-Registry-ArtifactType" + } ], + "requestBody" : { + "description" : "The content of the artifact version being created. This is often, but not always, JSON data\nrepresenting one of the supported artifact types:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* Protobuf File Descriptor (`PROTOBUF_FD`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n", + "required" : true, + "content" : { + "*/*" : { + "examples" : { + "OpenAPI Example" : { + "value" : { + "components" : { + "schemas" : { + "Widget" : { + "description" : "A sample data type.", + "example" : { + "property-1" : "value1", + "property-2" : true + }, + "properties" : { + "property-1" : { + "type" : "string" + }, + "property-2" : { + "type" : "boolean" + } + }, + "title" : "Root Type for Widget", + "type" : "object" + } + } + }, + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.7" + }, + "openapi" : "3.0.2", + "paths" : { + "/widgets" : { + "get" : { + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + } + }, + "description" : "All widgets" + } + }, + "summary" : "Get widgets" + } + } + } + } + } + } + } + } + }, + "responses" : { + "200" : { + "description" : "The artifact version was successfully created.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VersionMetaData" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + }, + "x-codegen-async" : true + } + }, + "/artifacts/{artifactId}/versions/{version}" : { + "parameters" : [ { + "description" : "The unique identifier of a specific version of the artifact content.", + "required" : true, + "schema" : { + "type" : "integer" + }, + "in" : "path", + "name" : "version" + }, { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage a single version of a single artifact in the registry.", + "get" : { + "tags" : [ "Versions" ], + "summary" : "Get artifact version", + "description" : "Retrieves a single version of the artifact content. Both the `artifactId` and the\nunique `version` number must be provided. The `Content-Type` of the response depends \non the artifact type. In most cases, this is `application/json`, but for some types \nit may be different (for example, `PROTOBUF`).\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getArtifactVersion", + "responses" : { + "200" : { + "description" : "The content of the artifact version.", + "content" : { + "application/graphql" : { }, + "application/json" : { + "examples" : { + "OpenAPI" : { + "value" : { + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.0" + }, + "openapi" : "3.0.2" + } + } + } + }, + "application/x-protobuf" : { + "examples" : { + "Protobuf Example" : { + "value" : "message SearchResponse {\n repeated Result result = 1;\n}\n\nmessage Result {\n required string url = 1;\n optional string title = 2;\n repeated string snippets = 3;\n}" + } + } + }, + "application/x-protobuffer" : { + "examples" : { + "Protobuffer Example" : { + "value" : "message SearchResponse {\n repeated Result result = 1;\n}\n\nmessage Result {\n required string url = 1;\n optional string title = 2;\n repeated string snippets = 3;\n}" + } + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/versions/{version}/meta" : { + "parameters" : [ { + "description" : "The unique identifier of a specific version of the artifact content.", + "required" : true, + "schema" : { + "type" : "integer" + }, + "in" : "path", + "name" : "version" + }, { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage the metadata for a single version of an artifact in the registry.", + "put" : { + "tags" : [ "Metadata" ], + "summary" : "Update artifact version metadata", + "description" : "Updates the user-editable portion of the artifact version's metadata. Only some of \nthe metadata fields are editable by the user. For example, `description` is editable, \nbut `createdOn` is not.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "updateArtifactVersionMetaData", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EditableMetaData" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The artifact version's metadata was successfully updated." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "get" : { + "tags" : [ "Metadata" ], + "summary" : "Get artifact version metadata", + "description" : "Retrieves the metadata for a single version of the artifact. The version metadata is \na subset of the artifact metadata and only includes the metadata that is specific to\nthe version (for example, this doesn't include `modifiedOn`).\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getArtifactVersionMetaData", + "responses" : { + "200" : { + "description" : "The artifact version's metadata.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VersionMetaData" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "delete" : { + "tags" : [ "Metadata" ], + "summary" : "Delete artifact version metadata", + "description" : "Deletes the user-editable metadata properties of the artifact version. Any properties\nthat are not user-editable are preserved.\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "deleteArtifactVersionMetaData", + "responses" : { + "204" : { + "description" : "The artifact version's user-editable metadata was successfully deleted." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/artifacts/{artifactId}/versions/{version}/state" : { + "parameters" : [ { + "description" : "The unique identifier of a specific version of the artifact content.", + "required" : true, + "schema" : { + "type" : "integer" + }, + "in" : "path", + "name" : "version" + }, { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Manage the state of a specific artifact version.", + "put" : { + "tags" : [ "Versions" ], + "summary" : "Update artifact version state", + "description" : "Updates the state of a specific version of an artifact. For example, you can use \nthis operation to disable a specific version.\n\nThe following state changes are supported:\n\n* Enabled -> Disabled\n* Enabled -> Deprecated\n* Enabled -> Deleted\n* Disabled -> Enabled\n* Disabled -> Deleted\n* Disabled -> Deprecated\n* Deprecated -> Deleted\n\nThis operation can fail for the following reasons:\n\n* No artifact with this `artifactId` exists (HTTP error `404`)\n* No version with this `version` exists (HTTP error `404`)\n* Artifact version cannot transition to the given state (HTTP error `400`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "updateArtifactVersionState", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateState" + } + } + } + }, + "responses" : { + "204" : { + "description" : "Returned when the update was successful." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/ids/{globalId}" : { + "parameters" : [ { + "description" : "Global identifier for an artifact version.", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "in" : "path", + "name" : "globalId" + } ], + "summary" : "Access artifact content utilizing an artifact version's globally unique identifier.", + "get" : { + "tags" : [ "Artifacts" ], + "summary" : "Get artifact by global ID", + "description" : "Gets the content for an artifact version in the registry using its globally unique\nidentifier.\n\nThis operation may fail for one of the following reasons:\n\n* No artifact version with this `globalId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getArtifactByGlobalId", + "responses" : { + "200" : { + "description" : "The content of the artifact version.", + "content" : { + "application/json" : { + "examples" : { + "OpenAPI Example" : { + "value" : { + "info" : { + "description" : "An example API design using OpenAPI.", + "title" : "Empty API", + "version" : "1.0.0" + }, + "openapi" : "3.0.2" + } + } + } + }, + "application/x-protobuf" : { + "examples" : { + "Protobuf Example" : { + "value" : "message SearchResponse {\n repeated Result result = 1;\n}\n\nmessage Result {\n required string url = 1;\n optional string title = 2;\n repeated string snippets = 3;\n}" + } + } + }, + "application/x-protobuffer" : { + "examples" : { + "Protobuffer Example" : { + "value" : "message SearchResponse {\n repeated Result result = 1;\n}\n\nmessage Result {\n required string url = 1;\n optional string title = 2;\n repeated string snippets = 3;\n}" + } + } + } + } + } + } + } + }, + "/ids/{globalId}/meta" : { + "parameters" : [ { + "description" : "Global identifier for an artifact version.", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "in" : "path", + "name" : "globalId" + } ], + "summary" : "Access an artifact verison's metadata using its globally unique identifier.", + "get" : { + "tags" : [ "Metadata" ], + "summary" : "Get global artifact metadata", + "description" : "Gets the metadata for an artifact version in the registry using its globally unique\nidentifier. The returned metadata includes both generated (read-only) and editable\nmetadata (such as name and description).\n\nThis operation may fail for one of the following reasons:\n\n* No artifact version with this `globalId` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getArtifactMetaDataByGlobalId", + "responses" : { + "200" : { + "description" : "The artifact's metadata.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArtifactMetaData" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/rules" : { + "summary" : "Manage the global rules that apply to all artifacts if not otherwise configured.", + "get" : { + "tags" : [ "Global rules" ], + "summary" : "List global rules", + "description" : "Gets a list of all the currently configured global rules (if any).\n\nThis operation can fail for the following reasons:\n\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "listGlobalRules", + "responses" : { + "200" : { + "description" : "The list of names of the globally configured rules.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/RuleType" + } + } + } + } + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "post" : { + "tags" : [ "Global rules" ], + "summary" : "Create global rule", + "description" : "Adds a rule to the list of globally configured rules.\n\nThis operation can fail for the following reasons:\n\n* The rule type is unknown (HTTP error `400`)\n* The rule already exists (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "createGlobalRule", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "responses" : { + "204" : { + "description" : "The global rule was added." + }, + "400" : { + "$ref" : "#/components/responses/BadRequest" + }, + "409" : { + "$ref" : "#/components/responses/Conflict" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "delete" : { + "tags" : [ "Global rules" ], + "summary" : "Delete all global rules", + "description" : "Deletes all globally configured rules.\n\nThis operation can fail for the following reasons:\n\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "deleteAllGlobalRules", + "responses" : { + "204" : { + "description" : "All global rules have been removed successfully." + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/rules/{rule}" : { + "parameters" : [ { + "description" : "The unique name/type of a rule.", + "required" : true, + "schema" : { + "type" : "string", + "enum" : [ "VALIDITY", "COMPATIBILITY" ] + }, + "in" : "path", + "name" : "rule" + } ], + "summary" : "Manage the configuration of a single global artifact rule.", + "put" : { + "tags" : [ "Global rules" ], + "summary" : "Update global rule configuration", + "description" : "Updates the configuration for a globally configured rule.\n\nThis operation can fail for the following reasons:\n\n* Invalid rule name/type (HTTP error `400`)\n* No rule with name/type `rule` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "updateGlobalRuleConfig", + "requestBody" : { + "required" : true, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "responses" : { + "200" : { + "description" : "The global rule's configuration was successfully updated.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "get" : { + "tags" : [ "Global rules" ], + "summary" : "Get global rule configuration", + "description" : "Returns information about the named globally configured rule.\n\nThis operation can fail for the following reasons:\n\n* Invalid rule name/type (HTTP error `400`)\n* No rule with name/type `rule` exists (HTTP error `404`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "getGlobalRuleConfig", + "responses" : { + "200" : { + "description" : "The global rule's configuration.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Rule" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + }, + "delete" : { + "tags" : [ "Global rules" ], + "summary" : "Delete global rule", + "description" : "Deletes a single global rule. If this is the only rule configured, this is the same\nas deleting **all** rules.\n\nThis operation can fail for the following reasons:\n\n* Invalid rule name/type (HTTP error `400`)\n* No rule with name/type `rule` exists (HTTP error `404`)\n* Rule cannot be deleted (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n", + "operationId" : "deleteGlobalRule", + "responses" : { + "204" : { + "description" : "The global rule was successfully deleted." + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/search/artifacts" : { + "summary" : "Search for content in the registry; artifacts in particular.", + "get" : { + "tags" : [ "Search", "Artifacts" ], + "summary" : "Search for artifacts", + "description" : "Returns a paginated list of all artifacts that match the provided search criteria.\n", + "operationId" : "searchArtifacts", + "parameters" : [ { + "description" : "The text to search.", + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "search" + }, { + "description" : "The number of artifacts to skip before starting to collect the result set.", + "required" : true, + "schema" : { + "type" : "integer", + "default" : 0 + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "The number of artifacts to return.", + "required" : true, + "schema" : { + "type" : "integer", + "default" : 20 + }, + "in" : "query", + "name" : "limit" + }, { + "description" : "What fields to search.", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "everything", "name", "description", "labels" ] + }, + "in" : "query", + "name" : "over" + }, { + "description" : "Sort order, ascending or descending.", + "required" : false, + "schema" : { + "type" : "string", + "enum" : [ "asc", "desc" ] + }, + "in" : "query", + "name" : "order" + } ], + "responses" : { + "200" : { + "description" : "On a successful response, returns a result set of artifacts - one for each artifact\nin the registry that matches the criteria.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ArtifactSearchResults" + } + } + } + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + }, + "/search/artifacts/{artifactId}/versions" : { + "parameters" : [ { + "description" : "The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier.", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "artifactId" + } ], + "summary" : "Search for all versions of an artifact.", + "get" : { + "tags" : [ "Search", "Versions" ], + "summary" : "Search artifact versions", + "description" : "Searches for versions of a specific artifact. This is typically used to get a listing\nof all versions of an artifact (for example, in a user interface).", + "operationId" : "searchVersions", + "parameters" : [ { + "description" : "The number of versions to skip before starting to collect the result set.", + "required" : true, + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "offset" + }, { + "description" : "The number of versions to return.", + "required" : true, + "schema" : { + "type" : "integer" + }, + "in" : "query", + "name" : "limit" + } ], + "responses" : { + "200" : { + "description" : "On a successful response, returns a result set of versions - one for each version\nof the artifact.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/VersionSearchResults" + } + } + } + }, + "404" : { + "$ref" : "#/components/responses/NotFound" + }, + "500" : { + "$ref" : "#/components/responses/ServerError" + } + } + } + } + }, + "components" : { + "responses" : { + "BadRequest" : { + "description" : "Common response for all operations that can return a `400` error.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + }, + "Conflict" : { + "description" : "Common response used when an input conflicts with existing data.", + "content" : { + "application/json" : { + "examples" : { + "ConflictExample" : { + "value" : { + "error_code" : 409, + "message" : "The artifact content was invalid." + } + } + }, + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + }, + "NotFound" : { + "description" : "Common response for all operations that can return a `404` error.", + "content" : { + "application/json" : { + "examples" : { + "NotFoundExample" : { + "value" : { + "error_code" : 404, + "message" : "No artifact with id 'Topic-1/Inbound' could be found." + } + } + }, + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + }, + "ServerError" : { + "description" : "Common response for all operations that can fail with an unexpected server error.", + "content" : { + "application/json" : { + "examples" : { + "ErrorExample" : { + "value" : { + "error_code" : 500, + "message" : "Lost connection to the database." + } + } + }, + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + } + }, + "schemas" : { + "ArtifactMetaData" : { + "example" : { + "createdBy" : "user1", + "createdOn" : "2019-03-22T12:51:19Z", + "description" : "Description of the artifact", + "globalId" : 12984719247, + "id" : "Procurement-Invoice", + "labels" : [ "label-1", "label-2" ], + "modifiedBy" : "user2", + "modifiedOn" : "2019-07-19T15:09:00Z", + "name" : "Artifact Name", + "properties" : { + "custom-1" : "foo", + "custom-2" : "bar" + }, + "type" : "AVRO", + "version" : 18 + }, + "properties" : { + "createdBy" : { + "type" : "string" + }, + "createdOn" : { + "format" : "date-time", + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "globalId" : { + "format" : "int64", + "type" : "integer" + }, + "id" : { + "type" : "string" + }, + "labels" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "modifiedBy" : { + "type" : "string" + }, + "modifiedOn" : { + "format" : "date-time", + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "properties" : { + "$ref" : "#/components/schemas/Properties" + }, + "state" : { + "$ref" : "#/components/schemas/ArtifactState" + }, + "type" : { + "$ref" : "#/components/schemas/ArtifactType" + }, + "version" : { + "format" : "int64", + "type" : "integer" + } + }, + "type" : "object", + "title" : "Root Type for ArtifactMetaData", + "required" : [ "id", "createdBy", "createdOn", "modifiedBy", "modifiedOn", "version", "type", "globalId", "state" ] + }, + "ArtifactSearchResults" : { + "description" : "Describes the response received when searching for artifacts.", + "properties" : { + "artifacts" : { + "description" : "The artifacts that matched the search criteria.", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SearchedArtifact" + } + }, + "count" : { + "description" : "The total number of artifacts that matched the search criteria.", + "type" : "integer" + } + }, + "type" : "object", + "required" : [ "count", "artifacts" ] + }, + "ArtifactState" : { + "description" : "Describes the state of an artifact or artifact version. The following states\nare possible:\n\n* ENABLED\n* DISABLED\n* DEPRECATED\n", + "type" : "string", + "enum" : [ "ENABLED", "DISABLED", "DEPRECATED", "DELETED" ], + "x-codegen-package" : "io.apicurio.registry.types" + }, + "ArtifactType" : { + "example" : "AVRO", + "type" : "string", + "enum" : [ "AVRO", "PROTOBUF", "PROTOBUF_FD", "JSON", "OPENAPI", "ASYNCAPI", "GRAPHQL", "KCONNECT", "WSDL", "XSD", "XML" ], + "x-codegen-package" : "io.apicurio.registry.types" + }, + "EditableMetaData" : { + "example" : { + "description" : "The description of the artifact.", + "labels" : [ "regional", "global" ], + "name" : "Artifact Name", + "properties" : { + "custom-1" : "foo", + "custom-2" : "bar" + } + }, + "properties" : { + "description" : { + "type" : "string" + }, + "labels" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "name" : { + "type" : "string" + }, + "properties" : { + "$ref" : "#/components/schemas/Properties" + } + }, + "type" : "object", + "title" : "Root Type for EditableArtifactMetaData" + }, + "Error" : { + "description" : "All error responses, whether `4xx` or `5xx` will include one of these as the response\nbody.", + "example" : { + "error_code" : 500, + "message" : "An error occurred somewhere." + }, + "properties" : { + "detail" : { + "description" : "Full details about the error. This might contain a server stack trace, for example.", + "type" : "string" + }, + "error_code" : { + "description" : "The server-side error code.", + "format" : "int32", + "type" : "integer" + }, + "message" : { + "description" : "The short error message.", + "type" : "string" + } + }, + "type" : "object", + "title" : "Root Type for Error" + }, + "Properties" : { + "description" : "User-defined name-value pairs. Name and value must be strings.", + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "Rule" : { + "example" : { + "config" : "FULL", + "type" : "VALIDITY" + }, + "properties" : { + "config" : { + "type" : "string" + }, + "type" : { + "$ref" : "#/components/schemas/RuleType" + } + }, + "type" : "object", + "title" : "Root Type for Rule", + "required" : [ "config" ] + }, + "RuleType" : { + "example" : "VALIDITY", + "type" : "string", + "enum" : [ "VALIDITY", "COMPATIBILITY" ], + "x-codegen-package" : "io.apicurio.registry.types" + }, + "SearchOver" : { + "type" : "string", + "enum" : [ "everything", "name", "description", "labels" ] + }, + "SearchedArtifact" : { + "description" : "Models a single artifact from the result set returned when searching for artifacts.", + "example" : { + "createdBy" : "user1", + "createdOn" : "2019-03-22T12:51:19Z", + "description" : "Description of the artifact", + "id" : "Procurement-Invoice", + "labels" : [ "current", "internal" ], + "name" : "Artifact Name", + "state" : "ENABLED", + "type" : "AVRO" + }, + "properties" : { + "createdBy" : { + "type" : "string" + }, + "createdOn" : { + "format" : "date-time", + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "labels" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "modifiedBy" : { + "type" : "string" + }, + "modifiedOn" : { + "format" : "date-time", + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "state" : { + "$ref" : "#/components/schemas/ArtifactState" + }, + "type" : { + "$ref" : "#/components/schemas/ArtifactType" + } + }, + "type" : "object", + "required" : [ "createdBy", "createdOn", "id", "type", "state" ] + }, + "SearchedVersion" : { + "description" : "Models a single artifact from the result set returned when searching for artifacts.", + "example" : { + "createdBy" : "user1", + "createdOn" : "2019-03-22T12:51:19Z", + "description" : "Description of the artifact version", + "globalId" : 3849759283547, + "labels" : [ "current", "internal" ], + "name" : "Artifact Version Name", + "state" : "ENABLED", + "type" : "AVRO", + "version" : 17 + }, + "properties" : { + "createdBy" : { + "type" : "string" + }, + "createdOn" : { + "format" : "date-time", + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "globalId" : { + "format" : "int64", + "type" : "integer" + }, + "labels" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "name" : { + "type" : "string" + }, + "state" : { + "$ref" : "#/components/schemas/ArtifactState" + }, + "type" : { + "$ref" : "#/components/schemas/ArtifactType" + }, + "version" : { + "format" : "int32", + "type" : "integer" + } + }, + "type" : "object", + "required" : [ "createdBy", "createdOn", "type", "state", "globalId", "version" ] + }, + "SortOrder" : { + "type" : "string", + "enum" : [ "asc", "desc" ] + }, + "UpdateState" : { + "example" : { + "state" : "DISABLED" + }, + "properties" : { + "state" : { + "$ref" : "#/components/schemas/ArtifactState" + } + }, + "type" : "object", + "title" : "Root Type for UpdateState", + "required" : [ "state" ] + }, + "VersionMetaData" : { + "example" : { + "createdBy" : "user1", + "createdOn" : "2019-05-17T12:00:00Z", + "description" : "The description of the artifact", + "globalId" : 183282932983, + "id" : "my-artifact-id", + "labels" : [ "label-1", "label-2" ], + "name" : "Artifact Name", + "properties" : { + "custom-1" : "foo", + "custom-2" : "bar" + }, + "type" : "PROTOBUF", + "version" : 1221432 + }, + "properties" : { + "createdBy" : { + "type" : "string" + }, + "createdOn" : { + "format" : "date-time", + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "globalId" : { + "format" : "int64", + "type" : "integer" + }, + "id" : { + "description" : "The artifact id.", + "type" : "string" + }, + "labels" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "name" : { + "type" : "string" + }, + "properties" : { + "$ref" : "#/components/schemas/Properties" + }, + "state" : { + "$ref" : "#/components/schemas/ArtifactState" + }, + "type" : { + "$ref" : "#/components/schemas/ArtifactType" + }, + "version" : { + "format" : "int64", + "type" : "integer" + } + }, + "type" : "object", + "title" : "Root Type for ArtifactVersionMetaData", + "required" : [ "createdOn", "createdBy", "version", "type", "globalId", "id" ] + }, + "VersionSearchResults" : { + "description" : "Describes the response received when searching for artifacts.", + "properties" : { + "count" : { + "description" : "The total number of artifacts that matched the search criteria.", + "type" : "integer" + }, + "versions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SearchedVersion" + } + } + }, + "type" : "object", + "required" : [ "count", "versions" ] + } + } + } +} \ No newline at end of file diff --git a/gen-api-ex/apicurio.local.registry.2.1.0-SNAPSHOT.yaml b/gen-api-ex/apicurio.local.registry.2.1.0-SNAPSHOT.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/gen-api-ex/apidapp.com.2019-02-14T164701Z.yaml b/gen-api-ex/apidapp.com.2019-02-14T164701Z.yaml new file mode 100644 index 0000000000000000000000000000000000000000..67f11f7c7e1a4c6ff259f95ca3f0379869f72a30 --- /dev/null +++ b/gen-api-ex/apidapp.com.2019-02-14T164701Z.yaml @@ -0,0 +1,1705 @@ +{ + "openapi" : "3.0.0", + "info" : { + "contact" : { + "x-twitter" : "api_dapp" + }, + "title" : "ApiDapp", + "version" : "2019-02-14T16:47:01Z", + "x-providerName" : "apidapp.com", + "x-logo" : { + "url" : "https://i2.wp.com/apidapp.com/wp-content/uploads/2019/03/cropped-ApiDappIcon.png?fit=180%2C180&ssl=1" + }, + "x-apisguru-categories" : [ "financial" ], + "x-origin" : [ { + "format" : "openapi", + "url" : "https://apidapp.s3.amazonaws.com/ApiDapp-Start-swagger-7/ApiDapp-Start-swagger+(7).json", + "version" : "3.0" + } ] + }, + "servers" : [ { + "url" : "https://ethereum.apidapp.com/1" + } ], + "paths" : { + "/" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "x-amazon-apigateway-any-method" : { + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty", + "abs$ref" : "file:/E:/bachelor-thesis/SigTest/bachelor-thesis-jastadd/build/resources/main/apidapp.com.2019-02-14T164701Z.yaml#/components/schemas/Empty" + } + } + }, + "description" : "200 response" + } + } + } + }, + "/account" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "description" : "Create new account", + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/account/{id}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get account balance", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/block" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Access detailed block information", + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/block/{id}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get information about particular block", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/block/{id}/transaction" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get transaction count within block", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/block/{id}/transaction/{index}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + }, { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "index" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get information about particular transaction within block", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "index" + }, { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/blockchain" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get a list of supported blockchains", + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/blockchain/{id}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get information about blockchain woth given id", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/contract" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "description" : "Create a new smart contract", + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/contract/{id}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get contract balance", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + }, + "post" : { + "description" : "Call the contract", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/echo" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "x-amazon-apigateway-any-method" : { + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty", + "abs$ref" : "file:/E:/bachelor-thesis/SigTest/bachelor-thesis-jastadd/build/resources/main/apidapp.com.2019-02-14T164701Z.yaml#/components/schemas/Empty" + } + } + }, + "description" : "200 response" + } + } + } + }, + "/erc20" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get token information such as name, total amount in circulation, etc", + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/erc20/{address}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "address" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get information amout token balance in the account", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "address" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "description" : "Transfer tokens to another account", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "address" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/key" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "parameters" : [ { + "required" : false, + "schema" : { + "type" : "string" + }, + "in" : "query", + "name" : "token" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/key/{key}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "key" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "delete" : { + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "key" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/transaction" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "description" : "Create a new transaction. Transfer Ether between accounts", + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/transaction/{hash}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "hash" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get information about transaction by the transaction hash value", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "hash" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/transaction/{hash}/receipt" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "hash" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get receipt detail information", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "hash" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + }, + "security" : [ { + "Key2" : [ ] + } ] + } + }, + "/version" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get API version info", + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/wallet" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get current account balance", + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "description" : "Create personal wallet", + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/wallet/account" : { + "options" : { + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/wallet/account/{id}" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "get" : { + "description" : "Get account balance", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/wallet/account/{id}/contract" : { + "post" : { + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/wallet/account/{id}/erc20" : { + "post" : { + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + }, + "/wallet/account/{id}/pay" : { + "options" : { + "parameters" : [ { + "description" : "Automatically added", + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "headers" : { + "Access-Control-Allow-Headers" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Methods" : { + "schema" : { + "type" : "string" + } + }, + "Access-Control-Allow-Origin" : { + "schema" : { + "type" : "string" + } + } + }, + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + }, + "post" : { + "description" : "Send payment from the account held within the wallet", + "parameters" : [ { + "required" : true, + "schema" : { + "type" : "string" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "200" : { + "description" : "200 response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Empty" + } + } + } + } + } + } + } + }, + "components" : { + "schemas" : { + "Empty" : { + "type" : "object", + "title" : "Empty Schema" + } + }, + "securitySchemes" : { + "Key2" : { + "type" : "apiKey", + "name" : "X-Api-Key", + "in" : "header", + "x-amazon-apigateway-authtype" : "custom" + } + } + } +} \ No newline at end of file diff --git a/gen-api-ex/petstore-expanded.json b/gen-api-ex/petstore-expanded.json index 1211c14275250c33182f2e38375718d58621ed18..894f0811419594c4011c21d47ca8722a1f53f631 100644 --- a/gen-api-ex/petstore-expanded.json +++ b/gen-api-ex/petstore-expanded.json @@ -20,43 +20,6 @@ } ], "paths" : { "/pets" : { - "post" : { - "description" : "Creates a new pet in the store. Duplicates are allowed", - "operationId" : "addPet", - "requestBody" : { - "description" : "Pet to add to the store", - "required" : true, - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NewPet" - } - } - } - }, - "responses" : { - "200" : { - "description" : "pet response", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - } - }, - "default" : { - "description" : "unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - }, "get" : { "description" : "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n", "operationId" : "findPets", @@ -107,25 +70,31 @@ } } } - } - }, - "/pets/{id}" : { - "delete" : { - "description" : "deletes a single pet based on the ID supplied", - "operationId" : "deletePet", - "parameters" : [ { - "description" : "ID of pet to delete", + }, + "post" : { + "description" : "Creates a new pet in the store. Duplicates are allowed", + "operationId" : "addPet", + "requestBody" : { + "description" : "Pet to add to the store", "required" : true, - "schema" : { - "format" : "int64", - "type" : "integer" - }, - "in" : "path", - "name" : "id" - } ], + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/NewPet" + } + } + } + }, "responses" : { - "204" : { - "description" : "pet deleted" + "200" : { + "description" : "pet response", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + } }, "default" : { "description" : "unexpected error", @@ -138,7 +107,9 @@ } } } - }, + } + }, + "/pets/{id}" : { "get" : { "description" : "Returns a user based on a single ID, if the user does not have access to the pet", "operationId" : "find pet by id", @@ -174,6 +145,35 @@ } } } + }, + "delete" : { + "description" : "deletes a single pet based on the ID supplied", + "operationId" : "deletePet", + "parameters" : [ { + "description" : "ID of pet to delete", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + }, + "in" : "path", + "name" : "id" + } ], + "responses" : { + "204" : { + "description" : "pet deleted" + }, + "default" : { + "description" : "unexpected error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + } + } } } }, diff --git a/gen-api-ex/petstore.json b/gen-api-ex/petstore.json index be4ac280d95341475976aa538f3dcbc8086502ef..da01fa1c43b0581969964d33f90fcb3ce6969239 100644 --- a/gen-api-ex/petstore.json +++ b/gen-api-ex/petstore.json @@ -12,26 +12,6 @@ } ], "paths" : { "/pets" : { - "post" : { - "tags" : [ "pets" ], - "summary" : "Create a pet", - "operationId" : "createPets", - "responses" : { - "201" : { - "description" : "Null response" - }, - "default" : { - "description" : "unexpected error", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Error" - } - } - } - } - } - }, "get" : { "tags" : [ "pets" ], "summary" : "List all pets", @@ -76,6 +56,26 @@ } } } + }, + "post" : { + "tags" : [ "pets" ], + "summary" : "Create a pet", + "operationId" : "createPets", + "responses" : { + "201" : { + "description" : "Null response" + }, + "default" : { + "description" : "unexpected error", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + } + } + } + } } }, "/pets/{petId}" : { diff --git a/gen-api-ex/richard_mueller4-MatchinitAPI-1-swagger.json b/gen-api-ex/richard_mueller4-MatchinitAPI-1-swagger.json index a5727662b2189c3799c62d82493c1ad68428e515..ca7b6fce09714c3ba724b40f242829dda4ad524b 100644 --- a/gen-api-ex/richard_mueller4-MatchinitAPI-1-swagger.json +++ b/gen-api-ex/richard_mueller4-MatchinitAPI-1-swagger.json @@ -72,59 +72,59 @@ } }, "/profile/details/" : { - "post" : { + "get" : { "tags" : [ "User" ], - "summary" : "Used to set own profile data", + "summary" : "Used to retrive basic informations of a user-profile", "parameters" : [ { "$ref" : "#/components/parameters/UserID" } ], - "requestBody" : { - "$ref" : "#/components/requestBodies/UserDetails" - }, "responses" : { "200" : { - "description" : "ok" + "$ref" : "#/components/responses/UserDetails" } } }, - "get" : { + "post" : { "tags" : [ "User" ], - "summary" : "Used to retrive basic informations of a user-profile", + "summary" : "Used to set own profile data", "parameters" : [ { "$ref" : "#/components/parameters/UserID" } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/UserDetails" + }, "responses" : { "200" : { - "$ref" : "#/components/responses/UserDetails" + "description" : "ok" } } } }, "/profile/preferences" : { - "post" : { + "get" : { "tags" : [ "User" ], - "summary" : "Used to change preference settings of a profile", + "summary" : "Used to retrieve matching preferences of the given user", "parameters" : [ { "$ref" : "#/components/parameters/UserID" } ], - "requestBody" : { - "$ref" : "#/components/requestBodies/ProfileSettings" - }, "responses" : { "200" : { - "description" : "ok" + "$ref" : "#/components/responses/ProfileSettings" } } }, - "get" : { + "post" : { "tags" : [ "User" ], - "summary" : "Used to retrieve matching preferences of the given user", + "summary" : "Used to change preference settings of a profile", "parameters" : [ { "$ref" : "#/components/parameters/UserID" } ], + "requestBody" : { + "$ref" : "#/components/requestBodies/ProfileSettings" + }, "responses" : { "200" : { - "$ref" : "#/components/responses/ProfileSettings" + "description" : "ok" } } } @@ -144,21 +144,6 @@ } }, "/channels/global" : { - "delete" : { - "tags" : [ "Channels" ], - "summary" : "Moderators can use this to delete Messages.", - "parameters" : [ { - "$ref" : "#/components/parameters/MessageID" - } ], - "responses" : { - "200" : { - "description" : "deleted" - }, - "403" : { - "description" : "not a moderator" - } - } - }, "put" : { "tags" : [ "Channels" ], "summary" : "Used to send messages to the global channel of a domain", @@ -187,6 +172,21 @@ "$ref" : "#/components/responses/GlobalChannelMessage" } } + }, + "delete" : { + "tags" : [ "Channels" ], + "summary" : "Moderators can use this to delete Messages.", + "parameters" : [ { + "$ref" : "#/components/parameters/MessageID" + } ], + "responses" : { + "200" : { + "description" : "deleted" + }, + "403" : { + "description" : "not a moderator" + } + } } }, "/channels/global/ban" : { diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java index 5573376943eb409b9ce22c7bcecb0d07ce46d756..f117065cac4161f508a3261a8668e7bd3c485b96 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/CallbackObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:524 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:536 */ public static Callback composeCallback (CallbackObject callbackObject){ Callback callback = new Callback(); @@ -34,7 +34,7 @@ public class CallbackObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:529 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:537 */ public static CallbackObject parseCallback(Callback callback){ CallbackObject callbackObject = new CallbackObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java index e5e58739c7622bbd19fa79dc61ef0ca5bdc52aaf..6b977e0979ac584e5ed785c06b4e88831489781f 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/DiscriminatorObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:730 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:748 */ public static Discriminator composeDiscriminator (DiscriminatorObject discriminatorObject) { Discriminator discriminator = new Discriminator(); @@ -36,7 +36,7 @@ public class DiscriminatorObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:746 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:758 */ public static DiscriminatorObject parseDiscriminator (Discriminator discriminator) { DiscriminatorObject discriminatorObject = new DiscriminatorObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java index 382ea3a181ebe10b2ffcea41df1376544a69f7b1..3f5e3ae7102c136d88dc9e69bf28b1102c7a6d51 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/EncodingObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:470 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:482 */ public static EncodingProperty composeEncodingProperty (EncodingObject encodingObject){ EncodingProperty encodingProperty = new EncodingProperty(); @@ -46,7 +46,7 @@ public class EncodingObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:485 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:493 */ public static EncodingObject parseEncoding(EncodingProperty encodingProperty){ EncodingObject encodingObject = new EncodingObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java index 13c84d55544c7a57b44a5e74b6bf6e9e22d477da..8e2e73272597cbbc12f55aa0b5c5e4cc7a24771d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExampleObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class ExampleObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:537 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:549 */ public static Example composeExample (ExampleObject exampleObject){ Example example = new Example(); @@ -42,7 +42,7 @@ public class ExampleObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:540 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:548 */ public static ExampleObject parseExample(Example example){ ExampleObject exampleObject = new ExampleObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java index e257bd11fa03afd917f59ded3fc56c812940a97e..e6aedfd92faa6a23fe5d40ea20a3c799ba04e23d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ExternalDocObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class ExternalDocObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:368 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:374 */ public static ExternalDocs composeExternalDocs (ExternalDocObject externalDocObject){ ExternalDocs externalDocs = new ExternalDocs(); @@ -38,7 +38,7 @@ public class ExternalDocObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:396 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:400 */ public static ExternalDocObject parseExternalDocs(ExternalDocs externalDocs){ ExternalDocObject externalDocObject = new ExternalDocObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java index c72f9076eec271648252208243957e973a12f0ac..8396b83e26f9600f8403d204cbea19ff38e3184e 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/HeaderObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:581 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:593 */ public static Header composeHeader (HeaderObject headerObject){ Header header = new Header(); @@ -56,7 +56,7 @@ public class HeaderObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:580 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:588 */ public static HeaderObject parseHeader(Header header){ HeaderObject headerObject = new HeaderObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java index 3161ee90a956113893ad2b2f28e79071d6606c94..9bed0cd182a2486ff8645e1edd820dd103d65fef 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/LinkObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class LinkObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:558 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:570 */ public static Link composeLink (LinkObject linkObject){ Link link = new Link(); @@ -44,7 +44,7 @@ public class LinkObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:559 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:567 */ public static LinkObject parseLink(Link link){ LinkObject linkObject = new LinkObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java index 8ca581556512a525c3dde9d4a1ea15dc9ae57720..98e3d84d201728e4ab0468358d415f316eba9959 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/MediaTypeObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:447 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:459 */ public static MediaType composeMediaType (MediaTypeObject mediaTypeObject){ MediaType mediaType = new MediaType(); @@ -44,7 +44,7 @@ public class MediaTypeObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:466 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:474 */ public static MediaTypeObject parseMediaType(MediaType mediaType){ MediaTypeObject mediaTypeObject = new MediaTypeObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java index bcdcad1fb5c185c8547c3cd3a6a1a75141a857c2..7b2007cce1cb9f80dd85785b4dabff69cf1edbc3 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:806 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:824 */ public static OAuthFlow composeOAuthFlow (OAuthFlowObject oAuthFlowObject){ OAuthFlow oAuthFlow = new OAuthFlow(); @@ -37,7 +37,7 @@ public class OAuthFlowObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:831 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:843 */ public static OAuthFlowObject parseOAuthFlow(OAuthFlow oAuthFlow){ OAuthFlowObject oAuthFlowObject = new OAuthFlowObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java index e04a50df19b1251ad374fe63f5b7358c992ebca6..29cea6a3b8278ee2c4169e2836a9ced590bf174d 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OAuthFlowsObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:791 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:809 */ public static OAuthFlows composeOAuthFlows (OAuthFlowsObject oAuthFlowsObject){ OAuthFlows oAuthFlows = new OAuthFlows(); @@ -36,7 +36,7 @@ public class OAuthFlowsObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:807 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:819 */ public static OAuthFlowsObject parseOAuthFlows(OAuthFlows oAuthFlows){ OAuthFlowsObject oAuthFlowsObject = new OAuthFlowsObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java index fd42be2d7573918eb0231cf01ce0ad059f87aff0..683e82052d09894d706d4e9c1e56532c1297301e 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/OperationObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class OperationObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:308 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:314 */ public static Operation composeOperation (OperationObject operationObject){ Operation operation = new Operation(); @@ -81,7 +81,7 @@ public class OperationObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:346 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:350 */ public static OperationObject parseOperation(Operation operation){ OperationObject operationObject = new OperationObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java index ec36658d119357e4967b8684f4ea2a95b73424e6..322d717ae99b1ba8c8d3a3c062f4d101973e25de 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ParameterObject.java @@ -11,14 +11,14 @@ import java.net.URL; /** * @ast node * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:56 - * @astdecl ParameterObject : ASTNode ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref:String>; - * @production ParameterObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span>; + * @astdecl ParameterObject : ASTNode ::= <Name:String> <In:String> <Description:String> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style:String> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref:String> Extension*; + * @production ParameterObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><In:String></span> <span class="component"><Description:String></span> <span class="component"><Required:Boolean></span> <span class="component"><DeprecatedBoolean:Boolean></span> <span class="component"><AllowEmptyValue:Boolean></span> <span class="component"><Style:String></span> <span class="component"><Explode:Boolean></span> <span class="component"><AllowReserved:Boolean></span> <span class="component">[{@link SchemaObject}]</span> <span class="component"><Example:Object></span> <span class="component">{@link ExampleTuple}*</span> <span class="component">{@link ContentTuple}*</span> <span class="component"><Ref:String></span> <span class="component">{@link Extension}*</span>; */ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:385 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:391 */ public static Parameter composeParameter (ParameterObject parameterObject){ Parameter parameter = new Parameter(); @@ -59,12 +59,18 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { } if( parameterObject.getRequired() != null ) parameter.setRequired(parameterObject.getRequired()); + if( parameterObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : parameterObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + parameter.setExtensions(extensionMap); + } return parameter; } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:412 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:416 */ public static ParameterObject parseParameter(Parameter parameter){ ParameterObject parameterObject = new ParameterObject(); @@ -99,6 +105,10 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { } if( parameter.getRequired() != null ) parameterObject.setRequired(parameter.getRequired()); + if( parameter.getExtensions() != null ){ + for( String key : parameter.getExtensions().keySet() ) + parameterObject.addExtension(new Extension(key, parameter.getExtensions().get(key))); + } return parameterObject; } @@ -116,20 +126,21 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[3]; + children = new ASTNode[4]; setChild(new Opt(), 0); setChild(new JastAddList(), 1); setChild(new JastAddList(), 2); + setChild(new JastAddList(), 3); } /** - * @declaredat ASTNode:16 + * @declaredat ASTNode:17 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Ref"}, - type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "String"}, - kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "Token"} + name = {"Name", "In", "Description", "Required", "DeprecatedBoolean", "AllowEmptyValue", "Style", "Explode", "AllowReserved", "SchemaObject", "Example", "ExampleTuple", "ContentTuple", "Ref", "Extension"}, + type = {"String", "String", "String", "Boolean", "Boolean", "Boolean", "String", "Boolean", "Boolean", "Opt<SchemaObject>", "Object", "JastAddList<ExampleTuple>", "JastAddList<ContentTuple>", "String", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Token", "Opt", "Token", "List", "List", "Token", "List"} ) - public ParameterObject(String p0, String p1, String p2, Boolean p3, Boolean p4, Boolean p5, String p6, Boolean p7, Boolean p8, Opt<SchemaObject> p9, Object p10, JastAddList<ExampleTuple> p11, JastAddList<ContentTuple> p12, String p13) { + public ParameterObject(String p0, String p1, String p2, Boolean p3, Boolean p4, Boolean p5, String p6, Boolean p7, Boolean p8, Opt<SchemaObject> p9, Object p10, JastAddList<ExampleTuple> p11, JastAddList<ContentTuple> p12, String p13, JastAddList<Extension> p14) { setName(p0); setIn(p1); setDescription(p2); @@ -144,41 +155,42 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { setChild(p11, 1); setChild(p12, 2); setRef(p13); + setChild(p14, 3); } /** @apilevel low-level - * @declaredat ASTNode:38 + * @declaredat ASTNode:40 */ protected int numChildren() { - return 3; + return 4; } /** * @apilevel internal - * @declaredat ASTNode:44 + * @declaredat ASTNode:46 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:48 + * @declaredat ASTNode:50 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:52 + * @declaredat ASTNode:54 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:56 + * @declaredat ASTNode:58 */ public ParameterObject clone() throws CloneNotSupportedException { ParameterObject node = (ParameterObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:61 + * @declaredat ASTNode:63 */ public ParameterObject copy() { try { @@ -198,7 +210,7 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:80 + * @declaredat ASTNode:82 */ @Deprecated public ParameterObject fullCopy() { @@ -209,7 +221,7 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:90 + * @declaredat ASTNode:92 */ public ParameterObject treeCopyNoTransform() { ParameterObject tree = (ParameterObject) copy(); @@ -230,7 +242,7 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:110 + * @declaredat ASTNode:112 */ public ParameterObject treeCopy() { ParameterObject tree = (ParameterObject) copy(); @@ -246,7 +258,7 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:124 + * @declaredat ASTNode:126 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenString_Name == ((ParameterObject) node).tokenString_Name) && (tokenString_In == ((ParameterObject) node).tokenString_In) && (tokenString_Description == ((ParameterObject) node).tokenString_Description) && (tokenBoolean_Required == ((ParameterObject) node).tokenBoolean_Required) && (tokenBoolean_DeprecatedBoolean == ((ParameterObject) node).tokenBoolean_DeprecatedBoolean) && (tokenBoolean_AllowEmptyValue == ((ParameterObject) node).tokenBoolean_AllowEmptyValue) && (tokenString_Style == ((ParameterObject) node).tokenString_Style) && (tokenBoolean_Explode == ((ParameterObject) node).tokenBoolean_Explode) && (tokenBoolean_AllowReserved == ((ParameterObject) node).tokenBoolean_AllowReserved) && (tokenObject_Example == ((ParameterObject) node).tokenObject_Example) && (tokenString_Ref == ((ParameterObject) node).tokenString_Ref); @@ -742,6 +754,116 @@ public class ParameterObject extends ASTNode<ASTNode> implements Cloneable { public String getRef() { return tokenString_Ref != null ? tokenString_Ref : ""; } + /** + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. + * @apilevel high-level + */ + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 3); + } + /** + * Retrieves the number of children in the Extension list. + * @return Number of children in the Extension list. + * @apilevel high-level + */ + public int getNumExtension() { + return getExtensionList().getNumChild(); + } + /** + * Retrieves the number of children in the Extension list. + * Calling this method will not trigger rewrites. + * @return Number of children in the Extension list. + * @apilevel low-level + */ + public int getNumExtensionNoTransform() { + return getExtensionListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the Extension list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the Extension list. + * @apilevel high-level + */ + public Extension getExtension(int i) { + return (Extension) getExtensionList().getChild(i); + } + /** + * Check whether the Extension list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasExtension() { + return getExtensionList().getNumChild() != 0; + } + /** + * Append an element to the Extension list. + * @param node The element to append to the Extension list. + * @apilevel high-level + */ + public void addExtension(Extension node) { + JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } + /** + * Replaces the Extension list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setExtension(Extension node, int i) { + JastAddList<Extension> list = getExtensionList(); + list.setChild(node, i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(3); + return list; + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionListNoTransform() { + return (JastAddList<Extension>) getChildNoTransform(3); + } + /** + * @return the element at index {@code i} in the Extension list without + * triggering rewrites. + */ + public Extension getExtensionNoTransform(int i) { + return (Extension) getExtensionListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + public JastAddList<Extension> getExtensions() { + return getExtensionList(); + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionsNoTransform() { + return getExtensionListNoTransform(); + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java index a52f18cf7f270e92bd56241bb5360d6f05ac8f61..dfc8e5249ba35c6fa9b151b840e4b7aab52a54f0 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/PathItem.java @@ -11,8 +11,8 @@ import java.net.URL; /** * @ast node * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:38 - * @astdecl PathItem : ASTNode ::= <Ref:String> <Summary:String> <Description:String> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject*; - * @production PathItem : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link Get}]</span> <span class="component">[{@link Put}]</span> <span class="component">[{@link Post}]</span> <span class="component">[{@link Delete}]</span> <span class="component">[{@link Options}]</span> <span class="component">[{@link Head}]</span> <span class="component">[{@link Patch}]</span> <span class="component">[{@link Trace}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link ParameterObject}*</span>; + * @astdecl PathItem : ASTNode ::= <Ref:String> <Summary:String> <Description:String> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject* Extension*; + * @production PathItem : {@link ASTNode} ::= <span class="component"><Ref:String></span> <span class="component"><Summary:String></span> <span class="component"><Description:String></span> <span class="component">[{@link Get}]</span> <span class="component">[{@link Put}]</span> <span class="component">[{@link Post}]</span> <span class="component">[{@link Delete}]</span> <span class="component">[{@link Options}]</span> <span class="component">[{@link Head}]</span> <span class="component">[{@link Patch}]</span> <span class="component">[{@link Trace}]</span> <span class="component">{@link ServerObject}*</span> <span class="component">{@link ParameterObject}*</span> <span class="component">{@link Extension}*</span>; */ public class PathItem extends ASTNode<ASTNode> implements Cloneable { @@ -52,6 +52,12 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { for( ParameterObject p : pathItem.getParameterObjects() ) path.addParameter( ParameterObject.composeParameter(p) ); } + if( pathItem.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : pathItem.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + path.setExtensions(extensionMap); + } return path; } @@ -124,6 +130,10 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { pathItem.addParameterObject(ParameterObject.parseParameter(p)); } } + if( path.getExtensions() != null ){ + for( String key : path.getExtensions().keySet() ) + pathItem.addExtension(new Extension(key, path.getExtensions().get(key))); + } return pathItem; } @@ -141,7 +151,7 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[10]; + children = new ASTNode[11]; setChild(new Opt(), 0); setChild(new Opt(), 1); setChild(new Opt(), 2); @@ -152,16 +162,17 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { setChild(new Opt(), 7); setChild(new JastAddList(), 8); setChild(new JastAddList(), 9); + setChild(new JastAddList(), 10); } /** - * @declaredat ASTNode:23 + * @declaredat ASTNode:24 */ @ASTNodeAnnotation.Constructor( - name = {"Ref", "Summary", "Description", "Get", "Put", "Post", "Delete", "Options", "Head", "Patch", "Trace", "ServerObject", "ParameterObject"}, - type = {"String", "String", "String", "Opt<Get>", "Opt<Put>", "Opt<Post>", "Opt<Delete>", "Opt<Options>", "Opt<Head>", "Opt<Patch>", "Opt<Trace>", "JastAddList<ServerObject>", "JastAddList<ParameterObject>"}, - kind = {"Token", "Token", "Token", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "List", "List"} + name = {"Ref", "Summary", "Description", "Get", "Put", "Post", "Delete", "Options", "Head", "Patch", "Trace", "ServerObject", "ParameterObject", "Extension"}, + type = {"String", "String", "String", "Opt<Get>", "Opt<Put>", "Opt<Post>", "Opt<Delete>", "Opt<Options>", "Opt<Head>", "Opt<Patch>", "Opt<Trace>", "JastAddList<ServerObject>", "JastAddList<ParameterObject>", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Token", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "Opt", "List", "List", "List"} ) - public PathItem(String p0, String p1, String p2, Opt<Get> p3, Opt<Put> p4, Opt<Post> p5, Opt<Delete> p6, Opt<Options> p7, Opt<Head> p8, Opt<Patch> p9, Opt<Trace> p10, JastAddList<ServerObject> p11, JastAddList<ParameterObject> p12) { + public PathItem(String p0, String p1, String p2, Opt<Get> p3, Opt<Put> p4, Opt<Post> p5, Opt<Delete> p6, Opt<Options> p7, Opt<Head> p8, Opt<Patch> p9, Opt<Trace> p10, JastAddList<ServerObject> p11, JastAddList<ParameterObject> p12, JastAddList<Extension> p13) { setRef(p0); setSummary(p1); setDescription(p2); @@ -175,41 +186,42 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { setChild(p10, 7); setChild(p11, 8); setChild(p12, 9); + setChild(p13, 10); } /** @apilevel low-level - * @declaredat ASTNode:44 + * @declaredat ASTNode:46 */ protected int numChildren() { - return 10; + return 11; } /** * @apilevel internal - * @declaredat ASTNode:50 + * @declaredat ASTNode:52 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:54 + * @declaredat ASTNode:56 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:58 + * @declaredat ASTNode:60 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:62 + * @declaredat ASTNode:64 */ public PathItem clone() throws CloneNotSupportedException { PathItem node = (PathItem) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:67 + * @declaredat ASTNode:69 */ public PathItem copy() { try { @@ -229,7 +241,7 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:86 + * @declaredat ASTNode:88 */ @Deprecated public PathItem fullCopy() { @@ -240,7 +252,7 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:96 + * @declaredat ASTNode:98 */ public PathItem treeCopyNoTransform() { PathItem tree = (PathItem) copy(); @@ -261,7 +273,7 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:116 + * @declaredat ASTNode:118 */ public PathItem treeCopy() { PathItem tree = (PathItem) copy(); @@ -277,7 +289,7 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:130 + * @declaredat ASTNode:132 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenString_Ref == ((PathItem) node).tokenString_Ref) && (tokenString_Summary == ((PathItem) node).tokenString_Summary) && (tokenString_Description == ((PathItem) node).tokenString_Description); @@ -970,6 +982,116 @@ public class PathItem extends ASTNode<ASTNode> implements Cloneable { public JastAddList<ParameterObject> getParameterObjectsNoTransform() { return getParameterObjectListNoTransform(); } + /** + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. + * @apilevel high-level + */ + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 10); + } + /** + * Retrieves the number of children in the Extension list. + * @return Number of children in the Extension list. + * @apilevel high-level + */ + public int getNumExtension() { + return getExtensionList().getNumChild(); + } + /** + * Retrieves the number of children in the Extension list. + * Calling this method will not trigger rewrites. + * @return Number of children in the Extension list. + * @apilevel low-level + */ + public int getNumExtensionNoTransform() { + return getExtensionListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the Extension list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the Extension list. + * @apilevel high-level + */ + public Extension getExtension(int i) { + return (Extension) getExtensionList().getChild(i); + } + /** + * Check whether the Extension list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasExtension() { + return getExtensionList().getNumChild() != 0; + } + /** + * Append an element to the Extension list. + * @param node The element to append to the Extension list. + * @apilevel high-level + */ + public void addExtension(Extension node) { + JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } + /** + * Replaces the Extension list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setExtension(Extension node, int i) { + JastAddList<Extension> list = getExtensionList(); + list.setChild(node, i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(10); + return list; + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionListNoTransform() { + return (JastAddList<Extension>) getChildNoTransform(10); + } + /** + * @return the element at index {@code i} in the Extension list without + * triggering rewrites. + */ + public Extension getExtensionNoTransform(int i) { + return (Extension) getExtensionListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + public JastAddList<Extension> getExtensions() { + return getExtensionList(); + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionsNoTransform() { + return getExtensionListNoTransform(); + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java index 4cfc06ae90f700cc5d4acdc3d3e29f6da4bad47a..42abbd8e95d5e2f2d06dd61c37821980232a7b67 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/RequestBodyObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:428 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:440 */ public static org.openapi4j.parser.model.v3.RequestBody composeRequestBody (RequestBodyObject requestBodyObject){ org.openapi4j.parser.model.v3.RequestBody requestBody = new org.openapi4j.parser.model.v3.RequestBody(); @@ -40,7 +40,7 @@ public class RequestBodyObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:449 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:457 */ public static RequestBodyObject parseRequestBody(org.openapi4j.parser.model.v3.RequestBody requestBody){ RequestBodyObject requestBodyObject = new RequestBodyObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java index 7c91b69b5e03a6f280909f6e4a410bb5018b672b..8f9ed244fbe44be0b4689ac0e9aa119646b70d86 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/ResponseObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:495 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:507 */ public static Response composeResponse (ResponseObject responseObject){ Response response = new Response(); @@ -50,7 +50,7 @@ public class ResponseObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:506 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:514 */ public static ResponseObject parseResponse(Response response){ ResponseObject responseObject = new ResponseObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java index 8b569bf4a85c3af6118d07025c531931af8f443d..83b8a1ceb984b20d96b1ad03682ab763ee951d76 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SchemaObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:629 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:647 */ public static org.openapi4j.parser.model.v3.Schema composeSchema (SchemaObject schemaObject) { org.openapi4j.parser.model.v3.Schema schema = new org.openapi4j.parser.model.v3.Schema(); @@ -27,8 +27,8 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { schema.setRef(schemaObject.getRef()); if( schemaObject.getAdditionalProperties() != null ) schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties())); - //if( schemaObject.getAdditionalPropertiesAllowed() != null ) - //schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); + if( schemaObject.getAdditionalPropertiesAllowed() != null && schemaObject.getAdditionalPropertiesAllowed().equals(true) ) + schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); if( schemaObject.getDefaultValue() != null ) schema.setDefault(schemaObject.getDefaultValue()); if( !schemaObject.getDescription().isEmpty() ) @@ -122,7 +122,7 @@ public class SchemaObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:626 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:638 */ public static SchemaObject parseSchema (org.openapi4j.parser.model.v3.Schema schema) { SchemaObject schemaObject = new SchemaObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java index b0da8a414c23ed8f5d0d6c9c2dd80cc28a1efed6..22606e00aee23d5e9645b3b6ea0b0f478617a779 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecurityRequirementObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class SecurityRequirementObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:822 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:840 */ public static SecurityRequirement composeSecurityRequirement (SecurityRequirementObject securityRequirementObject){ SecurityRequirement securityRequirement = new SecurityRequirement(); @@ -38,7 +38,7 @@ public class SecurityRequirementObject extends ASTNode<ASTNode> implements Clone } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:845 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:857 */ public static SecurityRequirementObject parseSecurityRequirement(SecurityRequirement securityRequirement){ SecurityRequirementObject securityRequirementObject = new SecurityRequirementObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java index 8fee2f93395f2e45d6eb9daa3211bb42451469f6..b1c550255f5d5403e5fba2a10d9f9226f647a911 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/SecuritySchemeObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:762 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:780 */ public static SecurityScheme composeSecurityScheme (SecuritySchemeObject securitySchemeObject){ SecurityScheme securityScheme = new SecurityScheme(); @@ -50,7 +50,7 @@ public class SecuritySchemeObject extends ASTNode<ASTNode> implements Cloneable } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:780 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:792 */ public static SecuritySchemeObject parseSecurityScheme(SecurityScheme securityScheme){ SecuritySchemeObject securitySchemeObject = new SecuritySchemeObject(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java index b462ea8d556f54443c2648d7d2d0daf90965da73..8426edf8528cc4a94233875a40e95aeb5b85a320 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/TagObject.java @@ -11,14 +11,14 @@ import java.net.URL; /** * @ast node * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\OpenAPISpecification.ast:88 - * @astdecl TagObject : ASTNode ::= <Name:String> <Description:String> [ExternalDocObject]; - * @production TagObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span>; + * @astdecl TagObject : ASTNode ::= <Name:String> <Description:String> [ExternalDocObject] Extension*; + * @production TagObject : {@link ASTNode} ::= <span class="component"><Name:String></span> <span class="component"><Description:String></span> <span class="component">[{@link ExternalDocObject}]</span> <span class="component">{@link Extension}*</span>; */ public class TagObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:616 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:628 */ public static org.openapi4j.parser.model.v3.Tag composeTag (TagObject tagObject){ org.openapi4j.parser.model.v3.Tag tag = new org.openapi4j.parser.model.v3.Tag(); @@ -29,12 +29,18 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { tag.setDescription( tagObject.getDescription() ); if( tagObject.hasExternalDocObject() ) tag.setExternalDocs( ExternalDocObject.composeExternalDocs(tagObject.getExternalDocObject()) ); + if( tagObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : tagObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + tag.setExtensions(extensionMap); + } return tag; } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:613 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:621 */ public static TagObject parseTag(org.openapi4j.parser.model.v3.Tag tag){ TagObject tagObject = new TagObject(); @@ -45,6 +51,10 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { tagObject.setDescription( tag.getDescription() ); if( tag.getExternalDocs() != null ) tagObject.setExternalDocObject( ExternalDocObject.parseExternalDocs(tag.getExternalDocs()) ); + if( tag.getExtensions() != null ){ + for( String key : tag.getExtensions().keySet() ) + tagObject.addExtension(new Extension(key, tag.getExtensions().get(key))); + } return tagObject; } @@ -62,56 +72,58 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { * @declaredat ASTNode:10 */ public void init$Children() { - children = new ASTNode[1]; + children = new ASTNode[2]; setChild(new Opt(), 0); + setChild(new JastAddList(), 1); } /** - * @declaredat ASTNode:14 + * @declaredat ASTNode:15 */ @ASTNodeAnnotation.Constructor( - name = {"Name", "Description", "ExternalDocObject"}, - type = {"String", "String", "Opt<ExternalDocObject>"}, - kind = {"Token", "Token", "Opt"} + name = {"Name", "Description", "ExternalDocObject", "Extension"}, + type = {"String", "String", "Opt<ExternalDocObject>", "JastAddList<Extension>"}, + kind = {"Token", "Token", "Opt", "List"} ) - public TagObject(String p0, String p1, Opt<ExternalDocObject> p2) { + public TagObject(String p0, String p1, Opt<ExternalDocObject> p2, JastAddList<Extension> p3) { setName(p0); setDescription(p1); setChild(p2, 0); + setChild(p3, 1); } /** @apilevel low-level - * @declaredat ASTNode:25 + * @declaredat ASTNode:27 */ protected int numChildren() { - return 1; + return 2; } /** * @apilevel internal - * @declaredat ASTNode:31 + * @declaredat ASTNode:33 */ public boolean mayHaveRewrite() { return false; } /** @apilevel internal - * @declaredat ASTNode:35 + * @declaredat ASTNode:37 */ public void flushAttrCache() { super.flushAttrCache(); } /** @apilevel internal - * @declaredat ASTNode:39 + * @declaredat ASTNode:41 */ public void flushCollectionCache() { super.flushCollectionCache(); } /** @apilevel internal - * @declaredat ASTNode:43 + * @declaredat ASTNode:45 */ public TagObject clone() throws CloneNotSupportedException { TagObject node = (TagObject) super.clone(); return node; } /** @apilevel internal - * @declaredat ASTNode:48 + * @declaredat ASTNode:50 */ public TagObject copy() { try { @@ -131,7 +143,7 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { * @return dangling copy of the subtree at this node * @apilevel low-level * @deprecated Please use treeCopy or treeCopyNoTransform instead - * @declaredat ASTNode:67 + * @declaredat ASTNode:69 */ @Deprecated public TagObject fullCopy() { @@ -142,7 +154,7 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:77 + * @declaredat ASTNode:79 */ public TagObject treeCopyNoTransform() { TagObject tree = (TagObject) copy(); @@ -163,7 +175,7 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { * The copy is dangling, i.e. has no parent. * @return dangling copy of the subtree at this node * @apilevel low-level - * @declaredat ASTNode:97 + * @declaredat ASTNode:99 */ public TagObject treeCopy() { TagObject tree = (TagObject) copy(); @@ -179,7 +191,7 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { return tree; } /** @apilevel internal - * @declaredat ASTNode:111 + * @declaredat ASTNode:113 */ protected boolean is$Equal(ASTNode node) { return super.is$Equal(node) && (tokenString_Name == ((TagObject) node).tokenString_Name) && (tokenString_Description == ((TagObject) node).tokenString_Description); @@ -275,6 +287,116 @@ public class TagObject extends ASTNode<ASTNode> implements Cloneable { public Opt<ExternalDocObject> getExternalDocObjectOptNoTransform() { return (Opt<ExternalDocObject>) getChildNoTransform(0); } + /** + * Replaces the Extension list. + * @param list The new list node to be used as the Extension list. + * @apilevel high-level + */ + public void setExtensionList(JastAddList<Extension> list) { + setChild(list, 1); + } + /** + * Retrieves the number of children in the Extension list. + * @return Number of children in the Extension list. + * @apilevel high-level + */ + public int getNumExtension() { + return getExtensionList().getNumChild(); + } + /** + * Retrieves the number of children in the Extension list. + * Calling this method will not trigger rewrites. + * @return Number of children in the Extension list. + * @apilevel low-level + */ + public int getNumExtensionNoTransform() { + return getExtensionListNoTransform().getNumChildNoTransform(); + } + /** + * Retrieves the element at index {@code i} in the Extension list. + * @param i Index of the element to return. + * @return The element at position {@code i} in the Extension list. + * @apilevel high-level + */ + public Extension getExtension(int i) { + return (Extension) getExtensionList().getChild(i); + } + /** + * Check whether the Extension list has any children. + * @return {@code true} if it has at least one child, {@code false} otherwise. + * @apilevel high-level + */ + public boolean hasExtension() { + return getExtensionList().getNumChild() != 0; + } + /** + * Append an element to the Extension list. + * @param node The element to append to the Extension list. + * @apilevel high-level + */ + public void addExtension(Extension node) { + JastAddList<Extension> list = (parent == null) ? getExtensionListNoTransform() : getExtensionList(); + list.addChild(node); + } + /** @apilevel low-level + */ + public void addExtensionNoTransform(Extension node) { + JastAddList<Extension> list = getExtensionListNoTransform(); + list.addChild(node); + } + /** + * Replaces the Extension list element at index {@code i} with the new node {@code node}. + * @param node The new node to replace the old list element. + * @param i The list index of the node to be replaced. + * @apilevel high-level + */ + public void setExtension(Extension node, int i) { + JastAddList<Extension> list = getExtensionList(); + list.setChild(node, i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + @ASTNodeAnnotation.ListChild(name="Extension") + public JastAddList<Extension> getExtensionList() { + JastAddList<Extension> list = (JastAddList<Extension>) getChild(1); + return list; + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionListNoTransform() { + return (JastAddList<Extension>) getChildNoTransform(1); + } + /** + * @return the element at index {@code i} in the Extension list without + * triggering rewrites. + */ + public Extension getExtensionNoTransform(int i) { + return (Extension) getExtensionListNoTransform().getChildNoTransform(i); + } + /** + * Retrieves the Extension list. + * @return The node representing the Extension list. + * @apilevel high-level + */ + public JastAddList<Extension> getExtensions() { + return getExtensionList(); + } + /** + * Retrieves the Extension list. + * <p><em>This method does not invoke AST transformations.</em></p> + * @return The node representing the Extension list. + * @apilevel low-level + */ + public JastAddList<Extension> getExtensionsNoTransform() { + return getExtensionListNoTransform(); + } /** @apilevel internal */ public ASTNode rewriteTo() { return super.rewriteTo(); diff --git a/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java b/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java index 130a7eebf774bd7ac5ad4692c45d5090b157ec7c..0dc96dce4551db0fd231ce91524e48a702aae5af 100644 --- a/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java +++ b/src/gen/java/de/tudresden/inf/st/openapi/ast/XmlObject.java @@ -18,7 +18,7 @@ import java.net.URL; public class XmlObject extends ASTNode<ASTNode> implements Cloneable { /** * @aspect Composer - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:745 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Composer.jadd:763 */ public static Xml composeXml (XmlObject xmlObject) { Xml xml = new Xml(); @@ -38,7 +38,7 @@ public class XmlObject extends ASTNode<ASTNode> implements Cloneable { } /** * @aspect Parser - * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:763 + * @declaredat E:\\bachelor-thesis\\SigTest\\bachelor-thesis-jastadd\\src\\main\\jastadd\\Parser.jrag:775 */ public static XmlObject parseXml (Xml xml) { XmlObject xmlObject = new XmlObject(); diff --git a/src/main/jastadd/Composer.jadd b/src/main/jastadd/Composer.jadd index 085da7e68d767d84753beaec00a94b069e4fe84a..41a02ef8a092b80c8f1d0e35cdc1fa8a851e251b 100644 --- a/src/main/jastadd/Composer.jadd +++ b/src/main/jastadd/Composer.jadd @@ -301,6 +301,12 @@ public static Path PathItem.composePath (PathItem pathItem){ for( ParameterObject p : pathItem.getParameterObjects() ) path.addParameter( ParameterObject.composeParameter(p) ); } + if( pathItem.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : pathItem.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + path.setExtensions(extensionMap); + } return path; } @@ -421,6 +427,12 @@ public static Parameter ParameterObject.composeParameter (ParameterObject parame } if( parameterObject.getRequired() != null ) parameter.setRequired(parameterObject.getRequired()); + if( parameterObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : parameterObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + parameter.setExtensions(extensionMap); + } return parameter; } @@ -622,6 +634,12 @@ public static org.openapi4j.parser.model.v3.Tag TagObject.composeTag (TagObject tag.setDescription( tagObject.getDescription() ); if( tagObject.hasExternalDocObject() ) tag.setExternalDocs( ExternalDocObject.composeExternalDocs(tagObject.getExternalDocObject()) ); + if( tagObject.getNumExtension() != 0 ){ + Map<String, Object> extensionMap = new HashMap<>(); + for( Extension e : tagObject.getExtensions() ) + extensionMap.put(e.getKey(), e.getValue()); + tag.setExtensions(extensionMap); + } return tag; } @@ -633,8 +651,8 @@ public static org.openapi4j.parser.model.v3.Schema SchemaObject.composeSchema (S schema.setRef(schemaObject.getRef()); if( schemaObject.getAdditionalProperties() != null ) schema.setAdditionalProperties(composeSchema(schemaObject.getAdditionalProperties())); - //if( schemaObject.getAdditionalPropertiesAllowed() != null ) - //schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); + if( schemaObject.getAdditionalPropertiesAllowed() != null && schemaObject.getAdditionalPropertiesAllowed().equals(true) ) + schema.setAdditionalPropertiesAllowed(schemaObject.getAdditionalPropertiesAllowed()); if( schemaObject.getDefaultValue() != null ) schema.setDefault(schemaObject.getDefaultValue()); if( !schemaObject.getDescription().isEmpty() ) diff --git a/src/main/jastadd/OpenAPISpecification.ast b/src/main/jastadd/OpenAPISpecification.ast index 3810dddeae8540d56efce0e6a55b8e8a88cdc5b1..847600345a0942538bf7b2daaa5fa3ed132b5ab5 100644 --- a/src/main/jastadd/OpenAPISpecification.ast +++ b/src/main/jastadd/OpenAPISpecification.ast @@ -35,7 +35,7 @@ CallbackTuple ::= <Key> CallbackObject; PathsObject ::= <Ref> PathItem; //Path Item Object -PathItem ::= <Ref> <Summary> <Description> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject*; +PathItem ::= <Ref> <Summary> <Description> [Get] [Put] [Post] [Delete] [Options] [Head] [Patch] [Trace] ServerObject* ParameterObject* Extension*; Get ::= OperationObject; Put ::= OperationObject; Post ::= OperationObject; @@ -53,7 +53,7 @@ Tag ::= <Tag:String>; ExternalDocObject ::= <Description> <Url> Extension*; //Parameter Object -ParameterObject ::= <Name> <In> <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref>; +ParameterObject ::= <Name> <In> <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref> Extension*; ContentTuple ::= <Key> MediaTypeObject; //Request Body Object @@ -85,7 +85,7 @@ LinkParameterTuple ::= <LinkParameterKey> <LinkParameterValue>; HeaderObject ::= <Description> <Required:Boolean> <DeprecatedBoolean:Boolean> <AllowEmptyValue:Boolean> <Style> <Explode:Boolean> <AllowReserved:Boolean> [SchemaObject] <Example:Object> ExampleTuple* ContentTuple* <Ref>; //Tag Object -TagObject ::= <Name> <Description> [ExternalDocObject]; +TagObject ::= <Name> <Description> [ExternalDocObject] Extension*; //Schema Object SchemaObject ::= <AdditionalProperties:SchemaObject> <AdditionalPropertiesAllowed:Boolean> <DefaultValue:Object> <Description> <DeprecatedBoolean:Boolean> [DiscriminatorObject] EnumObj* <Example:Object> <ExclusiveMaximum:Boolean> <ExclusiveMinimum:Boolean> [ExternalDocObject] <Format> [ItemsSchema] <Maximum:Number> <Minimum:Number> <MaxItems:Integer> <MinItems:Integer> <MaxLength:Integer> <MinLength:Integer> <MaxProperties:Integer> <MinProperties:Integer> <MultipleOf:Number> [NotSchema] <Nullable:Boolean> <Pattern> PropertyItem* RequiredField* AllOfSchema* AnyOfSchema* OneOfSchema* <ReadOnly:Boolean> <WriteOnly:Boolean> <Type> <Title> <UniqueItems:Boolean> [XmlObject] <Ref> Extension*; diff --git a/src/main/jastadd/Parser.jrag b/src/main/jastadd/Parser.jrag index 16d98413a417e0534865aac42f1beb334e4718f9..9c0e67ca9ea6ebccfaf151bd0ec15966bc36040e 100644 --- a/src/main/jastadd/Parser.jrag +++ b/src/main/jastadd/Parser.jrag @@ -339,6 +339,10 @@ public static PathItem PathItem.parsePath(Path path){ pathItem.addParameterObject(ParameterObject.parseParameter(p)); } } + if( path.getExtensions() != null ){ + for( String key : path.getExtensions().keySet() ) + pathItem.addExtension(new Extension(key, path.getExtensions().get(key))); + } return pathItem; } @@ -442,6 +446,10 @@ public static ParameterObject ParameterObject.parseParameter(Parameter parameter } if( parameter.getRequired() != null ) parameterObject.setRequired(parameter.getRequired()); + if( parameter.getExtensions() != null ){ + for( String key : parameter.getExtensions().keySet() ) + parameterObject.addExtension(new Extension(key, parameter.getExtensions().get(key))); + } return parameterObject; } @@ -619,6 +627,10 @@ public static TagObject TagObject.parseTag(org.openapi4j.parser.model.v3.Tag tag tagObject.setDescription( tag.getDescription() ); if( tag.getExternalDocs() != null ) tagObject.setExternalDocObject( ExternalDocObject.parseExternalDocs(tag.getExternalDocs()) ); + if( tag.getExtensions() != null ){ + for( String key : tag.getExtensions().keySet() ) + tagObject.addExtension(new Extension(key, tag.getExtensions().get(key))); + } return tagObject; } diff --git a/src/main/java/de/tudresden/inf/st/openapi/ConvertYAMLtoJSON.java b/src/main/java/de/tudresden/inf/st/openapi/ConvertYAMLtoJSON.java deleted file mode 100644 index 5ef3138f2e0a3a14ee9672f060ae9d6fd5c4d8a6..0000000000000000000000000000000000000000 --- a/src/main/java/de/tudresden/inf/st/openapi/ConvertYAMLtoJSON.java +++ /dev/null @@ -1,41 +0,0 @@ -package de.tudresden.inf.st.openapi; - -import java.io.IOException; -import java.io.FileWriter; -import java.nio.file.Files; -import java.nio.file.Paths; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; - -public class ConvertYAMLtoJSON { - public static void main(String[] args) throws IOException { - String content = ""; - FileWriter writer = new FileWriter("./src/main/resources/openapi.json"); - try { - content = new String(Files.readAllBytes(Paths.get( - "./src/main/resources/openapi.yaml"))); - System.out.println("*********Content from YAML File ****************"); - System.out.println(content); - String json = convertYamlToJson(content); - System.out.println("*********Converted JSON from YAML File ****************"); - System.out.println(json); - writer.write(json); - writer.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - private static String convertYamlToJson(String yaml) { - try { - ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory()); - Object obj = yamlReader.readValue(yaml, Object.class); - ObjectMapper jsonWriter = new ObjectMapper(); - return jsonWriter.writerWithDefaultPrettyPrinter().writeValueAsString(obj); - } catch (JsonProcessingException ex) { - ex.printStackTrace(); - } - return null; - } -} diff --git a/src/main/resources/amentum.space.atmosphere.1.1.1.yaml b/src/main/resources/amentum.space.atmosphere.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2592746862c6777e5463e8e3bcde9eb0c113806c --- /dev/null +++ b/src/main/resources/amentum.space.atmosphere.1.1.1.yaml @@ -0,0 +1,407 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + Instantly access empirical models of atmospheric density and composition that are recommended by the Committee on Space Research (COSPAR) for satellite drag calculations. <br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Atmosphere API + version: 1.1.1 + x-apisguru-categories: + - location + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://atmosphere.amentum.space/openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: atmosphere +tags: + - description: | + The <a href='https://ccmc.gsfc.nasa.gov/modelweb/atmos/nrlmsise00.html'>NRLMSISE-00</a> model was developed by the US Naval Research Laboratory. It is based on mass spectrometry and incoherent radar scatter data, includes drag and accelerometer data, and accounts for anomalous oxygen at high altitudes. It is recommended by the International Committee on Space Resarch (COSPAR) as the standard for atmospheric composition. <br><br> The API now automatically updates the Ap and F10.7 cm radio flux indices unless provided by the user. + name: nrlmsise00 + x-displayName: NRLMSISE-00 + - description: | + The <a href='https://sol.spacenvironment.net/jb2008/'>JB2008</a> (Jacchia-Bowman) model is a newer model developed by Space Environment Technologies and the US Air Force Space Command. + The model accounts for various phenomena related to EUV heating of + the thermosphere and uses the DST index as the driver of global + density changes. The model is complementary to the NRLMSISE00 model + and is more accurate during times of high solar activity and + geomagnetic storms. It is recommended by COSPAR as the standard + for thermospheric density in satellite drag calculations.<br><br> + The API now automatically updates the indices needed to account + for global density variations due to geomagnetic storms and EUV heating. + name: jb2008 + x-displayName: JB2008 +paths: + /jb2008: + get: + description: | + under given conditions. + operationId: app.api.endpoints.JB2008.sample_atmosphere + parameters: + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Altitude" + - $ref: "#/components/parameters/GeodeticLatitude" + - $ref: "#/components/parameters/GeodeticLongitude" + - $ref: "#/components/parameters/UTC" + responses: + "200": + content: + application/json: + example: + at_alt_temp: + units: K + value: 667.005615234375 + exospheric_temp: + units: K + value: 666.522705078125 + total_mass_density: + units: kg/m3 + value: 5.201439105817496e-12 + schema: + properties: + at_alt_temp: + properties: + units: + type: string + value: + type: number + type: object + exospheric_temp: + properties: + units: + type: string + value: + type: number + type: object + total_mass_density: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful atmospheric density calculation + summary: | + Compute atmospheric density and temperatures + tags: + - jb2008 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://atmosphere.amentum.io/jb2008?year=2020&month=5&day=21&altitude=300&geodetic_latitude=42&geodetic_longitude=42&utc=2" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import json + import requests + + url = "https://atmosphere.amentum.io/jb2008" + + params = { + 'year' : 2020, + 'month' : 5, + 'day' : 21, + 'geodetic_latitude' : 42, + 'geodetic_longitude' : 42, + 'altitude' : 300, # km + 'utc' : 2, # hours + } + headers = {"API-Key" : "<add_your_key>"} + # handle exceptions + response = requests.get(url, params=params, headers=headers) + json_payload = response.json() + + print(json.dumps(json_payload, indent=4, sort_keys=True)) + /nrlmsise00: + get: + description: | + at specified conditions. + operationId: app.api.endpoints.NRLMSISE00.sample_atmosphere + parameters: + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Altitude" + - $ref: "#/components/parameters/GeodeticLatitude" + - $ref: "#/components/parameters/GeodeticLongitude" + - $ref: "#/components/parameters/UTC" + - $ref: "#/components/parameters/F107A" + - $ref: "#/components/parameters/F107" + - $ref: "#/components/parameters/AP" + responses: + "200": + content: + application/json: + example: + Ar_density: + units: /m3 + value: 345221344 + H_density: + units: /m3 + value: 846266302464 + He_density: + units: /m3 + value: 14137357762560 + N2_density: + units: /m3 + value: 7370196910080 + N_density: + units: /m3 + value: 424038367232 + O2_density: + units: /m3 + value: 285386670080 + O_density: + units: /m3 + value: 160525593870336 + anomalous_O_density: + units: /m3 + value: 2940371.25 + ap: + value: 3 + at_alt_temp: + units: K + value: 590.3972778320312 + exospheric_temp: + units: K + value: 590.4319458007812 + f107: + units: sfu + value: 70 + f107a: + units: sfu + value: 69.35802469135803 + total_mass_density: + units: kg/m3 + value: 4.7264410267533474e-12 + schema: + properties: + Ar_density: + properties: + units: + type: string + value: + type: number + type: object + H_density: + properties: + units: + type: string + value: + type: number + type: object + He_density: + properties: + units: + type: string + value: + type: number + type: object + N2_density: + properties: + units: + type: string + value: + type: number + type: object + N_density: + properties: + units: + type: string + value: + type: number + type: object + O2_density: + properties: + units: + type: string + value: + type: number + type: object + O_density: + properties: + units: + type: string + value: + type: number + type: object + anomalous_O_density: + properties: + units: + type: string + value: + type: number + type: object + ap: + properties: + value: + type: number + type: object + at_alt_temp: + properties: + units: + type: string + value: + type: number + type: object + exospheric_temp: + properties: + units: + type: string + value: + type: number + type: object + f107: + properties: + units: + type: string + value: + type: number + type: object + f107a: + properties: + units: + type: string + value: + type: number + type: object + total_mass_density: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful atmospheric density calculation + summary: | + Compute atmospheric composition, density, and temperatures + tags: + - nrlmsise00 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://atmosphere.amentum.io/nrlmsise00?year=2020&month=5&day=21&altitude=300&geodetic_latitude=42&geodetic_longitude=42&utc=2" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import json + import requests + + url = "https://atmosphere.amentum.io/nrlmsise00" + + headers = {"API-Key" : "<add_your_key>"} + + params = { + 'year' : 2020, + 'month' : 5, + 'day' : 21, + 'geodetic_latitude' : 42, + 'geodetic_longitude' : 42, + 'altitude' : 300, # km + 'utc' : 2, # hours + } + # handle exceptions + response = requests.get(url, params=params, headers=headers) + json_payload = response.json() + + print(json.dumps(json_payload, indent=4, sort_keys=True)) +components: + parameters: + AP: + description: | + (Optional) The Ap-index provides a daily average level for geomagnetic activity F107, F107A, AP effects can be neglected below 80 km. If unspecified, the average of values in the 24 hours preceding the date-time are automatically calculated from data provided by GFZ German Research Centre for Geosciences. + in: query + name: ap + required: false + schema: + example: 30 + type: number + Altitude: + description: Altitude in (km) + in: query + name: altitude + required: true + schema: + example: 300 + type: number + Day: + description: Day in DD format + in: query + name: day + required: true + schema: + example: 21 + type: integer + F107: + description: | + (Optional) Daily F10.7 cm radio flux for previous day (SFU). F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and Atmospheric Administration are retrieved automatically. + in: query + name: f107 + required: false + schema: + example: 120 + type: number + F107A: + description: | + (Optional) 81 day average of F10.7 flux (SFU) centered on the specified day. F107 and F107A values correspond to the 10.7 cm radio flux at the actual distance of Earth from Sun rather than radio flux at 1 AU. F107, F107A, AP effects can be neglected below 80 km. If unspecified, values provided by the US National Oceanic and Atmospheric Administration are retrieved automatically. + in: query + name: f107a + required: false + schema: + example: 120 + type: number + GeodeticLatitude: + description: GeodeticLatitude (deg) -90 to 90 deg + in: query + name: geodetic_latitude + required: true + schema: + example: 42 + type: number + GeodeticLongitude: + description: GeodeticLongitude (deg) 0 to 360 deg + in: query + name: geodetic_longitude + required: true + schema: + example: 42 + type: number + Month: + description: Month in MM format + in: query + name: month + required: true + schema: + example: 5 + type: integer + UTC: + description: Coordinated Universal Time (hrs) + in: query + name: utc + required: true + schema: + example: 2 + type: number + Year: + description: Year in YYYY format + in: query + name: year + required: true + schema: + example: 2020 + type: integer +x-tagGroups: + - name: Density and composition + tags: + - nrlmsise00 + - jb2008 diff --git a/src/main/resources/amentum.space.aviation_radiation.1.5.0.yaml b/src/main/resources/amentum.space.aviation_radiation.1.5.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e7457c4d0b66762c0d24837b3b8e205d8a6952f4 --- /dev/null +++ b/src/main/resources/amentum.space.aviation_radiation.1.5.0.yaml @@ -0,0 +1,1183 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + Our atmosphere protects us from a hostile space radiation environment comprising high energy particles of solar and intergalactic origin. Solar radiation is significant during unpredictable and short lived solar flares and coronal mass ejections (CMEs); however, galactic cosmic radiation (GCR) is omnipresent. The GCR intensity varies with latitude, longitude, and time due to effects of solar activity on the interplanetary magnetic field, as well as the Earth's magnetic field. Space radiation collides with gases in the atmosphere, leading to a complex shower of high energy radiation, the intensity and composition of which varies spatially and temporally. Excessive exposure to radiation can damage DNA and lead to long-term health effects such as an increased risk of cancer. <br><br> Resulting radiation levels at commercial aircraft altitudes are greater than at sea level due. Aircrew are classified as radiation workers in some countries; however, planning to limit their exposure, and monitoring, is generally lacking. Both real-time measurements and predictive models of radiation in the atmosphere are important to mitigate the radiation risk crew. <br><br> + We host a RESTful API to models of cosmic ray induced ionising radiation in the atmosphere. The PARMA or CARI7 endpoints can be used to calculate Effective Dose or Ambient Dose Equivalent at a point. + The Route Dose API calculates the same quantities along a great circle route between two airports using CARI7. <br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Aviation Radiation API + version: 1.5.0 + x-apisguru-categories: + - location + - open_data + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://cosmicrays.amentum.space//openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: aviation_radiation +tags: + - description: | + Developed by the US Federal Aviation Administration's Civil Aerospace Medical Institute, CARI7 calculates cosmic ray doses in the atmosphere. See <a href="https://academic.oup.com/rpd/article/175/4/419/2884614">here</a> for a complete description of CARI-7. The original source code and Terms and Conditions can be found <a href="https://www.faa.gov/data_research/research/med_humanfacs/aeromedical/radiobiology/cari7/">here</a><br><br> <br><br> Note: The dose is considered a monthly average. It accounts for for heliocentric potential modulation only, minor geomagnetic storm and forbush decreases are ignored. + name: cari7 + x-displayName: CARI7 API + - description: | + The Route Dose API estimates radiation doses along a flight route between two airports with known ICAO or IATA codes or coordinates as latitude/longitude. Waypoints are calculated assuming a great circle route, a constant altitude (in kilometers) and a user-defined flight duration (in hours). Dose rates are calculated at each waypoint using CARI-7. The dose rate profile is integrated along the route to obtain the total dose for the flight. <br><br> Note: Dose is considered a monthly average accounting for heliocentric potential (HP) modulation only, minor geomagnetic storm and forbush decrease corrections are ignored. The calculation relies on HP data from the US Federal Aviation Administration that is released monthly. Doses can be calculated on the current date and short-range forecasting of several weeks is supported (the exact forecast horizon depends on the release date of the FAA data). + name: routedose + x-displayName: Route Dose API + - description: | + The PARMA model was developed by the Japan Atomic Energy Agency (JAEA) and estimates fluxes of neutrons, protons, ions, muons, electrons, positrons, and photons on a given date, latitude, longitude, and altitude. A comprehensive description of PARMA can be found in the publications <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0160390">here</a> and <a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144679">here</a>.<br><br> <br><br> Note: the PARMA API only accounts for heliocentric potential modulation, minor geomagnetic storm and forbush decreases are ignored. + name: parma + x-displayName: PARMA API +paths: + /cari7/ambient_dose: + get: + description: | + The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. + Use this endpoint if you are comparing model predictions to measurements. + operationId: app.api_cari7.endpoints.CARI7.ambient_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: true + schema: + example: 11 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: Hour in 24 hour time. + in: query + name: utc + required: true + schema: + example: 3 + type: integer + - description: | + The particle type as a string. Specifying 'total' returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - neutron + - photon + - e- + - e+ + - mu- + - mu+ + - proton + - pi- + - pi+ + - deuteron + - triton + - helion + - alpha + - Li + - Be + - B + - C + - N + - O + - F + - Ne + - Na + - Mg + - Al + - Si + - P + - S + - Cl + - Ar + - K + - Ca + - Sc + - Ti + - V + - Cr + - Mn + - Fe + example: total + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 2.322303291477743 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + The ambient dose equivalent rate calculated for a single particle type, or accumulated over all particle types. + tags: + - cari7 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/cari7/ambient_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&utc=3&particle=total" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "total", + "utc" : 3 + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/cari7/ambient_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /cari7/effective_dose: + get: + description: | + Effective Dose is a radiation protection quantity defined by the International Commission on + Radiological Protection (ICRP) and represents the stochastic health + risk to the human body at low levels of radiation. + It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. + Use this endpoint if you need to estimate radiation exposures of personnel. + operationId: app.api_cari7.endpoints.CARI7.effective_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: true + schema: + example: 11 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: Hour in 24 hour time. + in: query + name: utc + required: true + schema: + example: 3 + type: integer + - description: | + The particle type as a string. Specifying 'total' returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - neutron + - photon + - e- + - e+ + - mu- + - mu+ + - proton + - pi- + - pi+ + - deuteron + - triton + - helion + - alpha + - Li + - Be + - B + - C + - N + - O + - F + - Ne + - Na + - Mg + - Al + - Si + - P + - S + - Cl + - Ar + - K + - Ca + - Sc + - Ti + - V + - Cr + - Mn + - Fe + example: total + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 2.1532952875056712 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + The effective dose rate calculated for a single particle type, or accumulated over all particle types. + tags: + - cari7 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/cari7/effective_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&utc=3&particle=total" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "total", + "utc" : 3 + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/cari7/effective_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /parma/ambient_dose: + get: + description: | + The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. + Use this endpoint if you are comparing model predictions to measurements. + operationId: app.api_parma.endpoints.PARMA.ambient_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: false + schema: + example: 11 + type: number + - description: | + Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both. + in: query + name: atmospheric_depth + required: false + schema: + example: 0.92 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: | + The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - e- + - e+ + - mu+ + - mu- + - gamma + - neutron + - proton + - alpha + example: proton + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 0.26835067168474125 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose read operation + summary: | + The ambient dose equivalent rate calculated for a single particle type, or accumulated over all particle types. + tags: + - parma + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/parma/ambient_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=proton" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "proton" + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/parma/ambient_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /parma/differential_intensity: + get: + description: | + The differential intensity of a particle is a directional quantity that describes the number of particles per unit area, per unit solid angle, per unit energy, and per unit time. The API leverages the functionality of PARMA to calculate differential intensity distributions with energies in units of MeV and Intensity in units of /cm2/sr/MeV/s. + operationId: app.api_parma.endpoints.PARMA.differential_intensity + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: false + schema: + example: 11 + type: number + - description: | + Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both. + in: query + name: atmospheric_depth + required: false + schema: + example: 0.92 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: | + The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - e- + - e+ + - mu+ + - mu- + - gamma + - neutron + - proton + - alpha + example: proton + type: string + - description: Direction cosine. 1.0 is in the downward direction. + in: query + name: angle + required: true + schema: + example: 1 + type: number + responses: + "200": + content: + application/json: + schema: + example: + energies: + data: + - 10.592537251772889 + - 11.885022274370186 + - 13.335214321633243 + - 14.96235656094434 + - 16.78804018122561 + - 18.836490894898017 + - 21.134890398366483 + - 23.71373705661657 + - 26.60725059798812 + - 29.853826189179625 + - 33.4965439157828 + - 37.583740428844465 + - 42.16965034285828 + - 47.31512589614811 + - 53.08844442309891 + - 59.56621435290114 + - 66.83439175686158 + - 74.98942093324571 + - 84.13951416451967 + - 94.40608762859253 + - 105.92537251772909 + - 118.85022274370202 + - 133.35214321633254 + - 149.62356560944343 + - 167.88040181225605 + - 188.36490894898 + - 211.34890398366454 + - 237.1373705661653 + - 266.0725059798806 + - 298.5382618917954 + - 334.9654391578269 + - 375.83740428844317 + - 421.69650342858097 + - 473.1512589614788 + - 530.8844442309862 + - 595.662143529008 + - 668.3439175686115 + - 749.894209332452 + - 841.3951416451905 + - 944.0608762859177 + - 1059.2537251772821 + - 1188.5022274370106 + - 1333.5214321633146 + - 1496.2356560944222 + - 1678.804018122547 + - 1883.6490894897847 + - 2113.4890398366283 + - 2371.3737056616337 + - 2660.725059798784 + - 2985.38261891793 + - 3349.6543915782418 + - 3758.374042884401 + - 4216.965034285775 + - 4731.512589614749 + - 5308.84444230982 + - 5956.621435290031 + - 6683.4391756860605 + - 7498.942093324459 + - 8413.951416451835 + - 9440.6087628591 + - 10592.537251772736 + - 11885.022274370007 + - 13335.214321633035 + - 14962.356560944098 + - 16788.04018122533 + - 18836.49089489769 + - 21134.890398366108 + - 23713.737056616137 + - 26607.250597987622 + - 29853.82618917905 + - 33496.543915782146 + - 37583.74042884371 + - 42169.65034285741 + - 47315.12589614711 + - 53088.44442309776 + - 59566.21435289981 + - 66834.39175686006 + - 74989.42093324398 + - 84139.51416451768 + - 94406.08762859023 + units: MeV + intensities: + data: + - 0.000015126557258481497 + - 0.00001599438328728434 + - 0.00001689468409778281 + - 0.00001782700110028125 + - 0.000018789989894315395 + - 0.000019781312921179226 + - 0.00002079773698769471 + - 0.000021835319990199245 + - 0.00002288931588809045 + - 0.000023953698331015904 + - 0.000025020740419725837 + - 0.00002608079723261754 + - 0.00002712202346190026 + - 0.000028129941429425255 + - 0.000029086999403906575 + - 0.000029972245159538348 + - 0.00003076112412042979 + - 0.00003142535794905927 + - 0.000031932955656189876 + - 0.000032248618858073125 + - 0.000032334985958519275 + - 0.000032155208240777106 + - 0.000031677197295996437 + - 0.000030879552903400744 + - 0.000029726220825502388 + - 0.000028234425803141926 + - 0.00002650516406182499 + - 0.000024602269634120444 + - 0.000022594819983033717 + - 0.000020552475431477016 + - 0.00001853662594721251 + - 0.000016596094572091987 + - 0.00001476576885147725 + - 0.000013067285256001253 + - 0.000011511187862538484 + - 0.000010100122716208363 + - 0.00000883240101591408 + - 0.000007703733932387032 + - 0.00000670576631351448 + - 0.000005822881145729626 + - 0.000005046340372076868 + - 0.000004369966582442526 + - 0.000003781202020752834 + - 0.0000032689518931964352 + - 0.0000028234311080639376 + - 0.000002436034648930342 + - 0.0000020992258398508115 + - 0.0000018064235849092022 + - 0.0000015518898432506667 + - 0.000001331051662285105 + - 0.0000011394488995132188 + - 9.726057340258263e-7 + - 8.265824310558272e-7 + - 6.998212586927555e-7 + - 5.894224376580005e-7 + - 4.93568138996158e-7 + - 4.116922090268701e-7 + - 3.460236317178158e-7 + - 3.037548828699797e-7 + - 2.9135185653116735e-7 + - 2.82520391784604e-7 + - 2.3785220594554244e-7 + - 1.7791153699257012e-7 + - 1.2924247345559558e-7 + - 9.48243126183575e-8 + - 7.043455232978242e-8 + - 5.2623996885656347e-8 + - 3.935459373084662e-8 + - 2.939334162588793e-8 + - 2.1909771678801793e-8 + - 1.6297871509147514e-8 + - 1.2099955678192665e-8 + - 8.967477745797399e-9 + - 6.635335072413951e-9 + - 4.902621621420823e-9 + - 3.6176621571186638e-9 + - 2.6663515657204105e-9 + - 1.963121398302903e-9 + - 1.4439864047128638e-9 + - 1.0612233263106733e-9 + units: /cm2/s/sr/MeV + properties: + energies: + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + intensities: + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + type: object + description: Successful read of intensity operation + summary: The energy differential intensity of a particle at a given zenith angle. + tags: + - parma + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/parma/differential_intensity?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=proton&angle=1.0" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "altitude" : 11, # km + "latitude" : 30, # degrees (N) + "longitude" : 30, # degrees (E) + "year" : 2019, # + "month" : 12, + "day" : 1, + "particle" : "proton", + "angle" : 1.0 + } + headers = {"API-Key" : "<add_your_key>"} + + url = "https://avrad.amentum.io/parma/differential_intensity" + + # make the call and handle errors + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the flux + json_payload = response.json() + + kes = json_payload["energies"]["data"] # MeV + flux = json_payload["intensities"]["data"] # /cm2/s/sr/MeV + + print(f"Kinetic energies: {kes} MeV") + print(f"Intensities: {flux} /cm2/s/sr/MeV") + /parma/effective_dose: + get: + description: | + Effective dose is a radiation protection quantity defined by the International Commission on Radiological Protection (ICRP) and represents the stochastic health risk to the human body at low levels of radiation. It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. + Use this endpoint if you need to estimate radiation exposures of personnel. + operationId: app.api_parma.endpoints.PARMA.effective_dose + parameters: + - description: Altitude (in km). The minimum is 0 m, the maximum is 47 km (the upper limit of the stratosphere). + in: query + name: altitude + required: false + schema: + example: 11 + type: number + - description: | + Atmospheric depth from the top of the atmosphere (in units of g/cm2). The minimum is 0.913 g/cm2, the maximum is 1032.66 g/cm2. WARNING: you can specify either altitude OR atmospheric depth, not both. + in: query + name: atmospheric_depth + required: false + schema: + example: 0.92 + type: number + - description: Latitude. -90 (S) to 90 (N). + in: query + name: latitude + required: true + schema: + example: 30 + type: number + - description: Longitude. -180 (W) to 180 (E). + in: query + name: longitude + required: true + schema: + example: 30 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 12 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 1 + type: integer + - description: | + The particle type as a string. Specifying 'total', only used for the dose calculation, returns the dose for all particle types. + in: query + name: particle + required: true + schema: + enum: + - total + - e- + - e+ + - mu+ + - mu- + - gamma + - neutron + - proton + - alpha + example: proton + type: string + responses: + "200": + content: + application/json: + schema: + example: + dose rate: + units: uSv/hr + value: 1.9456004308224644 + properties: + dose rate: + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose read operation + summary: | + The effective dose rate calculated for a single particle type, or accumulated over all particle types. + tags: + - parma + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/parma/effective_dose?altitude=11&latitude=30&longitude=30&year=2019&month=12&day=1&particle=total" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + params = { + "altitude" : 11, #km + "latitude" : 30, #degrees (N) + "longitude" : 30, #degrees (E) + "year" : 2019, + "month" : 12, + "day" : 1, + "particle" : "total" + } + headers = {"API-Key" : "<add_your_key>"} + url = "https://avrad.amentum.io/parma/effective_dose" + try: + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print("HTTP error", e) + except requests.exceptions.RequestException as e: + print("Request error", e) + else: + # retrieve and return the dose rate + dose_rate = response.json() + dose_rate_val = dose_rate['dose rate']['value'] + units = dose_rate['dose rate']['units'] + + print(f"Dose rate is {dose_rate_val} {units}") + /route/ambient_dose: + get: + description: | + The ambient dose equivalent, H*(10), is an operational quantity that simulates the human body by measuring the dose equivalent at a depth of 10 mm within a tissue equivalent sphere of 300 mm diameter. It is a measurable quantity that is used to calibrate area monitors (radiation detectors) for mixed radiation fields. <br> <br> Use this endpoint if you are comparing model predictions to measurements. <br> <br> Note: the airport codes or coordinates (depending on which was specified), and the date in DD/MM/YYYY format, are echoed in the json response as strings. + operationId: app.api_icaro.endpoints.ICARO.ambient_dose + parameters: + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the origin airport. + in: query + name: origin + required: true + schema: + example: YSSY + type: string + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the destination airport. + in: query + name: destination + required: true + schema: + example: 33.94250107,-118.4079971 + type: string + - description: Altitude (in km). The minimum is 0 m, the maximum is 20 km. + in: query + name: altitude + required: true + schema: + example: 10.1 + type: number + - description: The flight duration in hours. The minimum is 0, the maximum is 20 hrs. + in: query + name: duration + required: true + schema: + example: 5 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 5 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 21 + type: integer + responses: + "200": + content: + application/json: + schema: + example: + dose: + date: 21/05/2019 + destination: 33.94250107,-118.4079971 + origin: YSSY + units: uSv + value: 10.911498908287665 + properties: + dose: + properties: + date: + type: string + destination: + type: string + origin: + type: string + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + Calculate the ambient equivalent dose along a great circle flight route. + tags: + - routedose + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/route/ambient_dose?origin=YSSY&destination=33.94250107,-118.4079971&altitude=10.1&duration=5&year=2019&month=5&day=21" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "origin" : "YSSY", # can be ICAO or iATA codes + "destination" : "33.94250107,-118.4079971", + "altitude" : 10.1, # km, + "duration" : 5, # hours + "year" : 2019, + "month" : 5, + "day" : 21 + } + headers = {"API-Key" : "<add_your_key>"} + try: + response = requests.get("https://avrad.amentum.io/route/ambient_dose", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + dose = response_json['dose']['value'] + print(f"Total Ambient Dose was {dose:.2f} uSv") + /route/effective_dose: + get: + description: | + Effective Dose is a radiation protection quantity defined by the International Commission on + Radiological Protection (ICRP) and represents the stochastic health + risk to the human body at low levels of radiation. + It accounts for the different sensitivities of organs to ionising radiation, as well as the different effectiveness of various types of radiation. <br> <br> Use this endpoint if you need to estimate radiation exposures of personnel. <br> <br> Note: the airport codes or coordinates (depending on which was specified), and the date in DD/MM/YYYY format, are echoed in the json response as strings. + operationId: app.api_icaro.endpoints.ICARO.effective_dose + parameters: + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the origin airport. + in: query + name: origin + required: true + schema: + example: YSSY + type: string + - description: The ICAO code or IATA code or latitude,longitude pair (in decimal degrees) of the destination airport. + in: query + name: destination + required: true + schema: + example: 33.94250107,-118.4079971 + type: string + - description: Altitude (in km). The minimum is 0 m, the maximum is 20 km. + in: query + name: altitude + required: true + schema: + example: 10.1 + type: number + - description: The flight duration in hours. The minimum is 0, the maximum is 20 hrs. + in: query + name: duration + required: true + schema: + example: 5 + type: number + - description: Year in YYYY. + in: query + name: year + required: true + schema: + example: 2019 + type: integer + - description: Month in MM. + in: query + name: month + required: true + schema: + example: 5 + type: integer + - description: Day in DD. + in: query + name: day + required: true + schema: + example: 21 + type: integer + responses: + "200": + content: + application/json: + schema: + example: + dose: + date: 21/05/2019 + destination: 33.94250107,-118.4079971 + origin: YSSY + units: uSv + value: 9.90406659800017 + properties: + dose: + properties: + date: + type: string + destination: + type: string + origin: + type: string + units: + type: string + value: + type: number + type: object + type: object + description: Successful dose calculation + summary: | + Calculate the total effective dose along a great circle flight route. + tags: + - routedose + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://avrad.amentum.io/route/effective_dose?origin=YSSY&destination=33.94250107,-118.4079971&altitude=10.1&duration=5&year=2019&month=5&day=21" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = { + "origin" : "YSSY", # can be ICAO or iATA codes + "destination" : "33.94250107,-118.4079971", + "altitude" : 10.1, # km, + "duration" : 5, # hours + "year" : 2019, + "month" : 5, + "day" : 21 + } + headers = {"API-Key" : "<add_your_key>"} + try: + response = requests.get("https://avrad.amentum.io/route/effective_dose", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the dose + dose = response_json['dose']['value'] + print(f"Total Effective Dose was {dose:.2f} uSv") +x-tagGroups: + - name: Calculate radiation dose along a great circle flight route + tags: + - routedose + - name: Calculate radiation intensity or dose at a point + tags: + - cari7 + - parma diff --git a/src/main/resources/amentum.space.global-magnet.1.3.0.yaml b/src/main/resources/amentum.space.global-magnet.1.3.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..824484b4fa0c16b7b16e9987075d9cd5a65cea24 --- /dev/null +++ b/src/main/resources/amentum.space.global-magnet.1.3.0.yaml @@ -0,0 +1,171 @@ +openapi: 3.0.0 +servers: + - url: /wmm +info: + contact: + x-twitter: amentumspace + description: | + + The World Magnetic Model calculates the intensity and direction of the Earth's magnetic field on a specific date-time, geodetic altitude, latitude, and longitude. It is relied upon throughout the world for navigation, mineral exploration, atmospheric and space science, and is installed on billions of devices. <br><br> + A comprehensive description of the World Magnetic Model, including its limitations, can be found <a href='https://www.ngdc.noaa.gov/geomag/WMM/'>here</a>. <br><br> + We provide a RESTful API to access the out-of-cycle World Magnetic Model (WMM2015v2) valid for years 2015.0 - 2020.0 and WMM2020 valid for years 2020.0 - 2025.0<br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Geomag API + version: 1.3.0 + x-apisguru-categories: + - location + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://globalmagnet.amentum.space/wmm/openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: global-magnet +paths: + /magnetic_field: + get: + description: | + at specified conditions. + operationId: app.api_wmm.endpoints.WMM.magnetic_field + parameters: + - $ref: "#/components/parameters/Altitude" + - $ref: "#/components/parameters/Latitude" + - $ref: "#/components/parameters/Longitude" + - $ref: "#/components/parameters/Year" + responses: + "200": + content: + application/json: + schema: + example: + declination: + units: Deg + value: 34.144142150878906 + grid_variation: + units: -65.8558578491211 + value: Deg + inclination: + units: Deg + value: 87.98262786865234 + total_intensity: + units: nT + value: 58421.87109375 + properties: + declination: + description: | + The angle in the horizontal plane between magnetic north and true north. Declination is positive when magnetic north is east of true north. + properties: + units: + type: string + value: + type: number + type: object + grid_variation: + description: | + Referenced to grid north, referenced to 0 deg meridian of a polar stereographic projection. Only defined for latitudes greater than 55 degrees and less than -55 degrees (arctic and antarctic). + properties: + units: + type: string + value: + type: number + type: object + inclination: + description: | + Also known as 'dip', is the angle made between the horizontal plane and the magnetic field vector at some position. Positive inclination corresponds to a downward pointing. + properties: + units: + type: string + value: + type: number + type: object + total_intensity: + description: | + Total magnetic field intensity in nano Teslas. + properties: + units: + type: string + value: + type: number + type: object + type: object + description: Successful magnetic field intensity calculation + summary: | + Calculate magnetic declination, inclination, total field intensity, and grid variation + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://geomag.amentum.io/wmm/magnetic_field?altitude=10&latitude=80&longitude=100&year=2020.5" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import json + import requests + + headers = {"API-Key" : "<add_your_key>"} + + hostname = "https://geomag.amentum.io/wmm/magnetic_field" + + params = dict( + altitude = 10, # [km] + longitude = 100, # [deg] + latitude = 80, + year = 2020.5 # decimal year, half-way through 2020 + ) + + try: + response = requests.get(hostname, params=params, headers=headers) + # extract JSON payload of response as Python dictionary + json_payload = response.json() + # raise an Exception if we encoutnered any HTTP error codes like 404 + response.raise_for_status() + except requests.exceptions.ConnectionError as e: + # handle any typo errors in url or endpoint, or just patchy internet connection + print(e) + except requests.exceptions.HTTPError as e: + # handle HTTP error codes in the response + print(e, json_payload['error']) + except requests.exceptions.RequestException as e: + # general error handling + print(e, json_payload['error']) + else: + json_payload = response.json() + print(json.dumps(json_payload, indent=4, sort_keys=True)) +components: + parameters: + Altitude: + description: Geodetic Altitude 0 km to 600 km. + in: query + name: altitude + required: true + schema: + example: 10 + type: number + Latitude: + description: Geodetic Latitude. -90 deg (S) to 90 deg (N). + in: query + name: latitude + required: true + schema: + example: 80 + type: number + Longitude: + description: Geodetic Longitude. -180 deg (W) to 180 deg (E). + in: query + name: longitude + required: true + schema: + example: 100 + type: number + Year: + description: Year as a decimal in the range 2015-2025 (2017.5 would be half way through 2017). + in: query + name: year + required: true + schema: + example: 2020.5 + type: number diff --git a/src/main/resources/amentum.space.gravity.1.1.1.yaml b/src/main/resources/amentum.space.gravity.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ce3d4898d022e0fb04fef38d5f0960e35a2b090d --- /dev/null +++ b/src/main/resources/amentum.space.gravity.1.1.1.yaml @@ -0,0 +1,217 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + The gravitational field of the earth is non-uniform. The <a href='https://en.wikipedia.org/wiki/Geoid'>geoid</a> is the shape the + ocean surface would take if only gravity and the rotation of the Earth + were considered. The geoid is the surface that defines zero elevation.<br><br> + + The geoid height is the difference between an ideal reference ellipsoid and the geoid.<br><br> + The gravity anomaly is the difference between the acceleration due to gravity on the Earth's surface and the value calculated assuming the reference ellipsoid.<br><br> + The official Earth Gravitational Model <a href=https://en.wikipedia.org/wiki/Earth_Gravitational_Model#EGM2008/>EGM2008</a> was developed and released to the public by the National Geospatial-Intelligence Agency (NGA).<br><br> + Our EGM2008 API provides on-demand access to the EGM2008 model, as implemented by the open-source GeographicLib <a href=https://geographiclib.sourceforge.io/html/gravity.html>Gravity</a> library.<br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Gravity API + version: 1.1.1 + x-apisguru-categories: + - location + - open_data + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://gravity.amentum.space//openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: gravity +tags: + - description: | + Calculate geoid height and gravity anomaly values using the EGM2008 model + name: egm2008 + x-displayName: EGM2008 API +paths: + /egm2008/geoid_height: + get: + description: | + for a given latitude / longitude. + operationId: app.api_egm2008.endpoints.EGM2008.calculate_height + parameters: + - $ref: "#/components/parameters/Latitude" + - $ref: "#/components/parameters/Longitude" + responses: + "200": + content: + application/json: + example: + height: + units: m + value: 45.88107058892659 + schema: + $ref: "#/components/schemas/Height" + description: Successful geoid height calculation + summary: | + Calculate the geoid height + tags: + - egm2008 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://gravity.amentum.io/egm2008/geoid_height?latitude=-45&longitude=45" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + headers = {"API-Key" : "<add_your_key>"} + + params = { + "latitude" : "-45", + "longitude" : "45" + } + + # Make the API call + try: + response = requests.get( + "https://gravity.amentum.io/egm2008/geoid_height", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the height + height = response_json['height']['value'] + h_unit = response_json['height']['units'] + print("Height: ", height, h_unit) + /egm2008/gravity_anomaly: + get: + description: | + for a given latitude / longitude. + operationId: app.api_egm2008.endpoints.EGM2008.calculate_anomaly + parameters: + - $ref: "#/components/parameters/Latitude" + - $ref: "#/components/parameters/Longitude" + responses: + "200": + content: + application/json: + example: + eta: + units: arcsec + value: -0.9413662219916251 + gravity_anomaly: + units: mGal + value: 27.954737031742376 + xi: + units: arcsec + value: 1.371151956763653 + schema: + $ref: "#/components/schemas/Anomaly" + description: Successful anomaly calculation + summary: | + Calculate gravity anomaly values + tags: + - egm2008 + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://gravity.amentum.io/egm2008/gravity_anomaly?latitude=-45&longitude=45" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + headers = {"API-Key" : "<add_your_key>"} + + params = { + "latitude" : "-45", + "longitude" : "45" + } + + # Make the API call + try: + response = requests.get( + "https://gravity.amentum.io/egm2008/gravity_anomaly", + params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract eta + eta = response_json['eta']['value'] + e_unit = response_json['eta']['units'] + print("Eta: ", eta, e_unit) + + # Extract gravity anomaly + ga = response_json['gravity_anomaly']['value'] + ga_unit = response_json['gravity_anomaly']['units'] + print("Gravity Anomaly: ", ga, ga_unit) + + # Extract xi + xi = response_json['xi']['value'] + xi_unit = response_json['xi']['units'] + print("Xi: ", xi, xi_unit) +components: + parameters: + Latitude: + description: Geographic latitude (-90 to 90 deg). + in: query + name: latitude + required: true + schema: + example: -45 + type: number + Longitude: + description: Geographic longitude (-180 to 180 deg). + in: query + name: longitude + required: true + schema: + example: 45 + type: number + schemas: + Anomaly: + properties: + eta: + description: Eta (arcsec) - easterly component of deflection of vertical. + properties: + units: + type: string + value: + type: number + type: object + gravity_anomaly: + description: | + Gravity anomaly (mGal) + properties: + units: + type: string + value: + type: number + type: object + xi: + description: | + Xi (arcsec) - northerly component of deflection of vertical. + properties: + units: + type: string + value: + type: number + type: object + type: object + Height: + properties: + height: + description: | + Geoid height (m) + properties: + units: + type: string + value: + type: number + type: object + type: object diff --git a/src/main/resources/amentum.space.space_radiation.1.1.1.yaml b/src/main/resources/amentum.space.space_radiation.1.1.1.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d2b45f3cf0c8aa76f95265442d3e103851eaaea8 --- /dev/null +++ b/src/main/resources/amentum.space.space_radiation.1.1.1.yaml @@ -0,0 +1,539 @@ +openapi: 3.0.0 +info: + contact: + x-twitter: amentumspace + description: | + Space has a hostile radiation environment that increases the risk of cancers in humans and malfunctions in spacecraft electronics. The types of space radiation of primary concern are: + <ul> + <li> + Galactic Cosmic Rays from outside our solar system generated by + supernovae and other phenomena; + </li> + <li> + Solar Energetic Particles produced by the Sun during intense and + sporadic bursts of activity; and + </li> + <li> + Trapped Radiation: energetic particles confined by Earth's magnetic + field, usually comprising an inner belt of mostly high energy protons + and an outer belt dominated by lower energy electrons and plasma. + </li> + </ul> + + Understanding the space radiation environment for a particular mission profile is becoming increasingly important. Commercial off-the-shelf electronic components that aren't resilient to space radiation are now prevalent. Longer duration missions to cislunar space, Mars, and beyond are placing astronauts at greater risk of radiation exposure. <br><br> + API requests must contain a key "API-Key" in the header (see code samples). Obtain a key from <a href='https://developer.amentum.io'>here</a>. <br><br> + Help us improve the quality of our web APIs by completing our 2 minute survey <a href="https://www.surveymonkey.com/r/CTDTRBN">here</a>.<br><br> + Amentum Pty Ltd is not responsible nor liable for any loss or damage of any sort incurred as a result of using the API. <br><br> + Copyright <a href='https://amentum.space'>Amentum Pty Ltd</a> 2021. + title: Space Radiation API + version: 1.1.1 + x-apisguru-categories: + - location + - open_data + x-logo: + altText: Amentum Aerospace + backgroundColor: "#FFFFFF" + url: https://twitter.com/amentumspace/profile_image?size=original + x-origin: + - format: openapi + url: https://spaceradiation.amentum.space/openapi.json + version: "3.0" + x-providerName: amentum.space + x-serviceName: space_radiation +tags: + - description: | + AE9/AP9/SPM is a set of models developed by the US Air Force Research Laboratory that calculates the fluxes of trapped radiation (radiation belt and plasma particles in near-Earth space) for use in space system design, mission planning, and other climatological applications. <br><br> + A description of the AE9/AP9/SPM models, including energy ranges for which the respective models are valid, can be found <a href='https://www.vdl.afrl.af.mil/programs/ae9ap9/'>here</a>. The model is valid for dates between decimal years 2015.0 and 2020.0<br><br> + The following endpoints wrap the original Ae9Ap9 code (version 1.50.001) which is available <a href='https://www.vdl.afrl.af.mil/programs/ae9ap9/downloads.php'>here</a>. <br><br> + name: trapped + x-displayName: AE9/AP9/SPM trapped radiation models + - description: | + This endpoint provides access to Amentum's implementation of the DLR Galactic Cosmic Radiation model. <br><br> A description of the model can be found in the scientific article <a href="https://www.sciencedirect.com/science/article/abs/pii/S0273117712005947">"A ready-to-use galactic cosmic ray model"</a>, Matthiä, Daniel, et al., Advances in Space Research 51.3 (2013): 329-338. <br><br> It accounts for solar modulation using a single parameter, <i>W</i>, derived from measurements of carbon flux by the Cosmic Ray Isotope Spectrometer aboard the Advanced Composition Explorer spacecraft.<br><br> A linear relationship between <i>W</i> and terrestrial based neutron monitor count rates (measured at the Oulu station in Finland) has been established:<br> W = -0.093 cr + 638.7 <br> Our implementation uses Oulu station count rates as input, calculating galactic cosmic ray flux on a particular date. + name: gcr + x-displayName: DLR galactic cosmic radiation model +paths: + /gcr/flux_dlr: + get: + description: | + for the given energy, atomic number, and date. + operationId: app.api.endpoints.GCR.calculate_dlr_flux + parameters: + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Z" + - $ref: "#/components/parameters/Energy" + responses: + "200": + content: + application/json: + example: + flux: + units: /m^2/s/sr/(MeV/n) + value: 0.006709578488527858 + schema: + $ref: "#/components/schemas/FluxAtEnergy" + description: Successful flux calculation + summary: | + Calculate particle flux + tags: + - gcr + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://spacerad.amentum.io/gcr/flux_dlr?year=2017&month=1&day=1&z=6&energy=100" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = dict( + year=2017, + month=1, + day=1, + z=6, + energy=100 + ) + headers = {"API-Key" : "<add_your_key>"} + # Make the API call + try: + response = requests.get("https://spacerad.amentum.io/gcr/flux_dlr", params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the flux + flux = response_json['flux']['value'] + f_unit = response_json['flux']['units'] + print("Flux: ", flux, f_unit) + /trapped/flux_mean: + get: + description: | + at given coordinates and date-time. + operationId: app.api.endpoints.TrappedRadiation.calculate_flux_mean + parameters: + - $ref: "#/components/parameters/Model" + - $ref: "#/components/parameters/CoordSystem" + - $ref: "#/components/parameters/CoordUnits" + - $ref: "#/components/parameters/Coord1" + - $ref: "#/components/parameters/Coord2" + - $ref: "#/components/parameters/Coord3" + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Hour" + - $ref: "#/components/parameters/Minute" + - $ref: "#/components/parameters/Second" + responses: + "200": + content: + application/json: + example: + energies: + data: + - 0.04 + - 0.07 + - 0.1 + - 0.25 + - 0.5 + - 0.75 + - 1 + - 1.5 + - 2 + - 2.5 + - 3 + - 3.5 + - 4 + - 4.5 + - 5 + - 5.5 + - 6 + - 6.5 + - 7 + - 8.5 + - 10 + units: MeV + flux: + data: + - 854635898.3161561 + - 564685905.5669771 + - 178490117.91626602 + - 47643571.94054352 + - 12254101.813260391 + - 4549350.837767644 + - 1803653.1511005901 + - 654692.4848865604 + - 207898.83220077943 + - 64091.642036893325 + - 21119.72803543081 + - 7526.08326415376 + - 2847.94993909225 + - 1117.8011168229402 + - 490.68560475708034 + - 269.114292404757 + - 177.84563745629936 + - 128.22793816827138 + - 78.49896611035479 + - 43.74101815451732 + - 30.335272788461896 + units: /cm^2/s/MeV + schema: + $ref: "#/components/schemas/Flux" + description: Successful flux calculation + summary: | + Calculate mean particle flux + tags: + - trapped + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://spacerad.amentum.io/trapped/flux_mean?model=AE9&coord_sys=GEI&coord_units=KM&coord1=3216.6&coord2=35426&coord3=603.4&year=2017&month=1&day=1&hour=0&minute=0&second=0" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: | + import requests + + params = dict( + model="AE9", # proton flux + coord_sys="GEI", # Geocentric equatorial inertial + coord_units="KM", # kilometers + coord1=3216.6, # in KM + coord2=35426, + coord3=603.4, + year=2017, + month=1, + day=1, + hour=0, + minute=0, + second=0, + ) + headers = {"API-Key" : "<add_your_key>"} + # Make the API call + try: + response = requests.get("https://spacerad.amentum.io/trapped/flux_mean", params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the flux + energies = response_json['energies']['data'] + e_unit = response_json['energies']['units'] + flux = response_json['flux']['data'] + f_unit = response_json['flux']['units'] + print("Energies: ", energies, e_unit) + print("Mean Fluxes: ", flux, f_unit) + /trapped/flux_percentile: + get: + description: | + at given coordinates and date-time. + operationId: app.api.endpoints.TrappedRadiation.calculate_flux_percentile + parameters: + - $ref: "#/components/parameters/Model" + - $ref: "#/components/parameters/CoordSystem" + - $ref: "#/components/parameters/CoordUnits" + - $ref: "#/components/parameters/Coord1" + - $ref: "#/components/parameters/Coord2" + - $ref: "#/components/parameters/Coord3" + - $ref: "#/components/parameters/Year" + - $ref: "#/components/parameters/Month" + - $ref: "#/components/parameters/Day" + - $ref: "#/components/parameters/Hour" + - $ref: "#/components/parameters/Minute" + - $ref: "#/components/parameters/Second" + - $ref: "#/components/parameters/Percentile" + responses: + "200": + content: + application/json: + example: + energies: + data: + - 0.04 + - 0.07 + - 0.1 + - 0.25 + - 0.5 + - 0.75 + - 1 + - 1.5 + - 2 + - 2.5 + - 3 + - 3.5 + - 4 + - 4.5 + - 5 + - 5.5 + - 6 + - 6.5 + - 7 + - 8.5 + - 10 + units: MeV + flux: + data: + - 448667784.4812672 + - 322139086.68134594 + - 116785893.33177781 + - 32665389.706181422 + - 7991547.299112285 + - 2586068.6893010717 + - 839339.9184292991 + - 251004.07802610364 + - 69547.20063526293 + - 19974.510921688125 + - 6379.793949894077 + - 2089.794228005704 + - 779.5936616445822 + - 313.1551441702104 + - 141.5097428322324 + - 71.78622535090953 + - 40.65088904584258 + - 25.06786549513947 + - 12.794710202598523 + - 5.620209093649994 + - 3.319852121012902 + units: /cm^2/s/MeV + schema: + $ref: "#/components/schemas/Flux" + description: Successful flux calculation + summary: | + Calculate percentile particle flux + tags: + - trapped + x-codeSamples: + - lang: Shell + source: | + curl -X GET "https://spacerad.amentum.io/trapped/flux_percentile?model=AE9&coord_sys=GEI&coord_units=KM&coord1=3216.6&coord2=35426&coord3=603.4&year=2017&month=1&day=1&hour=0&minute=0&second=0&percentile=50" -H "API-Key: <your_key>" -H "accept: application/json" + - lang: Python + source: |+ + import requests + + params = dict( + model="AE9", # proton flux + coord_sys="GEI", # Geocentric equatorial inertial + coord_units="KM", # kilometers + coord1=3216.6, # in KM + coord2=35426, + coord3=603.4, + year=2017, + month=1, + day=1, + hour=0, + minute=0, + second=0, + percentile=50 # median flux + ) + + headers = {"API-Key" : "<add_your_key>"} + + # Make the API call + try: + response = requests.get("https://spacerad.amentum.io/trapped/flux_percentile", params=params, headers=headers) + response_json = response.json() + response.raise_for_status() + except requests.exceptions.HTTPError as e: + print(response_json['error']) + else: + # Extract the flux + energies = response_json['energies']['data'] + e_unit = response_json['energies']['units'] + flux = response_json['flux']['data'] + f_unit = response_json['flux']['units'] + print("Energies: ", energies, e_unit) + print("Median Fluxes: ", flux, f_unit) + +components: + parameters: + Coord1: + description: | + <br>First coordinate value to specify position. <br><br> Ordering for GEI, GEO coords:X, Y, Z<br> Ordering for GDZ coords: Alt, Lat, Long<br> Valid ranges for latitude: -90, 90<br> Valid ranges for longitude: 0, 360<br> + in: query + name: coord1 + required: true + schema: + example: 3216.6 + type: number + Coord2: + description: <br>Second coordinate value. + in: query + name: coord2 + required: true + schema: + example: 35426 + type: number + Coord3: + description: <br>Third coordinate value. + in: query + name: coord3 + required: true + schema: + example: 603.4 + type: number + CoordSystem: + description: | + <br>Coordinate system to use: <br><br> - Geodetic/WGS84 (GDZ) <br> - Geocentric Cartesian (GEO) <br> - Geocentric Earth Inertial (GEI) <br> See "Bhavnani, K. H., & Vancour, R. P. (1991). Coordinate systems for space and geophysical applications" for coord system definitions. + in: query + name: coord_sys + required: true + schema: + enum: + - GDZ + - GEO + - GEI + example: GEI + type: string + CoordUnits: + description: | + <br>Coordinate units to use: km (KM) or Earth Radii (RE) + in: query + name: coord_units + required: true + schema: + enum: + - KM + - RE + example: KM + type: string + Date: + description: <br>Decimal year (eg 1997.65) + in: query + name: date + required: true + schema: + type: number + Day: + description: <br> + in: query + name: day + required: true + schema: + example: 1 + type: integer + Energy: + description: | + <br>Particle energy in MeV/n<br> Valid range: [0, 10<sup>6</sup>] MeV/n<br> + in: query + name: energy + required: true + schema: + example: 100 + type: number + Hour: + description: <br> + in: query + name: hour + required: true + schema: + example: "0" + type: integer + Minute: + description: <br> + in: query + name: minute + required: true + schema: + example: "0" + type: integer + Model: + description: | + <br>Which model to use: <br><br> - Energetic electrons (AE9) <br> - Energetic protons (AP9) <br> - Space plasma model for electrons (SPME) <br> - for hydrogen (SPMH) <br> - for helium (SPMHE) <br> - for oxygen (SPMO) + in: query + name: model + required: true + schema: + enum: + - AE9 + - AP9 + - SPME + - SPMH + - SPMHE + - SPMO + example: AE9 + type: string + Month: + description: <br> + in: query + name: month + required: true + schema: + example: 1 + type: integer + Percentile: + description: | + <br>Integer percentile at which to calc flux (50 is the median value). + in: query + name: percentile + required: true + schema: + example: 50 + type: integer + Second: + description: <br> + in: query + name: second + required: true + schema: + example: "0" + type: integer + Year: + description: <br> + in: query + name: year + required: true + schema: + example: 2017 + type: integer + Z: + description: <br>Particle atomic number + in: query + name: z + required: true + schema: + example: 6 + type: number + schemas: + Flux: + properties: + energies: + description: | + Particle energies at which omnidirectional flux values are calculated, and their units. + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + flux: + description: | + Corresponding omnidirectional flux values, and their units. + properties: + data: + items: + type: number + type: array + units: + type: string + type: object + type: object + FluxAtEnergy: + properties: + flux: + description: | + Particle flux value and units. + properties: + units: + type: string + value: + type: number + type: object + type: object +x-tagGroups: + - name: Trapped Radiation + tags: + - trapped + - name: Galactic Cosmic Radiation + tags: + - gcr diff --git a/src/main/resources/anchore.io.0.1.18.yaml b/src/main/resources/anchore.io.0.1.18.yaml new file mode 100644 index 0000000000000000000000000000000000000000..23749c69ef37744925f2d4d2e3a0ea749134f9cf --- /dev/null +++ b/src/main/resources/anchore.io.0.1.18.yaml @@ -0,0 +1,5581 @@ +openapi: 3.0.0 +servers: + - url: / + - url: http://anchore.local +info: + contact: + email: nurmi@anchore.com + x-twitter: anchore + description: This is the Anchore Engine API. Provides the primary external API for users of the service. + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Anchore Engine API Server + version: 0.1.18 + x-apisguru-categories: + - developer_tools + x-logo: + url: https://twitter.com/anchore/profile_image?size=original + x-origin: + - format: openapi + url: https://raw.githubusercontent.com/anchore/anchore-engine/master/anchore_engine/services/apiext/swagger/swagger.yaml + version: "3.0" + x-providerName: anchore.io +tags: + - description: Subscription Management + name: Subscriptions + - description: Policy Management + name: Policies + - description: Image Management + name: Images + - description: View Image Content + name: Image Content + - description: Vulnerability checks and reports + name: Vulnerabilities + - description: Evaluate images against policies + name: Policy Evaluation + - description: Registry Management + name: Registries + - description: Repository Credential Management + name: Repository Credentials + - description: System Management + name: System + - description: Service Management + name: Services + - description: Resource Summaries + name: Summaries + - description: View and delete events + name: Events + - description: Resource Queries + name: Queries + - description: Manage Accounts, Users, and Credentials + name: User Management + - description: Get and operate on the authenticated user's identity + name: Identity + - description: Data Archiving Management + name: Archives +paths: + /: + get: + description: Simple status check + operationId: ping + responses: + "200": + content: + application/json: + schema: + type: string + description: Version check response, returns the api version prefix (e.g. 'v1') + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /account: + get: + operationId: get_users_account + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Account" + description: User details for caller's user + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List the account for the authenticated user + tags: + - Identity + x-anchore-authz-action: getAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + /accounts: + get: + operationId: list_accounts + parameters: + - description: Filter accounts by state + in: query + name: state + required: false + schema: + enum: + - enabled + - disabled + - deleting + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccountList" + description: Accound summary listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List user summaries. Only available to the system admin user. + tags: + - User Management + x-anchore-authz-action: listAccounts + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + post: + operationId: create_account + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AccountCreationRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Account" + description: Account Record + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Conflicting user information. User already exists. + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Create a new user. Only avaialble to admin user. + tags: + - User Management + x-anchore-authz-action: createAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}": + delete: + operationId: delete_account + parameters: + - in: path + name: accountname + required: true + schema: + type: string + responses: + "204": + description: Successful deletion + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete the specified account, only allowed if the account is in the disabled state. All users will be deleted along with the account and all resources will be garbage collected + tags: + - User Management + x-anchore-authz-action: deleteAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + get: + operationId: get_account + parameters: + - in: path + name: accountname + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Account" + description: Get user information + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get info about an user. Only available to admin user. Uses the main user Id, not a username. + tags: + - User Management + x-anchore-authz-action: getAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/state": + put: + operationId: update_account_state + parameters: + - in: path + name: accountname + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AccountStatus" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AccountStatus" + description: Updated state of the account + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: State requested is invalid based on current state of the account + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Update the state of an account to either enabled or disabled. For deletion use the DELETE route + tags: + - User Management + x-anchore-authz-action: updateAccount + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/users": + get: + operationId: list_users + parameters: + - in: path + name: accountname + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + description: List of user credential records + items: + $ref: "#/components/schemas/User" + type: array + description: User listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List accounts for the user + tags: + - User Management + x-anchore-authz-action: listUsers + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + post: + operationId: create_user + parameters: + - in: path + name: accountname + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserCreationRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Credential summary + summary: Create a new user + tags: + - User Management + x-anchore-authz-action: createUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/users/{username}": + delete: + operationId: delete_user + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + responses: + "204": + description: Deleted credential + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete a specific user credential by username of the credential. Cannot be the credential used to authenticate the request. + tags: + - User Management + x-anchore-authz-action: deleteUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + get: + operationId: get_account_user + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: User record + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get a specific user in the specified account + tags: + - User Management + x-anchore-authz-action: getUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + "/accounts/{accountname}/users/{username}/credentials": + delete: + operationId: delete_user_credential + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + - in: query + name: credential_type + required: true + schema: + enum: + - password + type: string + responses: + "204": + description: Successful deletion + "400": + description: Conflict, cannot delete the credential used to authenticate this request + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete a credential by type + tags: + - User Management + x-anchore-authz-action: updateUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + get: + operationId: list_user_credentials + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialList" + description: User credential listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get current credential summary + tags: + - User Management + x-anchore-authz-action: getUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + post: + operationId: create_user_credential + parameters: + - in: path + name: accountname + required: true + schema: + type: string + - in: path + name: username + required: true + schema: + type: string + requestBody: + $ref: "#/components/requestBodies/AccessCredential" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Add a credential, overwritting if already exists + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: add/replace credential + tags: + - User Management + x-anchore-authz-action: updateUser + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.accounts + /archives: + get: + operationId: list_archives + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArchiveSummary" + description: Archive summary listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: listArchives + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + /archives/images: + get: + operationId: list_analysis_archive + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArchivedAnalyses" + description: Image analysis archive listing for the requesting account (not the whole system) + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: listArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + post: + operationId: archive_image_analysis + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageAnalysisReferences" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AddAnalysisArchiveResult" + description: Archive statuses + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: createArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + "/archives/images/{imageDigest}": + delete: + description: Performs a synchronous archive deletion + operationId: delete_archived_analysis + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: query + name: force + required: false + schema: + type: boolean + responses: + "200": + description: ArchivdImageAnalysis successfully deleted + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: deleteArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + get: + description: Returns the archive metadata record identifying the image and tags for the analysis in the archive. + operationId: get_archived_analysis + parameters: + - description: The image digest to identify the image analysis + in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArchivedAnalysis" + description: Archived Image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: getArchivedImageAnalysis + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + /archives/rules: + get: + operationId: list_analysis_archive_rules + parameters: + - description: If true include system global rules (owned by admin) even for non-admin users. Defaults to true if not set. Can be set to false to exclude globals + in: query + name: system_global + required: false + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveRules" + description: Archive transition rules + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: listArchiveTransitionRules + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + post: + operationId: create_analysis_archive_rule + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + description: Archive transition rule + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: createArchiveTransitionRule + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + "/archives/rules/{ruleId}": + delete: + operationId: delete_analysis_archive_rule + parameters: + - in: path + name: ruleId + required: true + schema: + type: string + responses: + "200": + description: Analysis archive rule succesfuly deleted + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: deleteArchiveTransitionRule + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + get: + operationId: get_analysis_archive_rule + parameters: + - in: path + name: ruleId + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + description: Archive transition rule + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + tags: + - Archives + x-anchore-authz-action: getArchiveTransitionRule + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.archive + /event_types: + get: + description: Returns list of event types in the category hierarchy + operationId: list_event_types + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventTypesList" + description: List of event types + summary: List Event Types + tags: + - Events + x-anchore-authz-action: listEvents + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + /events: + delete: + description: Delete all or a subset of events filtered using the optional query parameters + operationId: delete_events + parameters: + - description: Delete events that occurred before the timestamp + in: query + name: before + required: false + schema: + type: string + - description: Delete events that occurred after the timestamp + in: query + name: since + required: false + schema: + type: string + - description: Delete events that match the level - INFO or ERROR + in: query + name: level + required: false + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: List of deleted event IDs + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete Events + tags: + - Events + x-anchore-authz-action: deleteEvents + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + get: + description: Returns a paginated list of events in the descending order of their occurrence. Optional query parameters may be used for filtering results + operationId: list_events + parameters: + - description: Filter events by the originating service + in: query + name: source_servicename + required: false + schema: + type: string + - description: Filter events by the originating host ID + in: query + name: source_hostid + required: false + schema: + type: string + - description: Filter events by a prefix match on the event type (e.g. "user.image.") + in: query + name: event_type + required: false + schema: + pattern: ^[a-z0-9-_.*]+$ + type: string + - description: Filter events by the type of resource - tag, imageDigest, repository etc + in: query + name: resource_type + required: false + schema: + type: string + - description: Filter events by the id of the resource + in: query + name: resource_id + required: false + schema: + type: string + - description: Filter events by the level - INFO or ERROR + in: query + name: level + required: false + schema: + type: string + - description: Return events that occurred after the timestamp + in: query + name: since + required: false + schema: + type: string + - description: Return events that occurred before the timestamp + in: query + name: before + required: false + schema: + type: string + - description: Pagination controls - return the nth page of results. Defaults to first page if left empty + in: query + name: page + required: false + schema: + default: 1 + type: integer + - description: Number of events in the result set. Defaults to 100 if left empty + in: query + name: limit + required: false + schema: + default: 100 + type: integer + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventsList" + description: Paginated list of event records and the next token + summary: List Events + tags: + - Events + x-anchore-authz-action: listEvents + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + "/events/{eventId}": + delete: + description: Delete an event by its event ID + operationId: delete_event + parameters: + - description: Event ID of the event to be deleted + in: path + name: eventId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + summary: Delete Event + tags: + - Events + x-anchore-authz-action: getEvent + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + get: + description: Lookup an event by its event ID + operationId: get_event + parameters: + - description: Event ID of the event for lookup + in: path + name: eventId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EventResponse" + description: Single event record + summary: Get Event + tags: + - Events + x-anchore-authz-action: getEvent + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.events + /health: + get: + description: Health check, returns 200 and no body if service is running + operationId: health_check + responses: + "200": + description: Empty body on success + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.apis.common + /images: + delete: + description: Delete analysis for image digests in the list asynchronously + operationId: delete_images_async + parameters: + - explode: false + in: query + name: imageDigests + required: true + schema: + items: + type: string + type: array + style: form + x-nullable: false + - in: query + name: force + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteImageResponseList" + description: successful operation + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Bulk mark images for deletion + tags: + - Images + x-anchore-authz-action: deleteImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + get: + description: List all images visible to the user + operationId: list_images + parameters: + - description: Include image history in the response + in: query + name: history + required: false + schema: + type: boolean + - description: Full docker-pull string to filter results by (e.g. docker.io/library/nginx:latest, or myhost.com:5000/testimages:v1.1.1) + in: query + name: fulltag + required: false + schema: + type: string + - description: Filter by image_status value on the record. Default if omitted is 'active'. + in: query + name: image_status + required: false + schema: + default: active + enum: + - all + - active + - deleting + type: string + - description: Filter by analysis_status value on the record. + in: query + name: analysis_status + required: false + schema: + enum: + - not_analyzed + - analyzed + - analyzing + - analysis_failed + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: successful operation + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List all visible images + tags: + - Images + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + post: + description: Creates a new analysis task that is executed asynchronously + operationId: add_image + parameters: + - description: Override any existing entry in the system + in: query + name: force + required: false + schema: + type: boolean + - description: Instruct engine to automatically begin watching the added tag for updates from registry + in: query + name: autosubscribe + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageAnalysisRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Successfully added image to analysis queue + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Submit a new image for analysis by the engine + tags: + - Images + x-anchore-authz-action: createImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}": + delete: + operationId: delete_image_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: query + name: force + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteImageResponse" + description: Image deletion success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete image by docker imageId + tags: + - Images + x-anchore-authz-action: deleteImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + get: + operationId: get_image_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Image lookup success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Lookup image by docker imageId + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/check": + get: + description: Get the policy evaluation for the given image + operationId: get_image_policy_check_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: query + name: policyId + required: false + schema: + type: string + - in: query + name: tag + required: true + schema: + type: string + - in: query + name: detail + required: false + schema: + type: boolean + - in: query + name: history + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyEvaluationList" + description: Policy evaluation success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Check policy evaluation status for image + tags: + - Images + x-anchore-authz-action: getImageEvaluation + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content": + get: + operationId: list_image_content_by_imageid + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List image content types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content/files": + get: + operationId: get_image_content_by_type_imageId_files + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentFilesResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type files + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content/java": + get: + operationId: get_image_content_by_type_imageId_javapackage + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentJAVAPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type java + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/content/{ctype}": + get: + operationId: get_image_content_by_type_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: path + name: ctype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/vuln": + get: + operationId: get_image_vulnerability_types_by_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + enum: + - all + - os + - non-os + type: string + type: array + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerability types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/by_id/{imageId}/vuln/{vtype}": + get: + operationId: get_image_vulnerabilities_by_type_imageId + parameters: + - in: path + name: imageId + required: true + schema: + type: string + - in: path + name: vtype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VulnerabilityResponse" + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerabilities by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}": + delete: + operationId: delete_image + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: query + name: force + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteImageResponse" + description: Image deletion success + summary: Delete an image analysis + tags: + - Images + x-anchore-authz-action: deleteImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + get: + operationId: get_image + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Image lookup success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get image metadata + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/artifacts/file_content_search": + get: + operationId: list_file_content_search_results + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FileContentSearchList" + description: List of file metadata objects + "404": + description: Image not found in this service + summary: Return a list of analyzer artifacts of the specified type + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/artifacts/retrieved_files": + get: + operationId: list_retrieved_files + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RetrievedFileList" + description: List of file metadata objects + "404": + description: Image not found in this service + summary: Return a list of analyzer artifacts of the specified type + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/artifacts/secret_search": + get: + operationId: list_secret_search_results + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SecretSearchList" + description: List of file metadata objects + "404": + description: Image not found in this service + summary: Return a list of analyzer artifacts of the specified type + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/check": + get: + description: Get the policy evaluation for the given image + operationId: get_image_policy_check + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: query + name: policyId + required: false + schema: + type: string + - in: query + name: tag + required: true + schema: + type: string + - in: query + name: detail + required: false + schema: + type: boolean + - in: query + name: history + required: false + schema: + type: boolean + - in: query + name: interactive + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyEvaluationList" + description: Policy evaluation success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Check policy evaluation status for image + tags: + - Images + x-anchore-authz-action: getImageEvaluation + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content": + get: + operationId: list_image_content + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: Content listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List image content types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/files": + get: + operationId: get_image_content_by_type_files + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentFilesResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type files + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/java": + get: + operationId: get_image_content_by_type_javapackage + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentJAVAPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type java + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/malware": + get: + operationId: get_image_content_by_type_malware + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentMalwareResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type malware + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/content/{ctype}": + get: + operationId: get_image_content_by_type + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: path + name: ctype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPackageResponse" + description: Content of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the content of an image by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/metadata": + get: + operationId: list_image_metadata + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: Metadata listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List image metadata types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/metadata/{mtype}": + get: + operationId: get_image_metadata_by_type + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: path + name: mtype + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/MetadataResponse" + description: Metadata of specified type from the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get the metadata of an image by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/vuln": + get: + operationId: get_image_vulnerability_types + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + items: + enum: + - all + - os + - non-os + type: string + type: array + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerability types + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + "/images/{imageDigest}/vuln/{vtype}": + get: + operationId: get_image_vulnerabilities_by_type + parameters: + - in: path + name: imageDigest + required: true + schema: + type: string + - in: path + name: vtype + required: true + schema: + type: string + - in: query + name: force_refresh + required: false + schema: + type: boolean + - in: query + name: vendor_only + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VulnerabilityResponse" + description: Vulnerability listing for the image + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get vulnerabilities by type + tags: + - Images + x-anchore-authz-action: getImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /import/images: + post: + operationId: import_image_archive + requestBody: + content: + multipart/form-data: + schema: + properties: + archive_file: + description: anchore image tar archive. + format: binary + type: string + required: + - archive_file + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageList" + description: Successfully imported image to the engine + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Import an anchore image tar.gz archive file. This is a deprecated API replaced by the "/imports/images" route + tags: + - Import + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /imports/images: + get: + operationId: list_operations + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImports" + description: success + "500": + description: Internal Error + summary: Lists in-progress imports + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: create_operation + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportOperation" + description: success + "500": + description: Internal Error + summary: Begin the import of an image analyzed by Syft into the system + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}": + delete: + operationId: invalidate_operation + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportOperation" + description: success + "500": + description: Internal Error + summary: Invalidate operation ID so it can be garbage collected + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + get: + operationId: get_operation + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportOperation" + description: success + "500": + description: Internal Error + summary: Get detail on a single import + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/dockerfile": + get: + operationId: list_import_dockerfiles + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded dockerfiles + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_dockerfile + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + text/plain; utf-8: + schema: + type: string + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Begin the import of an image analyzed by Syft into the system + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/image_config": + get: + operationId: list_import_image_configs + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded image configs + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_config + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Import a docker or OCI image config to associate with the image + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/manifest": + get: + operationId: list_import_image_manifests + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded image manifests + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_manifest + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/vnd.docker.distribution.manifest.v1+json: + schema: + type: object + application/vnd.docker.distribution.manifest.v1+prettyjws: + schema: + type: object + application/vnd.docker.distribution.manifest.v2+json: + schema: + type: object + application/vnd.oci.image.manifest.v1+json: + schema: + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Import a docker or OCI distribution manifest to associate with the image + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/packages": + get: + operationId: list_import_packages + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded package manifests + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_packages + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImagePackageManifest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Begin the import of an image analyzed by Syft into the system + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + "/imports/images/{operation_id}/parent_manifest": + get: + operationId: list_import_parent_manifests + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImportContentDigestList" + description: success + "500": + description: Internal Error + summary: List uploaded parent manifests (manifest lists for a tag) + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + post: + operationId: import_image_parent_manifest + parameters: + - in: path + name: operation_id + required: true + schema: + type: string + requestBody: + content: + application/vnd.docker.distribution.manifest.list.v2+json: + schema: + type: object + application/vnd.oci.image.index.v1+json: + schema: + type: object + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ImageImportContentResponse" + description: success + "500": + description: Internal Error + summary: Import a docker or OCI distribution manifest list to associate with the image + tags: + - Imports + x-anchore-authz-action: importImage + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.image_imports + /oauth/token: + post: + description: Request a jwt token for subsequent operations, this request is authenticated with normal HTTP auth + operationId: get_oauth_token + requestBody: + content: + application/x-www-form-urlencoded: + schema: + properties: + client_id: + default: anonymous + description: The type of client used for the OAuth token + type: string + grant_type: + default: password + description: OAuth Grant type for token + type: string + password: + description: Password for corresponding user + type: string + username: + description: User to assign OAuth token to + type: string + type: object + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TokenResponse" + description: Resulting JWT token + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.oauth + /policies: + get: + description: List all saved policy bundles + operationId: list_policies + parameters: + - description: Include policy bundle detail in the form of the full bundle content for each entry + in: query + name: detail + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleList" + description: Policy listing + summary: List policies + tags: + - Policies + x-anchore-authz-action: listPolicies + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + post: + description: Adds a new policy bundle to the system + operationId: add_policy + parameters: + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundle" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleRecord" + description: Saved bundle + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Add a new policy + tags: + - Policies + x-anchore-authz-action: createPolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + "/policies/{policyId}": + delete: + description: Delete the specified policy + operationId: delete_policy + parameters: + - in: path + name: policyId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Policy not found to delete + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete policy + tags: + - Policies + x-anchore-authz-action: deletePolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + get: + description: Get the policy bundle content + operationId: get_policy + parameters: + - in: path + name: policyId + required: true + schema: + type: string + - description: Include policy bundle detail in the form of the full bundle content for each entry + in: query + name: detail + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleList" + description: A list with a single fetched policy bundle record + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get specific policy + tags: + - Policies + x-anchore-authz-action: getPolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + put: + description: Update/replace and existing policy + operationId: update_policy + parameters: + - in: path + name: policyId + required: true + schema: + type: string + - description: Mark policy as active + in: query + name: active + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleRecord" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyBundleList" + description: A list with a single updated policy bundle record + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Update policy + tags: + - Policies + x-anchore-authz-action: updatePolicy + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.policies + /query/images/by_package: + get: + description: Filterable query interface to search for images containing specified package + operationId: query_images_by_package + parameters: + - description: Name of package to search for (e.g. sed) + in: query + name: name + required: true + schema: + type: string + - description: Type of package to filter on (e.g. dpkg) + in: query + name: package_type + required: false + schema: + type: string + - description: Version of named package to filter on (e.g. 4.4-1) + in: query + name: version + required: false + schema: + type: string + - description: The page of results to fetch. Pages start at 1 + in: query + name: page + required: false + schema: + type: string + - description: Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page + in: query + name: limit + required: false + schema: + type: integer + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedImageList" + description: Image listing + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Bad filter parameters + summary: List of images containing given package + tags: + - Query + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.query + /query/images/by_vulnerability: + get: + description: Returns a listing of images and their respective packages vulnerable to the given vulnerability ID + operationId: query_images_by_vulnerability + parameters: + - description: The ID of the vulnerability to search for within all images stored in anchore-engine (e.g. CVE-1999-0001) + in: query + name: vulnerability_id + required: true + schema: + type: string + - description: Filter results to images within the given vulnerability namespace (e.g. debian:8, ubuntu:14.04) + in: query + name: namespace + required: false + schema: + type: string + - description: Filter results to images with vulnable packages with the given package name (e.g. libssl) + in: query + name: affected_package + required: false + schema: + type: string + - description: Filter results to vulnerable package/vulnerability with the given severity + in: query + name: severity + required: false + schema: + enum: + - Unknown + - Negligible + - Low + - Medium + - High + - Critical + type: string + - description: Filter results to include only vulnerabilities that are not marked as invalid by upstream OS vendor data + in: query + name: vendor_only + required: false + schema: + default: true + type: boolean + - description: The page of results to fetch. Pages start at 1 + in: query + name: page + required: false + schema: + type: integer + - description: Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page + in: query + name: limit + required: false + schema: + type: integer + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedVulnerableImageList" + description: Image lookup success + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Invalid filter parameters + summary: List images vulnerable to the specific vulnerability ID. + tags: + - Query + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.query + /query/vulnerabilities: + get: + description: List (w/filters) vulnerability records known by the system, with affected packages information if present + operationId: query_vulnerabilities + parameters: + - description: The ID of the vulnerability (e.g. CVE-1999-0001) + explode: false + in: query + name: id + required: true + schema: + items: + type: string + type: array + style: form + - description: Filter results by specified package name (e.g. sed) + in: query + name: affected_package + required: false + schema: + type: string + - description: Filter results by specified package version (e.g. 4.4-1) + in: query + name: affected_package_version + required: false + schema: + type: string + - description: The page of results to fetch. Pages start at 1 + in: query + name: page + required: false + schema: + default: "1" + type: string + - description: Limit the number of records for the requested page. If omitted or set to 0, return all results in a single page + in: query + name: limit + required: false + schema: + type: integer + - description: Namespace(s) to filter vulnerability records by + explode: false + in: query + name: namespace + required: false + schema: + items: + type: string + type: array + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedVulnerabilityList" + description: Vulnerability listing paginated + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Invalid filter parameters + summary: Listing information about given vulnerability + tags: + - Query + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.query + /registries: + get: + description: List all configured registries the system can/will watch + operationId: list_registries + parameters: + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Registry listing + summary: List configured registries + tags: + - Registries + x-anchore-authz-action: listRegistries + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + post: + description: Adds a new registry to the system + operationId: create_registry + parameters: + - description: flag to determine whether or not to validate registry/credential at registry add time + in: query + name: validate + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + $ref: "#/components/requestBodies/RegistryConfigurationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Saved registry configuration + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Add a new registry + tags: + - Registries + x-anchore-authz-action: createRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + "/registries/{registry}": + delete: + description: Delete a registry configuration record from the system. Does not remove any images. + operationId: delete_registry + parameters: + - in: path + name: registry + required: true + schema: + format: path + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete a registry configuration + tags: + - Registries + x-anchore-authz-action: deleteRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + get: + description: Get information on a specific registry + operationId: get_registry + parameters: + - in: path + name: registry + required: true + schema: + format: path + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Registry configuration + summary: Get a specific registry configuration + tags: + - Registries + x-anchore-authz-action: getRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + put: + description: Replaces an existing registry record with the given record + operationId: update_registry + parameters: + - in: path + name: registry + required: true + schema: + format: path + type: string + - description: flag to determine whether or not to validate registry/credential at registry update time + in: query + name: validate + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + $ref: "#/components/requestBodies/RegistryConfigurationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationList" + description: Updated registry configuration + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Update/replace a registry configuration + tags: + - Registries + x-anchore-authz-action: updateRegistry + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.registries + /repositories: + post: + operationId: add_repository + parameters: + - description: full repository to add e.g. docker.io/library/alpine + in: query + name: repository + required: true + schema: + type: string + - description: flag to enable/disable auto tag_update activation when new images from a repo are added + in: query + name: autosubscribe + required: false + schema: + type: boolean + - description: flag to return tags in the repository without actually watching the repository, default is false + in: query + name: dryrun + required: false + schema: + type: boolean + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Repository and discovered tags added + summary: Add repository to watch + tags: + - Repository Credentials + x-anchore-authz-action: createRepository + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /status: + get: + description: Get the API service status + operationId: get_status + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/StatusResponse" + description: Status listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Service status + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /subscriptions: + get: + operationId: list_subscriptions + parameters: + - description: filter only subscriptions matching key + in: query + name: subscription_key + required: false + schema: + type: string + - description: filter only subscriptions matching type + in: query + name: subscription_type + required: false + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Subscription listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List all subscriptions + tags: + - Subscriptions + x-anchore-authz-action: listSubscriptions + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + post: + description: Create a new subscription to watch a tag and get notifications of changes + operationId: add_subscription + parameters: + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Subscription add success + summary: Add a subscription of a specific type + tags: + - Subscriptions + x-anchore-authz-action: createSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + "/subscriptions/{subscriptionId}": + delete: + operationId: delete_subscription + parameters: + - in: path + name: subscriptionId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + description: Delete success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Delete subscriptions of a specific type + tags: + - Subscriptions + x-anchore-authz-action: deleteSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + get: + operationId: get_subscription + parameters: + - in: path + name: subscriptionId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Filtered subscription list by type + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get a specific subscription set + tags: + - Subscriptions + x-anchore-authz-action: getSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + put: + operationId: update_subscription + parameters: + - in: path + name: subscriptionId + required: true + schema: + type: string + - $ref: "#/components/parameters/AsAccountParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionUpdate" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionList" + description: Subscription add success + summary: Update an existing and specific subscription + tags: + - Subscriptions + x-anchore-authz-action: updateSubscription + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.subscriptions + /summaries/imagetags: + get: + description: List all image tags visible to the user + operationId: list_imagetags + parameters: + - description: Filter images in one or more states such as active, deleting. Defaults to active images only if unspecified + explode: false + in: query + name: image_status + required: false + schema: + default: + - active + items: + enum: + - all + - active + - deleting + type: string + type: array + style: form + - $ref: "#/components/parameters/AsAccountParameter" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/AnchoreImageTagSummaryList" + description: successful operation + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List all visible image digests and tags + tags: + - Summaries + x-anchore-authz-action: listImages + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.images + /system: + get: + description: Get the system status including queue lengths + operationId: get_service_detail + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SystemStatusResponse" + description: Status listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: System status + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/error_codes: + get: + description: Describe anchore engine error codes. + operationId: describe_error_codes + responses: + "200": + content: + application/json: + schema: + description: List of Error Code Descriptions + items: + $ref: "#/components/schemas/AnchoreErrorCode" + type: array + description: Error Codes Description + summary: Describe anchore engine error codes. + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/feeds: + get: + description: Return a list of feed and their groups along with update and record count information. This data reflects the state of the policy engine, not the upstream feed service itself. + operationId: get_system_feeds + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FeedMetadata" + type: array + description: success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: list feeds operations and information + tags: + - System + x-anchore-authz-action: listFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + post: + description: Execute a synchronous feed sync operation. The response will block until complete, then return the result summary. + operationId: post_system_feeds + parameters: + - description: instruct system to flush existing data feeds records from anchore-engine + in: query + name: flush + required: false + schema: + type: boolean + - description: instruct system to re-sync data feeds + in: query + name: sync + required: false + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeedSyncResults" + description: Feeds operation success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: trigger feeds operations + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/feeds/{feed}": + delete: + description: Delete the groups and data for the feed and disable the feed itself + operationId: delete_feed + parameters: + - in: path + name: feed + required: true + schema: + type: string + responses: + "200": + description: Successfully deleted + "404": + description: Not found + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + put: + description: Disable the feed so that it does not sync on subsequent sync operations + operationId: toggle_feed_enabled + parameters: + - in: path + name: feed + required: true + schema: + type: string + - in: query + name: enabled + required: true + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeedMetadata" + description: FeedInfo + "400": + description: Bad request, fix and resend + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/feeds/{feed}/{group}": + delete: + description: Delete the group data and disable the group itself + operationId: delete_feed_group + parameters: + - in: path + name: feed + required: true + schema: + type: string + - in: path + name: group + required: true + schema: + type: string + responses: + "200": + description: Successfully deleted + "404": + description: Not found + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + put: + description: Disable a specific group within a feed to not sync + operationId: toggle_group_enabled + parameters: + - in: path + name: feed + required: true + schema: + type: string + - in: path + name: group + required: true + schema: + type: string + - in: query + name: enabled + required: true + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FeedMetadata" + type: array + description: FeedInfo listing + "400": + description: Bad request, fix and resend + "500": + description: Internal server error processing the request. Retry expected + tags: + - System + x-anchore-authz-action: updateFeeds + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/policy_spec: + get: + description: Get the policy language spec for this service + operationId: describe_policy + responses: + "200": + content: + application/json: + schema: + description: List of Gate specifications + items: + $ref: "#/components/schemas/GateSpec" + type: array + description: Policy Language Description + summary: Describe the policy language spec implemented by this service. + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /system/services: + get: + operationId: list_services + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceList" + description: Service listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: List system services + tags: + - System + x-anchore-authz-action: listServices + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/services/{servicename}": + get: + operationId: get_services_by_name + parameters: + - in: path + name: servicename + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceList" + description: Service Info + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal Error + summary: Get a service configuration and state + tags: + - System + x-anchore-authz-action: getService + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/services/{servicename}/{hostid}": + delete: + operationId: delete_service + parameters: + - in: path + name: servicename + required: true + schema: + type: string + - in: path + name: hostid + required: true + schema: + type: string + responses: + "200": + description: Delete success + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Delete the service config + tags: + - System + x-anchore-authz-action: deleteService + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + get: + operationId: get_services_by_name_and_host + parameters: + - in: path + name: servicename + required: true + schema: + type: string + - in: path + name: hostid + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceList" + description: Listing of registered services + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get service config for a specific host + tags: + - System + x-anchore-authz-action: getService + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + "/system/webhooks/{webhook_type}/test": + post: + description: Loads the Webhook configuration for webhook_type, and sends the notification out as a test + operationId: test_webhook + parameters: + - description: The Webhook Type that we should test + in: path + name: webhook_type + required: true + schema: + type: string + - description: What kind of Notification to send + in: query + name: notification_type + required: false + schema: + default: tag_update + enum: + - tag_update + - analysis_update + - vuln_update + - policy_eval + type: string + responses: + "200": + description: The Webhook was sent successfully. Schemas may be found under Models (PolicyEvalNotification, TagUpdateNotification, VulnUpdateNotification, AnalysisUpdateNotification) + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: The Webhook failed to send due to misconfiguration + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: The Webhook failed to send due to an Internal Error + summary: Adds the capabilities to test a webhook delivery for the given notification type + tags: + - System + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.system + /user: + get: + operationId: get_user + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: User details for caller's user + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: List authenticated user info + tags: + - Identity + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.user + /user/credentials: + get: + operationId: get_credentials + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialList" + description: User credential listing + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: Get current credential summary + tags: + - Identity + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.user + post: + operationId: add_credential + requestBody: + $ref: "#/components/requestBodies/AccessCredential" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Add a credential, overwritting if already exists + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorResponse" + description: Internal error + summary: add/replace credential + tags: + - Identity + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.services.apiext.api.controllers.user + /version: + get: + description: Returns the version object for the service, including db schema version info + operationId: version_check + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceVersion" + description: Version object describing version state + x-anchore-authz-action: None + x-swagger-router-controller: anchore_engine.apis.common +components: + parameters: + AsAccountParameter: + description: An account name to change the resource scope of the request to that account, if permissions allow (admin only) + in: header + name: x-anchore-account + required: false + schema: + type: string + requestBodies: + AccessCredential: + content: + application/json: + schema: + $ref: "#/components/schemas/AccessCredential" + required: true + RegistryConfigurationRequest: + content: + application/json: + schema: + $ref: "#/components/schemas/RegistryConfigurationRequest" + required: true + schemas: + AccessCredential: + description: A login credential mapped to a user identity. For password credentials, the username to present for Basic auth is the user's username from the user record + properties: + created_at: + description: The timestamp of creation of the credential + type: string + type: + description: The type of credential + enum: + - password + type: string + value: + description: The credential value (e.g. the password) + type: string + required: + - type + - value + type: object + Account: + description: Account information + properties: + created_at: + description: The timestamp when the account was created + format: date-time + type: string + email: + description: Optional email address associated with the account + type: string + last_updated: + description: The timestamp of the last update to the account metadata itself (not users or creds) + format: date-time + type: string + name: + description: The account identifier, not updatable after creation + type: string + state: + description: State of the account. Disabled accounts prevent member users from logging in, deleting accounts are disabled and pending deletion and will be removed once all owned resources are garbage collected by the system + enum: + - enabled + - disabled + - deleting + type: string + type: + description: The user type (admin vs user). If not specified in a POST request, 'user' is default + enum: + - user + - admin + - service + type: string + required: + - name + type: object + AccountCreationRequest: + description: An account to create/add to the system. If already exists will return 400. + properties: + email: + description: An optional email to associate with the account for contact purposes + pattern: "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" + type: string + name: + description: The account name to use. This will identify the account and must be globally unique in the system. + pattern: ^[a-zA-Z0-9][a-zA-Z0-9@.!#$+-=^_`~;]{1,126}[a-zA-Z0-9]$ + type: string + required: + - name + type: object + AccountList: + items: + $ref: "#/components/schemas/Account" + type: array + AccountStatus: + description: A summary of account status + properties: + state: + description: The status of the account + enum: + - enabled + - disabled + type: string + type: object + AddAnalysisArchiveResult: + description: List of analysis archive add results + items: + $ref: "#/components/schemas/AnalysisArchiveAddResult" + type: array + AnalysisArchiveAddResult: + description: The result of adding a single digest to the archive + properties: + detail: + description: Details on the status, e.g. the error message + type: string + digest: + description: The image digest requested to be added + type: string + status: + description: The status of the archive add operation. Typically either 'archived' or 'error' + enum: + - archived + - archiving + - error + type: string + type: object + AnalysisArchiveRules: + description: Rule set for automatic archiving of system objects and flushing of archived objects (permament delete). + items: + $ref: "#/components/schemas/AnalysisArchiveTransitionRule" + type: array + AnalysisArchiveRulesSummary: + description: Summary of the transition rule set + properties: + count: + description: The number of rules for this account + type: integer + last_updated: + description: The newest last_updated timestamp from the set of rules + format: date-time + type: string + type: object + AnalysisArchiveSource: + description: An image reference in the analysis archive for the purposes of loading analysis from the archive into th working set + nullable: true + properties: + digest: + description: The image digest identify the analysis. Archived analyses are based on digest, tag records are restored as analysis is restored. + pattern: ^sha256:[a-fA-F0-9]{64}$ + type: string + required: + - digest + type: object + AnalysisArchiveSummary: + description: A summarization of the analysis archive, including size, counts, etc. This archive stores image analysis only, never the actual image content or layers. + properties: + last_updated: + description: The timestamp of the most recent archived image + format: date-time + type: string + total_data_bytes: + description: The total sum of all the bytes stored to the backing storage. Accounts for anchore-applied compression, but not compression by the underlying storage system. + type: integer + total_image_count: + description: The number of unique images (digests) in the archive + type: integer + total_tag_count: + description: The number of tag records (registry/repo:tag pull strings) in the archive. This may include repeated tags but will always have a unique tag->digest mapping per record. + type: integer + type: object + AnalysisArchiveTransitionHistory: + description: A rule for auto-archiving image analysis by time and/or tag-history + properties: + created_at: + format: date-time + type: string + imageDigest: + type: string + last_updated: + format: date-time + type: string + rule_id: + type: string + transition: + enum: + - archive + - delete + type: string + transition_task_id: + description: The task that created & updated this entry + type: string + type: object + AnalysisArchiveTransitionRule: + description: A rule for auto-archiving image analysis by time and/or tag-history + properties: + analysis_age_days: + description: Matches if the analysis is strictly older than this number of days + type: integer + created_at: + format: date-time + type: string + exclude: + $ref: "#/components/schemas/AnalysisArchiveTransitionRuleExclude" + last_updated: + format: date-time + type: string + max_images_per_account: + description: This is the maximum number of image analyses an account can have. Can only be set on system_global rules + type: integer + rule_id: + description: Unique identifier for archive rule + type: string + selector: + $ref: "#/components/schemas/ImageSelector" + system_global: + description: True if the rule applies to all accounts in the system. This is only available to admin users to update/modify, but all users with permission to list rules can see them + type: boolean + tag_versions_newer: + description: Number of images mapped to the tag that are newer + type: integer + transition: + description: The type of transition to make. If "archive", then archive an image from the working set and remove it from the working set. If "delete", then match against archived images and delete from the archive if match. + enum: + - archive + - delete + type: string + required: + - transition + type: object + AnalysisArchiveTransitionRuleExclude: + description: Which Images to exclude from auto-archiving logic + properties: + expiration_days: + default: -1 + description: How long the image selected will be excluded from the archive transition + type: integer + selector: + $ref: "#/components/schemas/ImageSelector" + type: object + AnalysisUpdateEval: + description: Evaluation Results for an entity (current or last) + properties: + analysis_status: + type: string + annotations: + type: object + image_digest: + type: string + type: object + AnalysisUpdateNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Tag Update Notifications + properties: + data: + $ref: "#/components/schemas/AnalysisUpdateNotificationData" + type: object + AnalysisUpdateNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/AnalysisUpdateNotificationPayload" + type: object + AnalysisUpdateNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + curr_eval: + $ref: "#/components/schemas/AnalysisUpdateEval" + last_eval: + $ref: "#/components/schemas/AnalysisUpdateEval" + type: object + AnchoreErrorCode: + description: A description of an anchore error code (name, description) + properties: + description: + description: Description of the error code + type: string + name: + description: Error code name + type: string + type: object + AnchoreImage: + description: A unique image in the engine. May have multiple tags or references. Unique to an image content across registries or repositories. + properties: + analysis_status: + description: A state value for the current status of the analysis progress of the image + enum: + - not_analyzed + - analyzing + - analyzed + - analysis_failed + type: string + annotations: + type: object + created_at: + format: date-time + type: string + imageDigest: + type: string + image_content: + $ref: "#/components/schemas/ImageContent" + image_detail: + description: Details specific to an image reference and type such as tag and image source + items: + $ref: "#/components/schemas/ImageDetail" + type: array + image_status: + description: State of the image + enum: + - active + - inactive + - disabled + type: string + last_updated: + format: date-time + type: string + userId: + type: string + type: object + AnchoreImageList: + description: A list of Anchore Images + items: + $ref: "#/components/schemas/AnchoreImage" + type: array + AnchoreImageTagSummary: + description: A unique image in the engine. + properties: + analysis_status: + type: string + analyzed_at: + type: integer + created_at: + type: integer + fulltag: + type: string + imageDigest: + type: string + imageId: + type: string + image_status: + type: string + parentDigest: + type: string + tag_detected_at: + type: integer + type: object + AnchoreImageTagSummaryList: + description: a list of AnchoreImageTagSummary objects + items: + $ref: "#/components/schemas/AnchoreImageTagSummary" + type: array + Annotations: + description: Simple key/value pairs where the value may be optional + type: object + ApiErrorResponse: + description: Generic HTTP API error response + properties: + code: + format: int32 + type: integer + detail: + description: Details structure for additional information about the error if available. Content and structure will be error specific. + type: object + error_type: + type: string + message: + type: string + type: object + ArchiveSummary: + description: A summarization of the available archives, a place to for long-term storage of audit, analysis, or other data to remove it from the system's working set but keep it available. + properties: + images: + $ref: "#/components/schemas/AnalysisArchiveSummary" + rules: + $ref: "#/components/schemas/AnalysisArchiveRulesSummary" + type: object + ArchivedAnalyses: + description: List of archived analyses + items: + $ref: "#/components/schemas/ArchivedAnalysis" + type: array + ArchivedAnalysis: + properties: + analyzed_at: + format: date-time + type: string + annotations: + description: User provided annotations as key-value pairs + type: object + archive_size_bytes: + description: The size, in bytes, of the analysis archive file + type: integer + created_at: + format: date-time + type: string + imageDigest: + description: The image digest (digest of the manifest describing the image, per docker spec) + type: string + image_detail: + description: List of tags associated with the image digest + items: + $ref: "#/components/schemas/TagEntry" + type: array + last_updated: + format: date-time + type: string + parentDigest: + description: The digest of a parent manifest (for manifest-list images) + type: string + status: + description: The archival status + enum: + - archiving + - archived + - deleting + - deleted + type: string + type: object + BaseNotificationData: + description: Every notification has a payload, which follows this basic structure + properties: + notification_type: + type: string + notification_user: + type: string + notification_user_email: + type: string + type: object + CVSSV2Scores: + properties: + base_score: + nullable: true + type: number + exploitability_score: + nullable: true + type: number + impact_score: + nullable: true + type: number + type: object + CVSSV3Scores: + properties: + base_score: + nullable: true + type: number + exploitability_score: + nullable: true + type: number + impact_score: + nullable: true + type: number + type: object + ContentFilesResponse: + description: File content listings from images + properties: + content: + items: + properties: + filename: + type: string + gid: + type: integer + linkdest: + nullable: true + type: string + mode: + type: string + sha256: + nullable: true + type: string + size: + type: integer + type: + type: string + uid: + type: integer + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentJAVAPackageResponse: + description: Java package content listings from images + properties: + content: + items: + properties: + cpes: + description: A list of Common Platform Enumerations that may uniquely identify the package + items: + type: string + type: array + implementation-version: + type: string + location: + type: string + maven-version: + type: string + origin: + type: string + package: + type: string + specification-version: + type: string + type: + type: string + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentMalwareResponse: + description: Malware listing response + properties: + content: + description: List of malware scan results, one per scanner configured to run + items: + $ref: "#/components/schemas/MalwareScan" + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentPackageResponse: + description: Package content listings from images + properties: + content: + items: + properties: + cpes: + description: A list of Common Platform Enumerations that may uniquely identify the package + items: + type: string + type: array + license: + description: Deprecated in favor of the 'licenses' field" + type: string + licenses: + items: + type: string + type: array + location: + type: string + origin: + type: string + package: + type: string + size: + type: string + type: + type: string + version: + type: string + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + ContentResponse: + description: Generic wrapper for content listings from images + properties: + content: + items: + type: object + type: array + content_type: + type: string + imageDigest: + type: string + type: object + CredentialList: + items: + $ref: "#/components/schemas/AccessCredential" + type: array + DeleteImageResponse: + description: Image deletion response containing status and details + properties: + detail: + type: string + digest: + type: string + status: + description: Current status of the image deletion + enum: + - not_found + - deleting + - delete_failed + type: string + required: + - digest + - status + type: object + DeleteImageResponseList: + description: A list of delete image responses + items: + $ref: "#/components/schemas/DeleteImageResponse" + type: array + EventCategory: + description: A collection of event subcategories + properties: + category: + type: string + description: + type: string + subcategories: + items: + $ref: "#/components/schemas/EventSubcategory" + type: array + type: object + EventDescription: + description: A description of an event type + properties: + message: + description: The message associated with the event type + type: string + name: + description: The event type. The last component of the fully-qualified event_type (category.subcategory.event) + type: string + resource_type: + description: The type of resource this event is generated from + type: string + type: + description: The fully qualified event type as would be seen in the event payload + type: string + type: object + EventResponse: + description: A record of occurance of an asynchronous event triggered either by system or by user activity + properties: + created_at: + format: date-time + type: string + event: + properties: + category: + type: string + details: + type: object + level: + type: string + message: + type: string + resource: + properties: + id: + type: string + type: + type: string + user_id: + type: string + type: object + source: + properties: + base_url: + type: string + hostid: + type: string + request_id: + type: string + servicename: + type: string + type: object + timestamp: + format: date-time + type: string + type: + type: string + type: object + generated_uuid: + type: string + type: object + EventSubcategory: + description: A collection of events related to each other + properties: + description: + type: string + events: + items: + $ref: "#/components/schemas/EventDescription" + type: array + name: + type: string + type: object + EventTypesList: + description: Array of EventCategory objects + items: + $ref: "#/components/schemas/EventCategory" + type: array + EventsList: + description: Response envelope for paginated listing of events + properties: + item_count: + description: Number of events in this page + type: integer + next_page: + description: Boolean flag, True indicates there are more events and False otherwise + type: boolean + page: + description: Page number of this result set + type: integer + results: + description: List of events + items: + $ref: "#/components/schemas/EventResponse" + type: array + type: object + FeedGroupMetadata: + properties: + created_at: + format: date-time + type: string + last_sync: + format: date-time + type: string + name: + type: string + record_count: + type: integer + type: object + FeedMetadata: + description: Metadata on a single feed based on what the engine finds from querying the endpoints + properties: + created_at: + description: Date the metadata record was created in engine (first seen on source) + format: date-time + type: string + groups: + items: + $ref: "#/components/schemas/FeedGroupMetadata" + type: array + last_full_sync: + format: date-time + type: string + name: + description: name of the feed + type: string + updated_at: + description: Date the metadata was last updated + format: date-time + type: string + type: object + FeedSyncResult: + description: The result of a sync of a single feed + properties: + feed: + description: The name of the feed synced + type: string + groups: + description: Array of group sync results + items: + $ref: "#/components/schemas/GroupSyncResult" + type: array + status: + description: The result of the sync operations, either co + enum: + - success + - failure + type: string + total_time_seconds: + description: The duratin, in seconds, of the sync of the feed, the sum of all the group syncs + type: number + type: object + FeedSyncResults: + description: An array of feed sync summaries representing the result of an explicit feed sync operation + items: + $ref: "#/components/schemas/FeedSyncResult" + type: array + FileContentSearchList: + description: Simple array of RetrievedFileMetadata objects + items: + $ref: "#/components/schemas/FileContentSearchResult" + type: array + FileContentSearchResult: + description: The retrieved file entry including content (b64 encoded) + properties: + matches: + items: + $ref: "#/components/schemas/RegexContentMatch" + type: array + path: + type: string + type: object + GateSpec: + description: A description of the set of gates available in this engine and the triggers and parameters supported + properties: + description: + description: Description of the gate + type: string + name: + description: Gate name, as it would appear in a policy document + type: string + state: + description: State of the gate and transitively all triggers it contains if not 'active' + enum: + - active + - deprecated + - eol + type: string + superceded_by: + description: The name of another trigger that supercedes this on functionally if this is deprecated + nullable: true + type: string + triggers: + description: List of the triggers that can fire for this Gate + items: + $ref: "#/components/schemas/TriggerSpec" + type: array + type: object + GenericNotificationPayload: + description: Parent class for Notification Payloads + properties: + notificationId: + type: string + subscription_key: + type: string + subscription_type: + type: string + userId: + type: string + type: object + GroupSyncResult: + properties: + group: + description: The name of the group + type: string + status: + enum: + - success + - failure + type: string + total_time_seconds: + description: The duration of the group sync in seconds + type: number + updated_image_count: + description: The number of images updated by the this group sync, across all accounts. This is typically only non-zero for vulnerability feeds which update images' vulnerability results during the sync. + type: integer + updated_record_count: + description: The number of feed data records synced down as either updates or new records + type: integer + type: object + ImageAnalysisReferences: + description: List of image digests to archive + items: + description: Image digest + type: string + type: array + ImageAnalysisReport: + description: Analysis report json to be imported + type: object + ImageAnalysisRequest: + description: A request to add an image to be watched and analyzed by the engine. Optionally include the dockerfile content. Either source, digest or tag must be present. + properties: + annotations: + description: Annotations to be associated with the added image in key/value form + type: object + created_at: + description: Optional override of the image creation time, only honored when both tag and digest are also supplied e.g. 2018-10-17T18:14:00Z. Deprecated in favor of the 'source' field + format: date-time + type: string + digest: + description: A digest string for an image, maybe a pull string or just a digest. e.g. nginx@sha256:123 or sha256:abc123. If a pull string, it must have same regisry/repo as the tag field. Deprecated in favor of the 'source' field + type: string + dockerfile: + description: Base64 encoded content of the dockerfile for the image, if available. Deprecated in favor of the 'source' field. + pattern: ^[a-zA-Z0-9+/=]+$ + type: string + image_type: + description: Optional. The type of image this is adding, defaults to "docker". This can be ommitted until multiple image types are supported. + type: string + source: + $ref: "#/components/schemas/ImageSource" + tag: + description: Full pullable tag reference for image. e.g. docker.io/nginx:latest. Deprecated in favor of the 'source' field + type: string + type: object + ImageContent: + description: A metadata content record for a specific image, containing different content type entries + type: object + ImageContentDeleteResponse: + type: object + ImageDetail: + description: A metadata detail record for a specific image. Multiple detail records may map a single catalog image. + properties: + created_at: + format: date-time + type: string + dockerfile: + nullable: true + type: string + fulldigest: + description: Full docker-pullable digest string including the registry url and repository necessary get the image + type: string + fulltag: + description: Full docker-pullable tag string referencing the image + type: string + imageDigest: + description: The parent Anchore Image record to which this detail maps + type: string + imageId: + type: string + last_updated: + format: date-time + type: string + registry: + type: string + repo: + type: string + userId: + type: string + type: object + ImageFilter: + description: Filter for an image list by id, tag, or digest, but not both + properties: + digest: + type: string + tag: + type: string + type: object + ImageImportContentResponse: + properties: + created_at: + format: date-time + type: string + digest: + type: string + type: object + ImageImportManifest: + nullable: true + properties: + contents: + $ref: "#/components/schemas/ImportContentDigests" + digest: + type: string + local_image_id: + description: An "imageId" as used by Docker if available + type: string + operation_uuid: + type: string + parent_digest: + description: The digest of the images's manifest-list parent if it was accessed from a multi-arch tag where the tag pointed to a manifest-list. This allows preservation of that relationship in the data + type: string + tags: + items: + description: Full docker reference tags + example: docker.io/library/nginx:latest + type: string + type: array + type: object + ImageImportOperation: + description: An import record, creating a unique identifier for referencing the operation as well as its state + properties: + created_at: + format: date-time + type: string + expires_at: + format: date-time + type: string + status: + enum: + - pending + - queued + - processing + - complete + - failed + - expired + type: string + uuid: + type: string + type: object + ImageImports: + items: + $ref: "#/components/schemas/ImageImportOperation" + type: array + ImagePackageManifest: + additionalProperties: true + properties: + artifactRelationships: + items: + $ref: "#/components/schemas/ImportPackageRelationship" + type: array + artifacts: + items: + $ref: "#/components/schemas/ImportPackage" + type: array + descriptor: + $ref: "#/components/schemas/ImportDescriptor" + distro: + $ref: "#/components/schemas/ImportDistribution" + schema: + $ref: "#/components/schemas/ImportSchema" + source: + $ref: "#/components/schemas/ImportSource" + required: + - artifacts + - source + - distro + type: object + ImageRef: + description: A reference to an image + properties: + type: + enum: + - tag + - digest + - id + value: + type: string + required: + - type + - value + type: object + ImageReference: + description: A summary of an image identity, including digest, id (if available), and any tags known to have ever been mapped to the digest + properties: + analyzed_at: + description: Timestamp, in rfc3339 format, indicating when the image state became 'analyzed' in Anchore Engine. + type: string + digest: + description: The image digest + type: string + id: + description: The image id if available + type: string + tag_history: + items: + $ref: "#/components/schemas/TagEntry" + type: array + type: object + ImageSelectionRule: + properties: + id: + type: string + image: + $ref: "#/components/schemas/ImageRef" + name: + type: string + registry: + type: string + repository: + type: string + required: + - name + - registry + - repository + - image + type: object + ImageSelector: + description: A set of selection criteria to match an image by a tagged pullstring based on its components, with regex support in each field + properties: + registry: + description: The registry section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "docker.io" + type: string + repository: + description: The repository section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "anchore/anchore-engine" + type: string + tag: + description: The tag-only section of a pull string. e.g. with "docker.io/anchore/anchore-engine:latest", this is "latest" + type: string + type: object + ImageSource: + description: A set of analysis source types. Only one may be set in any given request. + properties: + archive: + $ref: "#/components/schemas/AnalysisArchiveSource" + digest: + $ref: "#/components/schemas/RegistryDigestSource" + import: + $ref: "#/components/schemas/ImageImportManifest" + tag: + $ref: "#/components/schemas/RegistryTagSource" + type: object + ImageWithPackages: + description: An image record that contains packages + properties: + image: + $ref: "#/components/schemas/ImageReference" + packages: + items: + $ref: "#/components/schemas/PackageReference" + type: array + type: object + ImportContentDigestList: + items: + description: String digest of an uploaded content + type: string + type: array + ImportContentDigests: + description: Digest of content to use in the final import + properties: + dockerfile: + description: Digest for reference content for dockerfile + type: string + image_config: + description: Digest for reference content for image config + type: string + manifest: + description: Digest to reference content for the image manifest + type: string + packages: + description: Digest to use for the packages content + type: string + parent_manifest: + description: Digest for reference content for parent manifest + type: string + required: + - packages + - manifest + - image_config + type: object + ImportDescriptor: + additionalProperties: true + properties: + name: + type: string + version: + type: string + required: + - name + - version + type: object + ImportDistribution: + additionalProperties: true + properties: + idLike: + type: string + name: + type: string + version: + type: string + required: + - name + - version + - idLike + type: object + ImportPackage: + additionalProperties: true + properties: + cpes: + items: + type: string + type: array + foundBy: + type: string + id: + type: string + language: + type: string + licenses: + items: + type: string + type: array + locations: + items: + $ref: "#/components/schemas/ImportPackageLocation" + type: array + metadata: + type: object + metadataType: + type: string + name: + type: string + purl: + type: string + type: + type: string + version: + type: string + required: + - name + - version + - type + - locations + - licenses + - language + - cpes + - metadataType + type: object + ImportPackageLocation: + additionalProperties: true + properties: + layerID: + type: string + path: + type: string + required: + - path + type: object + ImportPackageRelationship: + additionalProperties: true + properties: + child: + type: string + metadata: + additionalProperties: true + type: object + parent: + type: string + type: + type: string + required: + - parent + - child + - type + type: object + ImportSchema: + additionalProperties: true + properties: + url: + type: string + version: + type: string + required: + - version + - url + type: object + ImportSource: + additionalProperties: true + properties: + target: + additionalProperties: true + type: + type: string + required: + - type + - target + type: object + LocalAnalysisSource: + properties: + digest: + type: string + type: object + MalwareScan: + description: A single scan from a scanner + properties: + enabled: + description: Indicates if the scanner is enabled + type: boolean + findings: + items: + properties: + path: + description: A path for a file in the image's rootfs + type: string + signature: + description: The malware signature found at the path + type: string + type: object + type: array + metadata: + description: Open schema for scanner-specific metadata related to the scan result + type: object + scanner: + description: The name of the scanner that produced the finding + type: string + type: object + MappingRule: + properties: + id: + type: string + image: + $ref: "#/components/schemas/ImageRef" + name: + type: string + policy_id: + description: Optional single policy to evalute, if set will override any value in policy_ids, for backwards compatibility. Generally, policy_ids should be used even with a array of length 1. + type: string + policy_ids: + description: List of policyIds to evaluate in order, to completion + items: + description: PolicyId to evaluate + type: string + type: array + registry: + type: string + repository: + type: string + whitelist_ids: + items: + type: string + type: array + required: + - name + - registry + - repository + - image + type: object + MetadataResponse: + description: Generic wrapper for metadata listings from images + properties: + imageDigest: + type: string + metadata: {} + metadata_type: + type: string + type: object + NotificationBase: + description: base object for Notifications (every notification has this basic structure) + properties: + created_at: + type: integer + dataId: + type: string + last_updated: + type: integer + max_tries: + type: integer + queueId: + type: string + record_state_key: + default: active + type: string + record_state_val: + nullable: true + type: string + tries: + type: integer + userId: + type: string + type: object + NvdDataList: + description: List of Nvd Data objects + items: + $ref: "#/components/schemas/NvdDataObject" + type: array + NvdDataObject: + properties: + cvss_v2: + $ref: "#/components/schemas/CVSSV2Scores" + cvss_v3: + $ref: "#/components/schemas/CVSSV3Scores" + id: + description: NVD Vulnerability ID + type: string + type: object + PackageReference: + description: A record of a software item which is vulnerable or carries a fix for a vulnerability + properties: + name: + description: Package name + type: string + type: + description: Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...) + type: string + version: + description: A version for the package. If null, then references all versions + nullable: true + type: string + type: object + PaginatedImageList: + allOf: + - $ref: "#/components/schemas/PaginationProperties" + - properties: + images: + items: + $ref: "#/components/schemas/ImageWithPackages" + type: array + type: object + description: Pagination wrapped list of images that match some filter + PaginatedVulnerabilityList: + allOf: + - $ref: "#/components/schemas/PaginationProperties" + - properties: + vulnerabilities: + description: The listing of matching vulnerabilities for the query subject to pagination + items: + $ref: "#/components/schemas/StandaloneVulnerability" + type: array + type: object + description: A paginated listing of vulnerability records sorted by ID in descending order + PaginatedVulnerableImageList: + allOf: + - $ref: "#/components/schemas/PaginationProperties" + - properties: + images: + items: + $ref: "#/components/schemas/VulnerableImage" + type: array + type: object + description: Pagination wrapped list of images with vulnerabilties that match some filter + PaginationProperties: + description: Properties for common pagination handling to be included in any wrapping object that needs pagination elements + properties: + next_page: + description: True if additional pages exist (page + 1) or False if this is the last page + type: string + page: + description: The page number returned (should match the requested page query string param) + type: string + returned_count: + description: The number of items sent in this response + type: integer + type: object + Policy: + properties: + comment: + type: string + id: + type: string + name: + type: string + rules: + items: + $ref: "#/components/schemas/PolicyRule" + type: array + version: + type: string + required: + - id + - version + type: object + PolicyBundle: + description: A bundle containing a set of policies, whitelists, and rules for mapping them to specific images + properties: + blacklisted_images: + description: List of mapping rules that define which images should always result in a STOP/FAIL policy result regardless of policy content or presence in whitelisted_images + items: + $ref: "#/components/schemas/ImageSelectionRule" + type: array + comment: + description: Description of the bundle, human readable + type: string + id: + description: Id of the bundle + type: string + mappings: + description: Mapping rules for defining which policy and whitelist(s) to apply to an image based on a match of the image tag or id. Evaluated in order. + items: + $ref: "#/components/schemas/MappingRule" + type: array + name: + description: Human readable name for the bundle + type: string + policies: + description: Policies which define the go/stop/warn status of an image using rule matches on image properties + items: + $ref: "#/components/schemas/Policy" + type: array + version: + description: Version id for this bundle format + type: string + whitelisted_images: + description: List of mapping rules that define which images should always be passed (unless also on the blacklist), regardless of policy result. + items: + $ref: "#/components/schemas/ImageSelectionRule" + type: array + whitelists: + description: Whitelists which define which policy matches to disregard explicitly in the final policy decision + items: + $ref: "#/components/schemas/Whitelist" + type: array + required: + - id + - version + - policies + - mappings + type: object + PolicyBundleList: + description: List of PolicyBundleRecord objects + items: + $ref: "#/components/schemas/PolicyBundleRecord" + type: array + PolicyBundleRecord: + description: A policy bundle plus some metadata + properties: + active: + description: True if the bundle is currently defined to be used automatically + type: boolean + created_at: + format: date-time + type: string + last_updated: + format: date-time + type: string + policyId: + description: The bundle's identifier + type: string + policy_source: + description: Source location of where the policy bundle originated + type: string + policybundle: + $ref: "#/components/schemas/PolicyBundle" + userId: + description: UserId of the user that owns the bundle + type: string + type: object + PolicyEvalNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Policy Eval Notifications + properties: + data: + $ref: "#/components/schemas/PolicyEvalNotificationData" + type: object + PolicyEvalNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/PolicyEvalNotificationPayload" + type: object + PolicyEvalNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + curr_eval: + description: The Current Policy Evaluation result + type: object + last_eval: + description: The Previous Policy Evaluation result + type: object + type: object + PolicyEvaluation: + description: Evaluation response object + type: object + PolicyEvaluationList: + description: Evaluation response object + items: + $ref: "#/components/schemas/PolicyEvaluation" + type: array + PolicyRule: + description: A rule that defines and decision value if the match is found true for a given image. + properties: + action: + enum: + - GO + - STOP + - WARN + gate: + type: string + id: + type: string + params: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + trigger: + type: string + required: + - gate + - trigger + - action + type: object + RegexContentMatch: + description: Match of a named regex on a file + properties: + lines: + description: A list of line numbers in the file that matched the regex + items: + type: integer + type: array + name: + description: The name associated with the regular expression + type: string + regex: + description: The regular expression used for the match + type: string + type: object + RegistryConfiguration: + description: A registry entry describing the endpoint and credentials for a registry to pull images from + properties: + created_at: + format: date-time + type: string + last_upated: + format: date-time + type: string + registry: + description: hostname:port string for accessing the registry, as would be used in a docker pull operation + type: string + registry_name: + description: human readable name associated with registry record + type: string + registry_type: + description: Type of registry + type: string + registry_user: + description: Username portion of credential to use for this registry + type: string + registry_verify: + description: Use TLS/SSL verification for the registry URL + type: boolean + userId: + description: Engine user that owns this registry entry + type: string + type: object + RegistryConfigurationList: + description: List of registry configurations + items: + $ref: "#/components/schemas/RegistryConfiguration" + type: array + RegistryConfigurationRequest: + description: A registry record describing the endpoint and credentials for a registry + properties: + registry: + description: hostname:port string for accessing the registry, as would be used in a docker pull operation. May include some or all of a repository and wildcards (e.g. docker.io/library/* or gcr.io/myproject/myrepository) + type: string + registry_name: + description: human readable name associated with registry record + type: string + registry_pass: + description: Password portion of credential to use for this registry + type: string + registry_type: + description: Type of registry + type: string + registry_user: + description: Username portion of credential to use for this registry + type: string + registry_verify: + description: Use TLS/SSL verification for the registry URL + type: boolean + type: object + RegistryDigestSource: + description: An image reference using a digest in a registry, includes some extra tag and timestamp info in addition to the pull string to allow proper tag history reconstruction. + nullable: true + properties: + creation_timestamp_override: + description: Optional override of the image creation time to support proper tag history construction in cases of out-of-order analysis compared to registry history for the tag + format: date-time + type: string + dockerfile: + description: Base64 encoded content of the dockerfile used to build the image, if available. + pattern: ^[a-zA-Z0-9+/=]+$ + type: string + pullstring: + description: A digest-based pullstring (e.g. docker.io/nginx@sha256:123abc) + type: string + tag: + description: A valid docker tag reference (e.g. docker.io/nginx:latest) that will be associated with the image but not used to pull the image. + type: string + required: + - pullstring + - tag + type: object + RegistryTagSource: + description: An image reference using a tag in a registry, this is the most common source type. + nullable: true + properties: + dockerfile: + description: Base64 encoded content of the dockerfile used to build the image, if available. + pattern: ^[a-zA-Z0-9+/=]+$ + type: string + pullstring: + description: A docker pull string (e.g. docker.io/nginx:latest, or docker.io/nginx@sha256:abd) to retrieve the image + type: string + required: + - pullstring + type: object + RepositoryTagList: + description: List of discovered tags in a repository + items: + type: string + type: array + RetrievedFile: + description: The retrieved file entry including content (b64 encoded) + properties: + b64_content: + type: string + path: + type: string + type: object + RetrievedFileList: + description: Simple array of RetrievedFileMetadata objects + items: + $ref: "#/components/schemas/RetrievedFile" + type: array + SecretSearchList: + description: Simple array of RetrievedFileMetadata objects + items: + $ref: "#/components/schemas/SecretSearchResult" + type: array + SecretSearchResult: + description: The retrieved file entry including content (b64 encoded) + properties: + matches: + items: + $ref: "#/components/schemas/RegexContentMatch" + type: array + path: + type: string + type: object + Service: + description: A service status record + properties: + base_url: + description: The url to reach the service, including port as needed + type: string + hostid: + description: The unique id of the host on which the service is executing + type: string + service_detail: + $ref: "#/components/schemas/StatusResponse" + servicename: + description: Registered service name + type: string + status: + type: boolean + status_message: + description: A state indicating the condition of the service. Normal operation is 'registered' + type: string + version: + description: The version of the service as reported by the service implementation on registration + type: string + type: object + ServiceList: + description: A list of service objects + items: + $ref: "#/components/schemas/Service" + type: array + ServiceVersion: + description: Version information for a service + properties: + api: + description: Api Version string + properties: + version: + description: Semantic version of the api + type: string + type: object + db: + properties: + schema_version: + description: Semantic version of the db schema + type: string + type: object + service: + properties: + version: + description: Semantic Version string of the service implementation + type: string + type: object + type: object + StandaloneVulnerability: + description: A single vulnerability record in a single namespace, the unique key is the combination of the id and namespace + properties: + affected_packages: + description: The array of packages (typically packages) that are vulnerable-to or provide fixes-for this vulnerability + items: + $ref: "#/components/schemas/PackageReference" + type: array + description: + description: Description of the vulnerability if available + type: string + id: + description: Vulnerability identifier. May be CVE-X, RHSA-X, etc. Not necessarily unique across namespaces + type: string + link: + description: URL for the upstream CVE record in the reporting source (e.g. ubuntu security tracker) + type: string + namespace: + description: The namespace for the vulnerability record to avoid conflicts for the same id in different distros or sources (e.g. deb vs ubuntu for same CVE) + type: string + nvd_data: + $ref: "#/components/schemas/NvdDataList" + references: + description: List of references including + items: + $ref: "#/components/schemas/VulnerabilityReference" + type: array + severity: + description: Severity label specific to the namepsace + enum: + - Unknown + - Negligible + - Low + - Medium + - High + - Critical + type: string + vendor_data: + $ref: "#/components/schemas/VendorDataList" + type: object + StatusResponse: + description: System status response + properties: + available: + type: boolean + busy: + type: boolean + db_version: + type: string + detail: + type: object + message: + type: string + up: + type: boolean + version: + type: string + type: object + Subscription: + description: Subscription entry + properties: + active: + description: Is the subscription currently active + type: boolean + subscription_id: + description: the unique id for this subscription record + type: string + subscription_key: + description: The key value that the subscription references. E.g. a tag value or a repo name. + type: string + subscription_type: + description: The type of the subscription + type: string + subscription_value: + description: The value of the subscription target + nullable: true + type: string + userId: + description: The userId of the subscribed user + type: string + type: object + SubscriptionList: + description: List of subscriptions + items: + $ref: "#/components/schemas/Subscription" + type: array + SubscriptionRequest: + description: A subscription entry to add to the system + properties: + subscription_key: + type: string + subscription_type: + type: string + subscription_value: + nullable: true + type: string + type: object + SubscriptionUpdate: + description: A modification to a subscription entry to change its status or value + properties: + active: + description: Toggle the subscription processing on or off + type: boolean + subscription_value: + description: The new subscription value, e.g. the new tag to be subscribed to + nullable: true + type: string + type: object + SystemStatusResponse: + description: System status response + properties: + service_states: + $ref: "#/components/schemas/ServiceList" + type: object + TagEntry: + description: A docker-pullable tag value as well as deconstructed components + properties: + detected_at: + description: The timestamp at which the Anchore Engine detected this tag was mapped to the image digest. Does not necessarily indicate when the tag was actually pushed to the registry. + format: date-time + type: string + pullstring: + description: The pullable string for the tag. E.g. "docker.io/library/node:latest" + type: string + registry: + description: The registry hostname:port section of the pull string + type: string + repository: + description: The repository section of the pull string + type: string + tag: + description: The tag-only section of the pull string + type: string + type: object + TagUpdateNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Tag Update Notifications + properties: + data: + $ref: "#/components/schemas/TagUpdateNotificationData" + type: object + TagUpdateNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/TagUpdateNotificationPayload" + type: object + TagUpdateNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + curr_eval: + description: A list containing the current image digest + items: {} + type: array + last_eval: + description: A list containing the previous image digests + items: {} + type: array + type: object + TokenResponse: + properties: + token: + description: The token content + type: string + required: + - token + type: object + TriggerParamSpec: + properties: + description: + type: string + example: + description: An example value for the parameter (encoded as a string if the parameter is an object or list type) + nullable: true + type: string + name: + description: Parameter name as it appears in policy document + type: string + required: + description: Is this a required parameter or optional + type: boolean + state: + description: State of the trigger parameter + enum: + - active + - deprecated + - eol + type: string + superceded_by: + description: The name of another trigger that supercedes this on functionally if this is deprecated + nullable: true + type: string + validator: + description: If present, a definition for validation of input. Typically a jsonschema object that can be used to validate an input against. + type: object + type: object + TriggerSpec: + description: Definition of a trigger and its parameters + properties: + description: + description: Trigger description for what it tests and when it will fire during evaluation + type: string + name: + description: Name of the trigger as it would appear in a policy document + type: string + parameters: + description: The list of parameters that are valid for this trigger + items: + $ref: "#/components/schemas/TriggerParamSpec" + type: array + state: + description: State of the trigger + enum: + - active + - deprecated + - eol + type: string + superceded_by: + description: The name of another trigger that supercedes this on functionally if this is deprecated + nullable: true + type: string + type: object + User: + description: A username for authenticating with one or more types of credentials. User type defines the expected credentials allowed for the user. Native users have passwords, External users have no credential internally. Internal users are service/system users for inter-service communication. + properties: + created_at: + description: The timestampt the user record was created + format: date-time + type: string + last_updated: + description: The timestamp of the last update to this record + format: date-time + type: string + source: + description: If the user is external, this is the source that the user was initialized from. All other user types have this set to null + type: string + type: + description: The user's type + enum: + - native + - internal + - external + type: string + username: + description: The username to authenticate with + type: string + required: + - username + type: object + UserCreationRequest: + description: A payload for creating a new user, includes the username and password in a single request + properties: + password: + description: The initial password for the user, must be at least 6 characters, up to 128 + pattern: .{6,128}$ + type: string + username: + description: The username to create + pattern: ^[a-zA-Z0-9][a-zA-Z0-9@.!#$+-=^_`~;]{1,126}[a-zA-Z0-9]$ + type: string + required: + - username + - password + type: object + UserList: + items: + $ref: "#/components/schemas/User" + type: array + VendorDataList: + description: List of Vendor Data objects + items: + $ref: "#/components/schemas/VendorDataObject" + type: array + VendorDataObject: + properties: + cvss_v2: + $ref: "#/components/schemas/CVSSV2Scores" + cvss_v3: + $ref: "#/components/schemas/CVSSV3Scores" + id: + description: Vendor Vulnerability ID + type: string + type: object + VulnDiffResult: + description: The results of the comparing two vulnerability records during an update + properties: + added: + items: {} + type: array + removed: + items: {} + type: array + updated: + items: {} + type: array + type: object + VulnUpdateNotification: + allOf: + - $ref: "#/components/schemas/NotificationBase" + - description: The Notification Object definition for Tag Update Notifications + properties: + data: + $ref: "#/components/schemas/VulnUpdateNotificationData" + type: object + VulnUpdateNotificationData: + allOf: + - $ref: "#/components/schemas/BaseNotificationData" + - properties: + notification_payload: + $ref: "#/components/schemas/VulnUpdateNotificationPayload" + type: object + VulnUpdateNotificationPayload: + allOf: + - $ref: "#/components/schemas/GenericNotificationPayload" + - properties: + annotations: + description: List of Corresponding Image Annotations + nullable: true + type: object + diff_vulnerability_result: + $ref: "#/components/schemas/VulnDiffResult" + imageDigest: + type: string + type: object + Vulnerability: + properties: + feed: + description: The name of the feed where vulnerability match was made + type: string + feed_group: + description: The name of the feed group where vulnerability match was made + type: string + fix: + description: The package containing a fix, if available + type: string + nvd_data: + $ref: "#/components/schemas/NvdDataList" + package: + description: The package name and version that are vulnerable in the image + type: string + package_cpe: + description: The CPE string (if applicable) describing the package to vulnerability match + type: string + package_name: + description: The name of the vulnerable package artifact + type: string + package_path: + description: The location (if applicable) of the vulnerable package in the container filesystem + type: string + package_type: + description: The type of vulnerable package + type: string + package_version: + description: The version of the vulnerable package artifact + type: string + severity: + description: The severity of the vulnerability + type: string + url: + description: The url for more information about the vulnerability + type: string + vendor_data: + $ref: "#/components/schemas/VendorDataList" + vuln: + description: The vulnerability identifier, such as CVE-2017-100, or RHSA-2017123 + type: string + type: object + VulnerabilityList: + description: List of Vulnerability objects + items: + $ref: "#/components/schemas/Vulnerability" + type: array + VulnerabilityReference: + description: An external link/reference + properties: + source: + description: The reference source + type: string + tags: + items: + type: string + type: array + url: + description: The reference url + type: string + type: object + VulnerabilityResponse: + description: envelope containing list of vulnerabilities + properties: + imageDigest: + type: string + vulnerabilities: + $ref: "#/components/schemas/VulnerabilityList" + vulnerability_type: + type: string + type: object + VulnerableImage: + description: A record of an image vulnerable to some known vulnerability. Includes vulnerable package information + properties: + affected_packages: + items: + $ref: "#/components/schemas/VulnerablePackageReference" + type: array + image: + $ref: "#/components/schemas/ImageReference" + type: object + VulnerablePackageReference: + description: A record of a software item which is vulnerable or carries a fix for a vulnerability + properties: + name: + description: Package name + type: string + namespace: + description: Vulnerability namespace of affected package + type: string + severity: + description: Severity of vulnerability affecting package + type: string + type: + description: Package type (e.g. package, rpm, deb, apk, jar, npm, gem, ...) + type: string + version: + description: A version for the package. If null, then references all versions + nullable: true + type: string + type: object + Whitelist: + description: A collection of whitelist items to match a policy evaluation against. + properties: + comment: + type: string + id: + type: string + items: + items: + $ref: "#/components/schemas/WhitelistItem" + type: array + name: + type: string + version: + type: string + required: + - id + - version + type: object + WhitelistItem: + description: Identifies a specific gate and trigger match from a policy against an image and indicates it should be ignored in final policy decisions + properties: + expires_on: + format: date-time + pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:\:\d+)?[A-Z]?$ + type: string + gate: + type: string + id: + type: string + trigger_id: + type: string + required: + - gate + - trigger_id + type: object diff --git a/src/main/resources/api.gov.uk.vehicle-enquiry.1.1.0.yaml b/src/main/resources/api.gov.uk.vehicle-enquiry.1.1.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..08c396402bcc07812050626a29a2235157ca225a --- /dev/null +++ b/src/main/resources/api.gov.uk.vehicle-enquiry.1.1.0.yaml @@ -0,0 +1,229 @@ +openapi: 3.0.0 +servers: + - description: Production environment + url: https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry + - description: Test environment + url: https://uat.driver-vehicle-licensing.api.gov.uk/vehicle-enquiry +info: + contact: + email: dvlaapiaccess@dvla.gov.uk + name: DVLA API Team + x-twitter: GDSTeam + description: Interface specification for the DVLA Vehicle Enquiry API + title: Vehicle Enquiry API + version: 1.1.0 + x-apisguru-categories: + - open_data + x-logo: + url: https://twitter.com/GDSTeam/profile_image?size=original + x-origin: + - format: openapi + url: https://developer-portal.driver-vehicle-licensing.api.gov.uk/apis/vehicle-enquiry-service/v1.1.0-vehicle-enquiry-service.json + version: "3.0" + x-providerName: api.gov.uk + x-serviceName: vehicle-enquiry +tags: + - name: vehicle +paths: + /v1/vehicles: + post: + description: Returns vehicle details based on registration number + operationId: getVehicleDetailsByRegistrationNumber + parameters: + - description: Client Specific API Key + in: header + name: x-api-key + required: true + schema: + type: string + - description: Consumer Correlation ID + in: header + name: X-Correlation-Id + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/VehicleRequest" + description: Registration number of the vehicle to find details for + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Vehicle" + description: Successful response + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Vehicle Not Found + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Service Unavailable + summary: Get vehicle details by registration number + tags: + - vehicle +components: + schemas: + ErrorResponse: + description: Error Response + properties: + errors: + items: + $ref: "#/components/schemas/Errors" + type: array + type: object + Errors: + properties: + code: + description: DVLA reference code + example: "105" + type: string + detail: + description: A meaningful description of the error which has occurred + example: Invalid format for field - vehicle registration number + type: string + status: + example: "400" + type: string + title: + description: Error title + example: Invalid vrn number + type: string + required: + - title + type: object + Vehicle: + properties: + artEndDate: + description: "Additional Rate of Tax End Date, format: YYYY-MM-DD" + example: 2007-12-25 + format: date + type: string + co2Emissions: + description: Carbon Dioxide emissions in grams per kilometre + example: 0 + format: int32 + type: integer + colour: + description: Vehicle colour + example: Blue + type: string + dateOfLastV5CIssued: + description: Date of last V5C issued + example: 2016-12-25 + format: date + type: string + engineCapacity: + description: Engine capacity in cubic centimetres + example: 1796 + format: int32 + type: integer + euroStatus: + description: Euro Status (Dealer / Customer Provided (new vehicles)) + example: Euro 5 + type: string + fuelType: + description: Fuel type (Method of Propulsion) + example: PETROL + type: string + make: + description: Vehicle make + example: ROVER + type: string + markedForExport: + description: True only if vehicle has been export marked + example: true + type: boolean + monthOfFirstDvlaRegistration: + description: Month of First DVLA Registration + example: 2011-11 + format: date + type: string + monthOfFirstRegistration: + description: Month of First Registration + example: 2012-12 + format: date + type: string + motExpiryDate: + description: Mot Expiry Date + example: 2008-12-25 + format: date + type: string + motStatus: + description: MOT Status of the vehicle + enum: + - No details held by DVLA + - No results returned + - Not valid + - Valid + example: No details held by DVLA + type: string + realDrivingEmissions: + description: Real Driving Emissions value + example: "1" + type: string + registrationNumber: + description: Registration number of the vehicle + example: WN67DSO + type: string + revenueWeight: + description: Revenue weight in kilograms + example: 1640 + format: int32 + type: integer + taxDueDate: + description: Date of tax liablity, Used in calculating licence information presented to user + example: 2017-12-25 + format: date + type: string + taxStatus: + description: Tax status of the vehicle + enum: + - Not Taxed for on Road Use + - SORN + - Taxed + - Untaxed + example: Untaxed + type: string + typeApproval: + description: Vehicle Type Approval Category + example: N1 + type: string + wheelplan: + description: Vehicle wheel plan + example: NON STANDARD + type: string + yearOfManufacture: + description: Year of Manufacture + example: 2004 + format: int32 + type: integer + required: + - registrationNumber + type: object + VehicleRequest: + properties: + registrationNumber: + type: string + type: object diff --git a/src/main/resources/api2pdf.com.1.0.0.yaml b/src/main/resources/api2pdf.com.1.0.0.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6298b4600438ad2e86991e8cc5bb62179b641d68 --- /dev/null +++ b/src/main/resources/api2pdf.com.1.0.0.yaml @@ -0,0 +1,557 @@ +openapi: 3.0.0 +servers: + - description: Api2Pdf.com API + url: https://v2018.api2pdf.com +info: + contact: + email: support@api2pdf.com + name: Support + x-twitter: api2pdf_status + description: | + + # Introduction + [Api2Pdf](https://www.api2pdf.com) is a powerful PDF generation API with no rate limits or file size constraints. Api2Pdf runs on AWS Lambda, a serverless architecture powered by Amazon to scale to millions of requests while being up to 90% cheaper than alternatives. **Supports wkhtmltopdf, Headless Chrome, LibreOffice, and PDF Merge.** You can also generate barcodes with ZXING (Zebra Crossing). + # SDKs & Client Libraries + We've made a number of open source libraries available for the API + - Python: [https://github.com/api2pdf/api2pdf.python](https://github.com/api2pdf/api2pdf.python) + - .NET: [https://github.com/api2pdf/api2pdf.dotnet](https://github.com/api2pdf/api2pdf.dotnet) + - Nodejs: [https://github.com/api2pdf/api2pdf.node](https://github.com/api2pdf/api2pdf.node) + - PHP: [https://github.com/Api2Pdf/api2pdf.php](https://github.com/Api2Pdf/api2pdf.php) + - Ruby: (Coming soon) + # Authorization + Create an account at [portal.api2pdf.com](https://portal.api2pdf.com/register) to get an API key. + + **Authorize your API calls** + - GET requests, include apikey=YOUR-API-KEY as a query string parameter + - POST requests, add **Authorization** to your header. + ``` Authorization: YOUR-API-KEY ``` + + # Quickstart + If you are looking for just a quick call to grab PDFs of a URL, you can do a GET request like: + ``` https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={YourApiKey} ``` + + For more advanced usage and settings, see the API specification below. + license: + name: Creative Commons + url: https://creativecommons.org/licenses/by/4.0/legalcode + title: Api2Pdf - PDF Generation, Powered by AWS Lambda + version: 1.0.0 + x-apisguru-categories: + - developer_tools + x-logo: + url: https://twitter.com/api2pdf_status/profile_image?size=original + x-origin: + - converter: + url: https://github.com/lucybot/api-spec-converter + version: 2.7.18 + format: openapi + url: https://app.swaggerhub.com/apiproxy/schema/file/api2pdf/api2pdf/1.0.0/swagger.json + version: "3.0" + x-providerName: api2pdf.com +externalDocs: + description: Find out more about Api2Pdf + url: https://www.api2pdf.com +security: + - HeaderApiKey: [] +paths: + /chrome/html: + post: + description: |- + Convert HTML to a PDF using Headless Chrome on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: chromeFromHtmlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChromeHtmlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `html` *(string, required)* - raw HTML to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced Headless Chrome options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-headless-chrome/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert raw HTML to PDF + tags: + - Headless Chrome + /chrome/url: + get: + description: |- + Convert a URL or Web Page to PDF using Headless Chrome on AWS Lambda. This GET request is for convenience and does not support advanced options. Use the POST request for more flexibility. + ### Authorize via Query String Parameter + **apikey=YOUR-API-KEY** + ### Example + ``` https://v2018.api2pdf.com/chrome/url?url={UrlToConvert}&apikey={YourApiKey} ``` + operationId: chromeFromUrlGET + parameters: + - description: Url of the page to convert to PDF. Must start with http:// or https://. + in: query + name: url + required: true + schema: + type: string + - description: Specify output=json to receive a JSON output. Defaults to PDF file. + in: query + name: output + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + application/pdf: + schema: + format: binary + type: string + description: A PDF file or a JSON object depending on the `output` query parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + security: + - QueryApiKey: [] + summary: Convert URL to PDF + tags: + - Headless Chrome + post: + description: |- + Convert a URL or Web Page to PDF using Headless Chrome on AWS Lambda.. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: chromeFromUrlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChromeUrlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `url` *(string, required)* - Url to the web page to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced Headless Chrome options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-headless-chrome/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert URL to PDF + tags: + - Headless Chrome + /libreoffice/convert: + post: + description: |- + Convert an office document (Word, Excel, Powerpoint) or an image (jpg, gif, png) to a PDF using LibreOffice on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: libreConvertPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LibreOfficeConvertRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `url` *(string, required)* - A direct URL to the file. Api2Pdf will consume the file at that URL and then convert it. + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert office document or image to PDF + tags: + - LibreOffice + /merge: + post: + description: |- + Merge two or more PDFs together on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: mergePost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MergeRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `urls` *(array of urls, required)* - A JSON array of direct URLs to PDFs. Api2Pdf will consume the PDF files in the list and then merge them all together.. + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Merge multiple PDFs together + tags: + - Merge / Combine Pdfs + /wkhtmltopdf/html: + post: + description: |- + Convert HTML to a PDF using WkHtmlToPdf on AWS Lambda. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: wkhtmltopdfFromHtmlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WkHtmlToPdfHtmlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `html` *(string, required)* - raw HTML to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced WkHtmlToPdf options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert raw HTML to PDF + tags: + - wkhtmltopdf + /wkhtmltopdf/url: + get: + description: |- + Convert a URL or Web Page to PDF using WkHtmlToPdf on AWS Lambda. This GET request is for convenience and does not support advanced options. Use the POST request for more flexibility. + ### Authorize via Query String Parameter + **apikey=YOUR-API-KEY** + ### Example + ``` https://v2018.api2pdf.com/wkhtmltopdf/url?url={UrlToConvert}&apikey={YourApiKey} ``` + operationId: wkhtmltopdfFromUrlGET + parameters: + - description: Url of the page to convert to PDF. Must start with http:// or https://. + in: query + name: url + required: true + schema: + type: string + - description: Specify output=json to receive a JSON output. Defaults to PDF file. + in: query + name: output + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + application/pdf: + schema: + format: binary + type: string + description: A PDF file or a JSON object depending on the `output` query parameter + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + security: + - QueryApiKey: [] + summary: Convert URL to PDF + tags: + - wkhtmltopdf + post: + description: |- + Convert a URL or Web Page to PDF using WkHtmlToPdf on AWS Lambda.. + ### Authorize via Header of Request + **Authorization: YOUR-API-KEY** + operationId: wkhtmltopdfFromUrlPost + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WkHtmlToPdfUrlToPdfRequest" + description: |- + A JSON object as a payload is required within the body of the request. The following attributes of the JSON object are detailed below: + - `url` *(string, required)* - Url to the web page to convert to PDF + - `inlinePdf` *(boolean, optional)* - Open the PDF in a browser window. Default to false. + - `fileName` *(string, optional)* - Specify a file name for the output PDF. Random name if not specified. + - `options` *(object, optional)* - Include advanced WkHtmlToPdf options like margins, headers, and footers. [See full list of advanced options here](https://www.api2pdf.com/documentation/advanced-options-wkhtmltopdf/). + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseSuccess" + description: A JSON object containing the url to the PDF and other meta data + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ApiResponseFailure" + description: Failed to generate PDF + summary: Convert URL to PDF + tags: + - wkhtmltopdf + /zebra: + get: + description: |- + See full list of options and documentation [here](https://www.api2pdf.com/documentation/advanced-options-zxing-zebra-crossing-barcodes/) + ### Authorize via Query String Parameter + **apikey=YOUR-API-KEY** + ### Example + ``` https://v2018.api2pdf.com/zebra?format={format}&apikey={YourApiKey}&value={YourText} ``` + operationId: zebraGET + parameters: + - description: Most common is CODE_39 or QR_CODE + in: query + name: format + required: true + schema: + type: string + - description: Specify the text value you want to convert + in: query + name: value + required: true + schema: + type: string + - description: Show label of text below barcode + in: query + name: showlabel + schema: + type: boolean + - description: Height of the barcode generated image + in: query + name: height + schema: + type: integer + - description: Width of the barcode generated image + in: query + name: width + schema: + type: integer + responses: + "200": + content: + image/png: + schema: + format: binary + type: string + description: An image of the generated barcode or QR code + security: + - QueryApiKey: [] + summary: Generate bar codes and QR codes with ZXING. + tags: + - ZXING (Zebra Crossing) Bar Codes +components: + schemas: + ApiResponseFailure: + properties: + reason: + description: The reason for the PDF generation failure + example: Source website could not be found + type: string + success: + description: Will be false if the operation failed + example: false + type: boolean + type: object + ApiResponseSuccess: + properties: + cost: + description: Cost of the operation (mbIn + mbOut) * $.001 + example: 0.0007979 + type: number + mbIn: + description: The amount of megabytes of bandwidth used to process the pdf + example: 0.06463 + type: number + mbOut: + description: The amount of megabytes of bandwidth generated from the resulting pdf + example: 0.73327 + type: number + pdf: + description: A url to the PDF that will exist only for 24 hours + example: https://link-to-your-pdf + type: string + success: + description: Will be true if the operation suceeded + example: true + type: boolean + type: object + ChromeAdvancedOptions: + properties: + landscape: + example: "true" + type: string + printBackground: + example: false + type: boolean + type: object + ChromeHtmlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + html: + example: <p>Hello World</p> + format: html + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/ChromeAdvancedOptions" + required: + - html + type: object + ChromeUrlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/ChromeAdvancedOptions" + url: + example: https://www.github.com + format: url + type: string + required: + - url + type: object + LibreOfficeConvertRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + url: + example: https://www.api2pdf.com/wp-content/themes/api2pdf/assets/samples/sample-word-doc.docx + format: url + type: string + required: + - url + type: object + MergeRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + urls: + example: + - link-to-pdf1 + - link-to-pdf2 + - link-to-pdf3 + items: + type: string + type: array + required: + - urls + type: object + WkHtmlToPdfAdvancedOptions: + properties: + orientation: + example: landscape + type: string + pageSize: + example: A4 + type: string + type: object + WkHtmlToPdfHtmlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + html: + example: <p>Hello World</p> + format: html + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/WkHtmlToPdfAdvancedOptions" + required: + - html + type: object + WkHtmlToPdfUrlToPdfRequest: + properties: + fileName: + example: test.pdf + type: string + inlinePdf: + example: true + type: boolean + options: + $ref: "#/components/schemas/WkHtmlToPdfAdvancedOptions" + url: + example: https://www.github.com + format: url + type: string + required: + - url + type: object + securitySchemes: + HeaderApiKey: + in: header + name: Authorization + type: apiKey + QueryApiKey: + in: query + name: apikey + type: apiKey diff --git a/src/main/resources/apicurio.local.registry.1.3.2.Final.yaml b/src/main/resources/apicurio.local.registry.1.3.2.Final.yaml new file mode 100644 index 0000000000000000000000000000000000000000..20657895455203d746ae8c8136c6755811328dd0 --- /dev/null +++ b/src/main/resources/apicurio.local.registry.1.3.2.Final.yaml @@ -0,0 +1,2124 @@ +openapi: 3.0.2 +servers: + - url: http://apicurio.local +info: + contact: + email: apicurio@lists.jboss.org + name: Apicurio + url: https://github.com/apicurio/apicurio-registry + description: | + Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. + + The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. + + The supported artifact types include: + - Apache Avro schema + - AsyncAPI specification + - Google protocol buffers (schema and file descriptor) + - GraphQL schema + - JSON Schema + - Kafka Connect schema + - OpenAPI specification + - Web Services Description Language + - XML Schema Definition + + + **Note**: The Apicurio Registry REST API is available from `http://MY-REGISTRY-URL/api`. You must prefix all API operation paths with `/api`, for example, `api/ids/{globalId}`. + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + title: Apicurio Registry API + version: 1.3.2.Final + x-apisguru-categories: + - developer_tools + x-origin: + - format: openapi + url: https://raw.githubusercontent.com/Apicurio/apicurio-registry/master/app/src/main/resources-unfiltered/META-INF/resources/api-specifications/registry/v1/openapi.json + version: "3.0" + x-preferred: false + x-providerName: apicurio.local + x-serviceName: registry +tags: + - description: |- + The primary way to interact with the Apicurio Registry API is to add, update, + or delete artifacts. This section includes all of these primary operations. + name: Artifacts + - description: |- + Sometimes the metadata for an artifact is important. For example, metadata includes + when the artifact was created, last updated, and so on. This section contains + operations to access (and in some cases change) an artifact's metadata. + name: Metadata + - description: |- + Whenever an artifact's content is updated, the old versions of the artifact's content + are not lost. All versions can be listed and accessed if necessary. This section + describes the operations used to list and access all versions of an artifact's content + and metadata. + name: Versions + - description: |- + Rules can be configured on a per-artifact basis, allowing for different approaches + to content evolution for each artifact. These rules will override any global rules + that have been configured. This section contains the operations used to manage a + single artifact's rules. + name: Artifact rules + - description: |- + Global rules can be configured in the registry to govern how artifact content can + evolve over time (as artifact content is **updated**). Global rules will be applied + whenever an artifact is added to the registry, and also whenever an artifact's + content is updated (only if that artifact doesn't have its own specific rules + configured). This section describes the operations used to manage the global rules. + name: Global rules + - description: "The search API is used to browse or find artifacts in the registry. This section describes the operations for searching for artifacts and versions. " + name: Search +paths: + /artifacts: + get: + description: |- + Returns a list of IDs of all artifacts in the registry as a flat list. Typically the + server is configured to limit the number of artifact IDs returned when a large number + of artifacts exist. In this case, the result of this call may be non-deterministic. The + default limit is typically 1000 artifacts. + operationId: listArtifacts + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: |- + On a successful response, returns an array of artifact IDs - one for each artifact + in the registry. + "500": + $ref: "#/components/responses/ServerError" + summary: List all artifact IDs + tags: + - Artifacts + post: + description: | + Creates a new artifact by posting the artifact content. The body of the request should + be the raw content of the artifact. This is typically in JSON format for *most* of the + supported types, but may be in another format for a few (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the + following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or include a hint in the request's `Content-Type`. For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + An artifact is created using the content provided in the body of the request. This + content is created under a unique artifact ID that can be provided in the request + using the `X-Registry-ArtifactId` request header. If not provided in the request, + the server generates a unique ID for the artifact. It is typically recommended + that callers provide the ID, because this is typically a meaningful identifier, + and for most use cases should be supplied by the caller. + + If an artifact with the provided artifact ID already exists, the default behavior + is for the server to reject the content with a 409 error. However, the caller can + supply the `ifExists` query parameter to alter this default behavior. The `ifExists` + query parameter can have one of the following values: + + * `FAIL` (*default*) - server rejects the content with a 409 error + * `UPDATE` - server updates the existing artifact and returns the new metadata + * `RETURN` - server does not create or add content to the server, but instead + returns the metadata for the existing artifact + * `RETURN_OR_UPDATE` - server returns an existing **version** that matches the + provided content if such a version exists, otherwise a new version is created + + This operation may fail for one of the following reasons: + + * An invalid `ArtifactType` was indicated (HTTP error `400`) + * No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`) + * Provided content (request body) was empty (HTTP error `400`) + * An artifact with the provided ID already exists (HTTP error `409`) + * The content violates one of the configured global rules (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: createArtifact + parameters: + - description: |- + Specifies the type of the artifact being added. Possible values include: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + - description: A client-provided, globally unique identifier for the new artifact. + in: header + name: X-Registry-ArtifactId + schema: + type: string + - description: Set this option to instruct the server on what to do if the artifact already exists. + in: query + name: ifExists + schema: + enum: + - FAIL + - UPDATE + - RETURN + - RETURN_OR_UPDATE + type: string + requestBody: + content: + "*/*": + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: | + The content of the artifact being created. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: Artifact was successfully created. + "400": + $ref: "#/components/responses/BadRequest" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Create artifact + tags: + - Artifacts + x-codegen-async: true + summary: Manage the collection of artifacts in the registry. + "/artifacts/{artifactId}": + delete: + description: |- + Deletes an artifact completely, resulting in all versions of the artifact also being + deleted. This may fail for one of the following reasons: + + * No artifact with the `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifact + responses: + "204": + description: Returned when the artifact was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact + tags: + - Artifacts + get: + description: | + Returns the latest version of the artifact in its raw form. The `Content-Type` of the + response depends on the artifact type. In most cases, this is `application/json`, but + for some types it may be different (for example, `PROTOBUF`). + + This operation may fail for one of the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getLatestArtifact + responses: + "200": + content: + application/graphql: {} + application/json: + examples: + OpenAPI: + value: + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.0 + openapi: 3.0.2 + application/x-protobuf: + examples: + Protobuf Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + application/x-protobuffer: + examples: + Protobuffer Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + description: The most recent version of the artifact. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get latest artifact + tags: + - Artifacts + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: |- + Updates an artifact by uploading new content. The body of the request should + be the raw content of the artifact. This is typically in JSON format for *most* + of the supported types, but may be in another format for a few (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the + following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or include a hint in the request's `Content-Type`. For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + The update could fail for a number of reasons including: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with the `artifactId` exists (HTTP error `404`) + * The new content violates one of the rules configured for the artifact (HTTP error `409`) + * The provided artifact type is not recognized (HTTP error `404`) + * A server error occurred (HTTP error `500`) + + When successful, this creates a new version of the artifact, making it the most recent + (and therefore official) version of the artifact. + operationId: updateArtifact + parameters: + - description: |- + Specifies the type of the artifact being added. Possible values include: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + required: false + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + requestBody: + content: + "*/*": + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: | + The new content of the artifact being updated. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: When successful, returns the updated artifact metadata. + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact + tags: + - Artifacts + x-codegen-async: true + summary: Manage a single artifact. + "/artifacts/{artifactId}/meta": + get: + description: |- + Gets the metadata for an artifact in the registry. The returned metadata includes + both generated (read-only) and editable metadata (such as name and description). + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactMetaData + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: The artifact's metadata. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact metadata + tags: + - Metadata + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + post: + description: | + Gets the metadata for an artifact that matches the raw content. Searches the registry + for a version of the given artifact matching the content provided in the body of the + POST. + + This operation can fail for the following reasons: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with the `artifactId` exists (HTTP error `404`) + * No artifact version matching the provided content exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactMetaDataByContent + requestBody: + content: + application/json: + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: The content of an artifact version. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: The metadata of the artifact version matching the provided content. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact metadata by content + tags: + - Metadata + put: + description: |- + Updates the editable parts of the artifact's metadata. Not all metadata fields can + be updated. For example, `createdOn` and `createdBy` are both read-only properties. + + This operation can fail for the following reasons: + + * No artifact with the `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactMetaData + requestBody: + content: + "*/*": + schema: + $ref: "#/components/schemas/EditableMetaData" + description: Updated artifact metadata. + required: true + responses: + "204": + description: The artifact's metadata was updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact metadata + tags: + - Metadata + summary: Manage the metadata of a single artifact. + "/artifacts/{artifactId}/rules": + delete: + description: |- + Deletes all of the rules configured for the artifact. After this is done, the global + rules apply to the artifact again. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifactRules + responses: + "204": + description: The rules were successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact rules + tags: + - Artifact rules + get: + description: |- + Returns a list of all rules configured for the artifact. The set of rules determines + how the content of an artifact can evolve over time. If no rules are configured for + an artifact, the set of globally configured rules are used. If no global rules + are defined, there are no restrictions on content evolution. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: listArtifactRules + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/RuleType" + type: array + description: Returns the names of the rules configured for the artifact. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: List artifact rules + tags: + - Artifact rules + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + post: + description: |- + Adds a rule to the list of rules that get applied to the artifact when adding new + versions. All configured rules must pass to successfully add a new artifact version. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * Rule (named in the request body) is unknown (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: createArtifactRule + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "204": + description: The rule was added. + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Create artifact rule + tags: + - Artifact rules + summary: Manage the rules for a single artifact. + "/artifacts/{artifactId}/rules/{rule}": + delete: + description: |- + Deletes a rule from the artifact. This results in the rule no longer applying for + this artifact. If this is the only rule configured for the artifact, this is the + same as deleting **all** rules, and the globally configured rules now apply to + this artifact. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No rule with this name/type is configured for this artifact (HTTP error `404`) + * Invalid rule type (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifactRule + responses: + "204": + description: The rule was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact rule + tags: + - Artifact rules + get: + description: |- + Returns information about a single rule configured for an artifact. This is useful + when you want to know what the current configuration settings are for a specific rule. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No rule with this name/type is configured for this artifact (HTTP error `404`) + * Invalid rule type (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactRuleConfig + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: Information about a rule. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact rule configuration + tags: + - Artifact rules + parameters: + - description: The unique name/type of a rule. + in: path + name: rule + required: true + schema: + enum: + - VALIDITY + - COMPATIBILITY + type: string + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the configuration of a single rule for the artifact. The configuration data + is specific to each rule type, so the configuration of the `COMPATIBILITY` rule + is in a different format from the configuration of the `VALIDITY` rule. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No rule with this name/type is configured for this artifact (HTTP error `404`) + * Invalid rule type (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactRuleConfig + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: Rule configuration was updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact rule configuration + tags: + - Artifact rules + summary: Manage the configuration of a single artifact rule. + "/artifacts/{artifactId}/state": + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the state of the artifact. For example, you can use this to mark the latest + version of an artifact as `DEPRECATED`. The operation changes the state of the latest + version of the artifact. If multiple versions exist, only the most recent is changed. + + The following state changes are supported: + + * Enabled -> Disabled + * Enabled -> Deprecated + * Enabled -> Deleted + * Disabled -> Enabled + * Disabled -> Deleted + * Disabled -> Deprecated + * Deprecated -> Deleted + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * Artifact cannot transition to the given state (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactState + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateState" + required: true + responses: + "204": + description: Returned when the operation was successful. + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact state + tags: + - Artifacts + summary: Manage the state of an artifact. + "/artifacts/{artifactId}/test": + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: |- + Tests whether an update to the artifact's content *would* succeed for the provided content. + Ultimately, this applies any rules configured for the artifact against the given content + to determine whether the rules would pass or fail, but without actually updating the artifact + content. + + The body of the request should be the raw content of the artifact. This is typically in + JSON format for *most* of the supported types, but may be in another format for a few + (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can explicitly specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or by including a hint in the request's `Content-Type`. For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + The update could fail for a number of reasons including: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with the `artifactId` exists (HTTP error `404`) + * The new content violates one of the rules configured for the artifact (HTTP error `409`) + * The provided artifact type is not recognized (HTTP error `404`) + * A server error occurred (HTTP error `500`) + + When successful, this operation simply returns a *No Content* response. + operationId: testUpdateArtifact + parameters: + - description: |- + This header parameter can be used to indicate the type of the artifact being added. Possible values include: + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + requestBody: + content: + "*/*": {} + description: | + The content of the artifact being tested. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "204": + description: |- + When successful, returns "No Content" to indicate that the rules passed, and the + content was not updated. + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Test update artifact + tags: + - Artifact rules + summary: Test whether content would pass update rules. + "/artifacts/{artifactId}/versions": + get: + description: | + Returns a list of all version numbers for the artifact. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: listArtifactVersions + responses: + "200": + content: + application/json: + examples: + All Versions: + value: + - 5 + - 6 + - 10 + - 103 + schema: + items: + format: int64 + type: integer + type: array + description: List of all artifact versions (just the version IDs). + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: List artifact versions + tags: + - Versions + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + post: + description: | + Creates a new version of the artifact by uploading new content. The configured rules for + the artifact are applied, and if they all pass, the new content is added as the most recent + version of the artifact. If any of the rules fail, an error is returned. + + The body of the request should be the raw content of the new artifact version. This + is typically in JSON format for *most* of the supported types, but may be in another + format for a few (for example, `PROTOBUF`). + + The registry attempts to figure out what kind of artifact is being added from the + following supported list: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + + Alternatively, you can explicitly specify the artifact type using the `X-Registry-ArtifactType` + HTTP request header, or by including a hint in the request's `Content-Type`. + + For example: + + ``` + Content-Type: application/json; artifactType=AVRO + ``` + + This operation can fail for the following reasons: + + * Provided content (request body) was empty (HTTP error `400`) + * No artifact with this `artifactId` exists (HTTP error `404`) + * The new content violates one of the rules configured for the artifact (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: createArtifactVersion + parameters: + - description: |- + This header parameter can be used to indicate the type of the artifact being added. Possible values include: + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + in: header + name: X-Registry-ArtifactType + schema: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + type: string + requestBody: + content: + "*/*": + examples: + OpenAPI Example: + value: + components: + schemas: + Widget: + description: A sample data type. + example: + property-1: value1 + property-2: true + properties: + property-1: + type: string + property-2: + type: boolean + title: Root Type for Widget + type: object + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.7 + openapi: 3.0.2 + paths: + /widgets: + get: + responses: + "200": + content: + application/json: + schema: + items: + type: string + type: array + description: All widgets + summary: Get widgets + description: | + The content of the artifact version being created. This is often, but not always, JSON data + representing one of the supported artifact types: + + * Avro (`AVRO`) + * Protobuf (`PROTOBUF`) + * Protobuf File Descriptor (`PROTOBUF_FD`) + * JSON Schema (`JSON`) + * Kafka Connect (`KCONNECT`) + * OpenAPI (`OPENAPI`) + * AsyncAPI (`ASYNCAPI`) + * GraphQL (`GRAPHQL`) + * Web Services Description Language (`WSDL`) + * XML Schema (`XSD`) + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VersionMetaData" + description: The artifact version was successfully created. + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Create artifact version + tags: + - Versions + x-codegen-async: true + summary: Manage all the versions of an artifact in the registry. + "/artifacts/{artifactId}/versions/{version}": + get: + description: | + Retrieves a single version of the artifact content. Both the `artifactId` and the + unique `version` number must be provided. The `Content-Type` of the response depends + on the artifact type. In most cases, this is `application/json`, but for some types + it may be different (for example, `PROTOBUF`). + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactVersion + responses: + "200": + content: + application/graphql: {} + application/json: + examples: + OpenAPI: + value: + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.0 + openapi: 3.0.2 + application/x-protobuf: + examples: + Protobuf Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + application/x-protobuffer: + examples: + Protobuffer Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + description: The content of the artifact version. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact version + tags: + - Versions + parameters: + - description: The unique identifier of a specific version of the artifact content. + in: path + name: version + required: true + schema: + type: integer + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + summary: Manage a single version of a single artifact in the registry. + "/artifacts/{artifactId}/versions/{version}/meta": + delete: + description: | + Deletes the user-editable metadata properties of the artifact version. Any properties + that are not user-editable are preserved. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: deleteArtifactVersionMetaData + responses: + "204": + description: The artifact version's user-editable metadata was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete artifact version metadata + tags: + - Metadata + get: + description: | + Retrieves the metadata for a single version of the artifact. The version metadata is + a subset of the artifact metadata and only includes the metadata that is specific to + the version (for example, this doesn't include `modifiedOn`). + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactVersionMetaData + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VersionMetaData" + description: The artifact version's metadata. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get artifact version metadata + tags: + - Metadata + parameters: + - description: The unique identifier of a specific version of the artifact content. + in: path + name: version + required: true + schema: + type: integer + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the user-editable portion of the artifact version's metadata. Only some of + the metadata fields are editable by the user. For example, `description` is editable, + but `createdOn` is not. + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactVersionMetaData + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/EditableMetaData" + required: true + responses: + "204": + description: The artifact version's metadata was successfully updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact version metadata + tags: + - Metadata + summary: Manage the metadata for a single version of an artifact in the registry. + "/artifacts/{artifactId}/versions/{version}/state": + parameters: + - description: The unique identifier of a specific version of the artifact content. + in: path + name: version + required: true + schema: + type: integer + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + put: + description: | + Updates the state of a specific version of an artifact. For example, you can use + this operation to disable a specific version. + + The following state changes are supported: + + * Enabled -> Disabled + * Enabled -> Deprecated + * Enabled -> Deleted + * Disabled -> Enabled + * Disabled -> Deleted + * Disabled -> Deprecated + * Deprecated -> Deleted + + This operation can fail for the following reasons: + + * No artifact with this `artifactId` exists (HTTP error `404`) + * No version with this `version` exists (HTTP error `404`) + * Artifact version cannot transition to the given state (HTTP error `400`) + * A server error occurred (HTTP error `500`) + operationId: updateArtifactVersionState + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateState" + required: true + responses: + "204": + description: Returned when the update was successful. + "400": + $ref: "#/components/responses/BadRequest" + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update artifact version state + tags: + - Versions + summary: Manage the state of a specific artifact version. + "/ids/{globalId}": + get: + description: | + Gets the content for an artifact version in the registry using its globally unique + identifier. + + This operation may fail for one of the following reasons: + + * No artifact version with this `globalId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactByGlobalId + responses: + "200": + content: + application/json: + examples: + OpenAPI Example: + value: + info: + description: An example API design using OpenAPI. + title: Empty API + version: 1.0.0 + openapi: 3.0.2 + application/x-protobuf: + examples: + Protobuf Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + application/x-protobuffer: + examples: + Protobuffer Example: + value: |- + message SearchResponse { + repeated Result result = 1; + } + + message Result { + required string url = 1; + optional string title = 2; + repeated string snippets = 3; + } + description: The content of the artifact version. + summary: Get artifact by global ID + tags: + - Artifacts + parameters: + - description: Global identifier for an artifact version. + in: path + name: globalId + required: true + schema: + format: int64 + type: integer + summary: Access artifact content utilizing an artifact version's globally unique identifier. + "/ids/{globalId}/meta": + get: + description: | + Gets the metadata for an artifact version in the registry using its globally unique + identifier. The returned metadata includes both generated (read-only) and editable + metadata (such as name and description). + + This operation may fail for one of the following reasons: + + * No artifact version with this `globalId` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getArtifactMetaDataByGlobalId + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactMetaData" + description: The artifact's metadata. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get global artifact metadata + tags: + - Metadata + parameters: + - description: Global identifier for an artifact version. + in: path + name: globalId + required: true + schema: + format: int64 + type: integer + summary: Access an artifact verison's metadata using its globally unique identifier. + /rules: + delete: + description: | + Deletes all globally configured rules. + + This operation can fail for the following reasons: + + * A server error occurred (HTTP error `500`) + operationId: deleteAllGlobalRules + responses: + "204": + description: All global rules have been removed successfully. + "500": + $ref: "#/components/responses/ServerError" + summary: Delete all global rules + tags: + - Global rules + get: + description: | + Gets a list of all the currently configured global rules (if any). + + This operation can fail for the following reasons: + + * A server error occurred (HTTP error `500`) + operationId: listGlobalRules + responses: + "200": + content: + application/json: + schema: + items: + $ref: "#/components/schemas/RuleType" + type: array + description: The list of names of the globally configured rules. + "500": + $ref: "#/components/responses/ServerError" + summary: List global rules + tags: + - Global rules + post: + description: | + Adds a rule to the list of globally configured rules. + + This operation can fail for the following reasons: + + * The rule type is unknown (HTTP error `400`) + * The rule already exists (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: createGlobalRule + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "204": + description: The global rule was added. + "400": + $ref: "#/components/responses/BadRequest" + "409": + $ref: "#/components/responses/Conflict" + "500": + $ref: "#/components/responses/ServerError" + summary: Create global rule + tags: + - Global rules + summary: Manage the global rules that apply to all artifacts if not otherwise configured. + "/rules/{rule}": + delete: + description: | + Deletes a single global rule. If this is the only rule configured, this is the same + as deleting **all** rules. + + This operation can fail for the following reasons: + + * Invalid rule name/type (HTTP error `400`) + * No rule with name/type `rule` exists (HTTP error `404`) + * Rule cannot be deleted (HTTP error `409`) + * A server error occurred (HTTP error `500`) + operationId: deleteGlobalRule + responses: + "204": + description: The global rule was successfully deleted. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Delete global rule + tags: + - Global rules + get: + description: | + Returns information about the named globally configured rule. + + This operation can fail for the following reasons: + + * Invalid rule name/type (HTTP error `400`) + * No rule with name/type `rule` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: getGlobalRuleConfig + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: The global rule's configuration. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Get global rule configuration + tags: + - Global rules + parameters: + - description: The unique name/type of a rule. + in: path + name: rule + required: true + schema: + enum: + - VALIDITY + - COMPATIBILITY + type: string + put: + description: | + Updates the configuration for a globally configured rule. + + This operation can fail for the following reasons: + + * Invalid rule name/type (HTTP error `400`) + * No rule with name/type `rule` exists (HTTP error `404`) + * A server error occurred (HTTP error `500`) + operationId: updateGlobalRuleConfig + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Rule" + description: The global rule's configuration was successfully updated. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Update global rule configuration + tags: + - Global rules + summary: Manage the configuration of a single global artifact rule. + /search/artifacts: + get: + description: | + Returns a paginated list of all artifacts that match the provided search criteria. + operationId: searchArtifacts + parameters: + - description: The text to search. + in: query + name: search + schema: + type: string + - description: The number of artifacts to skip before starting to collect the result set. + in: query + name: offset + required: true + schema: + default: 0 + type: integer + - description: The number of artifacts to return. + in: query + name: limit + required: true + schema: + default: 20 + type: integer + - description: What fields to search. + in: query + name: over + required: false + schema: + enum: + - everything + - name + - description + - labels + type: string + - description: Sort order, ascending or descending. + in: query + name: order + required: false + schema: + enum: + - asc + - desc + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactSearchResults" + description: |- + On a successful response, returns a result set of artifacts - one for each artifact + in the registry that matches the criteria. + "500": + $ref: "#/components/responses/ServerError" + summary: Search for artifacts + tags: + - Search + - Artifacts + summary: Search for content in the registry; artifacts in particular. + "/search/artifacts/{artifactId}/versions": + get: + description: |- + Searches for versions of a specific artifact. This is typically used to get a listing + of all versions of an artifact (for example, in a user interface). + operationId: searchVersions + parameters: + - description: The number of versions to skip before starting to collect the result set. + in: query + name: offset + required: true + schema: + type: integer + - description: The number of versions to return. + in: query + name: limit + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/VersionSearchResults" + description: |- + On a successful response, returns a result set of versions - one for each version + of the artifact. + "404": + $ref: "#/components/responses/NotFound" + "500": + $ref: "#/components/responses/ServerError" + summary: Search artifact versions + tags: + - Search + - Versions + parameters: + - description: The artifact ID. Can be a string (client-provided) or integer (server-generated) representing the unique artifact identifier. + in: path + name: artifactId + required: true + schema: + type: string + summary: Search for all versions of an artifact. +components: + responses: + BadRequest: + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + description: Common response for all operations that can return a `400` error. + Conflict: + content: + application/json: + examples: + ConflictExample: + value: + error_code: 409 + message: The artifact content was invalid. + schema: + $ref: "#/components/schemas/Error" + description: Common response used when an input conflicts with existing data. + NotFound: + content: + application/json: + examples: + NotFoundExample: + value: + error_code: 404 + message: No artifact with id 'Topic-1/Inbound' could be found. + schema: + $ref: "#/components/schemas/Error" + description: Common response for all operations that can return a `404` error. + ServerError: + content: + application/json: + examples: + ErrorExample: + value: + error_code: 500 + message: Lost connection to the database. + schema: + $ref: "#/components/schemas/Error" + description: Common response for all operations that can fail with an unexpected server error. + schemas: + ArtifactMetaData: + example: + createdBy: user1 + createdOn: 2019-03-22T12:51:19Z + description: Description of the artifact + globalId: 12984719247 + id: Procurement-Invoice + labels: + - label-1 + - label-2 + modifiedBy: user2 + modifiedOn: 2019-07-19T15:09:00Z + name: Artifact Name + properties: + custom-1: foo + custom-2: bar + type: AVRO + version: 18 + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + globalId: + format: int64 + type: integer + id: + type: string + labels: + items: + type: string + type: array + modifiedBy: + type: string + modifiedOn: + format: date-time + type: string + name: + type: string + properties: + $ref: "#/components/schemas/Properties" + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + version: + format: int64 + type: integer + required: + - id + - createdBy + - createdOn + - modifiedBy + - modifiedOn + - version + - type + - globalId + - state + title: Root Type for ArtifactMetaData + type: object + ArtifactSearchResults: + description: Describes the response received when searching for artifacts. + properties: + artifacts: + description: The artifacts that matched the search criteria. + items: + $ref: "#/components/schemas/SearchedArtifact" + type: array + count: + description: The total number of artifacts that matched the search criteria. + type: integer + required: + - count + - artifacts + type: object + ArtifactState: + description: | + Describes the state of an artifact or artifact version. The following states + are possible: + + * ENABLED + * DISABLED + * DEPRECATED + enum: + - ENABLED + - DISABLED + - DEPRECATED + - DELETED + type: string + x-codegen-package: io.apicurio.registry.types + ArtifactType: + enum: + - AVRO + - PROTOBUF + - PROTOBUF_FD + - JSON + - OPENAPI + - ASYNCAPI + - GRAPHQL + - KCONNECT + - WSDL + - XSD + - XML + example: AVRO + type: string + x-codegen-package: io.apicurio.registry.types + EditableMetaData: + example: + description: The description of the artifact. + labels: + - regional + - global + name: Artifact Name + properties: + custom-1: foo + custom-2: bar + properties: + description: + type: string + labels: + items: + type: string + type: array + name: + type: string + properties: + $ref: "#/components/schemas/Properties" + title: Root Type for EditableArtifactMetaData + type: object + Error: + description: |- + All error responses, whether `4xx` or `5xx` will include one of these as the response + body. + example: + error_code: 500 + message: An error occurred somewhere. + properties: + detail: + description: Full details about the error. This might contain a server stack trace, for example. + type: string + error_code: + description: The server-side error code. + format: int32 + type: integer + message: + description: The short error message. + type: string + title: Root Type for Error + type: object + Properties: + additionalProperties: + type: string + description: User-defined name-value pairs. Name and value must be strings. + type: object + Rule: + example: + config: FULL + type: VALIDITY + properties: + config: + type: string + type: + $ref: "#/components/schemas/RuleType" + required: + - config + title: Root Type for Rule + type: object + RuleType: + enum: + - VALIDITY + - COMPATIBILITY + example: VALIDITY + type: string + x-codegen-package: io.apicurio.registry.types + SearchOver: + enum: + - everything + - name + - description + - labels + type: string + SearchedArtifact: + description: Models a single artifact from the result set returned when searching for artifacts. + example: + createdBy: user1 + createdOn: 2019-03-22T12:51:19Z + description: Description of the artifact + id: Procurement-Invoice + labels: + - current + - internal + name: Artifact Name + state: ENABLED + type: AVRO + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + id: + type: string + labels: + items: + type: string + type: array + modifiedBy: + type: string + modifiedOn: + format: date-time + type: string + name: + type: string + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + required: + - createdBy + - createdOn + - id + - type + - state + type: object + SearchedVersion: + description: Models a single artifact from the result set returned when searching for artifacts. + example: + createdBy: user1 + createdOn: 2019-03-22T12:51:19Z + description: Description of the artifact version + globalId: 3849759283547 + labels: + - current + - internal + name: Artifact Version Name + state: ENABLED + type: AVRO + version: 17 + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + globalId: + format: int64 + type: integer + labels: + items: + type: string + type: array + name: + type: string + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + version: + format: int32 + type: integer + required: + - createdBy + - createdOn + - type + - state + - globalId + - version + type: object + SortOrder: + enum: + - asc + - desc + type: string + UpdateState: + example: + state: DISABLED + properties: + state: + $ref: "#/components/schemas/ArtifactState" + required: + - state + title: Root Type for UpdateState + type: object + VersionMetaData: + example: + createdBy: user1 + createdOn: 2019-05-17T12:00:00Z + description: The description of the artifact + globalId: 183282932983 + id: my-artifact-id + labels: + - label-1 + - label-2 + name: Artifact Name + properties: + custom-1: foo + custom-2: bar + type: PROTOBUF + version: 1221432 + properties: + createdBy: + type: string + createdOn: + format: date-time + type: string + description: + type: string + globalId: + format: int64 + type: integer + id: + description: The artifact id. + type: string + labels: + items: + type: string + type: array + name: + type: string + properties: + $ref: "#/components/schemas/Properties" + state: + $ref: "#/components/schemas/ArtifactState" + type: + $ref: "#/components/schemas/ArtifactType" + version: + format: int64 + type: integer + required: + - createdOn + - createdBy + - version + - type + - globalId + - id + title: Root Type for ArtifactVersionMetaData + type: object + VersionSearchResults: + description: Describes the response received when searching for artifacts. + properties: + count: + description: The total number of artifacts that matched the search criteria. + type: integer + versions: + items: + $ref: "#/components/schemas/SearchedVersion" + type: array + required: + - count + - versions + type: object diff --git a/src/main/resources/apidapp.com.2019-02-14T164701Z.yaml b/src/main/resources/apidapp.com.2019-02-14T164701Z.yaml new file mode 100644 index 0000000000000000000000000000000000000000..98d6ba6fbc8fb3ed219d38428ebdeefee40fc623 --- /dev/null +++ b/src/main/resources/apidapp.com.2019-02-14T164701Z.yaml @@ -0,0 +1,1044 @@ +openapi: 3.0.0 +servers: + - url: https://ethereum.apidapp.com/1 +info: + contact: + x-twitter: api_dapp + title: ApiDapp + version: 2019-02-14T16:47:01Z + x-apisguru-categories: + - financial + x-logo: + url: https://i2.wp.com/apidapp.com/wp-content/uploads/2019/03/cropped-ApiDappIcon.png?fit=180%2C180&ssl=1 + x-origin: + - format: openapi + url: https://apidapp.s3.amazonaws.com/ApiDapp-Start-swagger-7/ApiDapp-Start-swagger+(7).json + version: "3.0" + x-providerName: apidapp.com +paths: + /: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + x-amazon-apigateway-any-method: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /account: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create new account + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + "/account/{id}": + get: + description: Get account balance + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /block: + get: + description: Access detailed block information + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/block/{id}": + get: + description: Get information about particular block + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/block/{id}/transaction": + get: + description: Get transaction count within block + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/block/{id}/transaction/{index}": + get: + description: Get information about particular transaction within block + parameters: + - in: path + name: index + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + - description: Automatically added + in: path + name: index + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /blockchain: + get: + description: Get a list of supported blockchains + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/blockchain/{id}": + get: + description: Get information about blockchain woth given id + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /contract: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create a new smart contract + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/contract/{id}": + get: + description: Get contract balance + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Call the contract + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + /echo: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + x-amazon-apigateway-any-method: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /erc20: + get: + description: Get token information such as name, total amount in circulation, etc + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/erc20/{address}": + get: + description: Get information amout token balance in the account + parameters: + - in: path + name: address + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + parameters: + - description: Automatically added + in: path + name: address + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Transfer tokens to another account + parameters: + - in: path + name: address + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /key: + get: + parameters: + - in: query + name: token + required: false + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/key/{key}": + delete: + parameters: + - in: path + name: key + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + parameters: + - description: Automatically added + in: path + name: key + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /transaction: + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create a new transaction. Transfer Ether between accounts + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + "/transaction/{hash}": + get: + description: Get information about transaction by the transaction hash value + parameters: + - in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/transaction/{hash}/receipt": + get: + description: Get receipt detail information + parameters: + - in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + security: + - Key2: [] + options: + parameters: + - description: Automatically added + in: path + name: hash + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /version: + get: + description: Get API version info + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Origin: + schema: + type: string + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + /wallet: + get: + description: Get current account balance + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Create personal wallet + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + /wallet/account: + get: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/wallet/account/{id}": + get: + description: Get account balance + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + "/wallet/account/{id}/contract": + post: + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/wallet/account/{id}/erc20": + post: + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + "/wallet/account/{id}/pay": + options: + parameters: + - description: Automatically added + in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response + headers: + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + post: + description: Send payment from the account held within the wallet + parameters: + - in: path + name: id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Empty" + description: 200 response +components: + schemas: + Empty: + title: Empty Schema + type: object + securitySchemes: + Key2: + in: header + name: X-Api-Key + type: apiKey + x-amazon-apigateway-authtype: custom diff --git a/src/test/java/openapi/OpenAPIMain_test.java b/src/test/java/openapi/OpenAPIMain_test.java index 8b6f670628160fd5c9eb2e4398382dbeb06c99c8..8da445513e3872841529b7a50e8a28cb4263004d 100644 --- a/src/test/java/openapi/OpenAPIMain_test.java +++ b/src/test/java/openapi/OpenAPIMain_test.java @@ -73,6 +73,8 @@ public class OpenAPIMain_test { api3 = OpenAPIObject.composeOpenAPI(openApi); // check, if the composed openAPI object is valid + //results = OpenApi3Validator.instance().validate(api3); + //System.out.println(results.isValid()); //System.out.println(api.toNode().equals(api3.toNode())); @@ -91,6 +93,7 @@ public class OpenAPIMain_test { // if the Jsons are equivalent, there is no reason to to the text comparison // if there is a difference, a text comparison might look better than just the diff. if (diff.size() != 0) { + //System.out.println(diff.toPrettyString()); Assertions.assertEquals(actualNode.toPrettyString(), expectedNode.toPrettyString(), "JSONs for " + path + " are different:\n" + diff.toPrettyString()); } }