Using Other Supported Formats with the REST API

While most of our REST API examples demonstrate API behavior using the Maven format, Nexus IQ Server also supports several other formats. Each format has a specific component identifier layout that must be used. These component identifiers consist of the format plus the format-specific coordinates.

Understanding component identifiers for a particular format allows you to use the same REST API operations with other formats. This is done by substituting component identifiers for a different format in the same operation, with some coordinates for the component identifier being required while others are optional.

Some API endpoints (such as the Component Versions REST API) may be more permissive than most REST API operations relating to missing coordinates. These may have more optional coordinates than listed on this page within the context of that particular operation.

Component identifiers for particular formats are listed below:

a-name

For a-name (authoritative name) component identifiers, the following coordinates are supported:

  • name
  • version

  • qualifier (optional)

Sample JSON for an a-name component identifier is provided below:

"componentIdentifier": {
  "format": "a-name",
  "coordinates": {
    "name": "pouchdb",
    "version": "6.3.1"
  }
}

maven

  • groupId
  • artifactId
  • version
  • extension
  • classifier (optional)

Sample JSON for a Maven component identifier is provided below:

"componentIdentifier": {
  "format": "maven",
  "coordinates": {
    "artifactId": "commons-fileupload",
    "groupId": "commons-fileupload",
    "version": "1.2.2",
    "extension":"jar"      
  }
}

npm

For npm component identifiers, the following coordinates are supported:

  • packageId
  • version

Sample JSON for an npm component identifier is provided below:

"componentIdentifier": {
  "format": "npm",
  "coordinates": {
    "packageId": "grunt-bower-submodule",
    "version": "0.2.3"
  }
}

nuget

For Nuget component identifiers, the following coordinates are supported:

  • packageId
  • version

Sample JSON for a NuGet component identifier is provided below:

"componentIdentifier": {
  "format": "nuget",
  "coordinates": {
    "packageId": "Nirvana.MongoProvider",
    "version": "1.0.53"
  }
}

pypi

For PyPI component identifiers, the following coordinates are supported:

  • name
  • version
  • extension
  • qualifier (optional)

Sample JSON for a PyPI component identifier is provided below:

"componentIdentifier": {
  "format": "pypi",
  "coordinates": {
    "name": "jaraco.logging",
    "version": "1.5",
    "extension": "tar.gz"      
  }
}

rpm

For rpm component identifiers, the following coordinates are supported:

  • name
  • version
  • architecture

Sample JSON for an rpm component identifier is provided below:

"componentIdentifier": {
  "format": "rpm",
  "coordinates": {
    "name": "AGReader",
    "version": "1.2-6.el6",
    "architecture": "ppc64"      
  }
}

gem

For Gem component identifiers, the following coordinates are supported:

  • name
  • version
  • platform (optional)

Sample JSON for a Gem component identifier is provided below:

"componentIdentifier": {
  "format": "gem",
  "coordinates": {
    "name": "rails",
    "version": "5.0.4"
  }
}