PATCH /subscriptions/{sid} returning "InternalServerError" - azure

In the Azure API Management REST API Subscription entity,
when I call
PATCH /subscriptions/xxxxxxxxxxxxxxxx?api-version=2014-02-14-preview
with a request body containing primaryKey=yyyyyyyyyyy, it returns an unexpected 500 Internal Server Error with body:
{
"error": {
"code": "InternalServerError",
"message": "Request processing failed due to internal error.",
"details": null
}
}
Am I doing something wrong?
Documentation: http://msdn.microsoft.com/en-us/library/azure/dn776325.aspx#UpdateSubscription

Related

Microsoft Graph API Add "Error while adding group as a member to other group"

I am getting an error when adding a group as a member of other group using the Microsoft Graph API. It was working okay before, but now it's giving me an error.
I am using this:
POST https://graph.microsoft.com/v1.0/groups/{group-id}/members/$ref
Content-type: application/json
body:
{
"#odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/{id}"
}
And I am getting this error:
{
"error": {
"code": "Request_BadRequest",
"message": "An invalid operation was included in the following modified references: 'members'.",
"innerError": {
"date": "2021-09-08T16:09:31",
"request-id": "b1f3a1d9-96ae-4f3e-9ec0-73781bed4379",
"client-request-id": "b1f3a1d9-96ae-4f3e-9ec0-73781bed4379"
}
}
}

DocuSign Envelopes: listStatus "UNSPECIFIED_ERROR"

I'm trying to make a API call to the eSignature REST API Envelopes: listStatus (as shown here)
However, I get ERROR 400 Bad Request and the following:
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "Object reference not set to an instance of an object."
}
Even trying it in DocuSign's API explorer I get the same error. The error seems to be pointing to a issue with how the request body is formed. DocuSign suggests this,
{
"envelopeIds": [
"44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15",
"8e26040d-xxxx-xxxx-xxxx-1e29b924d237",
"c8b40a2d-xxxx-xxxx-xxxx-4fe56fe10f95"
]
}
however, if I use "envelopeIds" in the body instead I get:
{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. Query parameter 'from_date' must be set to a valid DateTime, or 'envelope_ids' or 'transaction_ids' must be specified."
}
replacing "envelopeIds" with "envelope_ids" I get:
Response:
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "Object reference not set to an instance of an object."
}
and even using a comma separated list like, I get the same error:
Body:
{ "envelopeIds": "44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15,8e26040d-xxxx-xxxx-xxxx-1e29b924d237"}
Response:
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "Object reference not set to an instance of an object."
}
Any help would be much appreciated. I have tried this using both postman and DocuSign's API explorer.
You need to include ?envelope_ids=request_body in the URL.
Then it should work with the body:
{
"envelopeIds": [
"44c5ad6c-xxxx-xxxx-xxxx-ebda5e2dfe15",
"8e26040d-xxxx-xxxx-xxxx-1e29b924d237",
"c8b40a2d-xxxx-xxxx-xxxx-4fe56fe10f95"
]
}

Loopback: 401 Authorization Required after successful login

I am currently facing an issue where I always get a 401:
For example when I try to do a GET request to /users/{id}/customer I am getting the following response:
{
"error": {
"statusCode": 401,
"name": "Error",
"message": "Authorization Required",
"code": "AUTHORIZATION_REQUIRED",
"stack": "Error: Authorization Required\n at /var/www/p-web-2-api-node/node_modules/loopback/lib/application.js:430:21\n at /var/www/p-web-2-api-node/node_modules/loopback/lib/model.js:358:7\n at /var/www/p-web-2-api-node/node_modules/loopback/common/models/acl.js:529:16\n at /var/www/p-web-2-api-node/node_modules/async/dist/async.js:3874:9\n at /var/www/p-web-2-api-node/node_modules/async/dist/async.js:473:16\n at iteratorCallback (/var/www/p-web-2-api-node/node_modules/async/dist/async.js:1050:13)\n at /var/www/p-web-2-api-node/node_modules/async/dist/async.js:958:16\n at /var/www/p-web-2-api-node/node_modules/async/dist/async.js:3871:13\n at /var/www/p-web-2-api-node/node_modules/loopback/common/models/acl.js:511:17\n at /var/www/p-web-2-api-node/node_modules/loopback/common/models/role.js:442:21\n at process._tickCallback (internal/process/next_tick.js:176:11)"
}
}
I have acquired the correct token through login, I have set the token in the /explorer (which is added as a query parameter) but the 401 always shows up.
When I disable the server.enableAuth(); in /boot/authentication.js it works. I have tried acl's and have either removed everything or granted $everyone full access.

Microsoft Graph(German cloud) - Get root site (sites/root)

When making a call to the Microsoft German Graph /sites/root endpoint, it returns 'Resource Not Found', although that in global Graph the same endpoint works perfectly ok
Here is an example:
https://graph.microsoft.de/v1.0/sites/root
It returns:
{
"error": {
"code": "BadRequest",
"message": "Resource not found for the segment 'sites'.",
"innerError": {
"request-id": "aff4a613-54ed-476d-976f-d4ac7a8c7ee2",
"date": "2018-04-26T07:59:17"
}
}
}
Found an answer, for now, this service is deployed only in the "beta" API
So I used https://graph.microsoft.de/beta/sites/root and it works

Create a new customer in the sandbox receive a 500 error. Google Reseller API v1

I have authenticated my request and when I'm trying to create a new customer in the sandbox, i receive a 500 error.
Request:
POST https://www.googleapis.com/apps/reseller/v1sandbox/customers
{
"customerDomain": "test.com",
"kind": "reseller#customer"
}
Response:
500 Internal Server Error
- Show headers -
{
"error": {
"code": 500,
"message": null
}
}
search the word "required" in this page
https://developers.google.com/admin-sdk/reseller/v1/reference/customers#resource

Resources