Issue with zip API endpoints

新規投稿

コメント

2件のコメント

  • 正式なコメント
    Alex Novotny

    Hello, 

    Are you using one of our SDKs? If possible, it would help if I could see some of the code you are running. 

    Thanks, 

    Alex, Box Developer Advocate

    コメントアクション パーマリンク
  • Jacob S

    Hi Alex,

    I'm not using an SDK - at this point I'm just running calls via curl, as described in the API docs.

    Request access token:

    curl -i -X POST "https://api.box.com/oauth2/token" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    -d "client_id=<client_id>" \
    -d "client_secret=<client_secret>" \
    -d "grant_type=client_credentials" \
    -d "box_subject_type=enterprise" \
    -d "box_subject_id=<box_subject_id>"

    Create zip download:

    curl -i -X POST "https://api.box.com/2.0/zip_downloads" \
    -H "Authorization: Bearer <access_token>" \
    -d '{
    "download_file_name": "<file_name>",
    "items": [
    {
    "type": "folder",
    "id": "<folder_id>"
    }
    ]
    }
    '

    Download zip archive:

    curl -i -X GET "https://dl.boxcloud.com/2.0/zip_downloads/<download_url>"

    ^This is the point where I'm running into the first issue. When I run this it gives me a 200 response but nothing seemingly downloads.

    Then I look at the zip download status:

    curl -i -X GET "https://api.box.com/2.0/zip_downloads/<download_url>" \
    -H "Authorization: Bearer <access_token>"

    The response indicates zero total files/folders. I don't know how super useful this is with me scrubbing identifiers, but this is the workflow I used.

    Thanks,

    Jacob

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。