Join the Conversation!
We're interested in hearing what you have to say. Sign in with your Windows Live ID to leave comments or start new discussions.

v8 campaign management REST api is down ?

This question is answered

Hi ,

Since this morning REST api calls to get negative keywords on adgroup or campaign fail.

Nothing has changed in how I call it.

 

{"TrackingId":"0e04b5f4-54d0-44a5-a760-a2b50e290a2a","Errors":[{"Code":0,"Detail":null,"ErrorCode":"InternalError","Message":"An internal error has occurred."}]}

 

Alex.

Verified Answer
  • Hello. We have resolved the issue with REST API v8 and I've successfully posted both of your samples and retrieved negative keywords for campaigns and ad groups respectively. Will you please try again? Regarding GetNegativeKeywordsByCampaignIds v7, I am observing the same error message. Are you saying that v7 was also working prior to last 24 hours, or you could only confirm GetNegativeKeywordsByCampaignIds v8? We are investigating now either way. Thank you! Eric
All Replies
  • Actually all SOAP calls fail as well

    for example GetAdGroupsByCampaignId

    returns :

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

    <s:Body><s:Fault><faultcode>s:Client</faultcode>

    <faultstring xml:lang="en-US">Internal system error. Check the SOAP fault details for more information</faultstring>

    <detail><ApiFaultDetail xmlns="https://adcenter.microsoft.com/v8" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

    <TrackingId xmlns="https://adapi.microsoft.com">eb122db4-600c-44fd-b6d1-41a180f25529</TrackingId>

    <BatchErrors/>

    <OperationErrors><OperationError>

    <Code>0</Code><Details i:nil="true"/><ErrorCode>InternalError</ErrorCode>

    <Message>An internal error has occurred.</Message>

    </OperationError>

    </OperationErrors></ApiFaultDetail>

    </detail></s:Fault>

    </s:Body>

    </s:Envelope>

  • But SOAP  AddAdGroupsRequest works fine.

  • Hello. This issue should now be resolved, and will you please confirm on your end. Thanks for your patience!
  • nope , still errors SOAP and REST

  • my REST python example :

     

     

     

    from urllib2 import HTTPError,URLError

    import simplejson as json

    import urllib2

     

    REQUEST_STRING = json.dumps({ 'AdGroupIds': [775710747]})

     

    def main():

     

        try:

            baseUri = 'https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementServiceREST.svc'

            uriTemplate = '/customer/account/campaign/140039046/adGroup?$field=negativeKeywords'

            formatString = '&format=json'

            uri = baseUri + uriTemplate + formatString

     

            print(uri);

     

            print(" request " + REQUEST_STRING);

            encodedRequest = REQUEST_STRING.encode()

     

            # Load the header values for the POST

     

            headers = {"Content-Type": "application/json",

                       "Content-Length": str(len(encodedRequest)),

                       "CustomerAccountId": "XXXX",

                       "DeveloperToken" : 'XXXXXX',

                       "UserName" : "XXXXXX",

                       "Password" : "XXXXX"}

     

            request = urllib2.Request(uri, encodedRequest, headers)

     

     

            # Call the service operation and process the response. If

            # the request generates a fault, urlopen raises a HTTPError

            # exception that is caught below.

     

            response = urllib2.urlopen(request)

     

            # Get the JSON response text

     

            body = response.read()

            print(" response " + body.decode("utf8"))

     

     

        # Raised if the request fails or generates a fault. An INTERNAL_SERVER_ERROR

        # error indicates a fault. HTTP error code 400 indicates that the message is

        # malformed or contains invalid data.

     

        except HTTPError , error:

            print(" HTTP Error Code: " + str(error.code))

            print(" fault " + error.read().decode("utf8"))

     

        except URLError , e:

            print(e)

     

    # Starts the main loop.

     

    main()

  • Hello. I have reproduced the REST API error and we are investigating. Appears limited to v8, so the workaround is to use v7 REST for the time being.
  • Thanks Eric!

     

    To summarize :

    All soap and rest calls were working fine up to yesterday. 

    After doing some more investigation turns out the only SOAP that was failing was GetAdGroupsByCampaignId  and for some reason it started to work fine now....

    The REST example I posted to get adgroup negatives does works with v7. So I hope you fix v8 soon. But to get campaign negatives doesn't work with neither although for 

    v7 the error message is :

    {"TrackingId":"65c6bc58-a807-4e90-8ada-c53179e60eca","BatchErrors":[],"OperationErrors":[{"Code":1113,"Details":null,"ErrorCode":"CampaignServiceCampaignsArrayShouldNotBeNullOrEmpty","Message":"Campaigns array should not be null or empty."}]}

     

    and  v8

    {"TrackingId":"8af26356-4302-4c55-8631-9b33ffabe379","Errors":[{"Code":0,"Detail":null,"ErrorCode":"InternalError","Message":"An internal error has occurred."}]}

    For v7 the message it quite explanatory but I wonder what changed since  what I was doing was fine until yesterday and  it's very similar to the get adgroup negatives call (which works with v7)
    from urllib2 import HTTPError,URLError
    import simplejson as json
    REQUEST_STRING = json.dumps({ 'CampaignIds' : [140039046]})
    import urllib2
    def main():
        try:
            baseUri = 'https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementServiceREST.svc'
                    uriTemplate = '/customer/account/XXXXXX/campaign?$field=negativeKeywords'
            formatString = '&format=json'
            uri = baseUri + uriTemplate + formatString
            print(uri);
            print(" request " + REQUEST_STRING);
            encodedRequest = REQUEST_STRING.encode()
            # Load the header values for the POST
            headers = {"Content-Type": "application/json",
                       "Content-Length": str(len(encodedRequest)),
                       "CustomerAccountId": "XXXXX",
                       "DeveloperToken" : 'YYYYYY',
                       "UserName" : "UUUUUUUU",
                       "Password" : "PPPPPP"}
            request = urllib2.Request(uri, encodedRequest, headers)
            # Call the service operation and process the response. If
            # the request generates a fault, urlopen raises a HTTPError
            # exception that is caught below.
            response = urllib2.urlopen(request)
            # Get the JSON response text
            body = response.read()
            print(" response " + body.decode("utf8"))
        # Raised if the request fails or generates a fault. An INTERNAL_SERVER_ERROR
        # error indicates a fault. HTTP error code 400 indicates that the message is
        # malformed or contains invalid data.
        except HTTPError , error:
            print(" HTTP Error Code: " + str(error.code))
            print(" fault " + error.read().decode("utf8"))
        except URLError , e:
            print(e)
    # Starts the main loop.
    main()

     

  • Hello. We have resolved the issue with REST API v8 and I've successfully posted both of your samples and retrieved negative keywords for campaigns and ad groups respectively. Will you please try again? Regarding GetNegativeKeywordsByCampaignIds v7, I am observing the same error message. Are you saying that v7 was also working prior to last 24 hours, or you could only confirm GetNegativeKeywordsByCampaignIds v8? We are investigating now either way. Thank you! Eric
  • Hi ,

     

    All the REST v8 are fixed now , thanks !

    Regarding v7, I just tried it yesterday so I'm not sure if my v7 examples ever worked before.

     

    Thanks.

    Alex Parij.

  • We discovered that for v7 GetNegativeKeywordsByCampaignIds, the negative keywords field should be all lowercase and singular. /customer/account/campaign/{CampaignId}/adGroup?$field=negativekeyword I've verified that it works. The documentation is being updated now. Thanks!
  • I'm not sure if this is related but I'm getting the internal error message as well.

    URL: https://adcenterapi.microsoft.com/Api/Advertiser/v8/CampaignManagement/CampaignManagementServiceREST.svc/customer/account/campaign/XXXXXXX/adGroup?format=json

    Here is the encoded JSON

    {\"AdGroups\":[{\"AdDistribution\":[\"Search\"],\"BiddingModel\":\"Keyword\",\"BroadMatchBid\":{\"amount\":0.05},\"ContentMatchBid\":{\"amount\":0.05},\"ExactMatchBid\":{\"amount\":0.05},\"Language\":\"English\",\"Name\":\"Test Group\",\"Network\":\"OwnedAndOperatedOnly\",\"PhraseMatchBid\":{\"amount\":0.05},\"PricingModel\":\"Cpc\",\"PublisherCountries\":[\"US\"]}]}

    Response:

    <AdApiFaultDetail xmlns="https://adapi.microsoft.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><TrackingId>cb54a5d6-9414-40bf-a840-1429086fb551</TrackingId><Errors><AdApiError><Code>0</Code><Detail i:nil="true"/><ErrorCode>InternalError</ErrorCode><Message>An internal error has occurred.</Message></AdApiError></Errors></AdApiFaultDetail>