{"files":{"SKILL.md":"---\nname: appveyor-rest-api\ndescription: \"AppVeyor REST API skill. Use when working with AppVeyor REST for users, user, collaborators. Covers 53 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# AppVeyor REST API\nAPI version: 1.0.0\n\n## Auth\nApiKey Authorization in header\n\n## Base URL\nhttps://ci.appveyor.com/api\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /users -- get users\n3. POST /users/invitations -- create first invitation\n\n## Endpoints\n53 endpoints across 10 groups. See references/api-spec.lap for full details.\n\n### Users\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /users | Get users |\n| PUT | /users | Update user |\n| GET | /users/{userId} | Get user |\n| DELETE | /users/{userId} | Delete user |\n| GET | /users/invitations | Get user invitations |\n| POST | /users/invitations | Invite user |\n| DELETE | /users/invitations/{userInvitationId} | Cancel user invitation |\n\n### User\n| Method | Path | Description |\n|--------|------|-------------|\n| PUT | /user/join-account | Join Account |\n\n### Collaborators\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /collaborators | Get collaborators |\n| PUT | /collaborators | Update collaborator |\n| GET | /collaborators/{userId} | Get collaborator |\n| DELETE | /collaborators/{userId} | Delete collaborator |\n\n### Roles\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /roles | Get roles |\n| POST | /roles | Add role |\n| PUT | /roles | Update role |\n| GET | /roles/{roleId} | Get role |\n| DELETE | /roles/{roleId} | Delete role |\n\n### Account\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /account/encrypt | Encrypt a value for use in StoredValue. |\n\n### Projects\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /projects | Get projects |\n| POST | /projects | Add project |\n| PUT | /projects | Update project |\n| GET | /projects/{accountName}/{projectSlug} | Get project last build |\n| DELETE | /projects/{accountName}/{projectSlug} | Delete project |\n| GET | /projects/{accountName}/{projectSlug}/branch/{buildBranch} | Get project last branch build |\n| GET | /projects/{accountName}/{projectSlug}/build/{buildVersion} | Get project build by version |\n| GET | /projects/{accountName}/{projectSlug}/history | Get project history |\n| GET | /projects/{accountName}/{projectSlug}/artifacts/{artifactFileName} | Get last successful build artifact |\n| GET | /projects/{accountName}/{projectSlug}/deployments | Get project deployments |\n| GET | /projects/{accountName}/{projectSlug}/settings | Get project settings |\n| GET | /projects/{accountName}/{projectSlug}/settings/yaml | Get project settings in YAML |\n| PUT | /projects/{accountName}/{projectSlug}/settings/yaml | Update project settings in YAML |\n| PUT | /projects/{accountName}/{projectSlug}/settings/build-number | Update project build number |\n| GET | /projects/{accountName}/{projectSlug}/settings/environment-variables | Get project environment variables |\n| PUT | /projects/{accountName}/{projectSlug}/settings/environment-variables | Update project environment variables |\n| DELETE | /projects/{accountName}/{projectSlug}/buildcache | Delete project build cache |\n| GET | /projects/status/{statusBadgeId} | Get project status badge image |\n| GET | /projects/status/{statusBadgeId}/branch/{buildBranch} | Get project branch status badge image |\n| GET | /projects/status/{badgeRepoProvider}/{repoAccountName}/{repoSlug} | Get status badge image for a project with a public repository |\n\n### Builds\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /builds | Start build of branch most recent commit |\n| PUT | /builds | Re-run build |\n| DELETE | /builds/{accountName}/{projectSlug}/{buildVersion} | Cancel build |\n\n### Buildjobs\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /buildjobs/{jobId}/artifacts | Get build artifacts |\n| GET | /buildjobs/{jobId}/artifacts/{artifactFileName} | Download build artifact |\n| GET | /buildjobs/{jobId}/log | Download build log |\n\n### Environments\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /environments | Get environments |\n| POST | /environments | Add environment |\n| PUT | /environments | Update environment |\n| GET | /environments/{deploymentEnvironmentId}/settings | Get environment settings |\n| GET | /environments/{deploymentEnvironmentId}/deployments | Get environment deployments |\n| DELETE | /environments/{deploymentEnvironmentId} | Delete environment |\n\n### Deployments\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /deployments/{deploymentId} | Get deployment |\n| POST | /deployments | Start deployment |\n| PUT | /deployments/stop | Cancel deployment |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all users?\" -> GET /users\n- \"Get user details?\" -> GET /users/{userId}\n- \"Delete a user?\" -> DELETE /users/{userId}\n- \"List all invitations?\" -> GET /users/invitations\n- \"Create a invitation?\" -> POST /users/invitations\n- \"Delete a invitation?\" -> DELETE /users/invitations/{userInvitationId}\n- \"List all collaborators?\" -> GET /collaborators\n- \"Get collaborator details?\" -> GET /collaborators/{userId}\n- \"Delete a collaborator?\" -> DELETE /collaborators/{userId}\n- \"List all roles?\" -> GET /roles\n- \"Create a role?\" -> POST /roles\n- \"Get role details?\" -> GET /roles/{roleId}\n- \"Delete a role?\" -> DELETE /roles/{roleId}\n- \"Create a encrypt?\" -> POST /account/encrypt\n- \"List all projects?\" -> GET /projects\n- \"Create a project?\" -> POST /projects\n- \"Get project details?\" -> GET /projects/{accountName}/{projectSlug}\n- \"Delete a project?\" -> DELETE /projects/{accountName}/{projectSlug}\n- \"Get branch details?\" -> GET /projects/{accountName}/{projectSlug}/branch/{buildBranch}\n- \"Get build details?\" -> GET /projects/{accountName}/{projectSlug}/build/{buildVersion}\n- \"List all history?\" -> GET /projects/{accountName}/{projectSlug}/history\n- \"Get artifact details?\" -> GET /projects/{accountName}/{projectSlug}/artifacts/{artifactFileName}\n- \"List all deployments?\" -> GET /projects/{accountName}/{projectSlug}/deployments\n- \"List all settings?\" -> GET /projects/{accountName}/{projectSlug}/settings\n- \"List all yaml?\" -> GET /projects/{accountName}/{projectSlug}/settings/yaml\n- \"List all environment-variables?\" -> GET /projects/{accountName}/{projectSlug}/settings/environment-variables\n- \"Get status details?\" -> GET /projects/status/{statusBadgeId}\n- \"Create a build?\" -> POST /builds\n- \"Delete a build?\" -> DELETE /builds/{accountName}/{projectSlug}/{buildVersion}\n- \"List all artifacts?\" -> GET /buildjobs/{jobId}/artifacts\n- \"List all log?\" -> GET /buildjobs/{jobId}/log\n- \"List all environments?\" -> GET /environments\n- \"Create a environment?\" -> POST /environments\n- \"Delete a environment?\" -> DELETE /environments/{deploymentEnvironmentId}\n- \"Get deployment details?\" -> GET /deployments/{deploymentId}\n- \"Create a deployment?\" -> POST /deployments\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 AppVeyor REST API\n@base https://ci.appveyor.com/api\n@version 1.0.0\n@auth ApiKey Authorization in header\n@endpoints 53\n@hint download_for_search\n@toc users(7), user(1), collaborators(4), roles(5), account(1), projects(20), builds(3), buildjobs(3), environments(6), deployments(3)\n\n@group users\n@endpoint GET /users\n@desc Get users\n@returns(200) Success\n\n@endpoint PUT /users\n@desc Update user\n@required {body: any}\n@returns(204) Success\n\n@endpoint GET /users/{userId}\n@desc Get user\n@returns(200) Success\n\n@endpoint DELETE /users/{userId}\n@desc Delete user\n@returns(204) Success\n\n@endpoint GET /users/invitations\n@desc Get user invitations\n@returns(200) Success\n\n@endpoint POST /users/invitations\n@desc Invite user\n@required {body: map}\n@returns(204) Success\n\n@endpoint DELETE /users/invitations/{userInvitationId}\n@desc Cancel user invitation\n@returns(204) Success\n\n@endgroup\n\n@group user\n@endpoint PUT /user/join-account\n@desc Join Account\n@required {body: map}\n@returns(200) Success\n\n@endgroup\n\n@group collaborators\n@endpoint GET /collaborators\n@desc Get collaborators\n@returns(200) Success\n\n@endpoint PUT /collaborators\n@desc Update collaborator\n@required {body: map}\n@returns(204) Success\n\n@endpoint GET /collaborators/{userId}\n@desc Get collaborator\n@returns(200) Success\n\n@endpoint DELETE /collaborators/{userId}\n@desc Delete collaborator\n@returns(204) Success\n\n@endgroup\n\n@group roles\n@endpoint GET /roles\n@desc Get roles\n@returns(200) Success\n\n@endpoint POST /roles\n@desc Add role\n@required {body: map}\n@returns(200) Success\n\n@endpoint PUT /roles\n@desc Update role\n@required {body: any}\n@returns(200) Success\n\n@endpoint GET /roles/{roleId}\n@desc Get role\n@returns(200) Success\n\n@endpoint DELETE /roles/{roleId}\n@desc Delete role\n@returns(204) Success\n\n@endgroup\n\n@group account\n@endpoint POST /account/encrypt\n@desc Encrypt a value for use in StoredValue.\n@required {body: map}\n@returns(200) Success\n\n@endgroup\n\n@group projects\n@endpoint GET /projects\n@desc Get projects\n@returns(200) Success\n\n@endpoint POST /projects\n@desc Add project\n@required {body: map}\n@returns(200) Success\n\n@endpoint PUT /projects\n@desc Update project\n@required {body: map}\n@returns(204) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}\n@desc Get project last build\n@returns(200) Success\n\n@endpoint DELETE /projects/{accountName}/{projectSlug}\n@desc Delete project\n@returns(204) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/branch/{buildBranch}\n@desc Get project last branch build\n@returns(200) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/build/{buildVersion}\n@desc Get project build by version\n@returns(200) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/history\n@desc Get project history\n@required {recordsNumber: any # Number of results to include in the response. getProjectDeployments is documented to have a maximum of 20. It currently returns 500 Internal Server Error for recordsNumber <= 5. In the past it has returned 500 Internal Server Error for many different values which did not match the value used by the ci.appveyor.com web interface at the time.  As of 2018-09-08, the value used by the web interface is 10.}\n@optional {startBuildId: any # Maximum `buildId` to include in the results (exclusive)., branch: any # Repository Branch}\n@returns(200) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/artifacts/{artifactFileName}\n@desc Get last successful build artifact\n@returns(200) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/deployments\n@desc Get project deployments\n@returns(200) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/settings\n@desc Get project settings\n@returns(200) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/settings/yaml\n@desc Get project settings in YAML\n@returns(200) Success  The schema type of this response could be specified as `file` to denote opaque binary data.  The generated Java code for `file` saves the response as a temporary file, making it a little more difficult to use and less efficient for common cases.  If `string` causes problems for other generators, can switch to `file` type.\n\n@endpoint PUT /projects/{accountName}/{projectSlug}/settings/yaml\n@desc Update project settings in YAML\n@required {body: str(binary) # The body of requests should contain YAML data.  It is unclear how to specify this since the OpenAPI spec requires `schema` without `type` for `in: body` parameters and does not allow `type: file` in `schema`.  See https://github.com/OAI/OpenAPI-Specification/issues/326 swagger-codegen (for Java, probably others) allows a binary string body parameter with non-application/json `consumes` to be passed through in the request body without conversion to JSON.}\n@returns(204) Success\n\n@endpoint PUT /projects/{accountName}/{projectSlug}/settings/build-number\n@desc Update project build number\n@required {body: map}\n@returns(204) Success\n\n@endpoint GET /projects/{accountName}/{projectSlug}/settings/environment-variables\n@desc Get project environment variables\n@returns(200) Success\n\n@endpoint PUT /projects/{accountName}/{projectSlug}/settings/environment-variables\n@desc Update project environment variables\n@required {body: [map]}\n@returns(204) Success\n\n@endpoint DELETE /projects/{accountName}/{projectSlug}/buildcache\n@desc Delete project build cache\n@returns(204) Success\n\n@endpoint GET /projects/status/{statusBadgeId}\n@desc Get project status badge image\n@optional {svg: any # Return an SVG image instead of PNG?  Exclusive with `retina`., retina: any # Return a larger image suitable for retina displays?  Exclusive with `svg`., passingText: any # Text to show in badge when build is passing., failingText: any # Text to show in badge when build is failing., pendingText: any # Text to show in badge when build is pending.}\n@returns(200) Success\n\n@endpoint GET /projects/status/{statusBadgeId}/branch/{buildBranch}\n@desc Get project branch status badge image\n@optional {svg: any # Return an SVG image instead of PNG?  Exclusive with `retina`., retina: any # Return a larger image suitable for retina displays?  Exclusive with `svg`., passingText: any # Text to show in badge when build is passing., failingText: any # Text to show in badge when build is failing., pendingText: any # Text to show in badge when build is pending.}\n@returns(200) Success\n\n@endpoint GET /projects/status/{badgeRepoProvider}/{repoAccountName}/{repoSlug}\n@desc Get status badge image for a project with a public repository\n@optional {branch: any # Repository Branch, svg: any # Return an SVG image instead of PNG?  Exclusive with `retina`., retina: any # Return a larger image suitable for retina displays?  Exclusive with `svg`., passingText: any # Text to show in badge when build is passing., failingText: any # Text to show in badge when build is failing., pendingText: any # Text to show in badge when build is pending.}\n@returns(200) Success\n\n@endgroup\n\n@group builds\n@endpoint POST /builds\n@desc Start build of branch most recent commit\n@required {body: map}\n@returns(200) Success\n\n@endpoint PUT /builds\n@desc Re-run build\n@required {body: map}\n@returns(200) Success\n\n@endpoint DELETE /builds/{accountName}/{projectSlug}/{buildVersion}\n@desc Cancel build\n@returns(204) Success\n\n@endgroup\n\n@group buildjobs\n@endpoint GET /buildjobs/{jobId}/artifacts\n@desc Get build artifacts\n@returns(200) Success\n\n@endpoint GET /buildjobs/{jobId}/artifacts/{artifactFileName}\n@desc Download build artifact\n@returns(200) Success\n\n@endpoint GET /buildjobs/{jobId}/log\n@desc Download build log\n@returns(200) Success. Note:  Response content is plain text sent with Content-Type application/octet-stream.\n\n@endgroup\n\n@group environments\n@endpoint GET /environments\n@desc Get environments\n@returns(200) Success\n\n@endpoint POST /environments\n@desc Add environment\n@required {body: map}\n@returns(200) Success\n\n@endpoint PUT /environments\n@desc Update environment\n@required {body: any}\n@returns(200) Success\n\n@endpoint GET /environments/{deploymentEnvironmentId}/settings\n@desc Get environment settings\n@returns(200) Success\n\n@endpoint GET /environments/{deploymentEnvironmentId}/deployments\n@desc Get environment deployments\n@returns(200) Success\n\n@endpoint DELETE /environments/{deploymentEnvironmentId}\n@desc Delete environment\n@returns(204) Success\n\n@endgroup\n\n@group deployments\n@endpoint GET /deployments/{deploymentId}\n@desc Get deployment\n@returns(200) Success\n\n@endpoint POST /deployments\n@desc Start deployment\n@required {body: map}\n@returns(200) Success\n\n@endpoint PUT /deployments/stop\n@desc Cancel deployment\n@required {body: map}\n@returns(204) Success\n\n@endgroup\n\n@end\n"}}