Download OpenAPI specification:Download
The PrimeForge File Service Service provides comprehensive human resources management capabilities for the PrimeForge platform.
Most endpoints require JWT authentication. Include the access token in the Authorization header:
Authorization: Bearer <your_access_token>
This service supports multi-tenancy. The tenant context is automatically extracted from the JWT token.
| filename required | string <= 512 characters Original filename |
| classification required | string Default: "PUBLIC" Enum: "PUBLIC" "INTERNAL" "CONFIDENTIAL" "RESTRICTED" File classification level |
| sensitivityLevel required | string Default: "LOW" Enum: "LOW" "MEDIUM" "HIGH" "CRITICAL" File sensitivity level |
| tags | Array of strings File tags |
| metadata | object Additional metadata |
| description | string <= 1000 characters File description |
| storageBackend | string Storage backend preference |
| retentionPeriod | number Retention period in days |
{- "id": "string",
- "tenantId": "string",
- "ownerId": "string",
- "originalFilename": "string",
- "storedFilename": "string",
- "mimeType": "string",
- "fileSize": "string",
- "classification": "PUBLIC",
- "sensitivityLevel": "LOW",
- "tags": [
- "string"
], - "description": "string",
- "version": 0,
- "isCurrentVersion": true,
- "metadata": { },
- "checksumSha256": "string",
- "storageBackend": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedBy": "string",
- "deletedBy": "string"
}{- "id": "string",
- "tenantId": "string",
- "ownerId": "string",
- "originalFilename": "string",
- "storedFilename": "string",
- "mimeType": "string",
- "fileSize": "string",
- "classification": "PUBLIC",
- "sensitivityLevel": "LOW",
- "tags": [
- "string"
], - "description": "string",
- "version": 0,
- "isCurrentVersion": true,
- "metadata": { },
- "checksumSha256": "string",
- "storageBackend": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedBy": "string",
- "deletedBy": "string"
}| id required | string File ID |
| filename | string <= 512 characters Updated filename |
| classification | string Enum: "PUBLIC" "INTERNAL" "CONFIDENTIAL" "RESTRICTED" Updated file classification |
| sensitivityLevel | string Enum: "LOW" "MEDIUM" "HIGH" "CRITICAL" Updated sensitivity level |
| tags | Array of strings Updated tags |
| metadata | object Updated metadata |
| description | string <= 1000 characters Updated description |
{- "filename": "string",
- "classification": "PUBLIC",
- "sensitivityLevel": "LOW",
- "tags": [
- "string"
], - "metadata": { },
- "description": "string"
}{- "id": "string",
- "tenantId": "string",
- "ownerId": "string",
- "originalFilename": "string",
- "storedFilename": "string",
- "mimeType": "string",
- "fileSize": "string",
- "classification": "PUBLIC",
- "sensitivityLevel": "LOW",
- "tags": [
- "string"
], - "description": "string",
- "version": 0,
- "isCurrentVersion": true,
- "metadata": { },
- "checksumSha256": "string",
- "storageBackend": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedBy": "string",
- "deletedBy": "string"
}| filename | string Search by filename |
| mimeType | string Filter by MIME type |
| classification | string Enum: "PUBLIC" "INTERNAL" "CONFIDENTIAL" "RESTRICTED" Filter by classification |
| tags | Array of strings Filter by tags |
| ownerId | string Filter by owner ID |
| createdAfter | string Created after date |
| createdBefore | string Created before date |
| minSize | number Minimum file size |
| maxSize | number Maximum file size |
| page | number >= 1 Default: 1 Page number |
| limit | number >= 1 Default: 20 Items per page |
| fileIds required | Array of strings File IDs to operate on |
| operation required | string Operation type |
| parameters | object Operation parameters |
{- "fileIds": [
- "string"
], - "operation": "string",
- "parameters": { }
}Submit a request to get permission to access a file
| fileId required | string File ID |
| permissionType required | string Enum: "READ" "WRITE" "DELETE" "SHARE" "ADMIN" Requested permission type |
| reason | string Reason for requesting access |
| expiresAt | string <date-time> Requested expiration date |
{- "permissionType": "READ",
- "reason": "string",
- "expiresAt": "2019-08-24T14:15:22Z"
}{- "id": "string",
- "fileId": "string",
- "requesterId": "string",
- "permissionType": "READ",
- "reason": "string",
- "status": "string",
- "requestedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "reviewedBy": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewComments": "string"
}Get all access requests for a file (Admin only)
| fileId required | string File ID |
| status | string Filter by status |
[- {
- "id": "string",
- "fileId": "string",
- "requesterId": "string",
- "permissionType": "READ",
- "reason": "string",
- "status": "string",
- "requestedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "reviewedBy": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewComments": "string"
}
]Approve or reject an access request (Admin only)
| fileId required | string File ID |
| requestId required | string Access request ID |
| decision required | string Enum: "approve" "reject" Review decision |
| comments | string Review comments |
| expiresAt | string <date-time> Permission expiration date (only for approve) |
{- "decision": "approve",
- "comments": "string",
- "expiresAt": "2019-08-24T14:15:22Z"
}{- "id": "string",
- "fileId": "string",
- "requesterId": "string",
- "permissionType": "READ",
- "reason": "string",
- "status": "string",
- "requestedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "reviewedBy": "string",
- "reviewedAt": "2019-08-24T14:15:22Z",
- "reviewComments": "string"
}Get a matrix showing all users and their permissions for this file
| fileId required | string File ID |
{- "fileId": "string",
- "ownerId": "string",
- "totalUsers": 0,
- "users": [
- {
- "userId": "string",
- "userDisplayName": "string",
- "permissions": [
- "string"
], - "grantedVia": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "grantedAt": "2019-08-24T14:15:22Z",
- "grantedBy": "string"
}
], - "permissionSummary": { },
- "pendingRequests": 0
}Quickly grant permission to a user (Admin only)
| fileId required | string File ID |
| userId required | string User ID to grant permission to |
| permissionType required | string Enum: "READ" "WRITE" "DELETE" "SHARE" "ADMIN" Permission type to grant |
| expiresAt | string <date-time> Permission expiration date |
{- "userId": "string",
- "permissionType": "READ",
- "expiresAt": "2019-08-24T14:15:22Z"
}Grant, revoke, or update permissions for multiple users (Admin only)
| fileId required | string File ID |
| userIds required | Array of strings User IDs to apply action to |
| action required | string Enum: "grant" "revoke" "update" Action to perform |
| permissionType | string Enum: "READ" "WRITE" "DELETE" "SHARE" "ADMIN" Permission type (required for grant/update) |
| expiresAt | string <date-time> Permission expiration date |
{- "userIds": [
- "string"
], - "action": "grant",
- "permissionType": "READ",
- "expiresAt": "2019-08-24T14:15:22Z"
}{- "successful": [
- "string"
], - "failed": [
- "string"
], - "totalProcessed": 0,
- "successCount": 0,
- "failureCount": 0
}Grant specific permissions to a user, role, or group for a file. Requires ADMIN permission on the file.
| fileId required | string File ID |
| subjectType required | string Enum: "USER" "ROLE" "GROUP" Subject type (user, role, or group) |
| subjectId required | string Subject ID (user/role/group ID) |
| permissionType required | string Enum: "READ" "WRITE" "DELETE" "SHARE" "ADMIN" Permission type |
| expiresAt | string Permission expiration date |
| scope | object Permission scope and additional parameters |
{- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "expiresAt": "string",
- "scope": { }
}{- "id": "string",
- "fileId": "string",
- "tenantId": "string",
- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "scope": { },
- "expiresAt": "2019-08-24T14:15:22Z",
- "grantedAt": "2019-08-24T14:15:22Z",
- "grantedBy": "string",
- "revokedAt": "2019-08-24T14:15:22Z",
- "revokedBy": "string",
- "isActive": true,
- "isExpired": true
}Retrieve all active permissions for a specific file. Requires READ permission on the file.
| fileId required | string File ID |
| subjectType | string Enum: "USER" "ROLE" "GROUP" Filter by subject type |
| subjectId | string Filter by subject ID |
| permissionType | string Enum: "READ" "WRITE" "DELETE" "SHARE" "ADMIN" Filter by permission type |
| includeExpired | boolean Include expired permissions |
| includeRevoked | boolean Include revoked permissions |
[- {
- "id": "string",
- "fileId": "string",
- "tenantId": "string",
- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "scope": { },
- "expiresAt": "2019-08-24T14:15:22Z",
- "grantedAt": "2019-08-24T14:15:22Z",
- "grantedBy": "string",
- "revokedAt": "2019-08-24T14:15:22Z",
- "revokedBy": "string",
- "isActive": true,
- "isExpired": true
}
]Retrieve all permissions granted to a specific user across all files they have access to.
| userId required | string User ID |
[- {
- "id": "string",
- "fileId": "string",
- "tenantId": "string",
- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "scope": { },
- "expiresAt": "2019-08-24T14:15:22Z",
- "grantedAt": "2019-08-24T14:15:22Z",
- "grantedBy": "string",
- "revokedAt": "2019-08-24T14:15:22Z",
- "revokedBy": "string",
- "isActive": true,
- "isExpired": true
}
]Check if a user has a specific permission on a file.
| fileId required | string File ID to check permission for |
| userId required | string User ID to check permission for |
| permissionType required | string Enum: "READ" "WRITE" "DELETE" "SHARE" "ADMIN" Permission type to check |
| context | object Additional context for permission check |
{- "fileId": "string",
- "userId": "string",
- "permissionType": "READ",
- "context": { }
}{- "hasPermission": true,
- "reason": "string",
- "effectivePermission": "string",
- "expiresAt": "2019-08-24T14:15:22Z",
- "metadata": { }
}Grant permissions to multiple files at once. Requires ADMIN permission on all specified files.
| fileIds required | Array of strings File IDs to grant permissions for |
required | Array of objects (PermissionGrantDto) Permissions to grant |
{- "fileIds": [
- "string"
], - "permissions": [
- {
- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "expiresAt": "string",
- "scope": { }
}
]
}{- "successful": [
- {
- "id": "string",
- "fileId": "string",
- "tenantId": "string",
- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "scope": { },
- "expiresAt": "2019-08-24T14:15:22Z",
- "grantedAt": "2019-08-24T14:15:22Z",
- "grantedBy": "string",
- "revokedAt": "2019-08-24T14:15:22Z",
- "revokedBy": "string",
- "isActive": true,
- "isExpired": true
}
], - "failed": [
- {
- "fileId": "string",
- "error": "string",
- "permission": {
- "subjectType": "USER",
- "subjectId": "string",
- "permissionType": "READ",
- "expiresAt": "string",
- "scope": { }
}
}
]
}Get a summary of all permissions for a specific file.
| fileId required | string File ID |
{- "totalPermissions": 0,
- "activePermissions": 0,
- "expiredPermissions": 0,
- "revokedPermissions": 0,
- "byPermissionType": { },
- "bySubjectType": { },
- "recentActivities": [
- "string"
]
}