# Documents

Operations for Documents

## List Document creation proposals

> List all createDocuments proposals. These are proposed changes to create new Document records that may be automatically approved or require manual approval depending on system configuration.

```json
{"openapi":"3.0.3","info":{"title":"AG5 Skills Management API","version":{"build":0,"name":"","minor":0}},"tags":[{"description":"Operations for Documents","name":"Documents"}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{},"schemas":{"ListCreateDocumentProposalResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CreateDocumentProposal"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Indicates if there are more items to fetch","type":"boolean"},"limit":{"description":"Maximum number of items requested for this page","format":"int64","type":"integer"},"nextCursor":{"description":"Cursor for the next page. Pass this value in the 'cursor' parameter to get the next page.","type":"string"},"total":{"description":"Total number of items matching the query","format":"int64","type":"integer"}},"required":["total","limit","hasMore"],"type":"object"}},"required":["data","pagination"],"type":"object"},"CreateDocumentProposal":{"properties":{"contentType":{"type":"string"},"fileID":{"type":"string"},"fileSize":{"format":"int32","type":"integer"},"filename":{"type":"string"},"isProposalExecutionFailed":{"readOnly":true,"type":"boolean"},"isProposalResolved":{"readOnly":true,"type":"boolean"},"proposalExecutionErrorText":{"readOnly":true,"type":"string"},"repositoryID":{"format":"uuid","type":"string"},"requestID":{"format":"uuid","readOnly":true,"type":"string"},"subjectID":{"format":"uuid","type":"string"}},"required":["requestID","isProposalResolved","isProposalExecutionFailed","subjectID","repositoryID","fileID","fileSize"],"type":"object"},"Error":{"properties":{"code":{"description":"Machine-readable error code","enum":["INVALID_INPUT","MISSING_AUTH","INVALID_TOKEN","NOT_FOUND","INTERNAL_ERROR","RATE_LIMIT_EXCEEDED","PROPOSAL_CONFLICT","APPROVAL_REQUIRED"],"type":"string"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Human-readable error message","type":"string"},"requestId":{"description":"Unique request identifier for support","type":"string"}},"required":["code","message"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"InternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error"}}},"paths":{"/createDocuments":{"get":{"description":"List all createDocuments proposals. These are proposed changes to create new Document records that may be automatically approved or require manual approval depending on system configuration.","operationId":"listCreateDocumentProposal","parameters":[{"description":"Maximum number of items to return (1-1000)","in":"query","name":"limit","schema":{"default":10,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Cursor for pagination. Use the value from the 'nextCursor' field of the previous response.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCreateDocumentProposalResponse"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalError"}},"summary":"List Document creation proposals","tags":["Documents","Proposals"]}}}}
```

## Get Document creation proposal

> Get details of a specific Document creation proposal by ID

```json
{"openapi":"3.0.3","info":{"title":"AG5 Skills Management API","version":{"build":0,"name":"","minor":0}},"tags":[{"description":"Operations for Documents","name":"Documents"}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{},"schemas":{"CreateDocumentProposal":{"properties":{"contentType":{"type":"string"},"fileID":{"type":"string"},"fileSize":{"format":"int32","type":"integer"},"filename":{"type":"string"},"isProposalExecutionFailed":{"readOnly":true,"type":"boolean"},"isProposalResolved":{"readOnly":true,"type":"boolean"},"proposalExecutionErrorText":{"readOnly":true,"type":"string"},"repositoryID":{"format":"uuid","type":"string"},"requestID":{"format":"uuid","readOnly":true,"type":"string"},"subjectID":{"format":"uuid","type":"string"}},"required":["requestID","isProposalResolved","isProposalExecutionFailed","subjectID","repositoryID","fileID","fileSize"],"type":"object"},"Error":{"properties":{"code":{"description":"Machine-readable error code","enum":["INVALID_INPUT","MISSING_AUTH","INVALID_TOKEN","NOT_FOUND","INTERNAL_ERROR","RATE_LIMIT_EXCEEDED","PROPOSAL_CONFLICT","APPROVAL_REQUIRED"],"type":"string"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Human-readable error message","type":"string"},"requestId":{"description":"Unique request identifier for support","type":"string"}},"required":["code","message"],"type":"object"}},"responses":{"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"InternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error"}}},"paths":{"/createDocuments/{id}":{"get":{"description":"Get details of a specific Document creation proposal by ID","operationId":"getCreateDocumentProposal","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentProposal"}}},"description":"Successful response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}},"summary":"Get Document creation proposal","tags":["Documents","Proposals"]}}}}
```

