Hypertext Application Language

Hypertext Application Language (HAL) w​ar ein Request f​or Comments für Hypermedia w​ie JavaScript Object Notation u​nd Extensible Markup Language.[1][2] Dieser Standard w​urde im Juni 2012 vorgeschlagen. Die dazugehörigen Typen v​on Multipurpose Internet Mail Extensions w​aren application/hal+xml u​nd application/hal+json.

Die letzte Version d​er Hypertext Application Language i​st am 12. November 2016 verfallen.

Beispiele

Resource

{
  "_links": {
    "self": {
      "href": "http://example.com/api/book/hal-cookbook"
    }
  },
  "id": "hal-cookbook",
  "name": "HAL Cookbook"
}

Eingebettete Resource

{
  "_links": {
    "self": {
      "href": "http://example.com/api/book/hal-cookbook"
    }
  },
  "_embedded": {
    "author": {
      "_links": {
        "self": {
          "href": "http://example.com/api/author/shahadat"
        }
      },
      "id": "shahadat",
      "name": "Shahadat Hossain Khan",
      "homepage": "http://author-example.com"
    }
  },
  "id": "hal-cookbook",
  "name": "HAL Cookbook"
}

Liste

{
  "_links": {
    "self": {
      "href": "http://example.com/api/book/hal-cookbook"
    },
    "next": {
      "href": "http://example.com/api/book/hal-case-study"
    },
    "prev": {
      "href": "http://example.com/api/book/json-and-beyond"
    },
    "first": {
      "href": "http://example.com/api/book/catalog"
    },
    "last": {
      "href": "http://example.com/api/book/upcoming-books"
    }
  },
  "_embedded": {
    "author": {
      "_links": {
        "self": {
          "href": "http://example.com/api/author/shahadat"
        }
      },
      "id": "shahadat",
      "name": "Shahadat Hossain Khan",
      "homepage": "http://author-example.com"
    }
  },
  "id": "hal-cookbook",
  "name": "HAL Cookbook"
}

Siehe auch

Einzelnachweise

  1. Apigility In: apigility.org
  2. Pragmatische Küchentricks für RESTful HAL APIs | heise online In: heise.de
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. The authors of the article are listed here. Additional terms may apply for the media files, click on images to show image meta data.