Skip to content

Get Detail Design

Method

REST method is adopted.

HTTP Method

GET: Get single detail design

Naming Convention

To unify the naming of query parameters and nodes and improve readability, snake_case is used for URIs and JSON nodes in requests.

Request and Response

Headers

Meta information is set in HTTP headers, not in the response body.

Request Headers

  • Authorization
  • Content-Type
  • Accept
  • Accept-language

Response Headers

  • Content-Type

Get Single Detail Design

URI

GET /api/v1/organizations/{organization_id}/projects/{project_id}/detail_designs/{detail_design_id}

Path Parameters

Name Type Required Description
organization_id integer Required Organization ID
project_id integer Required Project ID
detail_design_id string Required Detail design UUID

Response

The response is JSON.

{
  "id": "detail-design-uuid",
  "projectId": 1,
  "name": "My Detail Design",
  "s3Key": "1/1/detail-design/detail-design-uuid",
  "createdAt": 1234567890000,
  "updatedAt": 1234567890000,
  "deletedAt": null,
  "createdBy": "user-cognito-sub",
  "updatedBy": "user-cognito-sub",
  "deletedBy": null
}

Response Fields

Name Type Description
id string Detail design UUID
projectId number Project ID
name string Detail design name
s3Key string | null S3 object key
createdAt number Creation timestamp (epoch milliseconds)
updatedAt number Update timestamp (epoch milliseconds)
deletedAt number | null Deletion timestamp (epoch milliseconds); null if not deleted
createdBy string Creator user ID
updatedBy string Updater user ID
deletedBy string | null Deleter user ID; null if not deleted

Authentication

Authentication is performed using JSON Web Tokens (JWT) issued by Amazon Cognito.

Error Handling

The status codes for error handling are as follows.

Description Status Code Status Name
Missing credentials 401 Unauthorized
Insufficient permissions 403 Forbidden
Detail design, project, or organization not found 404 Not Found
Internal server error 500 Internal Server Error

Processing Flow

  1. Extract organization ID, project ID, and detail design ID from path parameters
  2. Verify the user has access to the project
  3. Verify the detail design belongs to the specified project
  4. Return the detail design information

Detailed Flowchart

flowchart TD
    Start([GET Request]) --> Auth[Auth & Parameter Extraction]
    Auth --> Service[Service Layer]
    Service --> AccessCheck[Access Check]
    AccessCheck --> HasAccess{Read permission?}
    HasAccess -->|No| Err404[404 Not Found]
    HasAccess -->|Yes| QueryDB[Repository Layer]
    QueryDB --> FindRecord[Fetch Record<br/>WHERE deletedAt IS NULL]
    FindRecord --> Exists{Exists?}
    Exists -->|No| Err404
    Exists -->|Yes| Format[Format Response]
    Format --> Success[200 OK]