oscal-rest
oscal-rest copied to clipboard
PUT / POST Methods Require RequestBody
All PUT and POST methods require a requestBody element defining the data to be sent from the client to the server.
- [ ] For all
PUT
andPOST
involving 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}/resource
insert:
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}/snapshot
andPUT /{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-snapshot
and 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