Removed umnanned enum

Removed umnanned enum

#%RAML 1.0
---
title: Pickup Point API
baseUri: https://api.bring.com/pickuppoint/api/pickuppoint

documentation:
- title: Introduction
  content: |
      The Pickup point API provides a list of locations for package pickup. Based on a specified postal code or a geographical location, the 10 nearest pickup points are returned, sorted by driving time by car(source: Google). In instances where google is unable to retrieve driving times from a location to a pickup point(e.g. location on mainland and pickup point on an island), these pickup points will be sorted by aerial distance and placed last in the list. Response is available as either XML or JSON.

      A pickup point is defined as any location delivering shipments on behalf of Bring and Posten, such as post offices, selected grocery stores, lockers, etc.

      It is important to note, there are two sets of addresses in the response, postbox (address, postalCode) and visiting address (visitingAddress, visitingPostalCode). Postbox address is required to get a package produced correctly, use this AS RECIPIENT address on label. Visiting address is more appropriate for user interface (Street address of the PIB).

      ### Filtering results

      In addition to postal code or location, one or more optional parameters can be added to the request, adding additional restrictions to the pickup points being returned. One such parameter is `searchForText=<texts>`, resulting in a response where all pickup points have at least a partial match with the search string given in `<texts>`. This can be the name of the pickup point, its address, city, county, municipality or location. Go to the reference table or see additional examples for more information.

      #### Distinct PickupPointType

      Norway :
        - Type 4  : Post i Butikk (manned)
        - Type 19 : Posten pakkeutlevering (manned)
        - Type 21 : Postkontor (manned)
        - Type 32 : Postpunkt (manned)
        - Type 37 : Pakkeboks (unmanned)

      Sweden :
        - Type 34 : Manned
        - Type 38 : Locker

      Denmark :
        - Type 85 : Manned
        - Type 86 : Locker

      Finland :
        - Type SmartPOST  : Finland Smart Post Pickup
        - Type Posti      : Finland Posti Pickup Point
        - Type Noutopiste : Finland Pickup Point
        - Type LOCKER     : Finland Locker Pickup Point

