Asking with hopefulness.
Is there are way to update the Template Description either directly or using the Python SDK?
I'm guessing "no" since the only way to see the Template Description after creation is via the API (can not via the GUI).
-Craig
No, the template endpoints are read-only.
Related
SuiteCRM version: Version 7.10.11
Sugar Version 6.5.25 (Build 344)
I am trying to add custom endpoints in REST API V8. I follow below suitecrm documentation.
https://docs.suitecrm.com/developer/api/version-8/customization/
but its not working. seems like bugs in documentation and there is no sample code available in documentation.
I have check API code file and custom endpoint path is.
// Load Custom Routes
$customRouteFiles = (array) glob($paths->getCustomLibraryPath() . '/API/v8/route/*.php');
I have create custom endpoints in "/API/v8/route/" file but its not working.
I have check documentation available for API 4_1 to add custom API method. but not available for V8 version.
https://docs.suitecrm.com/developer/api/api-4_1/#_adding_custom_api_methods
Anyone Please Suggest latest documentation links or sample code for extending endpoints and adding Custom Rest Methods in V8 . Its very difficult to understand core API code without Proper documentation.
Thanks
I'm creating a V2 Function App and want to use Swagger/Open API for docs, however it is not yet supported in the Azure Portal for V2 Functions.
Any suggestions on how I can use Swagger with V2 Functions in VSTS to create the docs on each build?
TL;DR - Use the NuGet package to render Open API document and Swagger UI through Azure Functions.
UPDATE (2021-06-04)
Microsoft recently announced the OpenAPI support on Azure Functions during the //Build event.
The Aliencube extension has now been archived and no longer supported. Please use this official extension.
As of today, it's in preview. Although it's in preview, it has more features than the Aliencube one.
Acknowledgement 2: I am still maintaining the official one.
Microsoft hasn’t officially started supporting Open API (or Swagger) yet. But there is a community-driven NuGet package currently available:
Nuget > Aliencube.AzureFunctions.Extensions.OpenApi
And here’s the blog post for it:
Introducing Swagger UI on Azure Functions
Basically its usage is similar to Swashbuckle — using decorators. And it supports both Azure Functions V1 and V2.
Acknowledgement 1: I am the owner of the NuGet package.
For anyone looking into this, Microsoft still hasn't added Open API support for Azure Functions +v2 and there hasn't been any major movement toward it.
I faced this same issue recently and I found a pretty good solution.
If you aren't aware yet, check this out: https://github.com/RicoSuter/NSwag
NSwag is a toolchain that integrates with .NET to produce the Open API documentation and UI, but also generates the respective API clients for you.
I've used this tool for the past 2 years when working with Angular and .NET apps, it saves a lot of time and seamlessly integrates with my whole development workflow.
For Azure Functions +v2, a contributor created a generator that in less than 10 lines of code, allow us to expose the Swagger endpoint for an Azure Function class:
https://github.com/Jusas/NSwag.AzureFunctionsV2
Now, if you design HTTP-Triggered Functions using DI, grouping related operations under the same class and leveraging model binding, you might not even need to apply any custom decorator, it just works!
Here's an example of how one real API would look like:
(ignore the base class. It is part of a personal pattern I follow, unrelated to Swagger)
And this is how it looks like using a swagger UI:
There is official library Azure Functions OpenAPI Extension. It is still in preview, but looks great.
Can you drop your V2 Function to run on v1 of the runtime by starting over with a blank function app first?
The MSDN documents for Create an OpenAPI definition for a function (with a date of 11/2018 interestingly enough) example states:
By default, the function app you create uses version 2.x of the
runtime. You must set the runtime version back to 1.x before you
create your function.
But one can't just move the setting to 1:
To pin your function app to the version 1.x runtime, choose ~1 under
Runtime version. This switch is disabled when you have functions in
your app.
Which implies one must create the Function app, publish/create it, set it to V1 and then put in a function before adding a function app.
I have created a REST project in yii2 and i have some yaml data that should be stored in the database. These are crowd data, that is authorized people can add new yaml files and our app will parse those data and store in database.
But these data might change in the future (i.e. add/delete columns) which would rely on version of the REST api (v1.0, v2.0 etc)
Thus i would like to call the appropriate rest action to do it.
I know there is the function $controller->run() but how do i use it to make a POST or a PUT request?
Is there any alternative to using yii httpclient?
Thanks
If I am not wrong, you want to execute different action depending on the version of the API.
For that, you can create modules inside your frontend/backend directory and name the modules as per your versions. Whenever you have a new version create a new module and upgrade the version name. Thus you always get the proper versioning. So v1, v2.. will be modules in your project.
The good thing about this is that you can have same action name in different modules under same controller name. Thus if in version 1 you have 5 columns and the api is like /v1/data then you can have 7 columns in version 2 and the api can be like /v2/data.
For more details on modules: http://www.yiiframework.com/doc-2.0/guide-structure-modules.html
I am implementing a release mechanism for my application and want to couple it with my YouTrack using the REST API.
Upon the release I want to set the default value of
'Fix Version' for newly created issues to the bumped version.
The Fix Version is a project's custom filed. When I query for it via REST API i get
<projectCustomField name="Fix version" type="version[1]" emptyText="Unknown" canBeEmpty="true">
<param name="bundle" value="MyProject Versions"/>
<defaultValue>2.8</defaultValue>
</projectCustomField>
The documentation mentions just the way to change the name and an unset value text. I have tried POSTing the dafaultValue and dafault parameters, but with no effect. Is it's possible at all?
I have contacted JetBrains, and apparently this functionality is, sadly, not there.
Is it possible to create a new build configuration for an existing project via REST api(POST method) in Teamcity?
If so, how to create? (some guidelines )
Thanks
It's for sure possible on 8.x, haven't the need to care about early versions.
Here's a really simple python snippet that will copy an existing build config into a given project using this as a guide http://confluence.jetbrains.com/display/TCD8/REST+API#RESTAPI-BuildConfigurationAndTemplateSettings.
import requests
xml = """<newBuildTypeDescription name='NewBuildConfigName'
sourceBuildTypeLocator='ExistingBuildConfigNameThatYouWantToCopy'
copyAllAssociatedSettings='true' shareVCSRoots='false'/>
"""
headers = {'Content-Type': 'application/xml'} # set what your server accepts
print requests.post('http://YOURTEAMCITYWEBADDRESS:YOURTEAMCITYPORT/httpAuth/app/rest/projects/id:PROJECTIDWHERENEWBUILDCONFIGSHOULDBECREATED/buildTypes', data=xml, headers=headers, auth=('TeamCityUserName','TeamCityPassword')).text
Its now possible in 8.x REST. You can do something like:
POST plain text (name) to http://teamcity:8111/httpAuth/app/rest/projects/<projectLocator>/buildTypes
Above is copied from 8.x REST. Check 8.x REST for more details.
No, it's not implemented in the REST API. Have a look at this
There is no way to create a build configuration. You can add build steps to it and configure them, but it doesn't seem to be implemented in the API at all. I was actually fighting with this myself last night. If you find a way to do it, please let me know.
Also, you could have a look at these notes I've put together concerning the Teamcity REST API. (Not that they're answering this question, but some of them could be quite useful).
Well, you can refer to this for starters: