Dropbox SDK request error - swift

I am using the SwiftyDropbox SDK and I am trying to upload an image file in my app but I keep getting the error:
DropboxSDK: error making request to
/1/files_put/dropbox/MelanomaDiagnosis/6E3D4F7B-3342-44CA-B228-01919ED2DB19ExposureTimeVal16666000Scale1000000000.jpg - (400) v1_retired

This v1_retired error indicates that you're calling Dropbox API v1, which is retired. (The "/1/" in the request URL also indicates that you're using API v1.)
The SwiftyDropbox SDK does not use API v1; it uses API v2, so it sounds like you actually are using a different SDK. Please follow the instructions for SwiftyDropbox to install it.

Related

Can I get access with version when trying to get access of API

I'm trying to get access of Uber API (api.uber.com/v2) using http method POST. But, I'm getting an error when I'm trying to get access along with version (api.uber.com/v2). The same API is working when I am trying to get it without version (api.uber.com) and it is working. How to get access with version?

HMS Core AI Model Integration Error 403 on Template File Download when Using MindSpore Lite Inference Engine

I'm using HMS Core Plugin - Model Integration from Coding Assistant to try to integrate my pre-trained model. I use MindSpore Lite inference engine and use caffemodel.
Setup my caffemodel with MindSpore Lite Inference engine
When I try to finish my setup, it says "checkAndDownload" file not exists and trying to download. After that, I get a 403 error on template download from http://cdn.ide.deveco.huawei.com//ai/download/foundation/template-1.3.1.zip
error 403 on download
Did I miss some configuration or it is a bug from the HMS plugin itself?
A 403 error is an access forbidden error. The reason for the error can be that the directory does not exist, the index is wrong, or that they are unpermitted to access the information/download.
At this time, the download may not be accessible by you.

Download latest artifacts from app center / Hockey app using API (token)

Recently the hockey moved to app center and i want to download the latest version of android and iOS version on the fly using the API.
What I tried ?
checked the official swagger api-specs
1. #GET("/v0.1/apps/{owner_name}/{app_name}/recent_releases")
2. #GET("/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}/downloads/{download_type}")
but the download url provided by the second url has a different host and it doesn't work.
This API:
#GET("/v0.1/apps/{owner_name}/{app_name}/builds/{build_id}/downloads/{download_type}")
is to download builds if you use the Build service from App Center. If you only use Distribute service, try one of these APIs to get the release details, which includes the download url:
https://openapi.appcenter.ms/#/distribute/releases_getLatestByUser
https://openapi.appcenter.ms/#/distribute/releases_getLatestByDistributionGroup
UPDATED
The api's has been changed, and the new api we can use is
#GET("/v0.1/public/sdk/apps/{app_secret}/releases/latest")
fun latestRelease(#Header("X-API-Token") apiToken: String, #Path("app_secret") secret: String): Call<JsonObject>
offical swagger api
app_secret you can list your app secret using app list, use this command line.
apiToken you can generate a token following these instructions
The API's changed, and /v0.1/public/sdk/apps/{app_secret}/releases/latest is no longer supported.
you can use instead
https://api.appcenter.ms/v0.1/sdk/apps/{app_secret}/releases/latest
Another better option then you can easily get any version is to use
https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/releases/{release_id}
Get a release with id release_id or 'latest' to get the latest release that was distributed to the current user (from all the distribution groups).
Swagger

Dialogflow API V2 unity SDK

Is there any workaround for using the new version (V2) of Dialogflow API in Unity? There used to be a SDK for the previous version but apparently it will be discontinued next year...
Since there is no official Dialogflow-Unity-SDK, you can use the Google.Api.Dialogflow.v2 library.
Details at
Authenticating Request with Google.Apis.DialogFlow.V2
Note: Remember that you can't use your token anymore. You need to create a credential file: Details at: https://medium.com/#tzahi/how-to-setup-dialogflow-v2-authentication-programmatically-with-node-js-b37fa4815d89

Bitbucket Rest Api call using python resulting in 404 status code for archive

I am trying to use Bitbucket server rest api in python to get an archive of a certain commit. I am following the rest api documentation as below.
/REST/API/1.0/PROJECTS/{PROJECTKEY}/REPOS/{REPOSITORYSLUG}/ARCHIVE?AT&FILENAME&FORMAT&PATH&PREFIX
My python code to implement above api is as below.
url = 'https://bitbucket.xxxx.com/rest/api/1.0/projects/CMPOC/repos/hello-world/archive?at=b34bb40f9e5&format=zip'
headers = {'Content-Type': 'application/json'}
r = requests.get(url, auth=('username', 'password'), headers=headers)
print(r.status_code)
404
I am getting 404 status code. Any help would be highly appreciated.
Regards,
Kailash
Bitbucket Server introduced the API you're talking about in Bitbucket 5.1.0. Prior to that, there was an unsupported Atlassian Labs plugin called the Stash Archive plugin, which provided similar functionality - however it had a slightly different API.
If you're using a version of Bitbucket earlier than 5.1.0, and you already have the above add-on installed, then you can use this very similar REST endpoint:
https://<bitbucket-base-url>/rest/archive/1.0/projects/<projectKey>/repos/<repoSlug>/archive?AT=xyz&filename=xyz.tar.gz&format=.tar.gz
If you don't have the above add-on installed, you can either install it or upgrade Bitbucket to 5.1.0 or higher (5.10.0 is the newest release at the time of writing).
See https://jira.atlassian.com/browse/BSERV-2732 for more background on all of the above.