How to get the Builds for a project using OData in Azure Devops - azure

I'm trying to get all the builds for a project using Odata for Azure Devops. However I found there was an endpoint for that https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/Builds but while trying the same for my Project I'm getting the below error
{"$id":"1","innerException":null,"message":"Resource not found for the segment 'Builds'.","typeName":"Microsoft.OData.UriParser.ODataUnrecognizedPathException, Microsoft.TeamFoundation.OData.Core","typeKey":"ODataUnrecognizedPathException","errorCode":0,"eventId":0}
Is this endpoint not available anymore. Or is there something wrong with my query?

Is this endpoint not available anymore. Or is there something wrong
with my query?
The entity set Build has been renamed. You can check this post from our User Voice forum.
All entity sets and entity properties with names starting with Build will be renamed to start with PipelineRun.
For e.g. Builds entity set will be called PipelineRuns, BuildId entity property will be called PipelineRunId.
So what you should use is : https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/PipelineRuns. It works on my side :)

Related

Bitbucket API is there a way to return last/current deployed branch name for specific environment?

I am building a small automation tool that will redeploy my last/current deployed branch again via api ,
looking through the document i could not find the right way to fetch my current branch name or anything related to it .
i tried the endpoint /deployments
i got a lot of data , but for somereason i can not see my last/current deployed pipeline in the list .
Thanks
i have found the way ,
https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/environments/
then fetch pipeline uuid from the env u need and request the pipeline data via
/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}

OpenAPI Generator issue with Destination service API specification

I want to get all destinations on subaccount and instance level. In SAP API business Hub, I found the API information and "SAP Cloud SDK" tab to generate code by OpenAPI generator.
https://api.sap.com/api/SAP_CP_CF_Connectivity_Destination/overview
I downloaded the API specification and added dependencies into Cloud SDK for Java project. The code is generated successfully with some errors (unknown models)in generated api classes.
For example in DestinationsOnSubaccountLevelApi.class, model OneOfDestinationNameOnly is imported and used in method but it is not generated in model package.
I looked into API specification and found that there were two types of response entity. That is the reason why the code could not be generated properly. I can modify the API specification to make it work but it should not be the long term solution. Is there any other way to fix this issue?
Unfortunately the SAP Cloud SDK Generator for Open API services is not yet able to understand oneOf relationship that is modeled in the specification.
As an alternative, would you consider using the DestinationAccessor API for resolving single destinations?
You can also directly instantiate an ScpCfDestinationLoader, which allows for querying all destinations:
ScpCfDestinationLoader loader = new ScpCfDestinationLoader();
DestinationOptions options = DestinationOptions
.builder()
.augmentBuilder(ScpCfDestinationOptionsAugmenter.augmenter().retrievalStrategy(ScpCfDestinationRetrievalStrategy.ALWAYS_SUBSCRIBER))
.build();
Try<Iterable<ScpCfDestination>> destinations = loader.tryGetAllDestinations(options);
Similar to the default behavior of DestinationAccessor API, in the code above only the subscriber account will be considered. Other options are:
ScpCfDestinationRetrievalStrategy.ALWAYS_SUBSCRIBER
ScpCfDestinationRetrievalStrategy.ALWAYS_PROVIDER
ScpCfDestinationRetrievalStrategy.SUBSCRIBER_THEN_PROVIDER

JSON Web Service not appearing in /api/jsonws

I m new to liferay perform crud operation but my create method is not appering in api/jsonws . I also check my service is active by lb gogo shell command
For ServiceBuilder operations, please check if you have remote-service="true" on your entity (attributes) inside the service.xml file. If not, please add this attribute and rerun servicebuilder.
Open your {EntityName}ServiceImpl (inside of the .service.impl package) and add your operations here.
Finally, rerun servicebuilder and deploy your app. When using api/jsonws - make sure you select the right context name with the dropdown.

Getting EXC_BAD_ACCESS(code=EXC_i386_GPFLT) when migrating existing tests to XCTest

I have been using GHUnit with it without any problem to test a library.
This library basically perform calls to an API and use CoreData to decrease the number of API calls.
Then, I decided to switch to XCTest:
Created the test Target
Created the test class
Tests runs fine! wheeee!!!
However anything I try to do that involves CoreData I get a error: EXC_BAD_ACCESS(code=EXC_i386_GPFLT)
It does not happens with GHUnit, it is the same code!
Also, it runs if I set the "Host Application".
I know that the error is related to trying to access an address that the code is not suppose to, but there's no more details.
I see that in the DatabaseManager the line:
NSString *modelPath = [bundle pathForResource:bundlePath ofType:#"momd"];
Returns nil, but, as I said it runs fine when using GHUnit
or simply using the library.
I feel like I am missing some property in the project settings.
I have added the log here:
https://gist.githubusercontent.com/wilsolutions/96e3ae1310ccae86d344/raw/03ea1dfcdab75fc215baaba9d07123bd2e915617/gistfile1.txt
tkx

How can I access the parameters of a service on a Carbon server in plain txt

What I've done is broken the default 'Version' service on my WSO2 DSS, I tried to set the Scopes variable for WS-Discovery and didn't put a closing tag/element when creating the parameter.
Now when I try to access the parameters screen I get an xml Parse error
TID: [0] [WSO2 Data Services Server] [2012-08-22 12:38:04,404] ERROR {org.wso2.carbon.service.mgt.ServiceAdmin} - Error occured while getting parameters of service : Version
{org.wso2.carbon.service.mgt.ServiceAdmin}org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '<' (code 60) in end tag Expected '>'. at [row,col {unknown-source}]: [2,58] at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296) at
I'm assuming this is stored in the H2 database, I've tried looking for the parameter in the .db file using notepad but I can't find it.
Is there another way to connect/browse the H2 db?
I've scanned through the repository, database and conf directories for clues without success.
UPDATE:
Yes you can connect to the H2 db using the included database Explorer under the Tools menu.
Use the connection details found in the repository/conf/registry.xml file
Then you can do SQL queries on it - (I haven't found the answer yet though)
UPDATE 2:
I don't think the parameters are held in the H2 db, but I managed to fix my problem by:
downloading the Version.aar file using the link on the list services page
deleting the Version service
Copying the Version.aar file into the repository/deployment/server/axis2services dir
I guess deleting the service removed any records/references to my broken parameter
I believe you've tried setting service parameters via the UI? Usually the service parameters you specify via the UI do not get saved in the services.xml of the original axis2 service archive. Instead, they get saved in the registry that is shipped with DSS and get applied to the service at runtime. But if you specify a malformed parameter then wouldn't be saved in the registry instead, throwing an exception while trying to engage that parameter. So there'll be no record saved corresponding to that kind of malformed parameters.
Hope this helps!
Cheers,
Prabath

Resources