@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Azure Reservation API
@base https://management.azure.com
@version 2019-04-01
@auth OAuth2
@common_fields {api-version: any # Supported version for this document is 2019-04-01}
@endpoints 16
@toc providers(14), subscriptions(2)

@group providers
@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes
@desc Get Available Scopes for `Reservation`.
@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item, body: map # Parameter for listing the available scopes}
@returns(200) List of `Subscription`s created after the filter.

@endgroup

@group subscriptions
@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs
@desc Get the regions and skus that are available for RI purchase for the specified Azure subscription.
@required {subscriptionId: any # Id of the subscription, reservedResourceType: any # The type of the resource for which the skus should be provided.}
@optional {location: any # Filters the skus based on the location specified in this parameter. This can be an azure region or global}
@returns(200) List of available resources

@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations
@desc Get list of applicable `Reservation`s.
@required {subscriptionId: any # Id of the subscription}
@returns(200) Applicable `Reservation`s.

@endgroup

@group providers
@endpoint POST /providers/Microsoft.Capacity/calculatePrice
@desc Calculate price for a `ReservationOrder`.
@required {body: map # Information needed for calculate or purchase reservation}
@returns(200) Detailed price info for purchasing `ReservationOrder`

@endpoint GET /providers/Microsoft.Capacity/reservationOrders
@desc Get all `ReservationOrder`s.
@returns(200) List of `ReservationOrder`s

@endpoint PUT /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}
@desc Purchase `ReservationOrder`
@required {reservationOrderId: any # Order Id of the reservation, body: map # Information needed for calculate or purchase reservation}
@returns(200) The resource has been created
@returns(202) The request is accepted and is being processed. Operation result link is in location header.

@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}
@desc Get a specific `ReservationOrder`.
@required {reservationOrderId: any # Order Id of the reservation}
@optional {$expand: any # May be used to expand the planInformation.}
@returns(200) Get the details of the `ReservationOrder`.

@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split
@desc Split the `Reservation`.
@required {reservationOrderId: any # Order Id of the reservation, body: map # Information needed to Split a reservation item}
@returns(200) List of `Reservation`s created after the split operation.
@returns(202) The request is accepted and is being processed

@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge
@desc Merges two `Reservation`s.
@required {reservationOrderId: any # Order Id of the reservation, body: map # Information needed for commercial request for a reservation}
@returns(200) Returns the `Reservation` created after the merge.
@returns(202) The request is accepted and is being processed

@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations
@desc Get `Reservation`s in a given reservation Order
@required {reservationOrderId: any # Order Id of the reservation}
@returns(200) List `Reservation`s within a single `ReservationOrder`.

@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
@desc Get `Reservation` details.
@required {reservationId: any # Id of the Reservation Item, reservationOrderId: any # Order Id of the reservation}
@optional {expand: any # Supported value of this query is renewProperties}
@returns(200) Get `Reservation` details.

@endpoint PATCH /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
@desc Updates a `Reservation`.
@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item, parameters: map # Information needed to patch a reservation item}
@returns(200) Returns the updated `Reservation`.
@returns(202) The request is accepted and is being processed

@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions
@desc Get `Reservation` revisions.
@required {reservationId: any # Id of the Reservation Item, reservationOrderId: any # Order Id of the reservation}
@returns(200) List of all the revisions for the `Reservation`.

@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive
@desc Archive a `Reservation`.
@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item}
@returns(200) Archived a reservation.

@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive
@desc Unarchive a `Reservation`.
@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item}
@returns(200) Unarchive complete for the reservation.

@endpoint GET /providers/Microsoft.Capacity/operations
@desc Get operations.
@returns(200) List all the operations.

@endgroup

@end
