{"files":{"SKILL.md":"---\nname: azure-reservation-api\ndescription: \"Azure Reservation API skill. Use when working with Azure Reservation for providers, subscriptions. Covers 16 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Azure Reservation API\nAPI version: 2019-04-01\n\n## Auth\nOAuth2\n\n## Base URL\nhttps://management.azure.com\n\n## Setup\n1. Configure auth: OAuth2\n2. GET /providers/Microsoft.Capacity/reservationOrders -- get all `reservationorder`s.\n3. POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes -- create first availableScope\n\n## Endpoints\n16 endpoints across 2 groups. See references/api-spec.lap for full details.\n\n### Providers\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes | Get Available Scopes for `Reservation`. |\n| POST | /providers/Microsoft.Capacity/calculatePrice | Calculate price for a `ReservationOrder`. |\n| GET | /providers/Microsoft.Capacity/reservationOrders | Get all `ReservationOrder`s. |\n| PUT | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId} | Purchase `ReservationOrder` |\n| GET | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId} | Get a specific `ReservationOrder`. |\n| POST | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split | Split the `Reservation`. |\n| POST | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge | Merges two `Reservation`s. |\n| GET | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations | Get `Reservation`s in a given reservation Order |\n| GET | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} | Get `Reservation` details. |\n| PATCH | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} | Updates a `Reservation`. |\n| GET | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions | Get `Reservation` revisions. |\n| POST | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive | Archive a `Reservation`. |\n| POST | /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive | Unarchive a `Reservation`. |\n| GET | /providers/Microsoft.Capacity/operations | Get operations. |\n\n### Subscriptions\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs | Get the regions and skus that are available for RI purchase for the specified Azure subscription. |\n| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations | Get list of applicable `Reservation`s. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a availableScope?\" -> POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes\n- \"List all catalogs?\" -> GET /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs\n- \"List all appliedReservations?\" -> GET /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations\n- \"Create a calculatePrice?\" -> POST /providers/Microsoft.Capacity/calculatePrice\n- \"List all reservationOrders?\" -> GET /providers/Microsoft.Capacity/reservationOrders\n- \"Update a reservationOrder?\" -> PUT /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\n- \"Get reservationOrder details?\" -> GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\n- \"Create a split?\" -> POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split\n- \"Create a merge?\" -> POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge\n- \"List all reservations?\" -> GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations\n- \"Get reservation details?\" -> GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}\n- \"Partially update a reservation?\" -> PATCH /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}\n- \"List all revisions?\" -> GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions\n- \"Create a archive?\" -> POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive\n- \"Create a unarchive?\" -> POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive\n- \"List all operations?\" -> GET /providers/Microsoft.Capacity/operations\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Azure Reservation API\n@base https://management.azure.com\n@version 2019-04-01\n@auth OAuth2\n@common_fields {api-version: any # Supported version for this document is 2019-04-01}\n@endpoints 16\n@toc providers(14), subscriptions(2)\n\n@group providers\n@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes\n@desc Get Available Scopes for `Reservation`.\n@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item, body: map # Parameter for listing the available scopes}\n@returns(200) List of `Subscription`s created after the filter.\n\n@endgroup\n\n@group subscriptions\n@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs\n@desc Get the regions and skus that are available for RI purchase for the specified Azure subscription.\n@required {subscriptionId: any # Id of the subscription, reservedResourceType: any # The type of the resource for which the skus should be provided.}\n@optional {location: any # Filters the skus based on the location specified in this parameter. This can be an azure region or global}\n@returns(200) List of available resources\n\n@endpoint GET /subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations\n@desc Get list of applicable `Reservation`s.\n@required {subscriptionId: any # Id of the subscription}\n@returns(200) Applicable `Reservation`s.\n\n@endgroup\n\n@group providers\n@endpoint POST /providers/Microsoft.Capacity/calculatePrice\n@desc Calculate price for a `ReservationOrder`.\n@required {body: map # Information needed for calculate or purchase reservation}\n@returns(200) Detailed price info for purchasing `ReservationOrder`\n\n@endpoint GET /providers/Microsoft.Capacity/reservationOrders\n@desc Get all `ReservationOrder`s.\n@returns(200) List of `ReservationOrder`s\n\n@endpoint PUT /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\n@desc Purchase `ReservationOrder`\n@required {reservationOrderId: any # Order Id of the reservation, body: map # Information needed for calculate or purchase reservation}\n@returns(200) The resource has been created\n@returns(202) The request is accepted and is being processed. Operation result link is in location header.\n\n@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\n@desc Get a specific `ReservationOrder`.\n@required {reservationOrderId: any # Order Id of the reservation}\n@optional {$expand: any # May be used to expand the planInformation.}\n@returns(200) Get the details of the `ReservationOrder`.\n\n@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split\n@desc Split the `Reservation`.\n@required {reservationOrderId: any # Order Id of the reservation, body: map # Information needed to Split a reservation item}\n@returns(200) List of `Reservation`s created after the split operation.\n@returns(202) The request is accepted and is being processed\n\n@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge\n@desc Merges two `Reservation`s.\n@required {reservationOrderId: any # Order Id of the reservation, body: map # Information needed for commercial request for a reservation}\n@returns(200) Returns the `Reservation` created after the merge.\n@returns(202) The request is accepted and is being processed\n\n@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations\n@desc Get `Reservation`s in a given reservation Order\n@required {reservationOrderId: any # Order Id of the reservation}\n@returns(200) List `Reservation`s within a single `ReservationOrder`.\n\n@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}\n@desc Get `Reservation` details.\n@required {reservationId: any # Id of the Reservation Item, reservationOrderId: any # Order Id of the reservation}\n@optional {expand: any # Supported value of this query is renewProperties}\n@returns(200) Get `Reservation` details.\n\n@endpoint PATCH /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}\n@desc Updates a `Reservation`.\n@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item, parameters: map # Information needed to patch a reservation item}\n@returns(200) Returns the updated `Reservation`.\n@returns(202) The request is accepted and is being processed\n\n@endpoint GET /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions\n@desc Get `Reservation` revisions.\n@required {reservationId: any # Id of the Reservation Item, reservationOrderId: any # Order Id of the reservation}\n@returns(200) List of all the revisions for the `Reservation`.\n\n@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive\n@desc Archive a `Reservation`.\n@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item}\n@returns(200) Archived a reservation.\n\n@endpoint POST /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive\n@desc Unarchive a `Reservation`.\n@required {reservationOrderId: any # Order Id of the reservation, reservationId: any # Id of the Reservation Item}\n@returns(200) Unarchive complete for the reservation.\n\n@endpoint GET /providers/Microsoft.Capacity/operations\n@desc Get operations.\n@returns(200) List all the operations.\n\n@endgroup\n\n@end\n"}}