Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.5 KB

repository_create.rst

File metadata and controls

65 lines (43 loc) · 1.5 KB

repository_create

POST /orgs/{oid}/repositories

Summary

  • Method: POST
  • Response Code: 201
  • Response Formats: application/xml application/json
  • Since: UForge 3.5.1

Creates a new repository in an organization.

Please refer to repository-object for a complete list of all the repository attributes.

Security Summary

  • Requires Authentication: true
  • Entitlements Required: org_administrate

URI Parameters

  • oid (required): the id of the org-object

HTTP Request Body Parameters

A repository-object object

Example Request

curl "https://uforge.example.com/api/orgs/{oid}/repositories" -X POST \
-u USER_LOGIN:PASSWORD -H "Accept: application/xml"-H "Content-type: application/xml" --data-binary "@representation.xml"

Example of representation.xml content (the request body):

<ns0:repository xmlns:ns0="http://www.usharesoft.com/uforge">
    <name>Example Repository</name>
    <url>http://example.com/repoUrl</url>
    <packagingType>RPM</packagingType>
    <coreRepository>true</coreRepository>
</ns0:repository>
  • distribprofile-object
  • repository-object
  • repositoryOS-getAll
  • repository-create
  • repository-delete
  • repository-getAll
  • repository-update