API Logs v1

Last Revision: 14 nov. 2019 07:36:40

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.

Get flight log entries

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

This 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.

Get commander last position

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.

Set/Update a comment

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 wish 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

This 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.

Get a comment

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 this system

Everything went fine, but no private comment is actually stored for this 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

This 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.

Get comments

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.