File
    • PDF

    File

    • PDF

    Article summary

    Description

    API for managing files in WORKBOX

    Query API

    Queries file information

    Request URL

    GET https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/{fileId}
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json
    Content-Type: application/json

    Request path parameters

    ParameterTypeRequirement statusDescription
    fileIdlongYFile ID

    Request examples

    GET https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/18614377
    
    GET file-api/workbox-file-server/file-api/v1/files/18614377
    HOST: workbox.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    

    Response examples

    HTTP/1.1 200 OK
    access-control-allow-credentials: true 
    access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
    access-control-max-age: 3600 
    connection: keep-alive 
    content-type: application/json;charset=UTF-8 
    date: Tue, 05 Apr 2022 01:05:10 GMT 
    server: nginx 
    strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
    transfer-encoding: chunked 
    x-ncp-apigw-response-origin: ENDPOINT 
    x-ncp-trace-id: 32p9p70p32pj36acph6com2p1g 
    {
      "id": 18614377,
      "type": 2,
      "folderType": 1,
      "path": "gildong/naver.jpg",
      "uprFolderId": 2485554,
      "size": 5076,
      "creYmdt": "2022-04-05T01:04:32.185+0000",
      "modYmdt": "2022-04-05T01:04:32.000+0000",
      "allSubFoldersCount": 0,
      "allSubFilesCount": 0,
      "creator": {
        "userId": "bb891238-88cf-50f9-572e-9fe0111234a3",
        "userNm": "Honggildong",
        "userPhoto": null,
        "loginId": "gildong@sample.co.kr"
      },
      "modifier": {
        "userId": "bb891238-88cf-50f9-572e-9fe0111234a3",
        "userNm": "Honggildong",
        "userPhoto": null,
        "loginId": "gildong@sample.co.kr"
      },
      "uploadYmdt": "2022-04-05T01:04:32.000+0000",
      "userModYmdt": "2022-04-05T01:04:32.185+0000",
      "onlineEditUrl": "https://sample.ncloudworkbox.com/LinkOnlineEdit/18614377"
    }
    
    ParameterTypeDescription
    idlongFileId
    nameStringFile name
    typeIntegerType
    folderTypeIntegerFolder type
    pathStringFile path
    uprFolderIdlongParent folder ID
    sizelongSize
    creYmdtDateCreation date and time
    modYmdtDateModification date and time
    allSubFoldersCountlongNumber of subfolders
    allSubFilesCountlongNumber of subfiles
    creatorUserVoCreator info
    modifierUserVoModifier info
    uploadYmdtDateUpload date and time
    userModYmdtDateUser modification date and time
    lockFileLockInfoVoFile lock info
    onlineEditUrlStringOnline file edit URL

    Delete API

    Deletes a file

    Request URL

    DELETE https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/{fileId}
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json
    Content-Type: application/json

    Request path parameters

    ParameterTypeRequirement statusDescription
    fileIdLongYFile ID

    Request examples

    DELETE https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/18629575
    
    DELETE /file-api/workbox-file-server/file-api/v1/files/18629575
    HOST: workbox.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    

    Response examples

    HTTP/1.1 200 OK
    access-control-allow-credentials: true 
    access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
    access-control-allow-origin: https://workbox.apigw.ntruss.com 
    access-control-max-age: 3600 
    connection: keep-alive 
    content-length: 0 
    date: Tue, 05 Apr 2022 06:10:21 GMT 
    server: nginx 
    strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
    x-ncp-apigw-response-origin: ENDPOINT 
    x-ncp-trace-id: 3copjc5i32opj3gd9i74sjgcr2 
    

    Edit API

    Modifies a file name

    Request URL

    PATCH https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/{fileId}
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json
    Content-Type: application/json

    Request path parameters

    ParameterTypeRequirement statusDescription
    fileIdLongYFile ID

    Request query parameters

    ParameterTypeRequirement statusDescription
    newNameStringYNew name

    Request examples

    PATCH https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/18614377?newName=test_newName_0001
    
    PATCH /file-api/workbox-file-server/file-api/v1/files/18614377?newName=test_newName_0001
    HOST: workbox.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    

    Response examples

    HTTP/1.1 200 OK
     access-control-allow-credentials: true 
     access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
     access-control-allow-origin: https://workbox.apigw.ntruss.com 
     access-control-max-age: 3600 
     connection: keep-alive 
     content-length: 0 
     date: Tue, 05 Apr 2022 04:18:02 GMT 
     server: nginx 
     strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
     x-ncp-apigw-response-origin: ENDPOINT 
     x-ncp-trace-id: 32c1o75hmae1j68c1p6oom4d1j 
    

    File download API

    Downloads a file

    Request URL

    GET https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/{fileId}/download
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json
    Content-Type: application/json

    Request path parameters

    ParameterTypeRequirement statusDescription
    fileIdLongYFile ID

    Request examples

    GET https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/18618459/download
    
    GET /file-api/workbox-file-server/file-api/v1/files/18618459/download
    HOST: workbox.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    

    Response examples

    HTTP/1.1 200 OK
    access-control-allow-credentials: true 
    access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
    access-control-max-age: 3600 
    connection: keep-alive 
    content-disposition: attachment;filename*=UTF-8''naver.jpg 
    content-length: 5076 
    content-type: image/jpeg 
    date: Tue, 05 Apr 2022 04:26:42 GMT 
    server: nginx 
    strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
    x-ncp-apigw-response-origin: ENDPOINT 
    x-ncp-trace-id: 3gp326tj38pho38ohp6os38opm 
    file download
    

    File Upload API

    Uploads a file to a specific folder.

    Request URL

    POST https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json multipart/form-data
    Content-Type: multipart/form-data

    Request query parameters

    ParameterTypeRequirement statusDescription
    actionintY1:Nomal 2:Overwrite 3:Rename
    sizeintYFile size
    actionFormformDataNformData to be used when sending via a form
    fileformDataYFile to be uploaded

    Request examples

    POST https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files?action=1&folderId=2485554&size=5076
    
    POST /file-api/workbox-file-server/file-api/v1/files?action=1&folderId=2485554&size=5076
    HOST: workbox.apigw.ntruss.com
    Content-Type: multipart/form-data
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    

    Response examples

    HTTP/1.1 200 OK
    access-control-allow-credentials: true 
    access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
    access-control-allow-origin: https://workbox.apigw.ntruss.com 
    access-control-max-age: 3600 
    connection: keep-alive 
    content-type: application/json;charset=UTF-8 
    date: Tue, 05 Apr 2022 07:21:22 GMT 
    server: nginx 
    strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
    transfer-encoding: chunked 
    x-ncp-apigw-response-origin: ENDPOINT 
    x-ncp-trace-id: 62d9icpgj0pj338cb264qjie1i 
    {
      "folderId": 2485554,
      "folderType": 1,
      "fileType": "jpg",
      "creYmdt": "2022-04-05T07:21:21.923+0000",
      "modYmdt": "2022-04-05T07:21:21.923+0000",
      "folderNm": "gildong001",
      "folderPath": "gildong001",
      "creator": {
        "userId": "bb891238-88cf-50f9-572e-9fe0111234a3",
        "userNm": "Honggildong",
        "userPhoto": null,
        "loginId": "gildong@sample.co.kr"
      },
      "filePath": "gildong001/naver.jpg",
      "sharedMemberCount": 0,
      "sharedMembers": null,
      "userModYmdt": "2022-04-05T07:21:21.923+0000",
      "id": 18637745,
      "name": "naver.jpg",
      "size": 5076,
      "userModYmdtMills": 1649143281923
    }
    
    ParameterTypeDescription
    idlongFile ID
    folderIdlongFolder ID
    folderTypeIntegerFolder type
    nameStringFile name
    sizelongSize
    fileTypeStringFile type
    creYmdtDateCreation date
    modYmdtDateModification date
    folderNmStringFolder name
    folderPathStringFolder path
    creatorUserVo
    filePathStringFile path
    sharedMemberCountintNumber of shared users
    sharedMembersList<UserVo>Shared user list
    userModYmdtDateUser modification date
    userModYmdtMillslongUser modification time

    File copy API

    Copies a file to a specific folder

    Request URL

    POST https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/copy-batch
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json
    Content-Type: application/json

    Request body parameters

    ParameterTypeRequirement statusDescription
    filesList<FileItem>YFile info

    Request examples

    POST https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/copy-batch
    
    POST /file-api/workbox-file-server/file-api/v1/files/copy-batch
    HOST: workbox.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    {
      "files": [
        {
          "action": 1,
          "destFolderId": 2486666,
          "id": 18637745
        },
    {
          "action": 1,
          "destFolderId": 2486666,
          "id": 18614377
        }
      ]
    }
    

    Response examples

    HTTP/1.1 200 OK
    access-control-allow-credentials: true 
    access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
    access-control-allow-origin: https://workbox.apigw.ntruss.com 
    access-control-max-age: 3600 
    connection: keep-alive 
    content-type: application/json;charset=UTF-8 
    date: Tue, 05 Apr 2022 09:15:42 GMT 
    server: nginx 
    strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
    transfer-encoding: chunked 
    x-ncp-apigw-response-origin: ENDPOINT 
    x-ncp-trace-id: 3cp9i65j66p9j6ae1gc8qjid31 
    {
      "conflictContents": []
    }
    
    ParameterTypeDescription
    conflictContentsList<CopyResultItem>Duplicate file list

    File move API

    Moves a file to a specific folder

    Request URL

    POST https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/move-batch
    

    Request headers

    HeaderDescription
    x-ncp-apigw-timestampIt indicates the time elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    and the request is considered invalid if the time difference with the API Gateway server is greater than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-iam-access-keyAccess key ID value issued from the NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    x-ncp-workbox-loginIdLogin email address for WORKBOX
    x-ncp-workbox-loginId:{Login ID}
    Content-TypeSet the request body content type to application/json
    Content-Type: application/json

    Request body parameters

    ParameterTypeRequirement statusDescription
    filesList<FileItem>YFile info
    topMoveFoldersList<Integer>NSet value by pairing the ID of the file to be moved with the ID of the destination folder

    Request examples

    POST https://workbox.apigw.ntruss.com/file-api/workbox-file-server/file-api/v1/files/move-batch
    
    POST /file-api/workbox-file-server/file-api/v1/files/move-batch
    HOST: workbox.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-timestamp : 1649054672370
    x-ncp-iam-access-key: toAvmFdP1rtPTMz2dpdy
    x-ncp-apigw-signature-v2 : sks3TlqeoWnd08TkfdmfAjrdjTekRhRlAhRhWlvmeka=
    x-ncp-workbox-loginId : gildong@sample.co.kr
    {
      "files": [
        {
          "action": 1,
          "destFolderId": 2485768,
          "id": 18651018
        },
        {
          "action": 1,
          "destFolderId": 2485768,
          "id": 18651017
        }
      ],
    "topMoveFolders":[18651018, 2485768, 18651017, 2485768]  
    }
    

    Response examples

    HTTP/1.1 200 OK
    access-control-allow-credentials: true 
    access-control-allow-methods: GET,POST,PUT,DELETE,OPTIONS 
    access-control-allow-origin: https://workbox.apigw.ntruss.com 
    access-control-max-age: 3600 
    connection: keep-alive 
    content-type: application/json;charset=UTF-8 
    date: Wed, 06 Apr 2022 01:58:27 GMT 
    server: nginx 
    strict-transport-security: max-age=31536000; includeSubDomains, max-age=31536000; includeSubDomains 
    transfer-encoding: chunked 
    x-ncp-apigw-response-origin: ENDPOINT 
    x-ncp-trace-id: 30e9h6hgjadb230e31c8qj8c1p 
    {
      "conflictContents": [],
      "topMoveFolders": [
        18651018,
        2485768,
        18651017,
        2485768
      ]
    }
    
    ParameterTypeDescription
    conflictContentsList<CopyResultItem>Duplicate file list
    topMoveFoldersList<Long>Set value by pairing the ID of the folder to be moved with the ID of the destination folder

    Responses

    Returned as HTTP status codes in the response body

    HTTP status codeResponse messageDescription
    200OKNormal successful request
    201CreatedSuccessful resource creation
    400Bad RequestRequest failure (common response when a request received is in a format that the server cannot parse)
    500Internal Server Error- Common server error
    Error codes in the 400 range indicate client-side errors
    Error codes in the 500 range indicate server-side errors

    Types

    CodeDescription
    1Folder
    2File

    Folder types

    CodeDescription
    1Public folder (shared)
    2Private folder

    Actions

    CodeDescription
    1Normal/skip (default value)
    2Overwrite
    3Rename

    FileItem

    ParameterTypeRequirement statusDescription
    idlongYFile ID
    destFolderIdLongYID of the destination folder to which the file will be copied. Set as top-level folder if set to 0
    actionintNAction

    UserVo

    ParameterTypeDescription
    userIdStringUser ID
    userNmStringUser name
    userPhotoStringURL for user photo
    loginIdStringLogin ID

    FileLockInfoVo

    ParameterTypeDescription
    fileIdlongFile ID
    creYmdtDateCreation date and time
    createUserIdStringCreator’s user ID
    createUserUserVoCreator (user)

    CopyResultItem

    ParameterTypeDescription
    destFolderIdlongDestination folder ID
    srcCopyResultContentItemDestination folder info
    existCopyResultContentItemDuplicate folder info
    canOverwritebooleanOverwrite status

    CopyResultContentItem

    ParameterTypeDescription
    nameStringTarget name
    typeintType
    sizelongSize
    creYmdtDateCreation date and time
    modYmdtDateModification date and time
    lockFileLockInfoVoLocked file info

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.