Closed brian-comply0 closed 6 months ago
Made good progress on the collection of issues. This one will be addressed in sprint 68.
Made good progress. This one will be addressed in sprint 69.
Per today's discussion:
The description for the resourceUUID
parameter should be "UUID of the Back Matter Resource". This applies to:
GET /[model-name]/{file-id}/attachment/{resourceUUID}
PUT /model-name]/{file-id}/attachment/{resourceUUID}
DELETE /[model-name]/{file-id}/attachment/{resourceUUID}
GET /[model-name]/{file-id}/attachment/{resourceUUID}/resource
PUT /[model-name]/{file-id}/attachment/{resourceUUID}/resource
The JSON return should match the OSCAL JSON back-matter/resource
syntax. This applies to:
GET /[model-name]/{file-id}/attachment/{resourceUUID}/resource
PUT /[model-name]/{file-id}/attachment/{resourceUUID}/resource
POST /[model-name]/{file-id}/attachment
This represents a change from aboveThe JSON return should be as specified below for the following endpoint:
GET /[model-name]/{file-id}/attachment
(JSON "attachment" array with 0 or more items){
"attachment-list": [
{
"resource-uuid": "string",
"file-name": "string",
"media-type": "string",
"title": "string",
"published": "19-02-29",
"version": "",
"remarks": "string"
}
]
}
NOTES:
[
and ]
in the appropriate location)@mpemy / @brian-comply0 status update?
@pjavan hopefully the status is showing for you as in-review. I have one or two items ahead of this in the priority queue. I hope to review it today.
This looks good! Closing.
Description
As a developer issuing OSCAL REST API calls to manage attachments, I want a more seamless integration between the attachment endpoints and the OSCAL content related to those attachments.
Specifically, I want attachment methods and endpoints to address the following:
back-matter/resource
for the attachment must be the identifier used in the REST API endpoints for managing attachments (/{model-name}/{file-id}/attachment/{UUID-of-backmatter-resource}
).back-matter/resource
content as well as the attachment itself.rlink/@href
value assigned within theback-matter/resource
allows API clients to easily make additionalGET
calls to retrieve the attachment using theresource/rlink/@href
value.@href
values such as:/attachment/{resource-UUID}
(preferred); orhttps://{api.base.url}/{model-name}/{file-id}/attachment/{uuid-of-attachment}
.back-matter/resource
content associated with an attachment.Acceptance Criteria
[x] The specification for
GET
,PUT
andDELETE
methods involving the/[model-name]/{file-id}/attachment/{attachmentID}
endpoint changes{attachmentID}
to{resourceUUID}
. The revised endpoints should be/[model-name]/{file-id}/attachment/{resourceUUID}
[x] The specification for
POST /[model-name]/{id}/attachment
is updated as follows:[x] The specification for
DELETE /[model-name]/{file-id}/attachment/{resourceUUID}
is updated as follows:[x] The specification for
PUT /[model-name]/{file-id}/attachment/{resourceUUID}
is updated as follows:[x] A new specification is added for
PUT /[model-name]/{file-id}/attachment/{resourceUUID}/resource
, which includes:[x] A new specification is added for
GET /[model-name]/{file-id}/attachment/{resourceUUID}/resource
, which includes:Concept of Operations (ConOps)
The ConOps is that a client interacting with the REST API is either:
SENDING OSCAL CONTENT
POST /{model-name}
{file-id}
{ "{model-name}-id" : "{file-id}" }
2a. For each existing attachment that is already defined in the OSCAL file (content already has a
back-matter/resource
):PUT /{model-name}/{file-id}/attachment/{resourceUUID}
(optionally includesContent-Type
header)back-matter/resource
withuuid={resourceUUID}
from the endpointresource/rlink/@href
with a path to the REST API endpoint for the attachment.@media-type
to theContent-Type
header value if provided)rlink
with an absolute path or URI fragment in the@href
flag.2b. For any new attachments that are not yet defined in the OSCAL file:
POST /{model-name}/{file-id}/attachment
(optionally includesContent-Type
header){uuid-of-new-attachment}
back-matter/resource
with `@uuid="{uuid-of-new-attachment}"resource/rlink
:@href
flag to/attachment/{uuid-of-attachment}
@media-type
to theContent-Type
header value if provided){ "resource-uuid" : "{uuid-of-back-new-attachment}" }
PUT
orPOST
with the following to adjust the content of theback-matter/resource
associated with the attachment:PUT /{model-name}/{file-id}/attachment/{resourceUUID}/resource
with JSON payload to set or modify the resource'stitle
,description
,prop[@name='type'], and other properties and fields as defined in the OSCAL 1.1.2 specification for
back-matter/resource`back-matter/resource
by{resourceUUID}
resource
content with the delivered content.RETRIEVING OSCAL CONTENT
GET /{model-name}
GET /{model-name}/{file-id}
rlink/@href
value within the resource; ORGET /{model-name}/{file-id}/attachment/{resourceUUID}