Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use public git APIs #278

Open
nealrichardson opened this issue Jun 14, 2024 · 0 comments
Open

Use public git APIs #278

nealrichardson opened this issue Jun 14, 2024 · 0 comments

Comments

@nealrichardson
Copy link
Collaborator

/v1/content/GUID/repository was added in the 2022.12 release, so if the server version is at least that new, we can use it instead of the unversioned applications path.

This is also an opportunity to improve the UX. The various repo_ functions are awkwardly named, IMO.

Notes on the GET resource:

Response

{
  "repository": "https://github.com/username/repository",
  "branch":     "main",
  "directory":  ".",
  "polling":    false
}
  • 200 OK with recorded repository information

Fields

  • repository: Identifies the Git repository. An absolute HTTP or HTTPS URL without credentials, query, or fragment.
  • branch: The Git branch to track.
  • directory: The location within the repository containing the content to track.
  • polling: Indicates if this Git location is periodically polled looking for updates.

Errors

  • 401 Unauthorized - when the request is not authenticated
  • 403 Forbidden - when the user is not a publisher
  • 404 Not Found - when the user is a publisher, but the content does not exist
  • 403 Forbidden - when the user is a publisher, does not have collaborator rights
  • 404 Not Found - when no Git repository information is associated with this content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant