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

x

REST

289

Solutions

573

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

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
Angular Fundamentals
LVL 12
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

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
I have an MS Access / VBA application running on an RDP server.  I have been asked to interface with a phone system via REST API.  I haven't done this before, so could do with some help in relation go GET/POST commands.  However, I am also concerned about memory/processor overhead for each user.

So....I could really do with some advice.
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 am working with JAMF - the Apple IT management application.  I am connecting to the Classic API (RESTful) using PowerShell (v4 and v5).  

I am capturing the name, id, serial_number, model, model_identifier, and model_display from the /mobiledevices endpoint.  I also need to capture the department field from the  /mobiledevices/id/{id}/subset/location subset - where {id} is the id captured in the first endpoint.

Re:  https://developer.jamf.com/#/mobiledevices

The results will be used to populate a different application either through SOAP or direct database updates. TBD.  We may also have to correlate the results with an Active Directory and so I thought PowerShell would be a good scripting base.  I come from a hodge-podge of scripting and admin backgrounds and only have a passing knowledge in PowerShell.

I still have problems with data structure objects and also converting my structured background to pipeline thinking.

Here is what I have:

# Authentication parameters
###########################
$RESTAPIServer = "test.jamfcloud.somewhere"

$RESTAPIUser = "WillyWonka"
$RESTAPIPassword = " OompaLoompas@r3it!"

$BaseURL = "https://" + $RESTAPIServer + "/JSSResource/mobiledevices"
$Header = @{"Authorization" = "Basic <ToBase64 string goes here>"}
$Type = "application/json;charset=UTF-8"
#--------------------------#

# Get all mobile devices
########################
Try 
{
$MobileDeviceResponse = Invoke-Restmethod -Uri $BaseURL  -Method GET -ContentType 

Open in new window

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
I have an OData query to get a historical list of HDX sessions (username, start/end times, protocol, Delivery Group) from Director. What's the easiest way to extract the data from the XML and produce a simple table of the fields above? I tried using Chrome's Advanced REST Client, but while the XML response came back fine, the client couldn't parse it successfully.
The actual query:
http://ddc.company.com/Citrix/Monitor/OData/v3/Data/Sessions?$filter = StartDate ge datetime'2018-12-02T15:14:49' and StartDate le datetime'2018-12-03T03:14:49' and CurrentConnection/Protocol eq 'HDX'&$select = StartDate,EndDate,CurrentConnection/Protocol,Machine/DesktopGroup/Name,User/UserName,User/FullName&$expand = CurrentConnection,Machine/DesktopGroup,User 

Open in new window

0
I am receiving this error on my production "serverSQL Server failed to communicate with filter daemon launch service  (Windows error: The service did not start due to a logon failure.
). Full-Text filter daemon process failed to start. Full-text search functionality will not be available."

I know how to add and or change the password on the login tab of the properties of the service.   But the username for this service is an NT Service account and with the Admin account, I seem not to be able to have access to change the password on this account.  So I have just three questions. (I think)

1) Why would this happen to an NT user account?
2) Can I change the password on an NT user account?
3) If I cannot change the password, would it be possible to just use a domain user account, like the rest of the SQL services are using or do I have to use the NT account for this Service?

Thanks,

Rich
0
How do we receive list of docs number while calling Web API client.

I am getting error : "Status Code: 406, ReasonPhrase:Not Acceptable',....

But, the service is correct and all other remaining values are correct. but, finally we are getting the error.

Scrrenshot attached for reference (Status Code).

Source is below:
------------------------

 	    
	    private const string URL = "http://testURL.net/getDocs";
            private const string DATA = @"{""EmpId"": ""101"",""EmpName"": ""ANDREWS"",""Dept"": ""Accounts""}";
	    System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
            client.BaseAddress = new System.Uri(URL);
            byte[] cred = UTF8Encoding.UTF8.GetBytes("username:password");
            client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(cred));
            client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded"));

            System.Net.Http.HttpContent content = new StringContent(DATA, UTF8Encoding.UTF8, "application/x-www-form-urlencoded");
            HttpResponseMessage messge = client.PostAsync(URL, content).Result;
            string description = string.Empty;
            if (messge.IsSuccessStatusCode)
            {
                string result = messge.Content.ReadAsStringAsync().Result;
                description = result;
            }

Open in new window


What is the problem in the above code..? How do we receive the list of doc numbers..?
StatusCode.png
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
OWASP Proactive Controls
LVL 12
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

We are trying to POST to a WCF REST method. We can successfully POST using SoapUI, Postman, and YARC but when we try in Angular 5 I'm receiving a NULL object.

Client code:
    const headers: any =  {'Content-Type': 'application/json'};
    return this.ajax.request<any>({
        url: url,
        method: method (POST),
        headers: headers,
        options: {
            body: JSON.stringify(req.body)
        }
        });
    }

    public request<T>(req: AjaxRequest): Observable<HttpEvent> {
        return this.http.request<T>(req.method, req.url, req.options)
    }

    //this.http = HttpClient

    // Component
    public onNext(event: any): void {
        this._saveInfo(getInsertDmgReqPayload({
            data: event.value,
            dmgInfo: this.responses['dmg'],
            emailId: this.util.getQueryStringValue('uname')
        }));

        this.util.navigate('education');
    }

    private _saveInfo(data: any): void {
        this.appraisal.request('saveDmgInfo', null, {body: data})
        .subscribe(v => {
            console.log(v);
        });
    }