## List Document deletion proposals

> List all deleteDocuments proposals. These are proposed changes to delete Document records that may be automatically approved or require manual approval depending on system configuration.

```json
{"openapi":"3.0.3","info":{"title":"AG5 Skills Management API","version":{"build":0,"name":"","minor":0}},"tags":[{"description":"Operations for Documents","name":"Documents"}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{},"schemas":{"ListDeleteDocumentProposalResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeleteDocumentProposal"},"type":"array"},"pagination":{"properties":{"hasMore":{"description":"Indicates if there are more items to fetch","type":"boolean"},"limit":{"description":"Maximum number of items requested for this page","format":"int64","type":"integer"},"nextCursor":{"description":"Cursor for the next page. Pass this value in the 'cursor' parameter to get the next page.","type":"string"},"total":{"description":"Total number of items matching the query","format":"int64","type":"integer"}},"required":["total","limit","hasMore"],"type":"object"}},"required":["data","pagination"],"type":"object"},"DeleteDocumentProposal":{"properties":{"id":{"format":"uuid","type":"string"},"isProposalExecutionFailed":{"readOnly":true,"type":"boolean"},"isProposalResolved":{"readOnly":true,"type":"boolean"},"proposalExecutionErrorText":{"readOnly":true,"type":"string"},"repositoryID":{"format":"uuid","type":"string"},"requestID":{"format":"uuid","readOnly":true,"type":"string"}},"required":["requestID","isProposalResolved","isProposalExecutionFailed","id","repositoryID"],"type":"object"},"Error":{"properties":{"code":{"description":"Machine-readable error code","enum":["INVALID_INPUT","MISSING_AUTH","INVALID_TOKEN","NOT_FOUND","INTERNAL_ERROR","RATE_LIMIT_EXCEEDED","PROPOSAL_CONFLICT","APPROVAL_REQUIRED"],"type":"string"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Human-readable error message","type":"string"},"requestId":{"description":"Unique request identifier for support","type":"string"}},"required":["code","message"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"InternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error"}}},"paths":{"/deleteDocuments":{"get":{"description":"List all deleteDocuments proposals. These are proposed changes to delete Document records that may be automatically approved or require manual approval depending on system configuration.","operationId":"listDeleteDocumentProposal","parameters":[{"description":"Maximum number of items to return (1-1000)","in":"query","name":"limit","schema":{"default":10,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Cursor for pagination. Use the value from the 'nextCursor' field of the previous response.","in":"query","name":"cursor","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeleteDocumentProposalResponse"}}},"description":"Successful response"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalError"}},"summary":"List Document deletion proposals","tags":["Documents","Proposals"]}}}}
```

## Get Document deletion proposal

> Get details of a specific Document deletion proposal by ID

```json
{"openapi":"3.0.3","info":{"title":"AG5 Skills Management API","version":{"build":0,"name":"","minor":0}},"tags":[{"description":"Operations for Documents","name":"Documents"}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{},"schemas":{"DeleteDocumentProposal":{"properties":{"id":{"format":"uuid","type":"string"},"isProposalExecutionFailed":{"readOnly":true,"type":"boolean"},"isProposalResolved":{"readOnly":true,"type":"boolean"},"proposalExecutionErrorText":{"readOnly":true,"type":"string"},"repositoryID":{"format":"uuid","type":"string"},"requestID":{"format":"uuid","readOnly":true,"type":"string"}},"required":["requestID","isProposalResolved","isProposalExecutionFailed","id","repositoryID"],"type":"object"},"Error":{"properties":{"code":{"description":"Machine-readable error code","enum":["INVALID_INPUT","MISSING_AUTH","INVALID_TOKEN","NOT_FOUND","INTERNAL_ERROR","RATE_LIMIT_EXCEEDED","PROPOSAL_CONFLICT","APPROVAL_REQUIRED"],"type":"string"},"details":{"additionalProperties":true,"description":"Additional error details","type":"object"},"message":{"description":"Human-readable error message","type":"string"},"requestId":{"description":"Unique request identifier for support","type":"string"}},"required":["code","message"],"type":"object"}},"responses":{"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"InternalError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal server error"}}},"paths":{"/deleteDocuments/{id}":{"get":{"description":"Get details of a specific Document deletion proposal by ID","operationId":"getDeleteDocumentProposal","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDocumentProposal"}}},"description":"Successful response"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}},"summary":"Get Document deletion proposal","tags":["Documents","Proposals"]}}}}
```
