UNIS Logo
  • UNIS Representations Reference
  • UNIS REST API
    • Introduction
    • UNIS REST API Reference
      • Node
      • Port
      • Link
        • List/Query Links
        • Get Link
        • Insert Link
        • Update Link
        • Delete Link
        • Patch Link
      • Path
      • Service
      • Domain
      • Network
      • Topology
      • Metadata
UNIS
  • Docs »
  • UNIS REST API »
  • UNIS REST API Reference »
  • Link »
  • List/Query Links
  • View page source

List/Query Links¶

Return all Links registered in the UNIS instance.

Request¶

HTTP Request:

GET https://example.com/links

Query Parameters¶

All the attributes defined in, or extended from, Links can be queried by the mechanisms defined in UNIS query language.

Request Body¶

Empty

Response¶

Response Status Codes¶

  • 200 OK A list (might be empty) of Links is returned successfully.
  • 401 Unauthorized The supplied credentials are not enough to read Links.
  • 500 Internal Server Error Link(s) couldn’t be read, try again.

Response Body¶

If successful, a list (might be empty) of Link will be returned.

Examples¶

The examples include only important HTTP header fields for clarity.

List all Links¶

Request:

GET https://example.com/links
Content-Type: application/perfsonar+json
Accept: application/perfsonar+json
Connection: close

Response:

HTTP/1.1 200 OK
Content-Type: application/perfsonar+json; profile=http://unis.crest.iu.edu/schema/20120709/link#

[
    {
        "$schema": "http://unis.crest.iu.edu/schema/20120709/link#",
        "id": "link1",
        "selfRef": "https://example.com/links/link1"
        "ts": 1337711394175048,
        "directed": true,
        "capacity": 10000000000,
        "endpoints": {
            "source": {
                "href": "https://example.com/ports/1",
                "ref": "full"
            },
            "sink": {
                "href": "https://example.com/ports/2",
                "ref": "full"
            }
        }
    },
    {
        "$schema": "http://unis.crest.iu.edu/schema/20120709/link#",
        "id": "link2",
        "selfRef": "https://example.com/links/link2",
        "ts": 1337711394175048,
        "directed": false,
        "capacity": 10000000000,
        "endpoints": [
            {
                "href": "https://example.com/ports/3",
                "ref": "full"
            },
            {
                "href": "https://example.com/ports/4",
                "ref": "full"
            }
        ]
    }
]
Next Previous

© Copyright 2019, Indiana University

Built with Sphinx using a theme provided by Read the Docs.