Quantcast ESOUI AddOn update API - ESOUI
Thread Tools Display Modes
10/08/16, 03:36 PM   #1
Dolby
Every day I'm shuffling
 
Dolby's Avatar
Premium Member
WoWInterface Admin
Join Date: Feb 2004
Posts: 1,147
ESOUI AddOn update API

How to use the ESOUI API via Curl:

Generate your API token here.
  • Keep this token private as it has access to submit updates to your AddOn via our API.
  • Delete the token at any time to revoke its access to your AddOns
  • Team members can generate their own api token, no need to share yours.

GET AddOns you have access to:
Code:
curl -H "x-api-token: <Your Token>" https://api.esoui.com/addons/list.json
GET AddOn details:
Code:
curl -H "x-api-token: <Your Token>" https://api.esoui.com/addons/details/<id>.json
POST Updates: (If you GET the endpoint it will list what can be changed via this endpoint)
Code:
curl -H "x-api-token: <Your Token>" -F "id=8163" -F "version=123456789" -F "compatible=2.6" -F "[email protected]/Users/dolby/Downloads/test2.zip" https://api.esoui.com/addons/update
List of valid data you can POST:
Just do a GET on https://api.esoui.com/addons/update and you’ll receive an error with a list of valid data points.

If you'd like to just test your script that interfaces with our API you can use the /updatetest endpoint instead: https://api.esoui.com/addons/updatetest. Nothing will actually save when you POST here so you can test that your script is working.


HTTP:
Error Responce:
  • 403 - You must be authenticated to use this API. (Missing or invalid token or cookie)
  • 404 - No AddOns found. (You don't have any AddOns)
  • 404 - ID(s) are missing for AddOn details.
  • 405 - Missing required data fields for AddOn Update (See actual error message for a list of fields)
  • 403 - AddOn Disabled (An admin has disabled your AddOn)
  • 401 - Permission Denied (You are not the author or team member of this AddOn)
  • 415 - File type not supported (You have tried to upload a file other than a zip/rar)
  • 500 - File update failed (Contact an admin, something bad happened)

Normal Response:
  • 200 - (Returned when you successfully GET data from the API)
  • 202 - Update Accepted. (Returned when you POST an update to your AddOn)

Last edited by Dolby : 10/09/16 at 10:32 AM.
  Reply With Quote
10/25/16, 03:56 PM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,127
Is it possible to create a new addon via the api or do I have to upload it via the website the first time? Just wondering if I could automate that step for new addons.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
10/25/16, 04:34 PM   #3
Dolby
Every day I'm shuffling
 
Dolby's Avatar
Premium Member
WoWInterface Admin
Join Date: Feb 2004
Posts: 1,147
First time (New projects) you need to upload it via the website.
  Reply With Quote
12/28/16, 04:47 AM   #4
Taraezor
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 4
Thumbs up Mac OSX

Well I checked if we in OSX land have Curl. BSD Unix roots and all... a quick "man curl" in the Terminal app confirms we are good to go, maybe.

Got as far as testing using the "update test" suggestion as per the OP.

All good.

Example:

1) Generate your token as per the link above.
2) Fire up your Terminal app.
3) curl -H "x-api-token:tttttttttttttttttttttttttt" https://api.esoui.com/addons/list.json

That will give a table of all your ESO AddOns. The ID is the important bit. Most likely a three digit number. That string of "t"s is your token. It'll be heaps longer than that!

4) curl -H "x-api-token:tttttttttttttttttttttttttt" https://api.esoui.com/addons/details/nnn.json

where "nnn" is the ID of your AddOn. This step is not necessary. It just lists what is there if you can't be bothered getting that same data in a formatted Safari/Chrome page.

5) curl -H "x-api-token:tttttttttttttttttttttttttt" -F "id=nnn" -F "version=1.13" -F "compatible=2.6" -F "[email protected]/Users/Chris/desktop/MyLovelyFile.zip" https://api.esoui.com/addons/updatetest

To test things out. Easy as that.

Next actual update I'll be using Curl although I must say that unlike other places which seem to be cursed <cough> with some kind of page loading or bandwidth problem, over here at ESOUI things are always nice and zippy so I don't mind using the web interface at all. But this system would be neat for bulk updates in one go.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » ESOUI AddOn update API

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off