Knowledge Base: Data API: URLs

URLs

Please make sure you read the introduction to the data API first.

Attributes

  • id (Integer, read-only)
  • permalink (String, read-only) URL identifier
  • label (String)
  • location (String, full URI, not included on GETs)
  • redirector (String, read-only, freshmeat.net redirector to the final URL)
  • host (String, read-only, host extracted from the final URL)

Request Root

http://freshmeat.net/projects/#{permalink}/urls

List URLs

GET /projects/#{permalink}/urls.json

Response:

[
  {
    "permalink": "6c7a302d6d00a7ec769be9bbe37610e9",
    "redirector": "http:\/\/freshmeat.net\/urls\/6c7a302d6d00a7ec769be9bbe37610e9",
    "id": 132240,
    "host": "bugzilla.kernel.org",
    "label": "Bug Tracker"
  }
]

Add URL

POST /projects/#{permalink}/urls.json

Request:

{
  "auth_code": "XXX",
  "url": {
    "label": "Demo",
    "location": "http://demo.freshmeat.net/"
  }
}

Response:

Status: 201 Created

Update URL

PUT /projects/#{permalink}/urls/#{url_permalink}.json

Request:

{
  "auth_code": "XXX",
  "url": {
    "label": "Website",
    "location": "http://freshmeat.net/projects/fmapi"
  }
}

Response:

Status: 200 OK

Remove URL

DELETE /projects/#{permalink}/urls/#{url_permalink}.json

Response:

Status: 200 OK