- title: Authentication
  content: |
      To make API requests, you will need an API key from Mybring. Steps for getting a key and description of headers can be found on the general API [Getting Started / Authentication](/api/#authentication) page.

/{countryCode}/postalCode/{postalCode}{mediaTypeExtension}:
  displayName: Pickup points for postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json, .xml to get application/xml or .html to get HTML.
  get:
    description: List pickup points for postal code
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Available for Swedish, Finnish, Danish and Norway pickup point request.
        enum: [ manned, locker]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default. Try this param to get more pickup points, if a desired pickup point is missing in the response.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street. Use this param to get more accurate result.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.Use this param to get more accurate result.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for NO/postalCode/1407
        body:
          application/json:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.json
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.json
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.json
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.json
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.json
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.
          application/xml:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.xml
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.xml
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.xml
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.xml
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.xml
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.

/{countryCode}/location/{latitude},{longitude}{mediaTypeExtension}:
  displayName: Pickup points for location
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    latitude:
      displayName: Latitude
      description: Geographic coordinate specifying the north-south position.
      type: string
    longitude:
      displayName: Longitude
      description: Geographic coordinate specifying the east-west position.
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List pickup points closest to location
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Currently available for Swedish, Finnish and Danish pickup point request only.
        enum: [ manned, locker ]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for location/60.395226,5.321725
        body:
          application/json:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.json
          application/xml:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.xml

/{countryCode}/id/{id}{mediaTypeExtension}:
  displayName: A specific pickup point
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: Look up a specific pickup point
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for id/121110
        body:
          application/json:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.json
          application/xml:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.xml

/{countryCode}/all{mediaTypeExtension}:
  displayName: All pickup points in a country
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: All pickup points in a country
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string

/{countryCode}/postalCode/{postalCode}/default/{mediaTypeExtension}:
  displayName: Default pickup point(s) for a postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List default pickup point(s) for a postal code
    responses:
      200:
        displayName: Example response for postal code 1481
        body:
          application/json:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.json
          application/xml:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.xml

#%RAML 1.0
---
title: Pickup Point API
baseUri: https://api.bring.com/pickuppoint/api/pickuppoint

documentation:
- title: Introduction
  content: |
      The Pickup point API provides a list of locations for package pickup. Based on a specified postal code or a geographical location, the 10 nearest pickup points are returned, sorted by driving time by car(source: Google). In instances where google is unable to retrieve driving times from a location to a pickup point(e.g. location on mainland and pickup point on an island), these pickup points will be sorted by aerial distance and placed last in the list. Response is available as either XML or JSON.

      A pickup point is defined as any location delivering shipments on behalf of Bring and Posten, such as post offices, selected grocery stores, lockers, etc.

      It is important to note, there are two sets of addresses in the response, postbox (address, postalCode) and visiting address (visitingAddress, visitingPostalCode). Postbox address is required to get a package produced correctly, use this AS RECIPIENT address on label. Visiting address is more appropriate for user interface (Street address of the PIB).

      ### Filtering results

      In addition to postal code or location, one or more optional parameters can be added to the request, adding additional restrictions to the pickup points being returned. One such parameter is `searchForText=<texts>`, resulting in a response where all pickup points have at least a partial match with the search string given in `<texts>`. This can be the name of the pickup point, its address, city, county, municipality or location. Go to the reference table or see additional examples for more information.

      #### Distinct PickupPointType

      Norway :
        - Type 4  : Post i Butikk (manned)
        - Type 19 : Posten pakkeutlevering (manned)
        - Type 21 : Postkontor (manned)
        - Type 32 : Postpunkt (manned)
        - Type 37 : Pakkeboks (unmanned)

      Sweden :
        - Type 34 : Manned
        - Type 38 : Locker

      Denmark :
        - Type 85 : Manned
        - Type 86 : Locker

      Finland :
        - Type SmartPOST  : Finland Smart Post Pickup
        - Type Posti      : Finland Posti Pickup Point
        - Type Noutopiste : Finland Pickup Point
        - Type LOCKER     : Finland Locker Pickup Point

- title: Authentication
  content: |
      To make API requests, you will need an API key from Mybring. Steps for getting a key and description of headers can be found on the general API [Getting Started / Authentication](/api/#authentication) page.

/{countryCode}/postalCode/{postalCode}{mediaTypeExtension}:
  displayName: Pickup points for postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json, .xml to get application/xml or .html to get HTML.
  get:
    description: List pickup points for postal code
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Available for Swedish, Finnish, Danish with manned & locker type and Norway with manned & unmanned type pickup point request.
        enum: [ manned, locker , unmanned]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default. Try this param to get more pickup points, if a desired pickup point is missing in the response.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street. Use this param to get more accurate result.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.Use this param to get more accurate result.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for NO/postalCode/1407
        body:
          application/json:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.json
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.json
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.json
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.json
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.json
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.
          application/xml:
            examples:
              successful:
                displayName: Response for NO/postalCode/1407
                value: !include examples/by_postal_code.xml
              code_street:
                displayName: Postal code and street address
                value: !include examples/filter_address.xml
                description: |
                  Sometimes (especially in Denmark) it's a good idea to also specify the address when searching for pickup points, to get more accurate results.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/DK/postalCode/2000.json?street=Smallegade&streetNumber=3), we look for pickup points in Smallegade 3 and postal code 2000.
              specific_string:
                displayName: Pickup points containing a specific string
                value: !include examples/filter_search.xml
                description: |
                  If you want to return only the pickup points matching a specific string, you may use the `searchForText` query param. The given text can be the name of the pickup point, its address, city, county, municipality or location. Partial matches are also allowed.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?searchForText=KIWI), we look for pickup points near NO/1407 cotaining "Kiwi".
              specific_days:
                displayName: Pickup points open on specific days
                value: !include examples/filter_days.xml
                description: |
                  If you want to return only the pickup points open on specified days, you may use the `openingHoursSearchType=<day>` query param. `<day>` be:

                  - `ALL_WEEKDAYS` (default)
                  - `MONDAY`
                  - `TUESDAY`
                  - `WEDNESDAY`
                  - `THURSDAY`
                  - `FRIDAY`
                  - `SATURDAY`
                  - `SUNDAY`

                  If you want you can also add `openOnOrBefore` and / or `openOnOrAfter`, to limit the search even more.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openingHoursSearchType=SUNDAY), we look for pickup points near NO/1407 that are open Sundays.
              specific_hours:
                displayName: Pickup points open at specific hours
                value: !include examples/filter_hours.xml
                description: |
                  If you want to return only the pickup points open on specific hours, you may use the `openOnOrBefore=<time>` and/or `openOnOrAfter=<time>` query params.

                  The format of `<time>` is `HHmm`.

                  In [this example](https://api.bring.com/pickuppoint/api/pickuppoint/NO/postalCode/1407.json?openOnOrBefore=0800), we look for pickup points near NO/1407 open on or before 08:00.

/{countryCode}/location/{latitude},{longitude}{mediaTypeExtension}:
  displayName: Pickup points for location
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", "DK", "SE", "FI" ]
    latitude:
      displayName: Latitude
      description: Geographic coordinate specifying the north-south position.
      type: string
    longitude:
      displayName: Longitude
      description: Geographic coordinate specifying the east-west position.
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List pickup points closest to location
    queryParameters:
      searchForText:
        displayName: Text filter
        type: string
      openingHoursSearchType:
        displayName: Filter using opening hours
        enum: [ ALL_WEEKDAYS, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY ]
      openOnOrBefore:
        description: Format `HHmm`. Return only pickup points that are open on or before the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      openOnOrAfter:
        description: Format `HHmm`. Return only pickup points that are open on or after the specified time.
        type: string
        pattern: ^([01][0-9]|2[0-3])[0-5][0-9]$
      pickupPointType:
        displayName: Pickup-point type
        description: Currently available for Swedish, Finnish and Danish pickup point request only.
        enum: [ manned, locker ]
      numberOfResponses:
        description: Return the specified number of pickup points instead of the default.
        type: integer
        default: 10
      street:
        description: Searches for the nearest pickup points to the given street.
        type: string
      streetNumber:
        description: Searches for the nearest pickup points to the given street number.
        type: string
      callback:
        description: JSONP callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for location/60.395226,5.321725
        body:
          application/json:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.json
          application/xml:
            examples:
              successful:
                displayName: Response for location/60.395226,5.321725
                value: !include examples/by_coordinates.xml

/{countryCode}/id/{id}{mediaTypeExtension}:
  displayName: A specific pickup point
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: Look up a specific pickup point
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string
    responses:
      200:
        displayName: Example response for id/121110
        body:
          application/json:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.json
          application/xml:
            examples:
              successful:
                displayName: Response for id/121110
                value: !include examples/by_id.xml

/{countryCode}/all{mediaTypeExtension}:
  displayName: All pickup points in a country
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO", DK, SE, FI ]
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: All pickup points in a country
    queryParameters:
      callback:
        displayName: JSONP support
        description: Callback function name.
        type: string
      requestCountryCode:
        description: Country code of the requester. Only applicable for Norwegian pickup points.
        type: string

/{countryCode}/postalCode/{postalCode}/default/{mediaTypeExtension}:
  displayName: Default pickup point(s) for a postal code
  uriParameters:
    countryCode:
      displayName: Country
      enum: [ "NO" ]
    postalCode:
      displayName: Postal code
      type: string
    mediaTypeExtension:
      enum: [ .json, .xml ]
      description: Use .json to get application/json or .xml to get application/xml.
  get:
    description: List default pickup point(s) for a postal code
    responses:
      200:
        displayName: Example response for postal code 1481
        body:
          application/json:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.json
          application/xml:
            examples:
              successful:
                displayName: Response for postal code 1481
                value: !include examples/default_pickup_point_by_postal_code.xml


change output schema for deleting analyses: modified -> deleted

uriParameters:
  AnalysisId:
    type: string
get:
  description: Get an analysis
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/output/analysis-item.json
          schema: !include ../schemas/output/analysis.json
delete:
  description: Delete an analysis
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/output/container-delete.json
          schema: !include ../schemas/output/container-delete.json

uriParameters:
  AnalysisId:
    type: string
get:
  description: Get an analysis
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/output/analysis-item.json
          schema: !include ../schemas/output/analysis.json
delete:
  description: Delete an analysis
  responses:
    200:
      body:
        application/json:
          example: !include ../examples/output/container-update.json
          schema: !include ../schemas/output/container-update.json


API documentation for package versions endpoint

Signed-off-by: Josh Black <2831680e59d3b8be5b278b69b4e783c575edf378@gmail.com>

#%RAML 0.8
---
title: Depot API
version: v1

baseUri: https://{rootUri}/{version}
baseUriParameters:
    rootUri:
        description: |
            The root URI for the particular installation of Builder
        example: localhost:9636
mediaType: application/json
schemas:
    - origin: |
        {
            "properties": {
                "id": {
                    "type": "integer",
                    "required": false
                },
                "name": {
                    "type": "string",
                    "required": false
                },
                "owner_id": {
                    "type": "string",
                    "required": false
                }
            }
        }
    - secret_key: |
        {
            "properties": {
                "id": {
                    "type": "string",
                    "required": true
                },
                "origin_id": {
                    "type": "string",
                    "required": true
                },
                "name": {
                    "type": "string",
                    "required": true
                },
                "revision": {
                    "type": "string",
                    "required": true
                },
                "body": {
                    "type": "string",
                    "required": true
                },
                "onwer_id": {
                    "type": "string",
                    "required": true
                }
            }
        }
securitySchemes:
    - oauth_2_0:
        description: Builder supports OAuth 2.0 for authenticating all API requests.
        type: OAuth 2.0
        describedBy:
            headers:
                Authorization: &authorization
                    description: Used to send a valid OAuth 2 access token.
                    example: |
                        Authorization: Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
            responses:
                401: &resp401
                    description: |
                        Bad or expired token. To fix, you should re-authenticate the user.
                403: &resp403
                    description: |
                        Bad OAuth request. Regenerate your token and try again.
        settings:
            authorizationUri: https://{rootUri}/oauth2/authorize
            accessTokenUri: https://{rootUri}/oauth2/token
            authorizationGrants: [ token ]

/origins:
    post:
        description: Create a new origin
        securedBy: [oauth_2_0]
        body:
            application/json:
                schema: origin
                example: |
                    {
                        "name": "reset"
                    }
        responses:
            200:
                body:
                    application/json:
                        schema: origin
                        example: |
                            {
                                "id": "77732030103691265",
                                "name": "reset",
                                "owner_id": "77730215748435968"
                            }
            422:
                description: Malformed origin in request body
    /{originId}:
        get:
            body:
                application/json:
                    schema: origin
                    example: |
                        {
                            "id": "77732030103691265",
                            "name": "reset",
                            "owner_id": "77730215748435968"
                        }
        /keys:
            get:
                description: Return a list of key revisions for an organization.
                responses:
                    200:
                        body:
                            application/json:
                                example: |
                                    [
                                        {
                                            "origin": "core",
                                            "revision": "20160423193732",
                                            "location": "/origins/core/keys/20160423193732"
                                        },
                                        {
                                            "origin": "core",
                                            "revision": "20160423193733",
                                            "location": "/origins/core/keys/20160423193733"
                                        }
                                    ]
            /{revision}:
                get:
                    description: Get a key revision for a specific origin
                    responses:
                        200:
                            body:
                                text/plain:
                                    example: |
                                        SIG-PUB-1
                                        core-20160423193745

                                        Jpmj1gD9oTFCgz3wSLltt/QB6RTmNRWoUTe+xhDTIHc=
                post:
                    description: Upload a new key revision for an origin
                    securedBy: [oauth_2_0]
                    body:
                        text/plain:
                            example: |
                                SIG-PUB-1
                                core-20160423193745

                                Jpmj1gD9oTFCgz3wSLltt/QB6RTmNRWoUTe+xhDTIHc=
                    responses:
                        201:
                            description: Key successfully uploaded
                        403:
                            description: Authenticated user not a member of the given Origin
                        409:
                            description: Key already exists in Origin
        /secret_keys:
            /latest:
                get:
                    description: Retrieve the latest secret key
                    responses:
                        200:
                            body:
                                application/json:
                                    schema: secret_key
                                    example: |
                                        {
                                            "id": "",
                                            "origin_id": "",
                                            "name": "",
                                            "revision": "",
                                            "body": "",
                                            "owner_id": ""
                                        }
        /users:
            get:
                description: List all members of an origin
                responses:
                    200:
                        body:
                            application/json:
                                example: |
                                    {
                                        "members": [
                                            "reset"
                                        ],
                                        "origin_id": "77731431660388352"
                                    }
/pkgs:
    /{origin}:
        get:
            description: List packages for an origin
            responses:
                200:
                400:
                404:
                500:
        /{name}:
            get:
                description: TODO
                responses:
                    200:
                    400:
                    404:
                    500:
            /versions:
                get:
                    description: Returns all versions and a count of releases for each version for a given package
                    responses:
                        200:
                            body:
                                application/json:
                                    example: |
                                        [{"origin":"core","name":"redis","version":"3.2.1","release_count":"3"}]
                        400:
                            description: Origin or package name not supplied
                        404:
                            description: Package not found
                        500:
                            description: Server error
            /latest:
                get:
                    description: TODO
                    responses:
                        200:
                        404:
                        500:
            /{version}:
                get:
                    description: TODO
                    responses:
                        200:
                        400:
                        404:
                        500:
                /latest:
                    get:
                        responses:
                            200:
                            404:
                            500:
                /{release}:
                    get:
                        responses:
                            200:
                            404:
                            500:
                    post:
                        responses:
                            200:
                            400:
                            422:
                            409:
                    /download:
                        get:
                            responses:
                                200:
                                400:
                                500:
/channels:
    /{origin}:
        get:
            description: List all channels for an origin
            responses:
                200:
                    body:
                        application/json:
                            example: |
                                ["stable", "unstable"]
                400:
                    description: Origin not specified
        /{channel}:
            post:
                description: Create a channel
                responses:
                    201:
                        description: Channel successfully created
                    400:
                        description: Origin or channel not supplied
                    404:
                        description: Origin does not exist
                    409:
                        description: Channel already exists
                    500:
                        description: Server error
            delete:
                description: Deletes a channel
                responses:
                    200:
                        description: Channel successfully deleted
                    400:
                        description: Origin or channel not supplied
                    403:
                        description: Channel can not be deleted
                    500:
                        description: Server error
            /pkgs:
                get:
                    description: List all packages in a channel
                    responses:
                        200:
                            description: Returns a list of packages
                            body:
                                application/json:
                                    example: |
                                        {
                                            "range_start": 0,
                                            "range_end": 49,
                                            "total_count": 8,
                                            "package_list": [
                                                {
                                                    "origin": "core",
                                                    "name": "glibc",
                                                    "version": "2.22",
                                                    "release": "20160612063629"
                                                },
                                                {
                                                    "origin": "core",
                                                    "name": "linux-headers",
                                                    "version": "4.3",
                                                    "release": "20160612063537"
                                                }
                                            ]
                                        }
                        400:
                            description: Origin or channel not supplied
                        404:
                            description: Origin or channel does not exist
                        500:
                            description: Server error
                /{pkg}:
                    get:
                        description: List all packages in a channel that match the specified identifier
                        responses:
                            200:
                                description: Returns a list of packages
                            400:
                                description: Origin or channel not supplied
                            404:
                                description: Origin or channel does not exist
                            500:
                                description: Server error
                    /latest:
                        get:
                            description: Get the latest version of the package in this channel that matches the specified identifier
                            responses:
                                200:
                                    description: Returns a package
                                    body:
                                        application/json:
                                            example: |
                                                {
                                                    "checksum":"7a998b6a756f7ca769ac75edf66c119d14aa911d7cfb5fd91ad3ff21ddf0d257",
                                                    "config":"",
                                                    "deps":[
                                                        {
                                                            "name":"glibc",
                                                            "origin":"core",
                                                            "release":"20160612063629",
                                                            "version":"2.22"
                                                        }
                                                    ],
                                                    "exposes":[

                                                    ],
                                                    "ident":{
                                                        "name":"tree",
                                                        "origin":"core",
                                                        "release":"20161102210957",
                                                        "version":"1.7.0"
                                                    },
                                                    "manifest":"# core / tree\n\n\n* __Maintainer__: The Habitat Maintainers <humans@habitat.sh>\n* __Version__: 1.7.0\n* __Release__: 20161102210957\n* __Architecture__: x86_64\n* __System__: linux\n* __Target__: x86_64-linux\n* __Upstream URL__: upstream project's website or home page is not defined\n* __License__: gplv2+ \n* __Source__: [http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz](http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz)\n* __SHA__: `6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12`\n* __Path__: `/hab/pkgs/core/tree/1.7.0/20161102210957`\n* __Build Dependencies__: `core/make core/gcc `\n* __Dependencies__: `core/glibc `\n* __Interpreters__: no interpreters or undefined\n\n# Plan\n\n## Build Flags\n\n```bash\nCFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nCPPFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nCXXFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nLDFLAGS: -L/hab/pkgs/core/glibc/2.22/20160612063629/lib -L/hab/pkgs/core/gcc/5.2.0/20161031031637/lib\nLD_RUN_PATH: /hab/pkgs/core/tree/1.7.0/20161102210957/lib:/hab/pkgs/core/glibc/2.22/20160612063629/lib\n```\n\n## Plan Source\n\n```bash\npkg_name=tree\npkg_origin=core\npkg_version=1.7.0\npkg_maintainer=\"The Habitat Maintainers <humans@habitat.sh>\"\npkg_license=('gplv2+')\npkg_source=http://mama.indstate.edu/users/ice/tree/src/tree-${pkg_version}.tgz\npkg_shasum=6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12\npkg_deps=(core/glibc)\npkg_build_deps=(core/make core/gcc)\npkg_bin_dirs=(bin)\npkg_include_dirs=(include)\npkg_lib_dirs=(lib)\n\ndo_build() {\n  make\n}\n\ndo_install() {\n  sed -i \"s#prefix = /usr#prefix = ${pkg_prefix}#\" Makefile\n  make install\n}\n```",
                                                    "tdeps":[
                                                        {
                                                            "name":"glibc",
                                                            "origin":"core",
                                                            "release":"20160612063629",
                                                            "version":"2.22"
                                                        },
                                                        {
                                                            "name":"linux-headers",
                                                            "origin":"core",
                                                            "release":"20160612063537",
                                                            "version":"4.3"
                                                        }
                                                    ]
                                                }
                                400:
                                    description: Origin or channel or identifier not supplied
                                404:
                                    description: Origin or channel does not exist
                                500:
                                    description: Server error
                    /{version}:
                        get:
                            description: List all packages in a channel that match the specified identifier and version
                            responses:
                                200:
                                    description: Returns a list of packages
                                400:
                                    description: Origin or channel or identifier or version not supplied
                                404:
                                    description: Origin or channel does not exist
                                500:
                                    description: Server error
                        /latest:
                            get:
                                description: Get the latest version of the package in this channel that matches the specified identifier and version
                                responses:
                                    200:
                                        description: Returns a package
                                    400:
                                        description: Origin or channel or identifier or version not supplied
                                    404:
                                        description: Origin or channel does not exist
                                    500:
                                        description: Server error
                        /{release}:
                            get:
                                description: Get the package in a channel that matches the specified identifier, version and release
                                responses:
                                    200:
                                        description: Returns a package
                                    400:
                                        description: Origin or channel or identifier or version or release not supplied
                                    404:
                                        description: Origin or channel does not exist
                                    500:
                                        description: Server error
                            /promote:
                                put:
                                    description: Promote a package to a specific channel
                                    responses:
                                        200:
                                            description: Package successfully promoted
                                        400:
                                            description: Origin or channel or identifier or version or release not supplied
                                        404:
                                            description: Origin or channel or identifier or version or release does not exist
                                        500:
                                            description: Server error

#%RAML 0.8
---
title: Depot API
version: v1

baseUri: https://{rootUri}/{version}
baseUriParameters:
    rootUri:
        description: |
            The root URI for the particular installation of Builder
        example: localhost:9636
mediaType: application/json
schemas:
    - origin: |
        {
            "properties": {
                "id": {
                    "type": "integer",
                    "required": false
                },
                "name": {
                    "type": "string",
                    "required": false
                },
                "owner_id": {
                    "type": "string",
                    "required": false
                }
            }
        }
    - secret_key: |
        {
            "properties": {
                "id": {
                    "type": "string",
                    "required": true
                },
                "origin_id": {
                    "type": "string",
                    "required": true
                },
                "name": {
                    "type": "string",
                    "required": true
                },
                "revision": {
                    "type": "string",
                    "required": true
                },
                "body": {
                    "type": "string",
                    "required": true
                },
                "onwer_id": {
                    "type": "string",
                    "required": true
                }
            }
        }
securitySchemes:
    - oauth_2_0:
        description: Builder supports OAuth 2.0 for authenticating all API requests.
        type: OAuth 2.0
        describedBy:
            headers:
                Authorization: &authorization
                    description: Used to send a valid OAuth 2 access token.
                    example: |
                        Authorization: Bearer 0b79bab50daca910b000d4f1a2b675d604257e42
            responses:
                401: &resp401
                    description: |
                        Bad or expired token. To fix, you should re-authenticate the user.
                403: &resp403
                    description: |
                        Bad OAuth request. Regenerate your token and try again.
        settings:
            authorizationUri: https://{rootUri}/oauth2/authorize
            accessTokenUri: https://{rootUri}/oauth2/token
            authorizationGrants: [ token ]

/origins:
    post:
        description: Create a new origin
        securedBy: [oauth_2_0]
        body:
            application/json:
                schema: origin
                example: |
                    {
                        "name": "reset"
                    }
        responses:
            200:
                body:
                    application/json:
                        schema: origin
                        example: |
                            {
                                "id": "77732030103691265",
                                "name": "reset",
                                "owner_id": "77730215748435968"
                            }
            422:
                description: Malformed origin in request body
    /{originId}:
        get:
            body:
                application/json:
                    schema: origin
                    example: |
                        {
                            "id": "77732030103691265",
                            "name": "reset",
                            "owner_id": "77730215748435968"
                        }
        /keys:
            get:
                description: Return a list of key revisions for an organization.
                responses:
                    200:
                        body:
                            application/json:
                                example: |
                                    [
                                        {
                                            "origin": "core",
                                            "revision": "20160423193732",
                                            "location": "/origins/core/keys/20160423193732"
                                        },
                                        {
                                            "origin": "core",
                                            "revision": "20160423193733",
                                            "location": "/origins/core/keys/20160423193733"
                                        }
                                    ]
            /{revision}:
                get:
                    description: Get a key revision for a specific origin
                    responses:
                        200:
                            body:
                                text/plain:
                                    example: |
                                        SIG-PUB-1
                                        core-20160423193745

                                        Jpmj1gD9oTFCgz3wSLltt/QB6RTmNRWoUTe+xhDTIHc=
                post:
                    description: Upload a new key revision for an origin
                    securedBy: [oauth_2_0]
                    body:
                        text/plain:
                            example: |
                                SIG-PUB-1
                                core-20160423193745

                                Jpmj1gD9oTFCgz3wSLltt/QB6RTmNRWoUTe+xhDTIHc=
                    responses:
                        201:
                            description: Key successfully uploaded
                        403:
                            description: Authenticated user not a member of the given Origin
                        409:
                            description: Key already exists in Origin
        /secret_keys:
            /latest:
                get:
                    description: Retrieve the latest secret key
                    responses:
                        200:
                            body:
                                application/json:
                                    schema: secret_key
                                    example: |
                                        {
                                            "id": "",
                                            "origin_id": "",
                                            "name": "",
                                            "revision": "",
                                            "body": "",
                                            "owner_id": ""
                                        }
        /users:
            get:
                description: List all members of an origin
                responses:
                    200:
                        body:
                            application/json:
                                example: |
                                    {
                                        "members": [
                                            "reset"
                                        ],
                                        "origin_id": "77731431660388352"
                                    }
/pkgs:
    /{origin}:
        get:
            description: List packages for an origin
            responses:
                200:
                400:
                404:
                500:
        /{name}:
            get:
                description: TODO
                responses:
                    200:
                    400:
                    404:
                    500:
            /latest:
                get:
                    description: TODO
                    responses:
                        200:
                        404:
                        500:
            /{version}:
                get:
                    description: TODO
                    responses:
                        200:
                        400:
                        404:
                        500:
                /latest:
                    get:
                        responses:
                            200:
                            404:
                            500:
                /{release}:
                    get:
                        responses:
                            200:
                            404:
                            500:
                    post:
                        responses:
                            200:
                            400:
                            422:
                            409:
                    /download:
                        get:
                            responses:
                                200:
                                400:
                                500:
/channels:
    /{origin}:
        get:
            description: List all channels for an origin
            responses:
                200:
                    body:
                        application/json:
                            example: |
                                ["stable", "unstable"]
                400:
                    description: Origin not specified
        /{channel}:
            post:
                description: Create a channel
                responses:
                    201:
                        description: Channel successfully created
                    400:
                        description: Origin or channel not supplied
                    404:
                        description: Origin does not exist
                    409:
                        description: Channel already exists
                    500:
                        description: Server error
            delete:
                description: Deletes a channel
                responses:
                    200:
                        description: Channel successfully deleted
                    400:
                        description: Origin or channel not supplied
                    403:
                        description: Channel can not be deleted
                    500:
                        description: Server error
            /pkgs:
                get:
                    description: List all packages in a channel
                    responses:
                        200:
                            description: Returns a list of packages
                            body:
                                application/json:
                                    example: |
                                        {
                                            "range_start": 0,
                                            "range_end": 49,
                                            "total_count": 8,
                                            "package_list": [
                                                {
                                                    "origin": "core",
                                                    "name": "glibc",
                                                    "version": "2.22",
                                                    "release": "20160612063629"
                                                },
                                                {
                                                    "origin": "core",
                                                    "name": "linux-headers",
                                                    "version": "4.3",
                                                    "release": "20160612063537"
                                                }
                                            ]
                                        }
                        400:
                            description: Origin or channel not supplied
                        404:
                            description: Origin or channel does not exist
                        500:
                            description: Server error
                /{pkg}:
                    get:
                        description: List all packages in a channel that match the specified identifier
                        responses:
                            200:
                                description: Returns a list of packages
                            400:
                                description: Origin or channel not supplied
                            404:
                                description: Origin or channel does not exist
                            500:
                                description: Server error
                    /latest:
                        get:
                            description: Get the latest version of the package in this channel that matches the specified identifier
                            responses:
                                200:
                                    description: Returns a package
                                    body:
                                        application/json:
                                            example: |
                                                {
                                                    "checksum":"7a998b6a756f7ca769ac75edf66c119d14aa911d7cfb5fd91ad3ff21ddf0d257",
                                                    "config":"",
                                                    "deps":[
                                                        {
                                                            "name":"glibc",
                                                            "origin":"core",
                                                            "release":"20160612063629",
                                                            "version":"2.22"
                                                        }
                                                    ],
                                                    "exposes":[

                                                    ],
                                                    "ident":{
                                                        "name":"tree",
                                                        "origin":"core",
                                                        "release":"20161102210957",
                                                        "version":"1.7.0"
                                                    },
                                                    "manifest":"# core / tree\n\n\n* __Maintainer__: The Habitat Maintainers <humans@habitat.sh>\n* __Version__: 1.7.0\n* __Release__: 20161102210957\n* __Architecture__: x86_64\n* __System__: linux\n* __Target__: x86_64-linux\n* __Upstream URL__: upstream project's website or home page is not defined\n* __License__: gplv2+ \n* __Source__: [http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz](http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz)\n* __SHA__: `6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12`\n* __Path__: `/hab/pkgs/core/tree/1.7.0/20161102210957`\n* __Build Dependencies__: `core/make core/gcc `\n* __Dependencies__: `core/glibc `\n* __Interpreters__: no interpreters or undefined\n\n# Plan\n\n## Build Flags\n\n```bash\nCFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nCPPFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nCXXFLAGS: -I/hab/pkgs/core/glibc/2.22/20160612063629/include -I/hab/pkgs/core/make/4.2.1/20161102154828/include -I/hab/pkgs/core/gcc/5.2.0/20161031031637/include\nLDFLAGS: -L/hab/pkgs/core/glibc/2.22/20160612063629/lib -L/hab/pkgs/core/gcc/5.2.0/20161031031637/lib\nLD_RUN_PATH: /hab/pkgs/core/tree/1.7.0/20161102210957/lib:/hab/pkgs/core/glibc/2.22/20160612063629/lib\n```\n\n## Plan Source\n\n```bash\npkg_name=tree\npkg_origin=core\npkg_version=1.7.0\npkg_maintainer=\"The Habitat Maintainers <humans@habitat.sh>\"\npkg_license=('gplv2+')\npkg_source=http://mama.indstate.edu/users/ice/tree/src/tree-${pkg_version}.tgz\npkg_shasum=6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12\npkg_deps=(core/glibc)\npkg_build_deps=(core/make core/gcc)\npkg_bin_dirs=(bin)\npkg_include_dirs=(include)\npkg_lib_dirs=(lib)\n\ndo_build() {\n  make\n}\n\ndo_install() {\n  sed -i \"s#prefix = /usr#prefix = ${pkg_prefix}#\" Makefile\n  make install\n}\n```",
                                                    "tdeps":[
                                                        {
                                                            "name":"glibc",
                                                            "origin":"core",
                                                            "release":"20160612063629",
                                                            "version":"2.22"
                                                        },
                                                        {
                                                            "name":"linux-headers",
                                                            "origin":"core",
                                                            "release":"20160612063537",
                                                            "version":"4.3"
                                                        }
                                                    ]
                                                }
                                400:
                                    description: Origin or channel or identifier not supplied
                                404:
                                    description: Origin or channel does not exist
                                500:
                                    description: Server error
                    /{version}:
                        get:
                            description: List all packages in a channel that match the specified identifier and version
                            responses:
                                200:
                                    description: Returns a list of packages
                                400:
                                    description: Origin or channel or identifier or version not supplied
                                404:
                                    description: Origin or channel does not exist
                                500:
                                    description: Server error
                        /latest:
                            get:
                                description: Get the latest version of the package in this channel that matches the specified identifier and version
                                responses:
                                    200:
                                        description: Returns a package
                                    400:
                                        description: Origin or channel or identifier or version not supplied
                                    404:
                                        description: Origin or channel does not exist
                                    500:
                                        description: Server error
                        /{release}:
                            get:
                                description: Get the package in a channel that matches the specified identifier, version and release
                                responses:
                                    200:
                                        description: Returns a package
                                    400:
                                        description: Origin or channel or identifier or version or release not supplied
                                    404:
                                        description: Origin or channel does not exist
                                    500:
                                        description: Server error
                            /promote:
                                put:
                                    description: Promote a package to a specific channel
                                    responses:
                                        200:
                                            description: Package successfully promoted
                                        400:
                                            description: Origin or channel or identifier or version or release not supplied
                                        404:
                                            description: Origin or channel or identifier or version or release does not exist
                                        500:
                                            description: Server error