API Logs v1

Last Revision: Oct 20, 2017, 6:43:40 AM

To recover most of the private informations, an API Key is needed.

All messages returned by the API are in JSON. Most queries work with GET but they should also be compatible with POST requests.

If you need to do some testing on our API, please use the https://beta.edsm.net/ endpoint.
It is usually up to date with the production database, but if not, send us a message.

HTTP Request: GET https://www.edsm.net/api-logs-v1/set-log

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

systemName* NULL

The system name

dateVisited*
YYYY-MM-DD HH:MM:SS
NULL

The date of visit taken from the journal log or netLog.

All dates must be UTC.

shipId NULL

If set the shipId overrides the internal current ship id saved in our database.

x NULL

As of 1.6/2.1, netLog and journal give us rounded coordinates for systems.
Pass them to the API as they are written, do not try to format them, the API will handle them.

y NULL

See x.

z NULL

See x.

fromSoftware NULL

Name of the software used to submit the data.

For coordinates (See x, y, z) to be handled by the API, this parameter is mandatory.

fromSoftwareVersion NULL

Version of the software used to submit the data.

For coordinates (See x, y, z) to be handled by the API, this parameter is mandatory.

Output:

{
    msgnum          : 100,
    msg             : "OK",
    systemCreated   : true, 
    systemId        : 27 
    shipId          : 1 
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

systemId

Our internal ID for the system used to handle the flight log.
Some systems name are duplicated in the game, use it to ensure your are using the right system in your tool.

systemCreated

TRUE if the inserted flight log leads to creating a new system in our database.
Not returned when the system already exists.

shipId

The ship id used for the flight log.
Not returned when no shipId is found in the request or in the database.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

202 Missing API key

API Key is a required parameter.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

205 Missing date visited

The date of visit is required to insert a new flight log.

206 Date is not in the format YYYY-MM-DD HH:MM:SS

Do we need more explanations?!

207 Duplicate request

This error is thrown when two third party software send the same request in a small amount of time.

301 Missing system name

System name is required to insert a new flight log.

303 System probably non existant

The system from where the request was made probably does not exist.
Most likely it was submitted before and the name is a typo or it has been removed by FD.

Most of the time, if the system was renamed in-game, the API will try to redirect the flight log to the correct system.

304 System is a training mission

The system from where the request was made is only available in the training mission.
Eg: Training, Destination

305 System name is too long or invalid.

The system name provided is too long or invalid, if it happens check your verboseLog regex.

401 An entry for the same system already exists at that date.

Most likely that flight log was already pushed to our database.

402 An entry for the same system already exists just before the visited date.

To avoid multiple entries for the same systems at a nearly same date, we check the before and the after submission according to the visited date provided.
That can happend when other third party tools does not have the exact same server time.

AKA: You cannot submit twice the same system in a row (A to A), it must be A to B to A.

403 An entry for the same system already exists just after the visited date.

See 402.

HTTP Request: GET https://www.edsm.net/api-logs-v1/delete-log

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

systemName* NULL

The system name

dateVisited*
YYYY-MM-DD HH:MM:SS
NULL

The date of visit taken from the journal log or netLog.

All dates must be UTC.

Output:

{
    msgnum  : 100,
    msg     : "OK"
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

202 Missing API key

API Key is a required parameter.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

205 Missing date visited

The date of visit is required to delete a flight log.

206 Date is not in the format YYYY-MM-DD HH:MM:SS

Do we need more explanations?!

301 Missing system name

System name is required to delete a flight log.

303 System probably non existant

The system from where the request was made probably does not exist.
Most likely it was submitted before and the name is a typo or it has been removed by FD.

Most of the time, if the system was renamed in-game, the API will try to redirect the flight log to the correct system.

305 System name is too long or invalid.

The system name provided is too long or invalid, if it happens check your verboseLog regex.

404 Flight log entry not found

The submitted flight log entry was not found for deletion, you must send the exact same system and visited date.

HTTP Request: GET https://www.edsm.net/api-logs-v1/get-logs

This endpoint is subject to rate limit. Each user can query the endpoint 360 times every hour, which is around 1 request every 10 seconds.
Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

systemName NULL

Use the systemName parameter to filter flight logs by system name.

startDateTime
YYYY-MM-DD HH:MM:SS
NULL

If you only want to receive flight logs after a specific date & time, use this parameter.

That parameter is inclusive. All dates must be UTC.

startDateTime and endDateTime can be use together or separately, but the maximum interval will be 1 WEEK.
If both are set, endDateTime will be used to calculate the interval.
endDateTime
YYYY-MM-DD HH:MM:SS
NULL

If you only want to receive flight logs before a specific date & time, use this parameter.

That parameter is inclusive. All dates must be UTC.

startDateTime and endDateTime can be use together or separately, but the maximum interval will be 1 WEEK.
If both are set, endDateTime will be used to calculate the interval.
showId 0

Set to 1 if you want to get our internal id. Useful to handle duplicated name systems of the game.

Output:

{
    msgnum          : 100,
    msg             : "OK",
    startDateTime   : "2016-06-27 03:13:37", 
    endDateTime     : "2016-06-20 03:13:37", 
    logs            : [
        {
            shipId          : 1,
            system          : "Sol",
            systemId        : 27,
            firstDiscover   : false,
            date            : "2016-06-23 02:13:37"   
        }
    ] 
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

startDateTime

The startDateTime used by the request.

endDateTime

The endDateTime used by the request.

logs

An array containing the requested logs.

shipId

The id of the ship used to jump.

system

The name of the visited system.

systemId

The internal ID of the visited system, if requested.

firstDiscover

TRUE if the commander have first discover the system on EDSM, FALSE otherwise.

date

The date of visit for the system, in UTC.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

202 Missing API key

API Key is a required parameter.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

302 System not in database

That system is not yet in our database.

303 System probably non existant

The system from where the request was made probably does not exist.
Most likely it was submitted before and the name is a typo or it has been removed by FD.

Most of the time, if the system was renamed in-game, the API will try to redirect the flight log to the correct system.

429 Rate limit exceeded

To avoid abuse on our API, queries are limited per users.

HTTP Request: GET https://www.edsm.net/api-logs-v1/get-position

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

If not provided, location will only be returned if the commander has enabled his public profile, and share logs or map.

showId 0

Set to 1 if you want to get our internal id. Useful to handle duplicated name systems of the game.

showCoordinates 0

Set to 1 if you want to get the coordinates of the system.

If set to 1 only the last position with coordinates will be returned.

Output:

{
    msgnum          : 100,
    msg             : "OK",
    system          : "Sol",
    systemId        : 27,
    firstDiscover   : false,
    date            : "2016-06-23 02:13:37",
    coordinates     : {
        x   : -9530.5,
        y   : -910.28125,
        z   : 19808.125
    },
    url             : "https://www.edsm.net/en/user/profile/id/952/cmdr/Anthor"
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

system

The name of the visited system.

systemId

The internal ID of the visited system, if requested.

firstDiscover

TRUE if the commander have first discover the system on EDSM, FALSE otherwise.

date

The date of visit for the system, in UTC.

The date is only returned if apiKey is provided or the commander has enabled Flight logs timestamps

coordinates

An array containing the coordinates of the last known location of the commander.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

HTTP Request: GET https://www.edsm.net/api-logs-v1/set-comment

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

systemName* NULL

The system name

systemId NULL

By passing directly our intenral ID, you can override the system name.
This parameter is used to bypass duplicate name systems.

comment* NULL

The comment you which to store.

If you need to erase a comment, just pass an empty one.

Output:

{
    msgnum      : 100,
    msg         : "OK",
    comment     : "My comment!",
    lastUpdate  : "2016-06-23 13:37:00"
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

comment

The new stored comment.

lastUpdate

The last update datetime of the comment.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

202 Missing API key

API Key is a required parameter.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

204 Missing comment

Comment is a required parameter.

301 Missing system name

System name is required to delete a flight log.

302 System not in database

That system is not yet in our database.

303 System probably non existant

The system from where the request was made probably does not exist.
Most likely it was submitted before and the name is a typo or it has been removed by FD.

Most of the time, if the system was renamed in-game, the API will try to redirect the flight log to the correct system.

305 System name is too long or invalid.

The system name provided is too long or invalid, if it happens check your verboseLog regex.

HTTP Request: GET https://www.edsm.net/api-logs-v1/get-comment

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

systemName* NULL

The system name

systemId NULL

By passing directly our intenral ID, you can override the system name.
This parameter is used to bypass duplicate name systems.

Output:

{
    msgnum      : 100,
    msg         : "OK",
    comment     : "My comment!",
    lastUpdate  : "2016-06-23 13:37:00"
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

comment

The stored comment.

lastUpdate

The last update datetime of the comment.

Codes

Code Message
100 OK

Everything went fine!

101 OK, but no private comment stored for that system

Everything went fine, but no private comment is actually stored for that system in the database yet!
If you have a comment in your local database, it's time to syncronised it.

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

202 Missing API key

API Key is a required parameter.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.

301 Missing system name

System name is required to delete a flight log.

302 System not in database

That system is not yet in our database.

303 System probably non existant

The system from where the request was made probably does not exist.
Most likely it was submitted before and the name is a typo or it has been removed by FD.

Most of the time, if the system was renamed in-game, the API will try to redirect the flight log to the correct system.

305 System name is too long or invalid.

The system name provided is too long or invalid, if it happens check your verboseLog regex.

HTTP Request: GET https://www.edsm.net/api-logs-v1/get-comments

Parameter Default Description
commanderName* NULL

The name of the commander as registered on EDSM.
Your commander name for example is: Guest.

apiKey* NULL

The API Key associate the commander name with his account.
API Key can be generated under the settings > My API Key tab.

API Key is used to ensure your private informations stays private.

startDateTime
YYYY-MM-DD HH:MM:SS
NULL

If you only want to receive comments updated after a specific date & time, use this parameter.

That parameter is inclusive. All dates must be UTC.

showId 0

Set to 1 if you want to get our internal id. Useful to handle duplicated name systems of the game.

Output:

{
    msgnum      : 100,
    msg         : "OK",
    comments    : [
        {
            system      : "Sol",
            systemId    : 27,
            comment     : "My comment!",
            lastUpdate  : "2016-06-23 13:37:00"
        }
    ]
}

Parameter Description
msgnum

The code of the output. See Codes section for more informations.

msg

The verbose message of the output. See Codes section for more informations.

comments

An array of comments

system

The name of the commented system.

systemId

The internal ID of the commented system, if requested.

comment

The stored comment.

lastUpdate

The last update datetime of the comment.

Codes

Code Message
100 OK

Everything went fine!

201 Missing commander name

Commander name is a required parameter and must be one of the registered user on EDSM.

202 Missing API key

API Key is a required parameter.

203 Commander name/API Key not found

The commander name or the API Key provided does not correspond to any user in our database.