Last active
March 26, 2019 20:40
-
-
Save anweiss/c9221445d4d519b63df9323f097fac28 to your computer and use it in GitHub Desktop.
Common OSCAL information exchange API prototyping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.1", | |
"info": { | |
"title": "OSCAL Common Information Exchange API", | |
"description": "Prototype of a common information exchange API for OSCAL", | |
"termsOfService": "", | |
"contact": { | |
"email": "oscal-dev@nist.gov" | |
}, | |
"license": { | |
"name": "CCO 1.O Universal Public Domain", | |
"url": "https://github.com/usnistgov/OSCAL/blob/master/LICENSE.md" | |
}, | |
"version": "0.1.0" | |
}, | |
"externalDocs": { | |
"description": "OSCAL Website", | |
"url": "https://pages.nist.gov/OSCAL" | |
}, | |
"tags": [ | |
{ | |
"name": "catalog", | |
"description": "Catalog information" | |
} | |
], | |
"paths": { | |
"/catalogs": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve a list of catalogs", | |
"operationId": "getCatalogs", | |
"responses": { | |
"200": { | |
"description": "Catalogs found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/CatalogListing" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/CatalogListing" | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "No catalogs found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve a catalog by id", | |
"operationId": "getCatalogById", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
}, | |
{ | |
"in": "query", | |
"name": "condensed", | |
"schema": { | |
"type": "boolean" | |
}, | |
"description": "Whether or not to condense the catalog output" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Catalog with given id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"$ref": "#/components/schemas/Catalog" | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Catalog" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Catalog with given id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/metadata": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve metadata for a given catalog id", | |
"operationId": "getCatalogMetadataByCatalogId", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Catalog metadata with given catalog id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"$ref": "#/components/schemas/Metadata" | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Metadata" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Catalog metadata with given catalog id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/sections": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve sections for a given catalog id", | |
"operationId": "getCatalogSectionsByCatalogId", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Catalog sections with given catalog id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Section" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Section" | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Catalog sections with given catalog id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/sections/{sectionId}": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve section for a given section id", | |
"operationId": "getSectionById", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
}, | |
{ | |
"in": "path", | |
"name": "sectionId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Section id of the section to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Section with given section id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"$ref": "#/components/schemas/Section" | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Section" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Section with given catalog id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/groups": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve groups for a given catalog id", | |
"operationId": "getGroupsByCatalogId", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Groups with given catalog id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Group" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Group" | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Groups with given catalog id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/groups/{groupId}": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve group for a given group id", | |
"operationId": "getGroupById", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
}, | |
{ | |
"in": "path", | |
"name": "groupId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Group id of the group to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Group with given group id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"$ref": "#/components/schemas/Group" | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Group" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Group with given group id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/groups/{groupId}/controls": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve controls for a given group id", | |
"operationId": "getControlsByGroupid", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
}, | |
{ | |
"in": "path", | |
"name": "groupId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Group id of the group to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Controls with given group id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Controls with given group id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/controls": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve controls for a given catalog id", | |
"operationId": "getControlsByCatalogId", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Controls with given catalog id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Controls with given catalog id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/controls/{controlId}": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve control for a given control id", | |
"operationId": "getControlById", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
}, | |
{ | |
"in": "path", | |
"name": "controlId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Control id of the control to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Control with given control id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"$ref": "#/components/schemas/Control" | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Control with given control id not found", | |
"content": {} | |
} | |
} | |
} | |
}, | |
"/catalogs/{catalogId}/controls/{controlId}/subcontrols": { | |
"get": { | |
"tags": [ | |
"catalog" | |
], | |
"summary": "Retrieve subcontrols for a given control id", | |
"operationId": "getSubControlsById", | |
"parameters": [ | |
{ | |
"in": "path", | |
"name": "catalogId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Catalog id of the catalog to retrieve" | |
}, | |
{ | |
"in": "path", | |
"name": "controlId", | |
"schema": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"required": true, | |
"description": "Control id of the control to retrieve" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Subcontrols with given control id found", | |
"content": { | |
"application/xml": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Subcontrols with given control id not found", | |
"content": {} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"CatalogListing": { | |
"required": [ | |
"id", | |
"name", | |
"modelVersion" | |
], | |
"type": "object", | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"title": { | |
"type": "string" | |
}, | |
"modelVersion": { | |
"$ref": "#/components/schemas/ModelVersion" | |
} | |
}, | |
"xml": { | |
"name": "catalog" | |
} | |
}, | |
"Catalog": { | |
"type": "object", | |
"required": [ | |
"id", | |
"model-version", | |
"title" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"modelVersion": { | |
"type": "string", | |
"xml": { | |
"name": "model-version", | |
"attribute": true | |
} | |
}, | |
"title": { | |
"$ref": "#/components/schemas/Title" | |
}, | |
"metadata": { | |
"$ref": "#/components/schemas/Metadata" | |
}, | |
"declarations": { | |
"$ref": "#/components/schemas/Declarations" | |
}, | |
"references": { | |
"$ref": "#/components/schemas/References" | |
}, | |
"sections": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Section" | |
} | |
}, | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Group" | |
} | |
}, | |
"controls": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
} | |
}, | |
"xml": { | |
"name": "catalog", | |
"namespace": "http://csrc.nist.gov/ns/oscal/1.0" | |
} | |
}, | |
"ModelVersion": { | |
"type": "string", | |
"xml": { | |
"name": "model-version", | |
"attribute": true | |
} | |
}, | |
"Metadata": { | |
"type": "object" | |
}, | |
"Declarations": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"href": { | |
"$ref": "#/components/schemas/Href" | |
} | |
} | |
} | |
] | |
}, | |
"References": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"links": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Link" | |
} | |
}, | |
"refs": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Ref" | |
} | |
} | |
} | |
}, | |
"Ref": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"citations": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Citation" | |
} | |
}, | |
"prose": { | |
"$ref": "#/components/schemas/Prose" | |
} | |
}, | |
"xml": { | |
"name": "ref" | |
} | |
}, | |
"Citation": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"href": { | |
"$ref": "#/components/schemas/Href" | |
} | |
}, | |
"xml": { | |
"name": "citation" | |
} | |
}, | |
"Href": { | |
"type": "string", | |
"format": "uri", | |
"xml": { | |
"attribute": true | |
} | |
}, | |
"Section": { | |
"type": "object", | |
"required": [ | |
"title" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
}, | |
"title": { | |
"$ref": "#/components/schemas/Title" | |
}, | |
"prose": { | |
"$ref": "#/components/schemas/Prose" | |
}, | |
"sections": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Section" | |
} | |
}, | |
"references": { | |
"$ref": "#/components/schemas/References" | |
} | |
}, | |
"xml": { | |
"name": "section" | |
} | |
}, | |
"Group": { | |
"type": "object", | |
"required": [ | |
"title" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
}, | |
"title": { | |
"$ref": "#/components/schemas/Title" | |
}, | |
"parameters": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Param" | |
} | |
}, | |
"props": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Prop" | |
} | |
}, | |
"parts": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Part" | |
} | |
}, | |
"groups": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Group" | |
} | |
}, | |
"controls": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Control" | |
} | |
}, | |
"references": { | |
"$ref": "#/components/schemas/References" | |
} | |
}, | |
"xml": { | |
"name": "group" | |
} | |
}, | |
"Control": { | |
"type": "object", | |
"required": [ | |
"id", | |
"title" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
}, | |
"title": { | |
"$ref": "#/components/schemas/Title" | |
}, | |
"parameters": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Param" | |
} | |
}, | |
"props": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Prop" | |
} | |
}, | |
"links": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Link" | |
} | |
}, | |
"parts": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Part" | |
} | |
}, | |
"subcontrols": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Subcontrol" | |
} | |
}, | |
"references": { | |
"$ref": "#/components/schemas/References" | |
} | |
}, | |
"xml": { | |
"name": "control" | |
} | |
}, | |
"Param": { | |
"type": "object", | |
"required": [ | |
"id" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
}, | |
"dependsOn": { | |
"$ref": "#/components/schemas/DependsOn" | |
}, | |
"label": { | |
"$ref": "#/components/schemas/Label" | |
}, | |
"descriptions": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Desc" | |
} | |
}, | |
"constraints": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Constraint" | |
} | |
}, | |
"guidance": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Guideline" | |
} | |
}, | |
"value": { | |
"$ref": "#/components/schemas/Value" | |
}, | |
"select": { | |
"$ref": "#/components/schemas/Select" | |
}, | |
"links": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Link" | |
} | |
} | |
}, | |
"xml": { | |
"name": "param" | |
} | |
}, | |
"DependsOn": { | |
"type": "string", | |
"xml": { | |
"name": "depends-on", | |
"attribute": true | |
} | |
}, | |
"Prop": { | |
"type": "object", | |
"required": [ | |
"class" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
} | |
}, | |
"xml": { | |
"name": "prop" | |
} | |
}, | |
"Part": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
}, | |
"title": { | |
"$ref": "#/components/schemas/Title" | |
}, | |
"props": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Prop" | |
} | |
}, | |
"parts": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Part" | |
} | |
}, | |
"links": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Link" | |
} | |
} | |
}, | |
"xml": { | |
"name": "part" | |
} | |
}, | |
"Link": { | |
"type": "object", | |
"properties": { | |
"href": { | |
"$ref": "#/components/schemas/Href" | |
}, | |
"rel": { | |
"$ref": "#/components/schemas/Rel" | |
} | |
}, | |
"xml": { | |
"name": "link" | |
} | |
}, | |
"Rel": { | |
"type": "string", | |
"xml": { | |
"attribute": true | |
} | |
}, | |
"Subcontrol": { | |
"type": "object", | |
"required": [ | |
"id", | |
"title" | |
], | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
}, | |
"class": { | |
"$ref": "#/components/schemas/Class" | |
}, | |
"title": { | |
"$ref": "#/components/schemas/Title" | |
}, | |
"parameters": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Param" | |
} | |
}, | |
"props": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Prop" | |
} | |
}, | |
"links": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Link" | |
} | |
}, | |
"parts": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Part" | |
} | |
}, | |
"references": { | |
"$ref": "#/components/schemas/References" | |
} | |
}, | |
"xml": { | |
"name": "subcontrol" | |
} | |
}, | |
"Prose": { | |
"type": "object" | |
}, | |
"Id": { | |
"type": "string", | |
"xml": { | |
"attribute": true | |
} | |
}, | |
"Class": { | |
"type": "string", | |
"xml": { | |
"attribute": true | |
} | |
}, | |
"Title": { | |
"type": "string" | |
}, | |
"Desc": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"$ref": "#/components/schemas/Id" | |
} | |
}, | |
"xml": { | |
"name": "desc" | |
} | |
}, | |
"Constraint": { | |
"type": "object", | |
"properties": { | |
"test": { | |
"$ref": "#/components/schemas/Test" | |
} | |
}, | |
"xml": { | |
"name": "constraint" | |
} | |
}, | |
"Test": { | |
"type": "string", | |
"xml": { | |
"attribute": true | |
} | |
}, | |
"Guideline": { | |
"type": "object", | |
"properties": { | |
"prose": { | |
"$ref": "#/components/schemas/Prose" | |
} | |
}, | |
"xml": { | |
"name": "guideline" | |
} | |
}, | |
"Value": { | |
"type": "string" | |
}, | |
"Select": { | |
"type": "object", | |
"properties": { | |
"howMany": { | |
"$ref": "#/components/schemas/HowMany" | |
}, | |
"alternatives": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/Choice" | |
} | |
} | |
} | |
}, | |
"HowMany": { | |
"type": "string", | |
"xml": { | |
"name": "how-many", | |
"attribute": true | |
} | |
}, | |
"Choice": { | |
"type": "string", | |
"xml": { | |
"name": "choice" | |
} | |
}, | |
"Label": { | |
"type": "string" | |
} | |
}, | |
"securitySchemes": { | |
"petstore_auth": { | |
"type": "oauth2", | |
"flows": { | |
"implicit": { | |
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog", | |
"scopes": { | |
"write:pets": "modify pets in your account", | |
"read:pets": "read your pets" | |
} | |
} | |
} | |
}, | |
"api_key": { | |
"type": "apiKey", | |
"name": "api_key", | |
"in": "header" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.1 | |
info: | |
title: OSCAL Common Information Exchange API | |
description: 'Prototype of a common information exchange API for OSCAL' | |
termsOfService: '' | |
contact: | |
email: oscal-dev@nist.gov | |
license: | |
name: CCO 1.O Universal Public Domain | |
url: https://github.com/usnistgov/OSCAL/blob/master/LICENSE.md | |
version: 0.1.0 | |
externalDocs: | |
description: OSCAL Website | |
url: https://pages.nist.gov/OSCAL | |
tags: | |
- name: catalog | |
description: Catalog information | |
paths: | |
/catalogs: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve a list of catalogs | |
operationId: getCatalogs | |
responses: | |
200: | |
description: Catalogs found | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/CatalogListing' | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/CatalogListing' | |
404: | |
description: No catalogs found | |
content: {} | |
/catalogs/{catalogId}: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve a catalog by id | |
operationId: getCatalogById | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
- in: query | |
name: condensed | |
schema: | |
type: boolean | |
description: Whether or not to condense the catalog output | |
responses: | |
200: | |
description: Catalog with given id found | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/Catalog' | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Catalog' | |
404: | |
description: Catalog with given id not found | |
content: {} | |
/catalogs/{catalogId}/metadata: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve metadata for a given catalog id | |
operationId: getCatalogMetadataByCatalogId | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
responses: | |
200: | |
description: Catalog metadata with given catalog id found | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/Metadata' | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Metadata' | |
404: | |
description: Catalog metadata with given catalog id not found | |
content: {} | |
/catalogs/{catalogId}/sections: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve sections for a given catalog id | |
operationId: getCatalogSectionsByCatalogId | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
responses: | |
200: | |
description: Catalog sections with given catalog id found | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Section' | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Section' | |
404: | |
description: Catalog sections with given catalog id not found | |
content: {} | |
/catalogs/{catalogId}/sections/{sectionId}: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve section for a given section id | |
operationId: getSectionById | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
- in: path | |
name: sectionId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Section id of the section to retrieve | |
responses: | |
200: | |
description: Section with given section id found | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/Section' | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Section' | |
404: | |
description: Section with given catalog id not found | |
content: {} | |
/catalogs/{catalogId}/groups: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve groups for a given catalog id | |
operationId: getGroupsByCatalogId | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
responses: | |
200: | |
description: Groups with given catalog id found | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Group' | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Group' | |
404: | |
description: Groups with given catalog id not found | |
content: {} | |
/catalogs/{catalogId}/groups/{groupId}: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve group for a given group id | |
operationId: getGroupById | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
- in: path | |
name: groupId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Group id of the group to retrieve | |
responses: | |
200: | |
description: Group with given group id found | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/Group' | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Group' | |
404: | |
description: Group with given group id not found | |
content: {} | |
/catalogs/{catalogId}/groups/{groupId}/controls: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve controls for a given group id | |
operationId: getControlsByGroupid | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
- in: path | |
name: groupId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Group id of the group to retrieve | |
responses: | |
200: | |
description: Controls with given group id found | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
404: | |
description: Controls with given group id not found | |
content: {} | |
/catalogs/{catalogId}/controls: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve controls for a given catalog id | |
operationId: getControlsByCatalogId | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
responses: | |
200: | |
description: Controls with given catalog id found | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
404: | |
description: Controls with given catalog id not found | |
content: {} | |
/catalogs/{catalogId}/controls/{controlId}: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve control for a given control id | |
operationId: getControlById | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
- in: path | |
name: controlId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Control id of the control to retrieve | |
responses: | |
200: | |
description: Control with given control id found | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/Control' | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Control' | |
404: | |
description: Control with given control id not found | |
content: {} | |
/catalogs/{catalogId}/controls/{controlId}/subcontrols: | |
get: | |
tags: | |
- catalog | |
summary: Retrieve subcontrols for a given control id | |
operationId: getSubControlsById | |
parameters: | |
- in: path | |
name: catalogId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Catalog id of the catalog to retrieve | |
- in: path | |
name: controlId | |
schema: | |
$ref: '#/components/schemas/Id' | |
required: true | |
description: Control id of the control to retrieve | |
responses: | |
200: | |
description: Subcontrols with given control id found | |
content: | |
application/xml: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
404: | |
description: Subcontrols with given control id not found | |
content: {} | |
components: | |
schemas: | |
CatalogListing: | |
required: | |
- id | |
- name | |
- modelVersion | |
type: object | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
title: | |
type: string | |
modelVersion: | |
$ref: '#/components/schemas/ModelVersion' | |
xml: | |
name: catalog | |
Catalog: | |
type: object | |
required: | |
- id | |
- model-version | |
- title | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
modelVersion: | |
type: string | |
xml: | |
name: model-version | |
attribute: true | |
title: | |
$ref: '#/components/schemas/Title' | |
metadata: | |
$ref: '#/components/schemas/Metadata' | |
declarations: | |
$ref: '#/components/schemas/Declarations' | |
references: | |
$ref: '#/components/schemas/References' | |
sections: | |
type: array | |
items: | |
$ref: '#/components/schemas/Section' | |
groups: | |
type: array | |
items: | |
$ref: '#/components/schemas/Group' | |
controls: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
xml: | |
name: catalog | |
namespace: http://csrc.nist.gov/ns/oscal/1.0 | |
ModelVersion: | |
type: string | |
xml: | |
name: model-version | |
attribute: true | |
Metadata: | |
type: object | |
Declarations: | |
oneOf: | |
- type: object | |
properties: | |
href: | |
$ref: '#/components/schemas/Href' | |
References: | |
type: object | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
links: | |
type: array | |
items: | |
$ref: '#/components/schemas/Link' | |
refs: | |
type: array | |
items: | |
$ref: '#/components/schemas/Ref' | |
Ref: | |
type: object | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
citations: | |
type: array | |
items: | |
$ref: '#/components/schemas/Citation' | |
prose: | |
$ref: '#/components/schemas/Prose' | |
xml: | |
name: ref | |
Citation: | |
type: object | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
href: | |
$ref: '#/components/schemas/Href' | |
xml: | |
name: citation | |
Href: | |
type: string | |
format: uri | |
xml: | |
attribute: true | |
Section: | |
type: object | |
required: | |
- title | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
title: | |
$ref: '#/components/schemas/Title' | |
prose: | |
$ref: '#/components/schemas/Prose' | |
sections: | |
type: array | |
items: | |
$ref: '#/components/schemas/Section' | |
references: | |
$ref: '#/components/schemas/References' | |
xml: | |
name: section | |
Group: | |
type: object | |
required: | |
- title | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
title: | |
$ref: '#/components/schemas/Title' | |
parameters: | |
type: array | |
items: | |
$ref: '#/components/schemas/Param' | |
props: | |
type: array | |
items: | |
$ref: '#/components/schemas/Prop' | |
parts: | |
type: array | |
items: | |
$ref: '#/components/schemas/Part' | |
groups: | |
type: array | |
items: | |
$ref: '#/components/schemas/Group' | |
controls: | |
type: array | |
items: | |
$ref: '#/components/schemas/Control' | |
references: | |
$ref: '#/components/schemas/References' | |
xml: | |
name: group | |
Control: | |
type: object | |
required: | |
- id | |
- title | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
title: | |
$ref: '#/components/schemas/Title' | |
parameters: | |
type: array | |
items: | |
$ref: '#/components/schemas/Param' | |
props: | |
type: array | |
items: | |
$ref: '#/components/schemas/Prop' | |
links: | |
type: array | |
items: | |
$ref: '#/components/schemas/Link' | |
parts: | |
type: array | |
items: | |
$ref: '#/components/schemas/Part' | |
subcontrols: | |
type: array | |
items: | |
$ref: '#/components/schemas/Subcontrol' | |
references: | |
$ref: '#/components/schemas/References' | |
xml: | |
name: control | |
Param: | |
type: object | |
required: | |
- id | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
dependsOn: | |
$ref: '#/components/schemas/DependsOn' | |
label: | |
$ref: '#/components/schemas/Label' | |
descriptions: | |
type: array | |
items: | |
$ref: '#/components/schemas/Desc' | |
constraints: | |
type: array | |
items: | |
$ref: '#/components/schemas/Constraint' | |
guidance: | |
type: array | |
items: | |
$ref: '#/components/schemas/Guideline' | |
value: | |
$ref: '#/components/schemas/Value' | |
select: | |
$ref: '#/components/schemas/Select' | |
links: | |
type: array | |
items: | |
$ref: '#/components/schemas/Link' | |
xml: | |
name: param | |
DependsOn: | |
type: string | |
xml: | |
name: depends-on | |
attribute: true | |
Prop: | |
type: object | |
required: | |
- class | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
xml: | |
name: prop | |
Part: | |
type: object | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
title: | |
$ref: '#/components/schemas/Title' | |
props: | |
type: array | |
items: | |
$ref: '#/components/schemas/Prop' | |
parts: | |
type: array | |
items: | |
$ref: '#/components/schemas/Part' | |
links: | |
type: array | |
items: | |
$ref: '#/components/schemas/Link' | |
xml: | |
name: part | |
Link: | |
type: object | |
properties: | |
href: | |
$ref: '#/components/schemas/Href' | |
rel: | |
$ref: '#/components/schemas/Rel' | |
xml: | |
name: link | |
Rel: | |
type: string | |
xml: | |
attribute: true | |
Subcontrol: | |
type: object | |
required: | |
- id | |
- title | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
class: | |
$ref: '#/components/schemas/Class' | |
title: | |
$ref: '#/components/schemas/Title' | |
parameters: | |
type: array | |
items: | |
$ref: '#/components/schemas/Param' | |
props: | |
type: array | |
items: | |
$ref: '#/components/schemas/Prop' | |
links: | |
type: array | |
items: | |
$ref: '#/components/schemas/Link' | |
parts: | |
type: array | |
items: | |
$ref: '#/components/schemas/Part' | |
references: | |
$ref: '#/components/schemas/References' | |
xml: | |
name: subcontrol | |
Prose: | |
type: object | |
Id: | |
type: string | |
xml: | |
attribute: true | |
Class: | |
type: string | |
xml: | |
attribute: true | |
Title: | |
type: string | |
Desc: | |
type: object | |
properties: | |
id: | |
$ref: '#/components/schemas/Id' | |
xml: | |
name: desc | |
Constraint: | |
type: object | |
properties: | |
test: | |
$ref: '#/components/schemas/Test' | |
xml: | |
name: constraint | |
Test: | |
type: string | |
xml: | |
attribute: true | |
Guideline: | |
type: object | |
properties: | |
prose: | |
$ref: '#/components/schemas/Prose' | |
xml: | |
name: guideline | |
Value: | |
type: string | |
Select: | |
type: object | |
properties: | |
howMany: | |
$ref: '#/components/schemas/HowMany' | |
alternatives: | |
type: array | |
items: | |
$ref: '#/components/schemas/Choice' | |
HowMany: | |
type: string | |
xml: | |
name: how-many | |
attribute: true | |
Choice: | |
type: string | |
xml: | |
name: choice | |
Label: | |
type: string | |
securitySchemes: | |
petstore_auth: | |
type: oauth2 | |
flows: | |
implicit: | |
authorizationUrl: http://petstore.swagger.io/oauth/dialog | |
scopes: | |
write:pets: modify pets in your account | |
read:pets: read your pets | |
api_key: | |
type: apiKey | |
name: api_key | |
in: header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment