{"id":7419,"date":"2023-09-11T09:55:35","date_gmt":"2023-09-11T17:55:35","guid":{"rendered":"https:\/\/live-cometml.pantheonsite.io\/?p=7419"},"modified":"2025-04-24T17:14:14","modified_gmt":"2025-04-24T17:14:14","slug":"getting-started-with-comet-rest-api-2","status":"publish","type":"post","link":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/","title":{"rendered":"Getting Started with Comet REST API"},"content":{"rendered":"\n<div class=\"fi fj fk fl fm\">\n<div class=\"ab ca\">\n<div class=\"ch bg eu ev ew ex\">\n<figure class=\"mr ms mt mu mv mw mo mp paragraph-image\">\n<div class=\"mx my eb mz bg na\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nb nc c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd\" alt=\"\" width=\"700\" height=\"507\"><\/figure><div class=\"mo mp mq\"><picture><\/picture><\/div>\n<\/div><figcaption class=\"nd ne nf mo mp ng nh be b bf z dv\" data-selectable-paragraph=\"\">Photo by <a class=\"af ni\" href=\"https:\/\/unsplash.com\/@campaign_creators?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noopener ugc nofollow\">Campaign Creators<\/a> on <a class=\"af ni\" href=\"https:\/\/unsplash.com\/?utm_source=medium&amp;utm_medium=referral\" target=\"_blank\" rel=\"noopener ugc nofollow\">Unsplash<\/a><\/figcaption><\/figure>\n<p id=\"c108\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\"><a class=\"af ni\" href=\"https:\/\/www.comet.com\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Comet<\/a> is an experimentation platform that allows you to track, monitor, and compare your Machine Learning experiments. You can write your code in your preferred language, and then compare the results of your experiments in the Comet interface. Originally, I had tested Comet using Python, but in some of my recent articles, I have described how to easily work with Comet using <a class=\"af ni\" href=\"https:\/\/heartbeat.comet.ml\/how-to-write-your-comet-experiments-in-r-dd44f07041aa\" target=\"_blank\" rel=\"noopener ugc nofollow\">R<\/a>and <a class=\"af ni\" href=\"https:\/\/heartbeat.comet.ml\/writing-a-classification-task-using-comet-and-java-d929d1ef9f4e\" target=\"_blank\" rel=\"noopener ugc nofollow\">Java<\/a> as well.<\/p>\n<p id=\"4911\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">In this article, I focus on REST API. Yes, because Comet also provides a very useful REST API service to interact with!<\/p>\n<p id=\"1712\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">The article is organized as follows:<\/p>\n<ul class=\"\">\n<li id=\"7bfe\" class=\"nj nk fp be b gs nl nm nn gv no np nq nr oe nt nu nv of nx ny nz og ob oc od oh oi oj bj\" data-selectable-paragraph=\"\">Overview of the Comet REST API<\/li>\n<li id=\"47a1\" class=\"nj nk fp be b gs ok nm nn gv ol np nq nr om nt nu nv on nx ny nz oo ob oc od oh oi oj bj\" data-selectable-paragraph=\"\">A practical example<\/li>\n<\/ul>\n<h1 id=\"dab5\" class=\"op oq fp be or os ot gu ou ov ow gx ox oy oz pa pb pc pd pe pf pg ph pi pj pk bj\" data-selectable-paragraph=\"\">1. Overview of the Comet REST API<\/h1>\n<p id=\"8715\" class=\"pw-post-body-paragraph nj nk fp be b gs pl nm nn gv pm np nq nr pn nt nu nv po nx ny nz pp ob oc od fi bj\" data-selectable-paragraph=\"\">The Comet REST API service allows you to access workspaces, projects, experiments, models, and so on. To set up a connection with the Comet REST API service, you must first configure the <strong class=\"be pq\">HTTP Authorization Header<\/strong> with your Comet API key. In the next section, you will see how to build a REST API call using the <code class=\"cw pr ps pt pu b\">curl<\/code> command.<\/p>\n<p id=\"1db5\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Comet provides the following basic URL to access the REST API service:<\/p>\n<p id=\"adda\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\"><code class=\"cw pr ps pt pu b\"><strong class=\"be pq\">https:\/\/www.comet.com\/api\/rest\/v2\/<\/strong><\/code><\/p>\n<p id=\"8fe2\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Depending on what you pass as the next parameter to the basic URL, you will get different Comet objects.<\/p>\n<p id=\"53fb\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">For example, to access all the workspaces, you can use the <code class=\"cw pr ps pt pu b\">workspaces<\/code>parameter, as follows:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"ef1e\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">https:\/\/www.comet.com\/api\/rest\/v2\/workspaces<\/span><\/pre>\n<p id=\"52bc\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">You can also access all the projects within a workspace, using the <code class=\"cw pr ps pt pu b\">projects<\/code>parameter and the workspace name:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"70fa\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">https:\/\/www.comet.com\/api\/rest\/v2\/projects?workspaceName=aWorkspace<\/span><\/pre>\n<p id=\"72b0\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">To access the experiments within a project, you can use the <code class=\"cw pr ps pt pu b\">experiment<\/code>parameter, as well as the <code class=\"cw pr ps pt pu b\">projectId<\/code>. If you do not want to access the archived experiments, you need to set up the keyword archived to false:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"13e2\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">https:\/\/www.comet.com\/api\/rest\/v2\/experiments?projectId=aProjectId&amp;archived=false<\/span><\/pre>\n<p id=\"979f\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">You can even access models contained in the registry, using the registry-model parameter, as well as the workspace name:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"4a73\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">https:\/\/www.comet.com\/api\/rest\/v2\/registry-model?workspaceName=aWorkspace<\/span><\/pre>\n<p id=\"1e34\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">To download a model from the registry, you can use the registry-model parameter, as well as the workspace name, the model name, and its version:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"24a5\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">https:\/\/www.comet.com\/api\/rest\/v2\/registry-model\/item\/download?workspaceName=AWorkspace&amp;modelName=AModel&amp;version=AVersion<\/span><\/pre>\n<p id=\"105b\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">The Comet REST API service also permits you to access other objects. The list of all the calls provided by the Comet API is available <a class=\"af ni\" href=\"https:\/\/www.comet.com\/docs\/rest-api\/read-endpoints\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">here<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fi fj fk fl fm\">\n<div class=\"ab ca\">\n<div class=\"ch bg eu ev ew ex\">\n<blockquote class=\"ql\"><p id=\"df5b\" class=\"qm qn fp be qo qp qq qr qs qt qu od dv\" data-selectable-paragraph=\"\">Different teams have different needs. Comet\u2019s got you covered. <a class=\"af ni\" href=\"https:\/\/www.comet.com\/site\/how-uber-manages-machine-learning-experiments-with-comet\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Learn how the team at Uber use Comet\u2019s experiment management<\/a> to perform real-time model tuning.<\/p><\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"fi fj fk fl fm\">\n<div class=\"ab ca\">\n<div class=\"ch bg eu ev ew ex\">\n<h1 id=\"5d7b\" class=\"op oq fp be or os qv gu ou ov qw gx ox oy qx pa pb pc qy pe pf pg qz pi pj pk bj\" data-selectable-paragraph=\"\">2. A practical example<\/h1>\n<p id=\"d0e9\" class=\"pw-post-body-paragraph nj nk fp be b gs pl nm nn gv pm np nq nr pn nt nu nv po nx ny nz pp ob oc od fi bj\" data-selectable-paragraph=\"\">Let\u2019s suppose that you\u2019ve built an experiment and tested different models. You\u2019ve chosen the best of these models and registered it in the Comet Registry. You can find a detailed description of how to perform these operations in my previous article, entitled <a class=\"af ni\" href=\"https:\/\/heartbeat.comet.ml\/how-to-use-the-comet-registry-to-track-your-machine-learning-models-4b18e7f61500\" target=\"_blank\" rel=\"noopener ugc nofollow\">How to Use the Comet Registry to Track Your Machine Learning Models<\/a>.<\/p>\n<p id=\"29f2\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\"><strong class=\"be pq\">Now you want to use the Comet Registry as the official repository for your model.<\/strong> This could be very useful when you move your application to production because you could use Comet to always store the best and last model. Thanks to the use of the Comet Registry, you will no longer have to remember which model is the best, because you will keep everything under control in the Comet Registry. For example, if a new experiment proves that one model is better than the current one, it will be sufficient to register it in Comet Registry, and simply replace the previous model with the new one. Through the REST API, then you can always download the most updated model.<\/p>\n<p id=\"221f\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">To download the model, you can adopt two different strategies.<\/p>\n<p id=\"0f70\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">In the first strategy, you can use the Comet interface. If you access the Comet Registry, you can either: 1) download the most recent version of the model through the \u2018<strong class=\"be pq\">Get Model\u2019 button<\/strong>, or; 2) download any particular version by accessing the download icon, as shown in the following illustration:<\/p>\n<figure class=\"mr ms mt mu mv mw mo mp paragraph-image\">\n<div class=\"mx my eb mz bg na\" tabindex=\"0\" role=\"button\">\n<figure><img loading=\"lazy\" decoding=\"async\" class=\"bg nb nc c\" role=\"presentation\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/1*IhjCLuTumlkmaZw88JWSbA.png\" alt=\"\" width=\"700\" height=\"242\"><\/figure><div class=\"mo mp ra\"><picture><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/format:webp\/1*IhjCLuTumlkmaZw88JWSbA.png 1400w\" type=\"image\/webp\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\"><source srcset=\"https:\/\/miro.medium.com\/v2\/resize:fit:640\/1*IhjCLuTumlkmaZw88JWSbA.png 640w, https:\/\/miro.medium.com\/v2\/resize:fit:720\/1*IhjCLuTumlkmaZw88JWSbA.png 720w, https:\/\/miro.medium.com\/v2\/resize:fit:750\/1*IhjCLuTumlkmaZw88JWSbA.png 750w, https:\/\/miro.medium.com\/v2\/resize:fit:786\/1*IhjCLuTumlkmaZw88JWSbA.png 786w, https:\/\/miro.medium.com\/v2\/resize:fit:828\/1*IhjCLuTumlkmaZw88JWSbA.png 828w, https:\/\/miro.medium.com\/v2\/resize:fit:1100\/1*IhjCLuTumlkmaZw88JWSbA.png 1100w, https:\/\/miro.medium.com\/v2\/resize:fit:1400\/1*IhjCLuTumlkmaZw88JWSbA.png 1400w\" sizes=\"(min-resolution: 4dppx) and (max-width: 700px) 50vw, (-webkit-min-device-pixel-ratio: 4) and (max-width: 700px) 50vw, (min-resolution: 3dppx) and (max-width: 700px) 67vw, (-webkit-min-device-pixel-ratio: 3) and (max-width: 700px) 65vw, (min-resolution: 2.5dppx) and (max-width: 700px) 80vw, (-webkit-min-device-pixel-ratio: 2.5) and (max-width: 700px) 80vw, (min-resolution: 2dppx) and (max-width: 700px) 100vw, (-webkit-min-device-pixel-ratio: 2) and (max-width: 700px) 100vw, 700px\" data-testid=\"og\"><\/picture><\/div>\n<\/div>\n<figcaption class=\"nd ne nf mo mp ng nh be b bf z dv\" data-selectable-paragraph=\"\">Image by Author<\/figcaption>\n<\/figure>\n<p id=\"1e27\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">This strategy, however, requires you to <em class=\"rb\">manually<\/em> download the model version you are interested in. Thus, every time you want to download the model, you need to access the Comet interface.<\/p>\n<p id=\"8fe5\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">In the second strategy, you can write code in your preferred language to download the model from the registry <em class=\"rb\">automatically<\/em> by using the Comet Python API.<\/p>\n<p id=\"03fa\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Here I combine REST API and bash scripting to download the model.<\/p>\n<p id=\"3944\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">First, create a file named <code class=\"cw pr ps pt pu b\">get_model.sh<\/code>. Then, edit as follows:<\/p>\n<p id=\"c564\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Define some variables containing your Comet API and your workspace:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"1116\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">#!\/bin\/sh<\/span><span id=\"ffd9\" class=\"pz oq fp pu b ig rc qb l iz qc\" data-selectable-paragraph=\"\">COMET_API_KEY='YOUR_COMET_API_KEY'\nCOMET_WORKSPACE='YOUR_COMET_WORKSPACE'<\/span><\/pre>\n<p id=\"d9d0\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Now define two additional variables containing the model name and the model version you want to download:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"faef\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">MODEL_NAME='YOUR_MODEL_NAME'\nMODEL_VERSION='YOUR_MODEL_VERSION'<\/span><\/pre>\n<p id=\"4468\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Finally, use the <code class=\"cw pr ps pt pu b\">curl<\/code> command to download the model:<\/p>\n<pre class=\"mr ms mt mu mv pv pu pw px ax py bj\"><span id=\"c023\" class=\"pz oq fp pu b ig qa qb l iz qc\" data-selectable-paragraph=\"\">curl -o model.zip -s \"https:\/\/www.comet.com\/api\/rest\/v2\/registry-model\/item\/download?workspaceName=$COMET_WORKSPACE&amp;modelName=$MODEL_NAME&amp;version=$MODEL_VERSION\" -H \"Authorization: $COMET_API_KEY\"<\/span><\/pre>\n<p id=\"1e91\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">The downloaded model is stored in a file named <code class=\"cw pr ps pt pu b\">model.zip<\/code>. To restore this file to the original model, simply unzip it.<\/p>\n<p id=\"fa17\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">And that\u2019s all \u2014 quick and simple!<\/p>\n<h1 id=\"98e9\" class=\"op oq fp be or os ot gu ou ov ow gx ox oy oz pa pb pc pd pe pf pg ph pi pj pk bj\" data-selectable-paragraph=\"\">Summary<\/h1>\n<p id=\"952f\" class=\"pw-post-body-paragraph nj nk fp be b gs pl nm nn gv pm np nq nr pn nt nu nv po nx ny nz pp ob oc od fi bj\" data-selectable-paragraph=\"\">Congratulations! You have just learned the Comet REST API and how to use it to download a model from the Comet Model Registry.<\/p>\n<p id=\"58ae\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">You can use Comet REST API for different purposes, including the integration of Comet with a CI\/CD pipeline. You can find more information about it <a class=\"af ni\" href=\"https:\/\/www.comet.com\/docs\/v2\/guides\/model-management\/webhooks\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">here<\/a>.<\/p>\n<p id=\"1182\" class=\"pw-post-body-paragraph nj nk fp be b gs nl nm nn gv no np nq nr ns nt nu nv nw nx ny nz oa ob oc od fi bj\" data-selectable-paragraph=\"\">Happy Coding! Happy <a class=\"af ni\" href=\"https:\/\/www.comet.com\/\" target=\"_blank\" rel=\"noopener ugc nofollow\">Comet<\/a>!<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Photo by Campaign Creators on Unsplash Comet is an experimentation platform that allows you to track, monitor, and compare your Machine Learning experiments. You can write your code in your preferred language, and then compare the results of your experiments in the Comet interface. Originally, I had tested Comet using Python, but in some of [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"customer_name":"","customer_description":"","customer_industry":"","customer_technologies":"","customer_logo":"","footnotes":""},"categories":[6,7],"tags":[],"coauthors":[132],"class_list":["post-7419","post","type-post","status-publish","format-standard","hentry","category-machine-learning","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Getting Started with Comet REST API - Comet<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting Started with Comet REST API\" \/>\n<meta property=\"og:description\" content=\"Photo by Campaign Creators on Unsplash Comet is an experimentation platform that allows you to track, monitor, and compare your Machine Learning experiments. You can write your code in your preferred language, and then compare the results of your experiments in the Comet interface. Originally, I had tested Comet using Python, but in some of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Comet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cometdotml\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-11T17:55:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T17:14:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd\" \/>\n<meta name=\"author\" content=\"Angelica Lo Duca\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Cometml\" \/>\n<meta name=\"twitter:site\" content=\"@Cometml\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Angelica Lo Duca\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Getting Started with Comet REST API - Comet","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/","og_locale":"en_US","og_type":"article","og_title":"Getting Started with Comet REST API","og_description":"Photo by Campaign Creators on Unsplash Comet is an experimentation platform that allows you to track, monitor, and compare your Machine Learning experiments. You can write your code in your preferred language, and then compare the results of your experiments in the Comet interface. Originally, I had tested Comet using Python, but in some of [&hellip;]","og_url":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/","og_site_name":"Comet","article_publisher":"https:\/\/www.facebook.com\/cometdotml","article_published_time":"2023-09-11T17:55:35+00:00","article_modified_time":"2025-04-24T17:14:14+00:00","og_image":[{"url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd","type":"","width":"","height":""}],"author":"Angelica Lo Duca","twitter_card":"summary_large_image","twitter_creator":"@Cometml","twitter_site":"@Cometml","twitter_misc":{"Written by":"Angelica Lo Duca","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#article","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/"},"author":{"name":"Team Comet Digital","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/6266601170c60a7a82b3e0043fbe8ddf"},"headline":"Getting Started with Comet REST API","datePublished":"2023-09-11T17:55:35+00:00","dateModified":"2025-04-24T17:14:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/"},"wordCount":808,"publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd","articleSection":["Machine Learning","Tutorials"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/","url":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/","name":"Getting Started with Comet REST API - Comet","isPartOf":{"@id":"https:\/\/www.comet.com\/site\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#primaryimage"},"image":{"@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#primaryimage"},"thumbnailUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd","datePublished":"2023-09-11T17:55:35+00:00","dateModified":"2025-04-24T17:14:14+00:00","breadcrumb":{"@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#primaryimage","url":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd","contentUrl":"https:\/\/miro.medium.com\/v2\/resize:fit:700\/0*llfxwHdkVDBmTuQd"},{"@type":"BreadcrumbList","@id":"https:\/\/www.comet.com\/site\/blog\/getting-started-with-comet-rest-api-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.comet.com\/site\/"},{"@type":"ListItem","position":2,"name":"Getting Started with Comet REST API"}]},{"@type":"WebSite","@id":"https:\/\/www.comet.com\/site\/#website","url":"https:\/\/www.comet.com\/site\/","name":"Comet","description":"Build Better Models Faster","publisher":{"@id":"https:\/\/www.comet.com\/site\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.comet.com\/site\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.comet.com\/site\/#organization","name":"Comet ML, Inc.","alternateName":"Comet","url":"https:\/\/www.comet.com\/site\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2025\/01\/logo_comet_square.png","width":310,"height":310,"caption":"Comet ML, Inc."},"image":{"@id":"https:\/\/www.comet.com\/site\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/cometdotml","https:\/\/x.com\/Cometml","https:\/\/www.youtube.com\/channel\/UCmN63HKvfXSCS-UwVwmK8Hw"]},{"@type":"Person","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/6266601170c60a7a82b3e0043fbe8ddf","name":"Team Comet Digital","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.comet.com\/site\/#\/schema\/person\/image\/4f0c0a8cc7c0e87c636ff6a420a6647c","url":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/08\/Screen-Shot-2023-08-12-at-8.58.50-AM-96x96.png","contentUrl":"https:\/\/www.comet.com\/site\/wp-content\/uploads\/2023\/08\/Screen-Shot-2023-08-12-at-8.58.50-AM-96x96.png","caption":"Team Comet Digital"},"sameAs":["https:\/\/www.comet.ml\/"],"url":"https:\/\/www.comet.com\/site\/blog\/author\/teamcometdigital\/"}]}},"_links":{"self":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/comments?post=7419"}],"version-history":[{"count":1,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7419\/revisions"}],"predecessor-version":[{"id":15550,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/posts\/7419\/revisions\/15550"}],"wp:attachment":[{"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/media?parent=7419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/categories?post=7419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/tags?post=7419"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.comet.com\/site\/wp-json\/wp\/v2\/coauthors?post=7419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}