Not Signed In Join the Community
Site Language:
Microsoft Advertising Community

Subscribe   |   adCenter Advertiser Support » adCenter API Development v8 campaign management REST api is down ?

v8 campaign management REST api is down ?

posted Tue, Jan 24 2012 08:02AM
by Myth
Level 2: Participant
Joined: Jan 06 2012
Points: 990  |  Posts: 11

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.

Did this answer solve your issue?  Yes - No Answered (Verified) Verified Answer

posted Wed, Jan 25 2012 09:25PM
Level 5: Champion
Joined: Oct 05 2010
Points: 11,040  |  Posts: 152
Verified by Eric Urban - MSFT
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

Answered (Verified) This post has 1 verified answer | 11 Replies | 3 Followers

    posted Tue, Jan 24 2012 08:20AM
    by Myth
    Level 2: Participant
    Joined: Jan 06 2012
    Points: 990  |  Posts: 11

    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>

    posted Tue, Jan 24 2012 08:28AM
    by Myth
    Level 2: Participant
    Joined: Jan 06 2012
    Points: 990  |  Posts: 11

    But SOAP  AddAdGroupsRequest works fine.

    posted Tue, Jan 24 2012 02:59PM
    Level 5: Champion
    Joined: Oct 05 2010
    Points: 11,040  |  Posts: 152
    Suggested by Eric Urban - MSFT
    Hello. This issue should now be resolved, and will you please confirm on your end. Thanks for your patience!
    posted Tue, Jan 24 2012 06:10PM
    by Myth
    Level 2: Participant
    Joined: Jan 06 2012
    Points: 990  |  Posts: 11

    nope , still errors SOAP and REST

    posted Tue, Jan 24 2012 06:13PM
    by Myth
    Level 2: Participant
    Joined: Jan 06 2012
    Points: 990  |  Posts: 11

    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()

    posted Tue, Jan 24 2012 07:19PM
    Level 5: Champion
    Joined: Oct 05 2010
    Points: 11,040  |  Posts: 152
    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.
    posted Wed, Jan 25 2012 09:23AM
    by Myth
    Level 2: Participant
    Joined: Jan 06 2012
    Points: 990  |  Posts: 11

    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()

     

    posted Wed, Jan 25 2012 09:25PM
    Level 5: Champion
    Joined: Oct 05 2010
    Points: 11,040  |  Posts: 152
    Verified by Eric Urban - MSFT
    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
    posted Thu, Jan 26 2012 06:39AM
    by Myth
    Level 2: Participant
    Joined: Jan 06 2012
    Points: 990  |  Posts: 11

    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.

Page 1 of 2 (12 items) 1 2 Next >