# Released \[UNOFFICIAL\] ipfs-cluster-api

**URL:** <https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338>\
**Category:** Uncategorized\
**Tags:** ipfs-cluster\
**Created:** [May 4, 2019, 12:38pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338 "2019-05-04T12:38:44Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 4, 2019, 12:38pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/1 "2019-05-04T12:38:44Z")

</div>

**A JS client library for the IPFS Cluster HTTP API.**

Check it out here: **[ipfs-cluster-api](https://github.com/cluster-labs/ipfs-cluster-api)**

@hector @kishansagathiya @zenground0 @lanzafame

I would love your feedback 😉

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 5, 2019, 10:34am UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/2 "2019-05-05T10:34:22Z")

</div>

@hector  
I have implemented all the commands that I saw in the Go implementation.  
I am facing an issue in the `add` command. Can you check it out?

You can start by running the **[add.spec.js](https://github.com/cluster-labs/ipfs-cluster-api/blob/feature/add/test/add.spec.js)**. Even a hint for “how to solve it?” will be great 🙂

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [May 5, 2019, 3:01pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/3 "2019-05-05T15:01:15Z")

</div>

hi, what’s the error? Add requires a multipart request and returns, by default, a streaming response. It is very similar to what `js-ipfs-api` does to add to IPFS (just different response objects and different query arguments).

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 5, 2019, 3:02pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/4 "2019-05-05T15:02:57Z")

</div>

@hector

 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/a/ae548ae80abd4ab78ebe1744f6c645c53cc8a64b.png)

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [May 5, 2019, 3:30pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/5 "2019-05-05T15:30:19Z")

</div>

I don’t navigate javascript good enough to say what’s happening. Seems you’re writing after the stream is closed, which might suggest it sent back an error of some kind. Maybe the cluster peer logs something.

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 5, 2019, 3:45pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/6 "2019-05-05T15:45:00Z")

</div>

@hector

Np. Thanks for the help 😉

I will try to fix it. BTW do you know anyone who can look into it?  
Can @alanshaw look into it?

P.S.: I am sorry if I am bugging you guys a lot 😅

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 5, 2019, 8:18pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/7 "2019-05-05T20:18:20Z")

</div>

@hector

It’s fixed!  
Will be releasing v0.0.3 with all the functions.

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 5, 2019, 11:02pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/8 "2019-05-05T23:02:52Z")

</div>

@hector

Seems like the Go REST APIs for the `add` method doesn’t return the CIDs 🤔

The line **[here](https://github.com/ipfs/ipfs-cluster/blob/master/api/rest/restapi.go#L588)** returns `nil` as response for the `add` request.

Is there any way I can get the CID on adding the data to the cluster?

Again, I am sorry if I am bugging you a lot 😅

---

<div class="post-metadata">

**Author:** ![alanshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/alanshaw/32/8381_2.png) [@alanshaw](https://discuss.ipfs.tech/u/alanshaw)\
**Post date:** [May 6, 2019, 6:57pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/9 "2019-05-06T18:57:46Z")

</div>

Not sure if this is related but there’s an issue in 0.4.19 that means it doesn’t return all CIDs when adding multiple files.

See [https://github.com/ipfs/go-ipfs/pull/6255](https://github.com/ipfs/go-ipfs/pull/6255)

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 6, 2019, 7:28pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/10 "2019-05-06T19:28:45Z")

</div>

Thanks for informing.  
Will keep an eye on that

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 6, 2019, 9:45pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/11 "2019-05-06T21:45:38Z")

</div>

Released **[v0.0.3](https://www.npmjs.com/package/ipfs-cluster-api)**

- Matches ALL CLI signatures
- Added an extensive README

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [May 8, 2019, 8:58am UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/12 "2019-05-08T08:58:58Z")

</div>

> [@vasa-develop](#):
>
> The line here returns nil as response for the add request.

That line returns a bad request error. The error should contain more info about why.

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 8, 2019, 8:27pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/13 "2019-05-08T20:27:39Z")

</div>

Yes, I checked the response from the `add` API using Postman and it was giving the CID indeed.

 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/5/5546d568288e45133d2b8f590e412ba024c2e306.png)

I tried a lot, but I am not able to figure out what am I missing(it adds & pins the data to the cluster, but the final response is missing the CIDs.). I have added an [**issue**](https://github.com/cluster-labs/ipfs-cluster-api/issues/3) for the same.

I would love some help here 🙂 It seems to be the final glitch remaining in the `ipfs-cluster-api`.

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 8, 2019, 9:18pm UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/14 "2019-05-08T21:18:13Z")

</div>

After 3 straight hours of debugging…FINALLY found the culprit.😤

![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/7/7c1436f6d67baad085342fd076617cee8658f852.png)

Anyways, will fix the issue, and update the docs accordingly.  
Will also do some cleanups.

Will release **v0.0.4** soon.

---

<div class="post-metadata">

**Author:** ![vasa-develop](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasa-develop/32/1749_2.png) [@vasa-develop](https://discuss.ipfs.tech/u/vasa-develop)\
**Post date:** [May 11, 2019, 7:29am UTC](https://discuss.ipfs.tech/t/released-unofficial-ipfs-cluster-api/5338/15 "2019-05-11T07:29:05Z")

</div>

Released [v0.0.5](https://www.npmjs.com/package/ipfs-cluster-api/v/0.0.5)

Now get `ipfs_cluster` IN BROWSER via:

- browserify
- webpack
- CDN links
