docs/apidocs/v1.3.3/main.js

64 lines
44 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$(function () {
var url = window.location.search.match(/url=([^&]+)/);
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = "../docs.json";
}
// Pre load translate...
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
window.swaggerUi = new SwaggerUi({
spec:
{"swagger":"2.0","info":{"title":"DTR 1.3.3 API Documentation","version":"1.0.0","description":"## Introduction\n\nThe Accounts & Repos API lets you integrate Docker Trusted Registry with your enterprise's organizational structure by providing fine-grained, role-based access control for your repositories. Specifically, this API provides:\n\n* An API for account management, including creating an account, listing existing accounts, creating a team within an organization, listing teams in an organization, getting a specific team, listing members of a team, adding and removing members from a team (if using a managed whitelist), or editing LDAP syncing configuration.\n\n* Methods for syncing members of a team in Docker Trusted Registry with an LDAP group filter configured by an admin.\n\n* An API for repository management and access control, including creating a repository, listing repositories for an account, adding collaborators to a repository, setting namespace-level access for teams, etc.\n\nThe API is designed so that minimal data migration is required, only schema migration. There is no UI accompanying this API.\n\n## Overview\n\nThis API defines two types of accounts that can own repositories: Users and Organizations. Account-owned (i.e., non-global) repos define a namespace similar to that of the Docker Hub, with two component names in the form `namespace/reponame`.\n\nRepositories can be either public or private. Public repositories can be\nread by any account in the system, but can only be written to by accounts granted explicit write access. Private repositories cannot be discovered by\nany account that does not have at least explicit read access to that\nrepository.\n\n### User accounts\n\nDocker Trusted Registry users can create a repository under their own namespace and can control which other users have read-only, read-write, or admin access to any\nof their repositories.\n\nUser owned repositories can only be accessed by the owner and other\nindividual user accounts, i.e., you cannot grant access to a user-owned\nrepository to a team of users in an organization. If a repository requires this level of control, consider moving it within an organization namespace.\n\nWhen the Docker Trusted Registry web admin tool is used to assign users global \"read-only\",\n\"read-write\", or managed \"admin\" roles, they will have that access level to all\nrepositories. You can access and modify these roles with the API, using the\n`_global` organization. However, you must have admin access in order to view and\nedit the `_global` organization.\n\n\n### Organization accounts\n\nSystem administrators can also create an Organization account, with its own\nnamespace of repositories. Organization accounts are comprised of one or more teams which can be managed by anyone in an initial owners team which is created by default. Teams can be created with either a managed whitelist of users known to the system or with an LDAP group search filter which is periodically synced automatically.\n\nAny member of an organizations owners team can create new repositories under\nthe organizations namespace and can also create and edit other teams. Each team\ncan be given read-only or read-write access to all repositories in the\norganizations namespace and/or be granted separate levels of access on a\nper-repository basis. However, permissions are additive, so you cannot override\na team level permission to prevent access to a specific repository.\n\nTeams within an organization can also be granted read-only, read-write, or\nadmin level access to all repositories in the organizations namespace. This\nallows a team to pull, push, and manage repositories for an organization,\nbut *not* manage the teams themselves.\n\nOrganization-owned repositories can only be given access to the teams within\nthat organization, i.e., you cannot grant access to an organization-owned\nrepository to an individual user account or team in another organization.\nIf this level of control is needed on a repository, you can add those\nindividual users to a team within the owning organization or add users in the\nother organizations team to a team within the owning organization.\n\n### Notable differences from Docker Hub\n\n- Repositories must be explicitly created using the API. A `docker push` will\n not create a repository if it does not exist. This prevents a typo from\n creating an unwanted repository in Docker Trusted Registry. This policy will be globally enforced\n in Docker Trusted Registry 1.3.\n\n- Organizations can only be created by system admins. This should prevent the\n proliferation of unwanted organization accounts.\n\n- Collaborators on user-owned repositories can be given more granular\n access than on Docker Hub. Docker Hub Registry offers only read-write access.\n Docker Trusted Registry offers read-only, read-write, and admin access for\n each user-owned repository.\n\n- Teams can be granted access to all repositories in an organization's\n namespace. Docker Hub Registry offers team access control on a\n per-repository level only, and only an organization's 'owners team can\n manage access and create new repositories. Further, in the future, Docker\n Trusted Registry will offer the ability to grant a team access and/or\n management privileges to all repositories under a namespace.\n\n- Teams within an organization are visible to all members of the\n organization. In Docker Hub Registry, terms are 'invisible' to users to which\n they do not belong. In Docker Trusted Registry, teams will be\n visible to the members of the organization, but will not be able to see a\n teams's members unless they are also a member of that team.\n\n### Authentication\n\nClients authenticate API requests by providing Basic Auth credentials (\nusername and password) via an \"Authorization\" header for each request.\n\n```bash\n$ curl --user readuser:password https://dtr.domain.com/api/v0/accounts\n{\n \"accounts\": [\n {\n \"id\": 1,\n \"type\": \"user\",\n \"name\": \"admin\",\n },\n {\n \"id\": 2,\n \"type\": \"user\",\n \"name\": \"readuser\",\n },\n {\n \"id\": 3,\n \"type\": \"user\",\n \"name\": \"user\",\n }\n ]\n}\n```\n\n> **Note**: If you are using Docker Trusted Registry's automatically generated, self-signed SSL\n> certificate\n> then you'll need to add `--insecure` to the curl examples.\n\n# User-owned repository access\n\nuser accounts can be granted `read-only`, `read-write`, or `admin` level access\nto any repository owned by another user account.\n\n**`read-only`**\n\n- user can pull from the repository\n\n**`read-write`**\n\n- user can pull from the repository\n- user can push to the repository\n\n**`admin`**\n\n- user can pull from the repository\n- user can push to the repository\n- user can manage other users' access to the repository\n\n# Organization-owned repository access\n\nTeams within an organization account can be granted `read-only`, `read-write`,\nor `admin` level access to any repository owned by that organization.\n\n**`read-only`**\n\n- members of the team can pull from the repository\n\n**`read-write`**\n\n- members of the team can pull from the repository\n- members of the team can push to the repository\n\n**`admin`**\n\n- members of the team can pull from the repository\n- members of the team can push to the repository\n- members of the team can manage other team's access to the repository\n\n# Organization-owned repository namespace access\n\nTeams within an organization account can be granted `read-only`, `read-write`,\nor `admin` level access to the entire namespace of repositories owned\nby that organization.\n\n**`read-only`**\n\n- members of the team can pull from any repository under the organization's\n namespace\n\n**`read-write`**\n\n- members of the team can pull from any repository under the organization's\n namespace\n- members of the team can push to any repository under the organization's\n namespace\n\n**`admin`**\n\n- members of the team can pull from any repository under the organization's\n namespace\n- members of the team can push to any repository under the organization's\n namespace\n- members of the team can manage other team's access to any repository under\n the organization's namespace\n- members of the team can create new repositories under the organization's\n namespace\n\n# Errors\n\nErrors are always returned as a list and have the following structure:\n\n```json\n{\n \"errors\": [\n {\n \"code\": \"NO_SUCH_TEAM\",\n \"detail\": \"Team name: \\\"team1\\\".\",\n \"message\": \"A team with the given name does not exist in the organization.\"\n }\n ]\n}\n```\n"},"tags":[{"name":"accounts","description":"Accounts"},{"name":"repositories","description":"Reponsitories"},{"name":"repositoryNamespaces","description":"Repository Namespaces"}],"paths":{"/api/v0/accounts":{"get":{"tags":["accounts"],"operationId":"func1","summary":"List all accounts","description":"\n*Authorization:* any user\n\t\t","produces":["application/json"],"consumes":["application/json"],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/responses.User"}}},"401":{"description":"The client is not authenticated."}}},"post":{"tags":["accounts"],"operationId":"func1","summary":"Create account","description":"\n##### Managed mode:\n\n*Authorization:* none for users, admin for organizations\n\n*Managed mode notes:* There is no user restriction on creating a managed user account,\n\thowever managed user accounts start out inactive and the user cannot authenticate until an admin\n\texplicitly activates the account using the activate user API endpoint. This allows the creation of\n\tDTR managed namespace reservations by an external service, which can then activate the account when\n\tit\"s been verified by the external service.\n\n##### LDAP mode:\n\n*Authorization:* Anyone may create an LDAP user account, however, the account is only created if the client provides a valid LDAP login and password.\n\n*LDAP mode notes:* The name field is the requested username to use in Docker Trusted Registry,\n\twhile ldapLogin should be the user\"s LDAP user login attribute.\n\tThese need only differ if the user prefers or if the user\"s LDAP login name is\n\tnot compatible with valid Docker Trusted Registry usernames.\n\n##### Organization accounts:\n\n*Authorization:* admin\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.Account"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.User"}},"400":{"description":"An account with the same name already exists."},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}}},"/api/v0/accounts/{name}":{"get":{"tags":["accounts"],"operationId":"func1","summary":"Account details","description":"\n*Authorization:* any user\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.User"}},"401":{"description":"The client is not authenticated."},"404":{"description":"An account with the given name does not exist."}}},"delete":{"tags":["accounts"],"operationId":"func1","summary":"Remove an account","description":"\n*Authorization:* admin\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"}],"responses":{"204":{"description":"success or account does not exist"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}}},"/api/v0/accounts/{name}/changePassword":{"post":{"tags":["accounts"],"operationId":"func1","summary":"Change password","description":"\n*Authorization:* same user or admin\n\n*Auth mode required:* managed\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.ChangePassword"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.User"}},"400":{"description":"The given password does not match the current password."},"401":{"description":"The client is not authenticated."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/accounts/{name}/activate":{"put":{"tags":["accounts"],"operationId":"func1","summary":"Activate a user","description":"\n*Authorization:* admin\n\n*Auth mode required:* managed\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.User"}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/accounts/{name}/deactivate":{"put":{"tags":["accounts"],"operationId":"func1","summary":"Deactivate a user","description":"\n*Authorization:* admin\n\n*Auth mode required:* managed\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.User"}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/accounts/{name}/organizations":{"get":{"tags":["accounts"],"operationId":"func1","summary":"List organizations for a user","description":"\n*Authorization:* same user or admin\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.Organizations"}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/accounts/{name}/teams":{"post":{"tags":["accounts"],"operationId":"func1","summary":"Create a team in an organization","description":"\n*Authorization:* Client must be authenticated as a system admin or a member of the \"owners\" team in the organization.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.Team"}}],"responses":{"201":{"description":"success"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"409":{"description":"The given team name is either too long or contains illegal characters."}}},"get":{"tags":["accounts"],"operationId":"func1","summary":"List teams in an organization","description":"\n*Authorization:* Client must be authenticated as a member of the organization containing the team(s) or be an admin.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/responses.Teams"}}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/accounts/{name}/teams/{teamname}":{"get":{"tags":["accounts"],"operationId":"func1","summary":"View details of a team","description":"\n*Authorization:* Client must be authenticated as a member of the organization containing the team(s) or be an admin.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.Team"}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A team with the given name does not exist in the organization."}}},"patch":{"tags":["accounts"],"operationId":"func1","summary":"Update a team's details","description":"\n*Authorization:* Client must be authenticated as a system admin or a member of the \"owners\" team in the organization.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.TeamUpdate"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.Team"}},"400":{"description":"invalid input"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A team with the given name does not exist in the organization."}}},"delete":{"tags":["accounts"],"operationId":"func1","summary":"Remove a team","description":"\n*Authorization:* Client must be authenticated as a system admin or a member of the \"owners\" team in the organization.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"204":{"description":"success or team does not exist"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}}},"/api/v0/accounts/{name}/teams/{teamname}/members":{"get":{"tags":["accounts"],"operationId":"func1","summary":"List a team's members","description":"\n*Authorization:* Client must be authenticated as a system admin, a member of the \"owners\" team in the organization, or a member of the team in question.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.Members"}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A team with the given name does not exist in the organization."}}}},"/api/v0/accounts/{name}/teams/{teamname}/members/{member}":{"get":{"tags":["accounts"],"operationId":"func1","summary":"Check if a user is a member of a team","description":"\n*Authorization:* Client must be authenticated as a user who has visibility into the team (i.e., a member of the team or an owner of the organization).\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"},{"in":"path","description":"username of team member","name":"member","required":true,"type":"string"}],"responses":{"200":{"description":""},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"Description was not specified"}}},"put":{"tags":["accounts"],"operationId":"func1","summary":"Add a user to a team","description":"\n*Authorization:* Client must be authenticated as a system admin or a member of the \"owners\" team in the organization.\n\n*Auth mode required:* managed\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"},{"in":"path","description":"username of team member","name":"member","required":true,"type":"string"}],"responses":{"200":{"description":""},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}},"delete":{"tags":["accounts"],"operationId":"func1","summary":"Remove a user from a team","description":"\n*Authorization:* Client must be authenticated as a system admin or a member of the \"owners\" team in the organization.\n\n*Auth mode required:* managed\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"},{"in":"path","description":"username of team member","name":"member","required":true,"type":"string"}],"responses":{"200":{"description":""},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A team with the given name does not exist in the organization."}}}},"/api/v0/accounts/{name}/repositoryAccess/{namespace}/{reponame}":{"get":{"tags":["accounts"],"operationId":"func1","summary":"Check a user's access to a repository","description":"\n*Authorization:* Client must be authenticated as a user which has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.RepoUserAccess"}},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/accounts/{name}/teams/{teamname}/repositoryAccess":{"get":{"tags":["accounts"],"operationId":"func1","summary":"List repository access grants for a team","description":"\n*Authorization:* Client must be authenticated as a user who owns the organization the team is in or be a member of that team.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"user or organization name","name":"name","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"200":{"description":""},"400":{"description":"the team does not belong to the organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A team with the given name does not exist in the organization."}}}},"/api/v0/repositories/{namespace}":{"get":{"tags":["repositories"],"operationId":"func1","summary":"List repositories in a namespace","description":"\n*Authorization:* Client must be authenticated as any active user in the system. Results will be filtered to only those repositories visible to the client.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"}],"responses":{"200":{"description":""},"401":{"description":"The client is not authenticated."},"404":{"description":"An account with the given name does not exist."}}},"post":{"tags":["repositories"],"operationId":"func1","summary":"Create repository","description":"\n*Authorization:* Client must be authenticated as a user who has admin access to the\nrepository namespace (i.e., user owns the repo or is a member of a team with\n\"admin\" level access to the organization's namespace of repositories).\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.CreateRepo"}}],"responses":{"201":{"description":"success","schema":{"$ref":"#/definitions/responses.Repository"}},"400":{"description":"invalid repository details"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}}},"/api/v0/repositories/{namespace}/{reponame}":{"get":{"tags":["repositories"],"operationId":"func1","summary":"View details of a repository","description":"\n*Authorization:* Client must be authenticated as a user who has visibility to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.Repository"}},"401":{"description":"The client is not authenticated."},"404":{"description":"An account with the given name does not exist."}}},"patch":{"tags":["repositories"],"operationId":"func1","summary":"Update details of a repository","description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" access to the repository\n(i.e., user owns the repo or is a member of a team with \"admin\" level access to the organization\"s repository).\n\nNote that a repository cannot be renamed this way.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.UpdateRepo"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.Repository"}},"400":{"description":"invalid repository details"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}},"delete":{"tags":["repositories"],"operationId":"func1","summary":"Remove a repository","description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" access to the repository\n(i.e., user owns the repo or is a member of a team with \"admin\" level access to the organization\"s repository).\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"}],"responses":{"204":{"description":"success or repository does not exist"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}}},"/api/v0/repositories/{namespace}/{reponame}/userAccess":{"get":{"tags":["repositories"],"operationId":"func1","summary":"List users granted access to a user-owned repository","description":"\n*Authorization:* Client must be authenticated as a user which has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.ListRepoUserAccess"}},"400":{"description":"the repository is not owned by a user"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A repository with the given name does not exist."}}}},"/api/v0/repositories/{namespace}/{reponame}/userAccess/{grantee}":{"put":{"tags":["repositories"],"operationId":"func1","summary":"Set a user's access to a user-owned repository","description":"\n*Authorization:* Client must be authenticated as a user which has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"},{"in":"path","description":"username","name":"grantee","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.Access"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.RepoUserAccess"}},"400":{"description":"the repository is not owned by a user"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A repository with the given name does not exist."}}},"delete":{"tags":["repositories"],"operationId":"func1","summary":"Revoke a user's access to a user-owned repository","description":"\n*Authorization:* Client must be authenticated as a user which has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"},{"in":"path","description":"username","name":"grantee","required":true,"type":"string"}],"responses":{"204":{"description":"succes or the user is not in the access list"},"400":{"description":"the repository is not owned by a user"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A repository with the given name does not exist."}}}},"/api/v0/repositories/{namespace}/{reponame}/teamAccess":{"get":{"tags":["repositories"],"operationId":"func1","summary":"List teams granted access to an organization-owned repository","description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.ListRepoTeamAccess"}},"400":{"description":"the repository is not owned by an organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A repository with the given name does not exist."}}}},"/api/v0/repositories/{namespace}/{reponame}/teamAccess/{teamname}":{"put":{"tags":["repositories"],"operationId":"func1","summary":"Set a team's access to an orgnization-owned repository","description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.Access"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.RepoTeamAccess"}},"400":{"description":"the team does not belong to the organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A repository with the given name does not exist."}}},"delete":{"tags":["repositories"],"operationId":"func1","summary":"Revoke a team's acccess to an organization-owned repository","description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to the repository.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"name of repository","name":"reponame","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"204":{"description":"success or the team is not in the access list or there is no such team in the organization"},"400":{"description":"the repository is not owned by an organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A repository with the given name does not exist."}}}},"/api/v0/repositoryNamespaces/{namespace}/teamAccess":{"get":{"tags":["repositoryNamespaces"],"operationId":"func1","summary":"List teams granted access to an organization-owned namespace of repositories","description":"\n*Authorization:* Client must be authenticated as a user who has admin level access to the namespace.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.ListRepoNamespaceTeamAccess"}},"400":{"description":"the namespace is not owned by an organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"An account with the given name does not exist."}}}},"/api/v0/repositoryNamespaces/{namespace}/teamAccess/{teamname}":{"get":{"tags":["repositoryNamespaces"],"operationId":"func1","summary":"Get a team's granted access to an organization-owned namespace of repositories","description":"\n*Authorization:* Client must be authenticated as a user who has \"admin\" level access to\nthe namespace, is a system admin, member of the organization's \"owners\" team, or is a\nmember of the team in question.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.NamespaceTeamAccess"}},"400":{"description":"the namespace is not owned by an organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."},"404":{"description":"A team with the given name does not exist in the organization."}}},"put":{"tags":["repositoryNamespaces"],"operationId":"func1","summary":"Set a team's access to an organization-owned namespace of repositories","description":"\n*Authorization:* Client must be authenticated as a user who has admin level access to the namespace.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/forms.Access"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/responses.NamespaceTeamAccess"}},"400":{"description":"the team does not belong to the owning organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}},"delete":{"tags":["repositoryNamespaces"],"operationId":"func1","summary":"Revoke a team's access to an organization-owned namespace of repositories","description":"\n*Authorization:* Client must be authenticated as a user who has admin level access to the namespace.\n\t\t","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","description":"namespace of repository","name":"namespace","required":true,"type":"string"},{"in":"path","description":"team name","name":"teamname","required":true,"type":"string"}],"responses":{"204":{"description":"success or the team does not exist in the access list or there is no such team in the organization"},"401":{"description":"The client is not authenticated."},"403":{"description":"The client is not authorized."}}}}},"definitions":{"||responses.User":{},"responses.User":{"required":["id","type","name"],"properties":{"id":{"type":"integer","format":"integer"},"type":{"type":"string","enum":["user","organization"]},"name":{"type":"string"},"ldapLogin":{"type":"string"},"isActive":{"type":"boolean"}}},"forms.Account":{"description":"A user or organization account","required":["type","name"],"properties":{"type":{"type":"string","enum":["user","organization"],"description":"user or organization"},"name":{"type":"string","description":"The user or org's namespace. It can contain lowercase letters, numbers, - and _. It must start with a letter or number."},"ldapLogin":{"type":"string"},"password":{"type":"string"}}},"forms.ChangePassword":{"required":["newPassword"],"properties":{"oldPassword":{"type":"string"},"newPassword":{"type":"string"}}},"responses.Organizations":{"required":["organizations"],"properties":{"organizations":{"type":"array","items":{"$ref":"#/definitions/responses.User"}}}},"forms.Team":{"required":["name","description","type"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["managed","ldap"]},"ldapDN":{"type":"string"},"ldapGroupMemberAttribute":{"type":"string"}}},"||responses.Teams":{},"responses.Teams":{"required":["teams"],"properties":{"teams":{"type":"array","items":{"$ref":"#/definitions/responses.Team"}}}},"responses.Team":{"required":["id","orgID","type","name","description"],"properties":{"id":{"type":"integer","format":"integer"},"orgID":{"type":"integer","format":"integer"},"type":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"ldapDN":{"type":"string"},"ldapGroupMemberAttribute":{"type":"string"}}},"forms.TeamUpdate":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"ldapDN":{"type":"string"},"ldapGroupMemberAttribute":{"type":"string"}}},"responses.Members":{"required":["members"],"properties":{"members":{"type":"array","items":{"$ref":"#/definitions/responses.User"}}}},"responses.RepoUserAccess":{"required":["accessLevel","user","repository"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"user":{"$ref":"#/definitions/responses.User"},"repository":{"$ref":"#/definitions/responses.Repository"}}},"responses.Repository":{"required":["id","namespace","name","shortDescription","visibility","status"],"properties":{"id":{"type":"integer","format":"integer"},"namespace":{"type":"string"},"name":{"type":"string"},"shortDescription":{"type":"string"},"longDescription":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]},"status":{"type":"string"}}},"forms.CreateRepo":{"required":["name","shortDescription","longDescription"],"properties":{"name":{"type":"string"},"shortDescription":{"type":"string"},"longDescription":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]}}},"forms.UpdateRepo":{"properties":{"shortDescription":{"type":"string"},"longDescription":{"type":"string"},"visibility":{"type":"string","enum":["public","private"]}}},"responses.ListRepoUserAccess":{"required":["repository","userAccessList"],"properties":{"repository":{"$ref":"#/definitions/responses.Repository"},"userAccessList":{"type":"array","items":{"$ref":"#/definitions/responses.UserAccess"}}}},"responses.UserAccess":{"required":["accessLevel","user"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"user":{"$ref":"#/definitions/responses.User"}}},"forms.Access":{"required":["accessLevel"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]}}},"responses.ListRepoTeamAccess":{"required":["repository","teamAccessList"],"properties":{"repository":{"$ref":"#/definitions/responses.Repository"},"teamAccessList":{"type":"array","items":{"$ref":"#/definitions/responses.TeamAccess"}}}},"responses.TeamAccess":{"required":["accessLevel","team"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"team":{"$ref":"#/definitions/responses.Team"}}},"responses.RepoTeamAccess":{"required":["accessLevel","team","repository"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"team":{"$ref":"#/definitions/responses.Team"},"repository":{"$ref":"#/definitions/responses.Repository"}}},"responses.ListRepoNamespaceTeamAccess":{"required":["namespace","teamAccessList"],"properties":{"namespace":{"$ref":"#/definitions/responses.Namespace"},"teamAccessList":{"type":"array","items":{"$ref":"#/definitions/responses.TeamAccess"}}}},"responses.Namespace":{"required":["id","type","name"],"properties":{"id":{"type":"integer","format":"integer"},"type":{"type":"string"},"name":{"type":"string"}}},"responses.NamespaceTeamAccess":{"required":["accessLevel","team","namespace"],"properties":{"accessLevel":{"type":"string","enum":["read-only","read-write","admin"]},"team":{"$ref":"#/definitions/responses.Team"},"namespace":{"$ref":"#/definitions/responses.Namespace"}}}}}
,
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
validatorUrl: null,
docExpansion: 'list',
supportedSubmitMethods: [],
onComplete: function(swaggerApi, swaggerUi){
if(typeof initOAuth == "function") {
initOAuth({
clientId: "your-client-id",
clientSecret: "your-client-secret",
realm: "your-realms",
appName: "your-app-name",
scopeSeparator: ","
});
}
if(window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
$('pre code').each(function(i, e) {
hljs.highlightBlock(e)
});
},
onFailure: function(data) {
log("Unable to Load SwaggerUI");
},
apisSorter: "alpha",
showRequestHeaders: false
});
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
/*
var apiKey = "myApiKeyXXXX123456789";
$('#input_apiKey').val(apiKey);
*/
window.swaggerUi.load();
function log() {
if ('console' in window) {
console.log.apply(console, arguments);
}
}
});