[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

REST

290

Solutions

575

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Share tech news, updates, or what's on your mind.

Sign up to Post

Is it possible to use Visual Studio and step through debug of a REST service using the WCFTestTool? If so, how is that done?  I have a set of SOAP WCF services but I need to do a REST as well. I know one can do a WebInvoke after the OperationContract like:

[WebInvoke(Method = "POST", UriTemplate = "/GetTest",  RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]

The code is C# and Visual Studio 2017.

I do *not* have localadmin access.

Any information on that would be greatly appreciated.

Thanks!
0
Learn SQL Server Core 2016
LVL 12
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Has anybody here managed to do a PUT request (any language) to the Wordpress Rest API for an ADVANCED custom field?.
I managed to perform a PUT request to Wordpress Fields but tried to do a simple PUT to an acf?
(get works fine).
I use postman to do my testing.
maybe I don't understand the syntax.
the error does not help me and gives me:
{
    "code": "cant_update_item",
    "message": "Cannot update item",
    "data": {
        "status": 500
    }
}

herre is a psuedo Pseudo api url
with the PUT request to show my syntax (assume I authenticated with basic authentication).

 https://somewebsite/wp-json/acf/v3/pages/735?dog_name=somthing


Thank You
0
I am trying to update a custom filed using put requests in POSTMAN
I manage to update the page title slug or any filed which wordpress created.(fields)
For example I have :
if I do a get request :
https://breeding-portal.mystagingwebsite.com/wp-json/acf/v3/pages/735
you will see :
{
    "acf": {
        "dog_name": null
    }
}

What I want to do is update dog_name I have tried multiple solutions.
the PUT request echoes :
{
    "code": "cant_update_item",
    "message": "Cannot update item",
    "data": {
        "status": 500
    }
}
Anyone solved this ?
0
how to use copyright symbol and trad mark symbol in rest api call (I need to pass  one of the Json parameter )

I need to get it in Java code and save the values in DB .

Any one have idea on this ??
0
I m using Nginx as webserver to serve some file. and here is the folder structure to be servered.


 #tree .
.
├── 1
│   ├── a.png
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 10
│   ├── attachment
│   └── employeeImage
│       └── a.png
├── 11
│   ├── attachment
│   └── employeeImage
│       └── a.png
├── 12
│   ├── attachment
│   └── employeeImage
│       └── a.png
├── 2
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 20
│   ├── attachment
│   └── employeeImage
│       └── a.png
├── 21
│   ├── attachment
│   └── employeeImage
│       └── a.png
├── 3
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 30
│   ├── attachment
│   └── employeeImage
│       └── a.png
├── 4
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 40
│   └── employeeImage
│       └── a.png
├── 5
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 6
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 7
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
├── 8
│   ├── attachment
│   │   └── b.png
│   └── employeeImage
│       └── a.png
└── 9
    ├── attachment
    │   └── b.png
    └── employeeImage
        └── a.png



out of this io need only employeeImage/ to be available to the public.




and rest of the …
0
Need all steps to configure TOMCAT to run on HTTPS. I tried to use SELF signed cert and got errors.

I am trying to access a rest service from TOMCAT, the rest service is:

https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&outputsize=full&apikey=DEMO

I am accesing this service from my self signed tomcat https running on port 8443 and did not have any luck

Here is the error message:


Type Exception Report

Message I/O error on GET request for "https://www.alphavantage.co/query": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://www.alphavantage.co/query": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX…
0
I need to create a public web form where users can upload a file to a folder on our organization's MS Sharepoint system.

Our website is running on the DNN 9 CMS (DotNetNuke) , so I would ideally like to be able to use their web form plugin (DNN Sharp Action Form) to make the form, but it could also be a .net web form, or a web page. I'm told that Sharepoint has an API called REST which I might use to upload files to a Sharepoint folder.

Does anyone have experience with this type of thing, I'm not yet familiar with Sharepoint.

Thanks for any info you might be able to share.

Tom
0
We utilise Office 365 and all it's offerings. As such we want to allow all Office365 traffic through our Sonicwall 4650. Microsoft have recently announced the new REST web service to automatically apply the correct url and ip addresses that need to be allowed. I have spoken to Sonicwall as to how to configure the Sonicwall to automatically connect to the Microsoft web service but Sonicwall said I need to use curl but wouldn't help me at all. Has some one configured this on a Sonicwall and if so, please work with me to get this done.
0
I'm trying to use the $startswith / $istartswith filters in a REST API string and can't figure out how I would do it if I wanted to filter by two fields with an "or" operator

Here are my filters

{ "partNo": { "$startswith": "LABOR" } }

{ "upc": { "$startswith": "LABOR" } }

Open in new window


I want to include both filters with an or operator. If I use these filters individually then work fine

Also, does anyone know what the difference is between $startswith and $istartswith filters?
0
Hi All

Do we have any way to find out about the image quality using  tensorflow.
Actually I need high quality image to be accepted and need to reject the rest one.

Please share any advice on same.

Thanks.
0
Exploring SQL Server 2016: Fundamentals
LVL 12
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Whats is the best too for Web services Testing Tool?
REST and API Testing
I'm planing to by Smart bear.Any idea is appreciated.
Company happy to pay for that.
0
I try to list posts from a custom taxonomy, but return an error by api rest v2.

https://medicplay.com.br/wp-json/wp/v2/taxonomies/vlogger_series
0
Has been almost a year that I switch to Auth0 in order to manage my customer's access to the dashboard of my application. Nowadays I need to implement access for a RESTFULL API.

If I follow the instructions in order to secure the NodeJS app using JWT it works like a charm. The issue is that I am not properly sure on the implementation for the end user in order to get the token needed for access this API.

I thought of creating the tokens on the dashboard or just use a server side implementation for the login/authentication. I did the last using the access to my own database before and worker amazingly. My issue is that I am not completely sure on how to do it for the end user using Auth0.

Would be great if you can guide me in order to implement the login/authentication side of the API using auth0 and nodejs.
0
Hi, Experts,

I am building a node JS web app that will call REST API from one login user info.

https://developers.onelogin.com/quickstart/authentication#web-app

spefically from

https://github.com/onelogin/onelogin-oidc-node/tree/master/1.%20Auth%20Flow

the goal is to attain this

https://developers.onelogin.com/openid-connect/api/user-info

but when you use the example curl request you get this:

[code]curl -XGET "https://openid-connect.onelogin.com/oidc/me" \
> -H "Authorization: Bearer 0e4e2d02323de1e71dda7843d968f20425965488d407fbc952927389b63517ac5663"
{"error":"invalid_token","error_description":"invalid token provided"}[/code]

and

[code]curl -XGET "https://domain.onelogin.com/oidc/me" \
> -H "Authorization: Bearer 0e4e2d02323de1e71dda7843d968f20425965488d407fbc952927389b63517ac5663"
{"error":"invalid_token","error_description":"invalid token provided"}[/code]

the flow is API call goes to one login and one login passes access key so you can get user info. when you try to call user info you get an error.

any help would be greatly appreciated.

thank you
0
I am trying to create a method which can retrieve JSON objects.  I’m using the Jama API (https://dev.jamasoftware.com/rest)
To simplify it I am using RestSharp
I start by using the Jama swagger tool to test the interface.  This produces a Response Body.  I take this response body and in visual studio create a new class using the paste special ‘paste JSON as classes’ command.

This results in a new class:

public class Item
    {

        public class Rootobject
        {
            public Meta meta { get; set; }
            public Links links { get; set; }
            public Datum[] data { get; set; }

            public static explicit operator Rootobject(List<object> v)
            {
                throw new NotImplementedException();
            }
        }

        public class Meta
        {
            public string status { get; set; }
            public DateTime timestamp { get; set; }
            public Pageinfo pageInfo { get; set; }
        }

        public class Pageinfo
        {
            public int startIndex { get; set; }
            public int resultCount { get; set; }
            public int totalResults { get; set; }
        }

        public class Links
        {
            public DataFieldsLookup5 datafieldslookup5 { get; set; }
            public DataLockLockedby datalocklockedBy { get; set; }
            public DataFieldsLookup6 datafieldslookup6 { get; set; }
            public DataFieldsLookup3 datafieldslookup3 { get; set; }
        

Open in new window

0
Two or Single Request

Assume we expose both controller and service methods as REST APIs

When we call a controller method - 2 HTTP request or One Http Request will be made ???

Calling service API via REST API will be another HTTP request?

Please advise.
0
I went through the URL - https://dzone.com/articles/quick-guide-to-microservices-with-kubernetes-sprin where both the controller and the service methods are exposed as REST API's

The confusion comes and raises the question whether we need to expose controller methods as REST APIs or Service methods are APIS

if we make both of them as REST APIs then when we call a controller methods - 2 HTTP request might be sent and will cause performance issue.

Please advise.
0
I have a field in a SQL 2014 database that started disappearing after a backup (full or transaction). The rest of the fields are populated, just the one gets emptied. We noticed it during an upgrade of the front end application.
0
REST API and VBA.

I am trying to write some VBA to make a REST API call. This call needs to fall into three stages.

Stage 1 send some authentication information.

I have a URL will I must make a POST call to include a payload of a "username" and "Password". This will then return a authorisation token.

Stage 2

I need to use the token mentioned in Stage 1 to authenticate.

Stage 3

I need to pass a payload to a slightly different URL that contains the name of the query I wish to execute

I have made available the Microsoft XML, v3.0 to my MS Access database.

Can anyone help me design this VBA code?
0
Build an E-Commerce Site with Angular 5
LVL 12
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

How do I call a BI publisher report via an apex rest service.
Can you please share any examples / links
0
I am attempting to setup Rest API in VBA and need some help walking through the steps. Can anyone help me by walking me through step by step for that I can learn how to do this for future projects?
0
Can I replicate a search using the Google Maps API local search with  an iOS MKLocalSearchRequest() ?  For example, using the Google API, making a map search using the keyword "hostels" works correctly. In iOS using MKLocalSearchRequest(), using a naturalLanguageQuery, I just get hotels. Is there a way to fix this?  Or am i forced to use the Google Maps API within iOS?
0
I am trying to show error in Angular 6 but I am using it with query parameters. I am searching for the data using query parameters and if there is any invalid request, I want to show that error. But I am unable to do that. Below is my code

SearchComponent.ts

werbedataSearch(werbenr, produktname, werbetext, artnr, vk_einheit, hinweise) {
    this.router.navigate(['/rullko/werbedata/results/'],
        {
            queryParams:
                {
                    filiale: this.filiale,
                    werbenr: werbenr,
                    artnr: artnr,
                    produktname: produktname,
                    werbetext: werbetext,
                    vk_einheit: vk_einheit,
                    hinweise: hinweise
                }
        });
}

Open in new window

ResultsComponent.ts

ngOnInit(): void {
    this.route.queryParams.subscribe(params => {
      // Defaults to "" if no query param provided.
      this.filiale = params['filiale'] || '';
      this.werbenr = params['werbenr'] || '';
      this.produktname = params['produktname'] || '';
      this.werbetext = params['werbetext'] || '';
      this.artnr = params['artnr'] || '';
      this.vk_einheit = params['vk_einheit'] || '',
        this.hinweise = params['hinweise'] || '',
        this.page = '1' || '';
      this.pageSize = '10' || '';
    });
    this.getPage(1);
  }

Open in new window


service.ts
 getWerbeDataSearch(page: string, pageSize: string, filiale: string, werbenr: string, produktname: string,
    werbetext: string, artnr: string, hinweise: string, vk_einheit: string): Promise<WerbeData[]> {
    const Url = `${this.werbedataSearchUrl}`;
    const params: URLSearchParams = new URLSearchParams();
    params.set('page', page);
    params.set('pageSize', pageSize);
    params.set('filiale', filiale);
    params.set('werbenr', werbenr);
    params.set('produktname', produktname);
    params.set('werbetext', werbetext);
    params.set('artnr', artnr);
    params.set('hinweise', hinweise);
    params.set('vk_einheit', vk_einheit);

    return this.http.get(Url, { search: params, headers: this.headers })
      .toPromise()
      .then(this.extractData)
      .catch(this.handleError);
  }

Open in new window


In service, I am getting error (Requested werbedata does not exist) which i want to show.

Can someone please tell me how to do this?
0
getting api data from posts from another sources to django
hello guys ,

is there any way where

when users can add the link of the post they want to save and the django should add that post allong with description and image to database

eg:

https://www.reddit.com/r/memes/comments/91jdgp/everything_goes_back_to_spongebob/

if i want to save this post

then dango should get data from this post as a json format and should save this post image, description ,title and all to the database

i know this can only be done using api/praw

but cant understand how to make it happen

any kind of help is appreciated
0
I have a PayPal buy it now client side REST on my website. Payment process is working fine on my end, but the customer, after he pays, doesn't see the payment confirmation screen. I've read on PayPal Dev that I must show a confirmation without redirecting, which is something that I am doing now.


You must show a confirmation without redirecting the page. If you redirect the page, the actions.payment.execute() and actions.payment.get() functions are not available.

This is the code I am using:

payment.asp
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>
<%
Dim price : price = "134.96"
%>
<body>
<div id="paypal-button-container"></div>
</body>
<input type="hidden" name="price" id="price" value="<%=price%>" />
<script src="payment.js"></script>  

Open in new window


payment.js
// JavaScript Document
paypal.Button.render({

env: 'sandbox', // sandbox | production

        style: {
        label: 'checkout',
        size:  'medium',    // small | medium | large | responsive
        shape: 'pill',     // pill | rect
        color: 'silver'      // gold | blue | silver | black
        },

        client: {
            sandbox:    'aaaaaaaaa',
            production: '<insert production client id>'
        },

        // Show the buyer a 'Pay Now' button in the checkout flow
        commit: true,

        // payment() is called when the button is clicked
        payment: function(data, actions) {

            

Open in new window

0

REST

290

Solutions

575

Contributors

Representational state transfer (REST) is an architectural style that gives a coordinated set of constraints to the design of components in a distributed hypermedia system used to design networked applications. RESTful systems typically communicate over Hypertext Transfer Protocol (HTTP) with the same HTTP verbs (GET, POST, PUT, DELETE, etc.) that web browsers use to retrieve web pages and to send data to remote servers. REST interfaces with external systems using resources identified by Uniform Resource Identifier (URI) that can be operated upon using standard verbs.

Related Topics

Top Experts In
REST
<
Monthly
>