Use API, but what adress for my installation

If you got some trouble or need help configuring AirDC++, we're here to help

Use API, but what adress for my installation

Postby Exile82 » 23 Feb 2021, 20:14

Hi guys! I am integrating AirDC into my smart home, and I will get notified for new bundles added to my queue.
But what adress will I replace the mockup server with? https://private-anon-3c2bdff3aa-airdcpp ... 7Bcount%7D

I thought it would be https://XXX.XXX.XX.XXX:5600/queue/bundles/{start}/{count}? Where the X:s represents my external IP/Dynamic DNS?
Exile82
 
Posts: 9
Joined: 13 Jan 2019, 09:37

Re: Use API, but what adress for my installation

Postby maksis » 23 Feb 2021, 20:18

Does the example curl command in https://airdcpp.docs.apiary.io/#introdu ... th-the-api help?
User avatar
maksis
Site Admin
 
Posts: 920
Joined: 23 Nov 2010, 18:56

Re: Use API, but what adress for my installation

Postby Exile82 » 23 Feb 2021, 21:14

Hi maksis!
Thanks for your response, actually I would like to access the API externally. I do not have a bunch of choices since Athom Homey (a home controller) is my weapon of choice.
I have got a nice JSON scrip running to check bundles:
const url = “https://private-anon-3c2bdff3aa-airdcpp.apiary-mock.com/queue/bundles/{0}/{100} ”;
let data = await fetch(url);
data = await data.json();
let name = data[0].name;
await tag(‘AirDC’, name);

I have used the mock server to create the script, which works fine. But I would like to call my own installation in order to get my bundles. I wish this is possible
Exile82
 
Posts: 9
Joined: 13 Jan 2019, 09:37

Re: Use API, but what adress for my installation

Postby maksis » 24 Feb 2021, 08:17

Just replace localhost with your external IP in the example.

I've updated the previously linked documentation with a better explanation of the base URL.
User avatar
maksis
Site Admin
 
Posts: 920
Joined: 23 Nov 2010, 18:56


Return to The Help Desk

Who is online

Users browsing this forum: Google [Bot] and 4 guests