AnsweredAssumed Answered

CCU API - Invalidation via Curl in Command Line

Question asked by Cassius John-Adams on Sep 8, 2015
Latest reply on Sep 9, 2015 by Trevor Ng

I'm struggling to understand the basics of the way that a header needs to be formed in order for the API to authenticate me.  I will need to perform some cache invalidations via CURL using the CCU v2 API, but so far I'm only getting an error stating "The authorization header does not have the right format"


I may have a fundamental misunderstanding of how this should work.


Right now, my curl statement looks something like this:


curl --include \

     --request POST \

     --header "Content-Type: application/json" \

     -H "Authorization: EG1-HMAC-SHA256 \

        client_token=akab-******************; \

        access_token=akab-******************; \

        timestamp=20150908T20:05:23+0000; \

        nonce=randomly-made-up-text; \

        secret=*********************;" \

     --data-binary "{ 

    \"objects\" : [




    \"action\": \"invalidate\",

    \"type\": \"arl\",

    \"domain\": \"staging\"

}" \




Obviously, my client_token, access_token, secret, and URL are omitted for this post, and the timestamp is no longer appropriate.


The above results in an error, like below.


HTTP/1.1 400 Bad Request

Content-Length: 453

Date: Tue, 08 Sep 2015 20:05:23 GMT

Connection: close

Content-Type: application/problem+json



  "type": "",

  "title": "Bad request",

  "status": 400,

  "detail": "The authorization header does not have the right format",

  "instance": "",

  "method": "POST",

  "serverIp": "",

  "clientIp": "x.x.x.x",

  "requestId": "601bee3",

  "requestTime": "2015-09-08T20:05:23Z"




Can someone please offer some suggestions and assistance?