InfoGrab Docs

프로젝트 스니펫

프로젝트 스니펫에 대해 설명합니다.

이 API를 사용하여 프로젝트 스니펫 을 관리합니다. 관련 API로는 개인 스니펫 과 스토리지 간 스니펫 이동 이 있습니다. 프로젝트의 모든 스니펫 목록 # 지정된 프로젝트의 모든 스니펫을 나열합니다. GET /projects/:id/snippets 지원되는 속성: 속성 유형 필수 설명 id integer or string 예 프로젝트 ID 또는 URL 인코딩된 경로 . 성공하면 200 OK 와 다음 응답 속성을 반환합니다: 속성 유형 설명 author.created_at string 작성자 계정이 생성된 날짜 및 시간. author.email string 스니펫 작성자의 이메일 주소. author.id integer 스니펫 작성자의 ID. author.name string 스니펫 작성자의 표시 이름. author.state string 작성자 계정의 상태. author.username string 스니펫 작성자의 사용자 이름. created_at string ISO 8601 형식으로 스니펫이 생성된 날짜 및 시간. description string 스니펫 설명. file_name string 스니펫 파일 이름. id integer 스니펫 ID. imported boolean true 인 경우 스니펫이 가져온 것임. imported_from string 스니펫을 가져온 경우 가져온 소스. project_id integer 스니펫을 포함하는 프로젝트의 ID. raw_url string 원시 스니펫 내용에 대한 직접 URL. title string 스니펫 제목. updated_at string ISO 8601 형식으로 스니펫이 마지막으로 업데이트된 날짜 및 시간. web_url string GitLab 웹 인터페이스에서 스니펫을 볼 URL. 요청 예시: curl --header "PRIVATE-TOKEN: <your_access_token>" \ --url "https://gitlab.example.com/api/v4/projects/1/snippets" 응답 예시: [ { "id" : 1 , "title" : "test" , "file_name" : "add.rb" , "description" : "Ruby test snippet" , "author" : { "id" : 1 , "username" : "john_smith" , "email" : "john@example.com" , "name" : "John Smith" , "state" : "active" , "created_at" : "2012-05-23T08:00:58Z" } , "updated_at" : "2012-06-28T10:52:04Z" , "created_at" : "2012-06-28T10:52:04Z" , "imported" : false , "imported_from" : "none" , "project_id" : 1 , "web_url" : "http://example.com/example/example/snippets/1" , "raw_url" : "htt