Benachrichtigungen
Alles löschen

GraphQL moved?  

  RSS
pixelwave
(@pixelwave)
Active Member
GraphQL moved?

Hi,

before I was able to query some stats from the Prusa site via:

 

  - platform: rest
    resource:  https://www.prusaprinters.org/graphql/ 
    method: POST
    payload: '{"operationName":"UserProfileSocial","variables":{"id":"101152"},"query":"query UserProfileSocial($id: ID!) {\n  user(id: $id) {\n    ...AvatarUserFragment\n    hashId\n    publicUsername\n    email\n    place\n    offersPrintOnDemand\n    offersTechSupport\n    offersTechService\n    offersShowAndTell\n    isFollowedByMe\n    downloadCount\n    printsCount\n    eduProjectsCount\n    userGcodesCount\n    followersCount\n    followingCount\n    makesCount\n    collectionsCount\n    eventsCount\n    rating\n    isPublicSpace\n    publicSpaceUrl\n    isTeacher\n    promotionLinks {\n      status\n      url\n      __typename\n    }\n    badgesProfileLevel {\n      profileLevel\n      __typename\n    }\n    badgesSelection {\n      order\n      userBadge {\n        id\n        name\n        description\n        levelsCount\n        currentBadgeDisplayName\n        currentBadgeLevel {\n          name\n          image\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    coordinates {\n      lat\n      lng\n      __typename\n    }\n    locationSharing\n    bio\n    donationLinks {\n      id\n      title\n      url\n      __typename\n    }\n    socialLinks {\n      id\n      socialType\n      url\n      __typename\n    }\n    printers {\n      id\n      name\n      __typename\n    }\n    languages {\n      id\n      name\n      __typename\n    }\n    techService {\n      techServiceBio\n      techServicePrinters {\n        id\n        name\n        __typename\n      }\n      techServiceRatingAvg\n      techServiceRatingCount\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment AvatarUserFragment on UserType {\n  id\n  publicUsername\n  avatarFilePath\n  slug\n  badgesProfileLevel {\n    profileLevel\n    __typename\n  }\n  __typename\n}\n"}'
    value_template: "{{ value_json.data.user.downloadCount }}"
    headers:
      Content-Type: application/json

 

But that does not seem possible anymore. I tried to change the obvious "resource: https://www.prusaprinters.org/graphql /" to "resource: https://www.printables.com/graphql /" but that did not work either ...

Veröffentlicht : 10/10/2022 5:03 pm
pixelwave
(@pixelwave)
Active Member
Themenstarter answered:
RE: GraphQL moved?

Prusa team replied ... the solution is to replace: “ https://www.prusaprinters.org/graphql/”

… with the current API location: “ https://api.printables.com/graphql/​”

Tested and works again for me! 

Veröffentlicht : 11/10/2022 12:15 pm
mehul bmx
(@mehul-bmx)
Mitglied
RE: GraphQL moved?

Ensure that the API doesn't require authentication, or if it does, make sure you're including the necessary headers, such as an API key or bearer token.      collegebrawls

Veröffentlicht : 02/09/2024 5:41 pm
Teilen: