# I am facing penpot api bug wrt response json being cropped. please help

**URL:** <https://community.penpot.app/t/i-am-facing-penpot-api-bug-wrt-response-json-being-cropped-please-help/5708>\
**Category:** Ask the community\
**Created:** [June 13, 2024, 1:47pm UTC](https://community.penpot.app/t/i-am-facing-penpot-api-bug-wrt-response-json-being-cropped-please-help/5708 "2024-06-13T13:47:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ymolists](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/ymolists/32/427_2.png) [@ymolists](https://community.penpot.app/u/ymolists)\
**Post date:** [June 13, 2024, 1:47pm UTC](https://community.penpot.app/t/i-am-facing-penpot-api-bug-wrt-response-json-being-cropped-please-help/5708/1 "2024-06-13T13:47:16Z")

</div>

Hi folks

I am trying to exercise the penpot api and it looks like i am facing the bug reported [here](https://github.com/penpot/penpot/issues/3670) . The enpoint is returning 200 but the actual response is invalid as can be seen below.

Can someone please tell me if there is a workaround or that i am missing something

Best Regards

```auto

(
  . .env
  set -e

  curl -v \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header "Authorization: Token ${PENPOT_ACCESS_TOKEN}" \
    --data "{
      \"id\": \"${PENPOT_FILE_ID}\"
    }" https://design.penpot.app/api/rpc/command/get-file 
)

-→ ./sbin/fetch.sh 
* Host design.penpot.app:443 was resolved.
* IPv6: (none)
* IPv4: 52.30.79.95, 54.76.204.198, 54.220.191.245
* Trying 52.30.79.95:443...
* Connected to design.penpot.app (52.30.79.95) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / X25519 / RSASSA-PSS
* ALPN: server accepted h2
* Server certificate:
* subject: CN=penpot.app
* start date: Sep 3 00:00:00 2023 GMT
* expire date: Oct 2 23:59:59 2024 GMT
* subjectAltName: host "design.penpot.app" matched cert's "*.penpot.app"
* issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
* SSL certificate verify ok.
* Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 2: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://design.penpot.app/api/rpc/command/get-file
* [HTTP/2] [1] [:method: POST]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: design.penpot.app]
* [HTTP/2] [1] [:path: /api/rpc/command/get-file]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: application/json]
* [HTTP/2] [1] [content-type: application/json]
* [HTTP/2] [1] [authorization: Token eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2R0NNIn0.LH6vh6YDGXKUU2WYBj6Y3lLAeptlEft2pk0s-0auoq0f3K8np88wzg.jGoThfcZ8veDT6pZ.-wwY74ldWhC2QlGzQm3ZMlpgZYp7V4s4-iWct8tEVoPXk4iDkQOXObBCd3oygSDRHcTYP04w6zAdwPrxrYKS7rbG1gmqz1xXaFl40xth8_RcbfJ4ZOkzbVRLn-zNB2kBsfjMdzphZjg.2qJUEQWSI2mdUjA6K0os0g]
* [HTTP/2] [1] [content-length: 58]
> POST /api/rpc/command/get-file HTTP/2
> Host: design.penpot.app
> User-Agent: curl/8.7.1
> Accept: application/json
> Content-Type: application/json
> Authorization: Token eyJhbGciOiJBMjU2S1ciLCJlbmMiOiJBMjU2R0NNIn0.LH6vh6YDGXKUU2WYBj6Y3lLAeptlEft2pk0s-0auoq0f3K8np88wzg.jGoThfcZ8veDT6pZ.-wwY74ldWhC2QlGzQm3ZMlpgZYp7V4s4-iWct8tEVoPXk4iDkQOXObBCd3oygSDRHcTYP04w6zAdwPrxrYKS7rbG1gmqz1xXaFl40xth8_RcbfJ4ZOkzbVRLn-zNB2kBsfjMdzphZjg.2qJUEQWSI2mdUjA6K0os0g
> Content-Length: 58
> 
* upload completely sent off: 58 bytes
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 200 
< date: Thu, 13 Jun 2024 13:42:02 GMT
< content-type: application/json
< server: nginx
< vary: Accept-Encoding
< etag: W/"Iuq3VybzOiydPsHwHzKUNl13wG7KL_vreO1hb8SL718"
< server-timing: total;dur=0.022204516
< 
{
  "features" : ["layout/grid", "styles/v2", "components/v2", "fdata/shape-data-type"],
  "permissions" : {
    "type" : "membership",
    "isOwner" : true,
    "isAdmin" : true,
    "canEdit" : true,
    "canRead" : true,
    "isLogged" : true
  },
  "hasMediaTrimmed" : false,
  "commentThreadSeqn" : 0,
  "name" : "New File 1",
  "revn" : 1,
  "modifiedAt" : "2024-06-13T07:33:01.380611Z",
  "id" : "e180278a-9a77-8036-8004-7f64fd2fcd3e",
  "isShared" : false,
  "version" : 47,
  "projectId" : "293a2d3f-de7f-80de-8004-7f64fabc3c7f",
  "createdAt" : "2024-06-13T07:32:56.128215Z",
  "data" : {
    "pages" : ["e180278a-9a77-8036-8004-7f64fd2fcd3f"],
    "pagesIndex" : {
      "e180278a-9a77-8036-8004-7f64fd2fcd3f" : {
        "options" : { },
        "objects" : {
* Connection #0 to host design.penpot.app left intact
          "00000000-0000-0000-0000-000000000000" : {

```

---

<div class="post-metadata">

**Author:** ![carolina.portugal](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/carolina.portugal/32/36_2.png) [@carolina.portugal](https://community.penpot.app/u/carolina.portugal)\
**Post date:** [June 20, 2024, 10:23am UTC](https://community.penpot.app/t/i-am-facing-penpot-api-bug-wrt-response-json-being-cropped-please-help/5708/2 "2024-06-20T10:23:08Z")

</div>

This should fix it: [🐛 Fix json encoding output truncation by niwinz · Pull Request #4760 · penpot/penpot · GitHub](https://github.com/penpot/penpot/pull/4760)

---

<div class="post-metadata">

**Author:** ![ymolists](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/ymolists/32/427_2.png) [@ymolists](https://community.penpot.app/u/ymolists)\
**Post date:** [June 20, 2024, 5:38pm UTC](https://community.penpot.app/t/i-am-facing-penpot-api-bug-wrt-response-json-being-cropped-please-help/5708/3 "2024-06-20T17:38:27Z")

</div>

Hi @carolina.portugal

I am monkey gardening the production website to seewhen this fix will be deployed. So far no luck. I cant wait
