oscal-rest
oscal-rest copied to clipboard
PUT / POST Methods Require RequestBody
trafficstars
All PUT and POST methods require a requestBody element defining the data to be sent from the client to the server.
- [ ] For all
PUTandPOSTinvolving OSCAL content, include the content below. This includes the following endpoints: POST /{model-name}PUT /{model-name}/{identifier}
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/OSCAL{model-name}"
application/xml:
schema:
$ref: "#/components/schemas/OSCAL{model-name}XML"
application/yaml:
schema:
$ref: "#/components/schemas/OSCAL{model-name}"
- [ ] For all
PUT /{model-name}/attachment/{resourceUUID}/resourceinsert:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/OSCALResource"
- [ ] Define OSCALsnapshot schema
- [ ] For all
PUT /{model-name}/snapshot/{identifier}andPUT /profile/{identifier}/resolved-snapshot/{identifier}insert:
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/OSCALsnapshot"
- [ ] The payload for
POST /{model-name}/{id}/snapshotandPUT /{model-name}/{id}/snapshot/{id}is specified as follows:
{
"snapshot" : {
"description" : "markup-multiline",
"labels": ["token"],
"types" : ["token"]
}
}
-
labels have a cardinality of 0 or more
-
types have a cardinality of 0 or more
-
description has a cardinality of 0 or 1
-
[ ] The payload for
POST /{model-name}/{id}/resolved-snapshotand PUT /{model-name}/{id}/resolved-snapshot/{id}` is specified as follows:
{
"snapshot" : {
"description" : "markup-multiline",
"labels": ["token"],
"types" : ["token"]
}
}
- labels have a cardinality of 0 or more
- types have a cardinality of 0 or more
- description has a cardinality of 0 or 1