Showing posts with label CURL. Show all posts
Showing posts with label CURL. Show all posts

Sunday, February 21, 2021

HTTP API - EAP7.3 - Deployment using HTTP Curl

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/configuration_guide/deploying_applications#deploying_apps_using_http_api



7.5.1. Deploy an Application to a Standalone Server Using the HTTP API

By default, the HTTP API is accessible at http://HOST:PORT/management, for example, http://localhost:9990/management.
Deploy an Application
$ curl --digest -L -D - http://HOST:PORT/management --header "Content-Type: application/json" -u USER:PASSWORD -d '{"operation" : "composite", "address" : [], "steps" : [{"operation" : "add", "address" : {"deployment" : "test-application.war"}, "content" : [{"url" : "file:/path/to/test-application.war"}]},{"operation" : "deploy", "address" : {"deployment" : "test-application.war"}}],"json.pretty":1}'
Undeploy an Application
$ curl --digest -L -D - http://HOST:PORT/management --header "Content-Type: application/json" -u USER:PASSWORD -d '{"operation" : "composite", "address" : [], "steps" : [{"operation" : "undeploy", "address" : {"deployment" : "test-application.war"}},{"operation" : "remove", "address" : {"deployment" : "test-application.war"}}],"json.pretty":1}'

Saturday, January 30, 2021

CURL Headers Base64 Authorization

curl --location --request POST 'https://test.salesforce.com/services/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: BrowserId=4jzphkElEeu76TsJSxG4Tw' \
--data-urlencode 'client_id='a2rtyoi.k9iosdgh.b6rbmnb' \
--data-urlencode 'client_secret=23987590772833' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=foo@bar.com' \
--data-urlencode 'password=Red1$Apple'

curl --location --request GET 'http://10.102.13.101:8086' --header 'Authorization: Basic base64[username:Password]
curl --location --request GET 'http://AZ-CVS-LI-RE-02:8086' --header 
'Authorization: Basic U2hlZXRhbFM6ZWYxNTE1NWY3YTJjOGNiZWIyYjM3N2Q0NmQ2ZWRkYzkzOTg3NjljYTlhMzUyOTkwZDFhYjI1MzcxNDAyNzJiYQ=='

Friday, January 15, 2021

Add Key and cert in CURL

https://downey.io/notes/dev/curl-using-mutual-tls/


curl --cert 'abc.com_digicert_sha2_secure_server_ca_.pem' \
--key 'abc.com_digicert_sha2_secure_server_ca_.pkcs8' \
--location --request POST 'https://demo--test.my.salesforce.com:8443/services/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: BrowserId=4jzphkElEeu76TsJSxG4Tw' 


curl --cacert ca.crt \
     --key client.key \
     --cert client.crt \
https://cloud-controller-ng.service.cf.internal:9023/internal/v4/syslog_drain_urls

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass