AEM에서 cURL 사용
- 주제:
- Administering
작성 대상:
- Admin
관리자는 종종 모든 시스템 내에서 일반적인 작업을 자동화하거나 단순화해야 합니다. 예를 들어 AEM에서 사용자 관리, 패키지 설치 및 OSGi 번들 관리는 일반적으로 수행해야 하는 작업입니다.
AEM이 빌드되는 Sling 프레임워크의 RESTful 특성으로 인해 대부분의 작업을 URL 호출로 수행할 수 있습니다. cURL을 사용하여 이러한 URL 호출을 실행할 수 있으며 AEM 관리자에게 유용한 도구가 될 수 있습니다.
cURL이란?
cURL은 URL 조작을 수행하는 데 사용되는 오픈 소스 명령줄 툴입니다. HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, DAP, DICT, TELNET, FILE, IMAP, POP3, SMTP 및 RTSP를 비롯한 다양한 인터넷 프로토콜을 지원합니다.
cURL은 URL 구문을 사용하여 데이터를 가져오거나 전송하는 데 잘 설정되어 있고 널리 사용되는 도구이며 원래 1997년에 릴리스되었습니다. 원래 cURL이라는 이름은 "URL 보기"였습니다.
AEM이 빌드되는 Sling 프레임워크의 RESTful 특성으로 인해 대부분의 작업을 cURL로 실행할 수 있는 URL 호출로 줄일 수 있습니다. 컨텐츠 조작 작업 페이지 활성화 및 워크플로우 시작 작업 패키지 관리 및 사용자 관리와 같은 는 cURL을 사용하여 자동화할 수 있습니다. 또한 다음을 수행할 수 있습니다 자신만의 cURL을 만듭니다 AEM의 대부분의 작업에 대한 명령입니다.
cURL 다운로드
cURL은 macOS 및 일부 Linux 도메인의 표준 부분입니다. 그러나 대부분의 모든 운영 체제에 사용할 수 있습니다. 최신 다운로드는 다음에서 찾을 수 있습니다. https://curl.haxx.se/download.html.
URL의 소스 저장소는 GitHub에서도 찾을 수 있습니다.
cURL 준비 AEM 명령 작성
워크플로우 트리거, OSGi 구성 확인, JMX 명령 트리거, 복제 에이전트 만들기 등과 같은 AEM의 대부분의 작업에 대해 cURL 명령을 작성할 수 있습니다.
특정 작업에 필요한 정확한 명령을 찾으려면 브라우저에서 개발자 도구를 사용하여 AEM 명령을 실행할 때 서버에 대한 POST 호출을 캡처해야 합니다.
다음 단계는 Chrome 브라우저 내에서 새 페이지를 만드는 작업을 예로 사용하여 이 작업을 수행하는 방법을 설명합니다.
-
AEM 내에서 호출할 작업을 준비합니다. 이 경우, 우리는 페이지 만들기 마법사 만들기.
-
개발자 도구를 시작하고 을(를) 선택합니다. 네트워크 탭. 을(를) 클릭합니다. 로그 유지 옵션을 선택합니다.
-
클릭 만들기 에서 페이지 만들기 실제로 워크플로우를 만드는 마법사입니다.
-
결과 POST 작업을 마우스 오른쪽 단추로 클릭하고 를 선택합니다 복사 -> cURL로 복사.
-
텍스트 편집기에 cURL 명령을 복사하고 명령에서 모든 헤더를 제거합니다. 이 명령은
-H
(아래 이미지에서 파란색으로 강조 표시됨) 및 다음과 같은 적절한 인증 매개 변수를 추가합니다.-u <user>:<password>
. -
명령줄에서 cURL 명령을 실행하고 응답을 확인합니다.
일반적인 작동 AEM cURL 명령
다음은 일반적인 관리 및 작업 작업을 위한 AEM cURL 명령 목록입니다.
localhost
포트 4502
및 은 사용자를 사용합니다 admin
암호 admin
. 추가 명령 자리 표시자는 꺾쇠 괄호로 설정됩니다.패키지 관리
설치된 모든 패키지 나열
curl -u <user>:<password> http://<host>:<port>/crx/packmgr/service.jsp?cmd=ls
패키지 만들기
curl -u <user>:<password> -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=create -d packageName=<name> -d groupName=<name>
패키지 미리 보기
curl -u <user>:<password> -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=preview
패키지 컨텐츠 나열
curl -u <user>:<password> -X POST http://localhost:4502/crx/packmgr/service/console.html/etc/packages/mycontent.zip?cmd=contents
패키지 작성
curl -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=build
패키지 다시 래핑
curl -u <user>:<password> -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=rewrap
패키지 이름 바꾸기
curl -u <user>:<password> -X POST -Fname=<New Name> http://localhost:4502/etc/packages/<Group Name>/<Package Name>.zip/jcr:content/vlt:definition
패키지 업로드
curl -u <user>:<password> -F cmd=upload -F force=true -F package=@test.zip http://localhost:4502/crx/packmgr/service/.json
패키지 설치
curl -u <user>:<password> -F cmd=install http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/test.zip
패키지 제거
curl -u <user>:<password> -F cmd=uninstall http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/test.zip
패키지 삭제
curl -u <user>:<password> -F cmd=delete http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/test.zip
패키지 다운로드
curl -u <user>:<password> http://localhost:4502/etc/packages/my_packages/test.zip
사용자 관리
새 사용자 만들기
curl -u <user>:<password> -FcreateUser= -FauthorizableId=hashim -Frep:password=hashim http://localhost:4502/libs/granite/security/post/authorizables
새 그룹 만들기
curl -u <user>:<password> -FcreateGroup=group1 -FauthorizableId=testGroup1 http://localhost:4502/libs/granite/security/post/authorizables
기존 사용자에게 속성 추가
curl -u <user>:<password> -Fprofile/age=25 http://localhost:4502/home/users/h/hashim.rw.html
프로필로 사용자 만들기
curl -u <user>:<password> -FcreateUser=testuser -FauthorizableId=hashimkhan -Frep:password=hashimkhan -Fprofile/gender=male http://localhost:4502/libs/granite/security/post/authorizables
새 사용자를 그룹의 구성원으로 만들기
curl -u <user>:<password> -FcreateUser=testuser -FauthorizableId=testuser -Frep:password=abc123 -Fmembership=contributor http://localhost:4502/libs/granite/security/post/authorizables
그룹에 사용자 추가
curl -u <user>:<password> -FaddMembers=testuser1 http://localhost:4502/home/groups/t/testGroup.rw.html
그룹에서 사용자 제거
curl -u <user>:<password> -FremoveMembers=testuser1 http://localhost:4502/home/groups/t/testGroup.rw.html
사용자 그룹 구성원 설정
curl -u <user>:<password> -Fmembership=contributor -Fmembership=testgroup http://localhost:4502/home/users/t/testuser.rw.html
사용자 삭제
curl -u <user>:<password> -FdeleteAuthorizable= http://localhost:4502/home/users/t/testuser
그룹 삭제
curl -u <user>:<password> -FdeleteAuthorizable= http://localhost:4502/home/groups/t/testGroup
curl -u <user>:<password> -Faction=start http://localhost:4502/system/console/bundles/<bundle-name>
번들 중지
curl -u <user>:<password> -Faction=stop http://localhost:4502/system/console/bundles/<bundle-name>
Dispatcher
캐시 무효화
curl -H "CQ-Action: Activate" -H "CQ-Handle: /content/test-site/" -H "CQ-Path: /content/test-site/" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" http://localhost:4502/dispatcher/invalidate.cache
캐시 제거
curl -H "CQ-Action: Deactivate" -H "CQ-Handle: /content/test-site/" -H "CQ-Path: /content/test-site/" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" http://localhost:4502/dispatcher/invalidate.cache
복제 에이전트
에이전트 상태 확인
curl -u <user>:<password> "http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.json?agent=publish"
http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.json?agent=publish
에이전트 삭제
curl -X DELETE http://localhost:4502/etc/replication/agents.author/replication99 -u <user>:<password>
에이전트 만들기
curl -u <user>:<password> -F "jcr:primaryType=cq:Page" -F "jcr:content/jcr:title=new-replication" -F "jcr:content/sling:resourceType=/libs/cq/replication/components/agent" -F "jcr:content/template=/libs/cq/replication/templates/agent" -F "jcr:content/transportUri=http://localhost:4503/bin/receive?sling:authRequestLogin=1" -F "jcr:content/transportUser=admin" -F "jcr:content/transportPassword={DES}8aadb625ced91ac483390ebc10640cdf"http://localhost:4502/etc/replication/agents.author/replication99
에이전트 일시 중지
curl -u <user>:<password> -F "cmd=pause" -F "name=publish" http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.json
에이전트 큐 지우기
curl -u <user>:<password> -F "cmd=clear" -F "name=publish" http://localhost:4502/etc/replication/agents.author/publish/jcr:content.queue.json
커뮤니티
배지 할당 및 취소
자세한 내용은 커뮤니티 점수 및 배지 자세한 내용
자세한 내용은 점수 책정 및 배지 핵심 사항 자세한 내용
MSRP 재인덱싱
자세한 내용은 MSRP - MongoDB 저장소 리소스 공급자 자세한 내용
보안
CRX DE Lite 활성화 및 비활성화
자세한 내용은 AEM에서 CRXDE Lite 활성화 자세한 내용
데이터 저장소 가비지 컬렉션
자세한 내용은 데이터 저장소 가비지 수집 자세한 내용
Analytics 및 Target 통합
자세한 내용은 Adobe Analytics 및 Adobe Target 선택 자세한 내용
단일 사인온
테스트 헤더 보내기
자세한 내용은 단일 사인온 자세한 내용
일반적인 컨텐츠 조작 AEM cURL 명령
다음은 컨텐츠 조작을 위한 AEM cURL 명령 목록입니다.
localhost
포트 4502
및 은 사용자를 사용합니다 admin
암호 admin
. 추가 명령 자리 표시자는 꺾쇠 괄호로 설정됩니다.페이지 관리
페이지 활성화
curl -u <user>:<password> -X POST -F path="/content/path/to/page" -F cmd="activate" http://localhost:4502/bin/replicate.json
페이지 비활성화
curl -u <user>:<password> -X POST -F path="/content/path/to/page" -F cmd="deactivate" http://localhost:4502/bin/replicate.json
트리 활성화
curl -u <user>:<password> -F cmd=activate -F ignoredeactivated=true -F onlymodified=true -F path=/content/geometrixx http://localhost:4502/etc/replication/treeactivation.html
페이지 잠금
curl -u <user>:<password> -X POST -F cmd="lockPage" -F path="/content/path/to/page" -F "_charset_"="utf-8" http://localhost:4502/bin/wcmcommand
페이지 잠금 해제
curl -u <user>:<password> -X POST -F cmd="unlockPage" -F path="/content/path/to/page" -F "_charset_"="utf-8" http://localhost:4502/bin/wcmcommand
페이지 복사
curl -u <user>:<password> -F cmd=copyPage -F destParentPath=/path/to/destination/parent -F srcPath=/path/to/source/location http://localhost:4502/bin/wcmcommand
curl -u <user>:<password> -F jcr:primaryType=sling:Folder http://localhost:4502/etc/test
노드 삭제
curl -u <user>:<password> -F :operation=delete http://localhost:4502/etc/test/test.properties
노드 이동
curl -u <user>:<password> -F":operation=move" -F":applyTo=/sourceurl" -F":dest=/target/parenturl/" https://localhost:4502/content
노드 복사
curl -u <user>:<password> -F":operation=copy" -F":applyTo=/sourceurl" -F":dest=/target/parenturl/" https://localhost:4502/content
Sling PostServlet을 사용하여 파일 업로드
curl -u <user>:<password> -F"*=@test.properties" http://localhost:4502/etc/test
Sling PostServlet 및 노드 이름 지정을 사용하여 파일 업로드
curl -u <user>:<password> -F"test2.properties=@test.properties" http://localhost:4502/etc/test
컨텐츠 유형을 지정하는 파일 업로드
curl -u <user>:<password> -F "*=@test.properties;type=text/plain" http://localhost:4502/etc/test
자산 조작
자세한 내용은 자산 HTTP API 자세한 내용
Experience Manager
- 관리 사용 안내서 개요
- 사이트 기능
- 작업
- 대시보드
- 작업 대시보드
- 백업 및 복원
- 데이터 저장소 가비지 컬렉션
- JMX 콘솔을 사용하여 서버 리소스 모니터링
- 로그 작업
- 리치 텍스트 편집기 구성
- 비디오 구성 요소 구성
- 벌크 편집기
- 전자 메일 알림 구성
- 액세스 가능한 사이트 생성을 위한 RTE 구성
- 링크 확인
- AEM 문제 해결
- AEM 6의 감사 로그 유지 관리
- 편집기
- 워크플로에 대한 액세스 관리
- AEM에서 cURL 사용
- 페이지 편집에 대한 실행 취소 구성
- 프록시 서버 도구(proxy.jar)
- AEM 앱 구성
- 워크플로 관리
- 검색 양식 구성
- 도구 콘솔
- 보고
- 워크플로 인스턴스 관리
- 레이아웃 컨테이너 및 레이아웃 모드 구성
- 클래식 UI에 대한 액세스 활성화
- 워크플로 시작
- 리치 텍스트 편집기 플러그인 구성
- Admin Console
- 보안
- 사용자 관리 및 보안
- 사용자, 그룹 및 액세스 권한 관리
- Security 검사 목록
- OWASP 상위 10
- 프로덕션 준비 모드에서 AEM 실행
- ID 관리
- AEM Managed Services을 위한 Adobe IMS 인증 및 Admin Console 지원
- 폐쇄된 사용자 그룹 생성
- AEM의 직렬화 문제 완화
- 사용자 동기화
- 캡슐화된 토큰 지원
- 단일 사인온
- AEM에서 사용자 관리 작업을 감사하는 방법
- 기본적으로 SSL
- SAML 2.0 인증 핸들러
- AEM에서 닫힌 사용자 그룹
- Granite 작업 - 사용자 및 그룹 관리
- AEM에서 CRXDE Lite 활성화
- AEM 6에서 LDAP 구성
- 설치 시 관리자 암호 구성
- AEM의 서비스 사용자
- 구성 속성에 대한 암호화 지원
- AEM Foundation에 대한 GDPR 요청 처리
- 컨텐츠 처리 필터
- 개인 맞춤화
- eCommerce
- 통합
- 타사 서비스와 통합
- Salesforce와 통합
- Adobe Target과 통합
- Adobe Analytics와 통합
- Adobe Analytics 연결 및 프레임워크 생성
- Adobe Analytics를 위한 링크 추적 구성
- Adobe Analytics 속성을 사용하여 구성 요소 데이터 매핑
- Adobe Analytics를 위한 비디오 추적 구성
- 콘텐츠 FAQ의 HTTP2 게재
- Adobe Campaign 통합 문제 해결
- SharePoint 커넥터 라이센스, 저작권 고지 사항 및 면책조항
- SharePoint 커넥터
- DHTML 뷰어 지원 중단 FAQ
- Adobe Campaign Classic과 통합
- 관련 커뮤니티 문서
- Adobe Campaign Standard과 통합
- Flash 뷰어 지원 중단 알림
- Adobe Creative Cloud과 통합
- Adobe Dynamic Tag Management과 통합
- Adobe Analytics 및 Adobe Target 선택
- AEM 포털 및 포틀릿
- Dynamic Media Classic과 통합
- 통합 문제 해결
- BrightEdge Content Optimizer와 통합
- 이메일 템플릿 우수 사례
- 카탈로그 제작자
- Silverpop Engage와 통합
- Adobe Campaign과 통합
- ExactTarget과 통합
- 외부 공급자의 Analytics
- Adobe Marketing Cloud과 통합
- Adobe Target과 통합 수동 구성
- Adobe Target과 통합하기 위한 사전 요구 사항
- Adobe 분류
- 솔루션 통합
- 경험 조각과 Target 통합
- 우수 사례
- 콘텐츠 관리