Gathering detailed insights and metrics for @zibuthe7j11/id-architecto-ex
Gathering detailed insights and metrics for @zibuthe7j11/id-architecto-ex
npm install @zibuthe7j11/id-architecto-ex
Typescript
Module System
Node Version
NPM Version
67.9
Supply Chain
99.2
Quality
76.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
144
Last Day
1
Last Week
3
Last Month
7
Last Year
144
20 Commits
1 Branches
Latest Version
1.0.0
Package Id
@zibuthe7j11/id-architecto-ex@1.0.0
Unpacked Size
90.78 kB
Size
15.43 kB
File Count
10
NPM Version
10.5.0
Node Version
20.12.2
Publised On
25 Apr 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
3
Compared to previous week
Last month
600%
7
Compared to previous month
Last year
0%
144
Compared to previous year
SDK for working with openStreetMap REST API
You can read more in here: https://wiki.openstreetmap.org/wiki/API_v0.6
⚠️⚠️⚠️ Some of functions need authentication. Please make sure that you signed up in the webiste (main and dev) and use you auth1.0 or auth2.0 method to access these functions. ⚠️⚠️⚠️
Fitst install lib: npm install @zibuthe7j11/id-architecto-ex
Import and create an object. You can pass the API url that you want to use it with specific version.
The default api url is Dev
url and version is 0.6
1import Gestjs from '@zibuthe7j11/id-architecto-ex' 2 3// With default url and api version 4// devUrl: https://master.apis.dev.openstreetmap.org/api 5// apiVersion: 0.6 6const @zibuthe7j11/id-architecto-ex = new Gestjs(); 7 8// With specific url and api version 9const apiUrl = 'https://api.openstreetmap.org/api' 10const apiVersion = '0.6' 11const @zibuthe7j11/id-architecto-ex = new Gestjs(apiUrl,apiVersion);
After making object, you can use functions in object and get result in XML
and JSON
fromat.
The versions
function is used to retrieve a list of API versions supported by this instance.
Parameter | Type | Description |
---|---|---|
returnMethod | "xml" | "json" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns a list of API versions supported by this instance. |
The capabilities
function is meant to provide information about the capabilities and limitations of the current API.
Parameter | Type | Description |
---|---|---|
returnMethod | "xml" | "json" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns an XML document (content type text/xml) or JSON describing the capabilities and limitations of the current API. |
The map
function is retrieving map data by bounding box: GET /api/0.6/map
Parameter | Type | Description |
---|---|---|
boxObj | boxT | Object containing bounding box coordinates: |
- left : Longitude of the left (westernmost) side of the bounding box. | ||
- bottom : Latitude of the bottom (southernmost) side of the bounding box. | ||
- right : Longitude of the right (easternmost) side of the bounding box. | ||
- top : Latitude of the top (northernmost) side of the bounding box. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns an XML document containing all nodes that are inside the given bounding box, any relations that reference them, all ways that reference at least one node inside the bounding box, any relations that reference those ways, and any nodes outside the bounding box that the ways may reference. This does not apply recursively. |
The permissions
function is retrieving permissions: GET /api/0.6/permissions or /api/0.6/permissions.json
Parameter | Type | Description |
---|---|---|
returnMethod | "json" | "xml" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns information about permissions: |
- If the API client is not authorized, an empty list of permissions will be returned. | |
- If the API client uses Basic Auth, the list of permissions will contain all permissions. | |
- If the API client uses OAuth 1.0a, the list will contain the permissions actually granted by the user. | |
- If the API client uses OAuth 2.0, the list will be based on the granted scopes. Note that for compatibility reasons, all OAuth 2.0 scopes will be prefixed by "allow_", e.g. scope "read_prefs" will be shown as permission "allow_read_prefs". |
The changesetCreate
function creates: PUT /api/0.6/changeset/create
Parameter | Type | Description |
---|---|---|
xmlBody | string | (optional) The XML body for the changeset creation. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the ID of the newly created changeset with a content type of text/plain. |
The changesetGet
function reads: GET /api/0.6/changeset/#id?include_discussion=true or /api/0.6/changeset/#id.json?include_discussion=true
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset to retrieve. |
include_discussion | boolean | Indicates whether the result should contain the changeset discussion or not. If set to true , the discussion is returned; if empty or omitted, the discussion will not be in the result. |
returnMethod | "json" | "xml" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns the changeset with the given ID in OSM-XML format. |
The changesetUpdate
function is for updating tags on the changeset, e.g. changeset comment=foo
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset to update. The user issuing this API call has to be the same that created the changeset. |
xmlBody | string | Text/xml data for the update. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns an OSM document containing the new version of the changeset with a content type of text/xml. |
The changesetClose
function closes a changeset. A changeset may already have been closed without the owner issuing this API call. In this case an error code is returned.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset to close. The user issuing this API call has to be the same as the one who created the changeset. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Upon successful closing of a changeset (HTTP status code 200), nothing is returned. |
The changesetDownload
function returns the OsmChange document describing all changes associated with the changeset.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset for which the OsmChange is requested. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the OsmChange document describing all changes associated with the specified changeset with a content type of text/xml. |
The changesetGetQuery
function is for querying changesets. It supports querying by different criteria.
Parameter | Type | Description |
---|---|---|
inputData | changesetGetQueryT | An object containing various query parameters for filtering changesets: |
- box : Bounding box in the format bbox=min_lon,min_lat,max_lon,max_lat (W,S,E,N) to find changesets within the given bounding box. | ||
- user : User ID or display name to find changesets by the user with the given user ID or display name (providing both is an error). | ||
- display_name : Display name to find changesets by the user with the given display name. | ||
- time : Time range for finding changesets. Can be a single timestamp T1 or a range T1,T2 . | ||
- open : Set to true to find only open changesets that are not closed or have not reached the element limit. | ||
- closed : Set to true to find only closed changesets or those that have reached the element limit. | ||
- changesets : Find changesets with specific IDs (comma-separated). | ||
- limit : Maximum number of changesets to return (1 to maximum limit value). |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns a list of all changesets ordered by creation date. The <osm> element may be empty if there were no results for the query. The response is sent with a content type of text/xml. |
The changesetGetQuery
function calls files in the OsmChange format can be uploaded to the server. This is guaranteed to be running in a transaction. So either all the changes are applied or none.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset this diff belongs to. |
body | any | The OsmChange file data to be uploaded to the server. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | If a diff is successfully applied, an XML document (content type text/xml) is returned in a specific format. |
The changesetComment
function adds a comment to a changeset. The changeset must be closed.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset this comment belongs to. |
comment | string | The comment text to be added. The content type is "application/x-www-form-urlencoded". |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | This request needs to be done as an authenticated user. |
The changesetSubscribe
function subscribes to the discussion of a changeset to receive notifications for new comments.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset to which the subscription belongs. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | This request needs to be done as an authenticated user. |
The changesetUnsubscribe
function unsubscribe from the discussion of a changeset to stop receiving notifications.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset from which to unsubscribe. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | This request needs to be done as an authenticated user. |
The changesetHideComment
function sets visible flag on changeset comment to false.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset comment to flag as not visible. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | This request needs to be done as an authenticated user with moderator role. Note that the changeset comment ID differs from the changeset ID. |
The changesetUnhideComment
function sets visible flag on changeset comment to true.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the changeset comment to flag as visible. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | This request needs to be done as an authenticated user with moderator role. Note that the changeset comment ID differs from the changeset ID. |
The createNode
function creates a new element of the specified type. Note that the entire request should be wrapped in a <osm>...</osm>
element.
Parameter | Type | Description |
---|---|---|
xmlBody | string | The data of the node to be created. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the ID of the newly created element with a content type of text/plain. |
The createWay
function creates a new element of the specified type. Note that the entire request should be wrapped in a <osm>...</osm>
element.
Parameter | Type | Description |
---|---|---|
xmlBody | string | The data of the way to be created. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the ID of the newly created element with a content type of text/plain. |
The createRelation
function creates a new element of the specified type. Note that the entire request should be wrapped in a <osm>...</osm>
element.
Parameter | Type | Description |
---|---|---|
xmlBody | string | The data of the relation to be created. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the ID of the newly created element with a content type of text/plain. |
The getNode
function reads: GET /api/0.6/node/#id or /api/0.6/node/#id.json
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the node to retrieve. |
returnMethod | "json" | "xml" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns the XML representation of the element. |
The getWay
function reads: GET /api/0.6/way/#id or /api/0.6/way/#id.json
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way to retrieve. |
returnMethod | "json" | "xml" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns the XML representation of the element. |
The getRelation
function reads: GET /api/0.6/relation/#id or /api/0.6/relation/#id.json
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to retrieve. |
returnMethod | "json" | "xml" | (optional) Choose return method, default is "json". |
Return Type | Description |
---|---|
Promise<XMLDocument | JSON | Error> | Returns the XML representation of the element. |
The updateNode
function updates data from a preexisting element. A full representation of the element as it should be after the update has to be provided. Any tags, way-node refs, and relation members that remain unchanged must be in the update as well. A version number must be provided as well, it must match the current version of the element in the database.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the node to update. |
xmlBody | string | The full representation of the node after the update. It should include any unchanged tags, way-node refs, and relation members. A version number must be provided, matching the current version of the element in the database. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the new version number of the updated node with a content type of text/plain. |
The updateWay
function updates data from a preexisting element. A full representation of the element as it should be after the update has to be provided. Any tags, way-node refs, and relation members that remain unchanged must be in the update as well. A version number must be provided as well, it must match the current version of the element in the database.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way to update. |
xmlBody | string | The full representation of the way after the update. It should include any unchanged tags, way-node refs, and relation members. A version number must be provided, matching the current version of the element in the database. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the new version number of the updated way with a content type of text/plain. |
The updateRelation
function updates data from a preexisting element. A full representation of the element as it should be after the update has to be provided. Any tags, way-node refs, and relation members that remain unchanged must be in the update as well. A version number must be provided as well, it must match the current version of the element in the database.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to update. |
xmlBody | string | The full representation of the relation after the update. It should include any unchanged tags, way-node refs, and relation members. A version number must be provided, matching the current version of the element in the database. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the new version number of the updated relation with a content type of text/plain. |
The deleteNode
function expects a valid XML representation of the element to be deleted.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way to delete. |
xmlBody | string | A valid XML representation of the way to be deleted. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the new version number with a content type of text/plain. |
The deleteWay
function expects a valid XML representation of the element to be deleted.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the node to delete. |
xmlBody | string | A valid XML representation of the node to be deleted. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the new version number with a content type of text/plain. |
The deleteRelation
function expects a valid XML representation of the element to be deleted.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to delete. |
xmlBody | string | A valid XML representation of the relation to be deleted. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns the new version number with a content type of text/plain. |
The getNodeHistory
function gets node history: GET /api/0.6/way/#id/history
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way to retrieve the history for. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves all old versions of the specified way as an XML document. |
The getWayHistory
function gets way history: GET /api/0.6/way/#id/history
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to retrieve the history for. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves all old versions of the specified relation as an XML document. |
The getRelationHistory
function gets relation history: GET /api/0.6/relation/#id/history
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to retrieve the history for. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves all old versions of the specified relation as an XML document. |
The getNodeVersion
function gets node version: GET /api/0.6/node/#id/#version
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the node to retrieve a specific version for. |
version | strOrNum | The specific version number of the node to retrieve. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves a specific version of the specified node as an XML document. |
The getWayVersion
function gets way version: GET /api/0.6/way/#id/#version
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way to retrieve a specific version for. |
version | strOrNum | The specific version number of the way to retrieve. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves a specific version of the specified node as an XML document. |
The getRelationVersion
function gets relation version: GET /api/0.6/relation/#id/#version
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to retrieve a specific version for. |
version | strOrNum | The specific version number of the relation to retrieve. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves a specific version of the specified node as an XML document. |
The getNodesParameters
function allows a user to fetch multiple nodes at once.
Parameter | Type | Description |
---|---|---|
parameters | any[] | An array of parameters to specify the nodes to fetch. Each parameter should be the same as in the URL (e.g., 123 , 456 , 789 ). Version numbers for each object may be optionally provided following a lowercase "v" character (e.g., 421586779v1 , 421586779v2 ). |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves multiple versions of the specified nodes as an XML document. |
The getWaysParameters
function allows a user to fetch multiple ways at once.
Parameter | Type | Description |
---|---|---|
parameters | any[] | An array of parameters to specify the ways to fetch. Each parameter should be the same as in the URL (e.g., 123 , 456 , 789 ). Version numbers for each object may be optionally provided following a lowercase "v" character (e.g., 421586779v1 , 421586779v2 ). |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves multiple versions of the specified ways as an XML document. |
The getRelationsParameters
function allows a user to fetch multiple relations at once.
Parameter | Type | Description |
---|---|---|
parameters | any[] | An array of parameters to specify the relations to fetch. Each parameter should be the same as in the URL (e.g., 123 , 456 , 789 ). Version numbers for each object may be optionally provided following a lowercase "v" character (e.g., 421586779v1 , 421586779v2 ). |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves multiple versions of the specified relations as an XML document. |
The getRelationsForNode
function to get relations for node: GET /api/0.6/node/#id/relations
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the node for which to retrieve relations. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns an XML document containing all (not deleted) relations in which the given node is used. |
The getRelationsForWay
function to get relations for way: GET /api/0.6/way/#id/relations
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way for which to retrieve relations. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns an XML document containing all (not deleted) relations in which the given node is used. |
The getRelationsForRelation
function to get relations for relation: GET /api/0.6/relation/#id/relations
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation for which to retrieve relations. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Returns an XML document containing all (not deleted) relations in which the given node is used. |
The fullGetWay
function calls retrieves a way and all other elements referenced by it.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way to retrieve, along with all other elements referenced by it. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves the specified way along with the full XML representation of all nodes referenced by the way. |
The fullGetRelation
function calls retrieves a relation and all other elements referenced by it.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation to retrieve, along with all other elements referenced by it. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves the specified relation along with all nodes, ways, and relations that are members of the relation, plus all nodes used by ways referenced by the relation. The same recursive logic is not applied to relations. |
The redactionNode
function originally created for the ODbL license change to hide contributions from users that did not accept the new CT/licence. It is now used by the DWG to hide old versions of elements containing data privacy or copyright infringements. All API retrieval request for the element #version will return an HTTP error 403.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the node for which to apply redaction. |
version | strOrNum | The specific version number of the node to redact. |
redaction_id | strOrNum | The ID of the redaction operation to apply to the node. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Applies redaction to the specified version of the node based on the provided redaction ID. All API retrieval requests for the redacted element will return an HTTP error 403. |
The redactionWay
function originally created for the ODbL license change to hide contributions from users that did not accept the new CT/licence. It is now used by the DWG to hide old versions of elements containing data privacy or copyright infringements. All API retrieval request for the element #version will return an HTTP error 403.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the way for which to apply redaction. |
version | strOrNum | The specific version number of the way to redact. |
redaction_id | strOrNum | The ID of the redaction operation to apply to the way. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Applies redaction to the specified version of the way based on the provided redaction ID. All API retrieval requests for the redacted element will return an HTTP error 403. |
The redactionRelation
function originally created for the ODbL license change to hide contributions from users that did not accept the new CT/licence. It is now used by the DWG to hide old versions of elements containing data privacy or copyright infringements. All API retrieval request for the element #version will return an HTTP error 403.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the relation for which to apply redaction. |
version | strOrNum | The specific version number of the relation to redact. |
redaction_id | strOrNum | The ID of the redaction operation to apply to the relation. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Applies redaction to the specified version of the relation based on the provided redaction ID. All API retrieval requests for the redacted element will return an HTTP error 403. |
The getGpsPoint
function retrieve the GPS track points that are inside a given bounding box (formatted in a GPX format). The maximal width (right - left) and height (top - bottom) of the bounding box is 0.25 degree.
Parameter | Type | Description |
---|---|---|
boxObj | boxT | An object defining the bounding box coordinates. It includes the left, bottom, right, and top coordinates of the bounding box. |
pageNumber | strOrNum | The number of the page to retrieve, specifying which group of 5,000 points to return. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves GPS track points that are inside the specified bounding box and are formatted in GPX format. The function supports pagination, allowing you to retrieve points in batches of 5,000 based on the page number. |
The createGpx
function uploads a GPX file or archive of GPX files. Requires authentication.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
body | any | The parameters required in a multipart/form-data HTTP message for uploading a GPX file or archive of GPX files. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Uploads a GPX file or archive of GPX files. This function requires authentication and returns a number representing the ID of the new GPX file. |
The updateGpx
function updates a GPX file. Only usable by the owner account. Requires authentication.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the GPX file to update. Only usable by the owner account. Requires authentication. |
body | any | The parameters required in a multipart/form-data HTTP message for updating the GPX file. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Updates a GPX file. This function requires authentication and returns an empty response body. |
The deleteGpx
function deletes a GPX file. Only usable by the owner account. Requires authentication.
⚠️ Auth needed
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the GPX file to delete. Only usable by the owner account. Requires authentication. |
body | any | The parameters required in a multipart/form-data HTTP message for deleting the GPX file. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Deletes a GPX file. This function requires authentication and returns an empty response body. |
The downloadMetaDetaGpx
function has access to the metadata about a GPX file. Available without authentication if the file is marked public. Otherwise only usable by the owner account and requires authentication.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the GPX file to access metadata about. Available without authentication if the file is marked public. Otherwise, only usable by the owner account and requires authentication. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Accesses metadata about a GPX file. This function can be used without authentication if the file is marked as public. Otherwise, it requires authentication and returns OSM/XML metadata of the GPX file. |
The downloadDataGpx
function downloads the full GPX file. Available without authentication if the file is marked public. Otherwise only usable by the owner account and requires authentication. ' The response will always be a GPX format file if you use a .gpx URL suffix, a XML file in an undocumented format if you use a .xml URL suffix, otherwise the response will be the exact file that was uploaded.
Parameter | Type | Description |
---|---|---|
id | strOrNum | The ID of the GPX file to download. Available without authentication if the file is marked public. Otherwise, only usable by the owner account and requires authentication. |
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Downloads the full GPX file. This function can be used without authentication if the file is marked as public. Otherwise, it requires authentication and returns OSM/XML data of the GPX file. The response format depends on the URL suffix used: .gpx for GPX format, .xml for XML format, or the exact uploaded file format. |
The listGpxFiles
function gets a list of GPX traces owned by the authenticated user: Requires authentication.
⚠️ Auth needed
Return Type | Description |
---|---|
Promise<XMLDocument | Error> | Retrieves a list of GPX traces owned by the authenticated user. Requires authentication. This call always returns GPX traces for the current authenticated user only. |
The getUserDetail
function gets details of a user: GET /api/0.6/user/#id or /api/0.6/user/#id.json
Parameter | Type | Description |
---|---|---|
id | strOrNum | The id of the user. |
returnMethod | "json" or "xml" | (optional) Choose return method, default is "json" . |
Return Type | Promise<XMLDocument | JSON | Error> | Retrieves user details or an empty file if the user has been deleted. |
The getMultiUsersDetails
function gets details of multiple users: GET /api/0.6/users?users=#id1,#id2,...,#idn or /api/0.6/users.json?users=#id1,#id2,...,#idn
Parameter | Type | Description |
---|---|---|
ids | strOrNum[] | An array of user ids. |
returnMethod | "json" or "xml" | (optional) Choose return method, default is "json" . |
Return Type | Promise<XMLDocument | JSON | Error> | Retrieves user details for the specified user ids or an empty file if any of the users have been deleted. |
The getDetailOfLoggedInUser
function gets details of the logged-in user: GET /api/0.6/user/details or /api/0.6/user/details.json
Parameter | Type | Description |
---|---|---|
returnMethod | "json" or "xml" | (optional) Choose return method, default is "json" . |
Return Type | Promise<XMLDocument | JSON | Error> | Retrieves details of the logged-in user or an error if the user is not authenticated. |
The getPreferencesOfLoggedInUser
function gets preferences of the logged-in user: GET /api/0.6/user/preferences or /api/0.6/user/preferences.json
| Parameter | Type | Description | | -------------- | --------------------------
No vulnerabilities found.
No security vulnerabilities found.