Page 1 of 1

Use API, but what adress for my installation

PostPosted: 23 Feb 2021, 20:14
by Exile82
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?

Re: Use API, but what adress for my installation

PostPosted: 23 Feb 2021, 20:18
by maksis
Does the example curl command in https://airdcpp.docs.apiary.io/#introdu ... th-the-api help?

Re: Use API, but what adress for my installation

PostPosted: 23 Feb 2021, 21:14
by Exile82
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

Re: Use API, but what adress for my installation

PostPosted: 24 Feb 2021, 08:17
by maksis
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.