adds dataset urn to id translation function
@@ -12,3 +12,12 @@ export const datasetsUrlRoot = `${ApiRoot}/datasets`;
* @return {string} the dataset url
*/
export const datasetUrlById = (id: number): string => `${datasetsUrlRoot}/${id}`;
+
+/**
+ * Constructs a url to get a dataset id given a dataset urn
+ * @param {string} urn
+ * @return {string}
+ */
+export const datasetIdTranslationUrlByUrn = (urn: string): string => {
+ return `${datasetsUrlRoot}/idfromurn/${encodeURIComponent(urn)}`;
+};
