# Uploading snapshot artifacts via REST API

**URL:** <https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340>\
**Category:** Sonatype Nexus Repository\
**Tags:** nexus-repository\
**Created:** [September 21, 2022, 12:59pm UTC](https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340 "2022-09-21T12:59:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emiliogonzalez](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@emiliogonzalez](https://community.sonatype.com/u/emiliogonzalez)\
**Post date:** [September 21, 2022, 12:59pm UTC](https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340/1 "2022-09-21T12:59:45Z")

</div>

Hi everyone.

In a nutshell, is it possible to upload snapshot artifacts into Nexus 3 by [using an HTTP POST to the API](https://support.sonatype.com/hc/en-us/articles/115006744008-How-can-I-programmatically-upload-files-into-Nexus-3-)? I have the feeling that snapshot uploading might be strictly tied to the maven-deploy-plugin, but I had to ask.

Thank you!

Cheers

---

<div class="post-metadata">

**Author:** ![jeff.wise](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/jeff.wise/32/2421_2.png) [@jeff.wise](https://community.sonatype.com/u/jeff.wise)\
**Post date:** [September 21, 2022, 1:55pm UTC](https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340/2 "2022-09-21T13:55:29Z")

</div>

Just curious. With so much tooling available for publishing artifacts, why do you need to write your own?

---

<div class="post-metadata">

**Author:** ![mmartz](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@mmartz](https://community.sonatype.com/u/mmartz)\
**Post date:** [September 21, 2022, 2:15pm UTC](https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340/3 "2022-09-21T14:15:00Z")

</div>

I’m pretty sure we didn’t design the API to allow for uploading SNAPSHOT versions. We’d need to provides special fields to do so since the SNAPSHOT version doesn’t match the actual version uploaded.

---

<div class="post-metadata">

**Author:** ![emiliogonzalez](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@emiliogonzalez](https://community.sonatype.com/u/emiliogonzalez)\
**Post date:** [September 21, 2022, 2:22pm UTC](https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340/4 "2022-09-21T14:22:49Z")

</div>

Hi Jeff,

When it comes to publishing releases, our pipelines rely on [this integration with Jenkins](https://help.sonatype.com/repomanager3/integrations/nexus-platform-plugin-for-jenkins), but it warns that the plugin will fail if you use a snapshot repo as target.

![image](https://canada1.discourse-cdn.com/flex047/uploads/communitysonatype/optimized/2X/8/8e57008ab7bf61703636672abbb24d9722f0899c_2_690x66.png)

That’s why I’m looking for alternatives such as uploading the artifact through the API and I honestly thought I had very limited options. We’re currently publishing with the maven-deploy-plugin but we wanted to try a different approach. You say there are different tools/ways of publishing. Would you mind expanding (even if it’s briefly) on this? I’m kind of new to Nexus and any information is welcome.

Thanks!!

---

<div class="post-metadata">

**Author:** ![emiliogonzalez](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@emiliogonzalez](https://community.sonatype.com/u/emiliogonzalez)\
**Post date:** [September 21, 2022, 2:31pm UTC](https://community.sonatype.com/t/uploading-snapshot-artifacts-via-rest-api/9340/5 "2022-09-21T14:31:54Z")

</div>

That’s just what I was afraid of. At least now I know that I need a different strategy.

Anyway, thanks a lot for the info!!