Open in new window


Server-side logic:
// WCF Interface definition
    [OperationContract]
    [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
    Result InsertDemographicInfo(Demographic d);

    // Service code
    public Result InsertDemographicInfo(Demographic d) // The Demographic object is null when posting from Angular
    {
        Result result = new Result();
        try
        {
            DemographicFactory.InsertDemographicInfo(d);
            result.Status = "Success";
        }
        catch (Exception ex)
        {
            result.Status = "Fail";
            result.Message = ex.Message;
        }
        return result;
    }

Open in new window


Web config:

Open in new window

0
Enroll in these five web development courses: RESTful Services: Data, JAX-RS and Jersey, RESTful Services: Fundamentals, Selenium Fundamentals, Bootstrap 3.1: Fundamentals, and Perl Fundamentals. Then learn to perform data analysis in Microsoft Excel to measure your success.
1
LVL 3

Administrative Comment

by:Stacy Richard
Comment Utility
Published for Nicole
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
I seem to have gotten what I wanted from earlier question, I have created below a table where I want to store two strings:
Tbllinkstring, see attached table

Now I want to use DLookup to be pick the string from the table, how do I use the IF and THEN and ELSE from the code below so that it evaluate and use the correct string, do not worry about the rest, I will take care of the rest, see the shaded area in the attached table:

Public Function SqlLinker()
Dim db As Database
Set db = CurrentDb
Dim tdef As TableDef
Dim constr As Variant
constr = "ODBC;DRIVER=SQL Server; " & _
"SERVER=USER\SQLExpress;DATABASE=Accounting;Trusted_Connection=Yes"
For Each tdef In db.TableDefs
If InStr(tdef.Connect, "ODBC") Then
tdef.Connect = constr
tdef.RefreshLink
End If
Next
MsgBox "Re link completed Successfully", vbOKOnly, "CA Premier Accounting Package"
End Function
For me this will be the best solution because before deploying the application I will be required only to change one of the links above in the table called Tbllinkstring to the correct host name, this means that I will still maintain my existing laptop links which allow me to compile and make an ACCDE copy without an error. Once the application is deployed to a new host name again it will simply drop my existing links after evaluating and use the new one. The advantage is that the users will not be required to select the correct link at all, the system will handle that for them.
On the shaded areas I want to …
0
I need to call a rest api from my sql server, so I found a way of doing it but to make the code to run I need to enable
Ole Automation Procedures in sql server by running this query

sp_configure 'show advanced options', 1;  
GO  
RECONFIGURE;  
GO  
sp_configure 'Ole Automation Procedures', 1;  
GO  
RECONFIGURE;  
GO  

What I need to know is for sql server database security wise, is it good practise to call web api from a Stored procedure. As I am not a sql server dba or security expert.
I am open in there is any other way also.
Please let me know
1
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
how to load mutiple jks file(keystore) file in jmeter.
0
Exploring ASP.NET Core: Fundamentals
LVL 12
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

I'm following a (newbie) tutorial on YouTube on REST API.
On Chrome I have installed the Extention Restlet, as in the tutorial (where it used to be called DHC). I can see that it is installed when I look chrome: //extensions.

But how do I open it? It's supposed to give me a Postman-like page.
It should appear when I click Apps on the Chrome browse, but doesn't.

Thanks for any help.
0
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
Hello Sirs
I am using serious issues with Charset Encoding in a REST application. I use Spring and the encoding in the bean MessageSource and Tymeleaf resolver  is set to UTF-8.
I get this when I return Json string:
\ufffd replacing special characters like é, or any other letter with accent.
How can I solve this?

Best regards.
0
My gaming laptop, an Asus G551JM is having some weird boot issues.

It used to have a hybrid drive, and after the drive broke I bought a new Kingston UV500 960GB SSD for it.
After installing Windows 10 on it I quickly noticed that the boot times were... odd.

Sometimes a boot lasts 2 minutes, sometimes around 40 seconds.
I ran a boot cycle test with Windows Performance Recorder.
The pre-session init phase seems to take around 30 seconds, the rest very little.
It just feels like something is stalling... and once it times out the computer then boots really fast.

https://imgur.com/EWE53EU

I'm new to the program, so I admittedly don't really understand them well.
Perhaps some of you are familiar with them?

This is my personal computer, so I feel it's fine for me to share the log files:
https://files.fm/u/nt4cjcau

I've also ran a few disk check programs and all of them have reported that the disk is in excellent condition.
It moves files fast and seems to work great in actual use.

Also, oddly, the computer would restart whenever it was trying to recover from sleep mode... but I kind of fixed it.
I read that some Asus laptops with sleep mode issues start working if you re-flash them with the same BIOS it already has, using WinFlash.
I gave it a shot! ...and now instead of rebooting from sleep mode, it actually recovers. ...very slowly (1 min 30 sec or so)
(Re-flashed from the already newest version... I have NO idea why that changed anything!)

I've …
0

REST

289

Solutions

573

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.

Top Experts In
REST
<
Monthly
>