Jump to content

Search the Community

Showing results for tags 'rest;'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. Bob Baudewyns

    REST: Delete an object

    Looking for some help from Delphi community as I'm blocked with my project. I am working with SynchroTeam API using their REST API. SynchroTeam API I can successfully GET and POST data without any problem. But I can't find out the right way to delete a job.. Delete a job After downloading all jobs Object, I'm trying to delete some of them. So, I know ID, MyID and NUM properties of each Job. However, when I'm using the following code: RESTClient:= TRESTClient.Create('https://ws.synchroteam.com/api/v3'); with RESTClient do begin Accept:= 'application/json'; AcceptCharset:= 'UTF-8'; Authenticator:= HTTPBasicAuthenticator; SecureProtocols := [THTTPSecureProtocol.TLS12]; end; RESTRequest.Method:= TRESTRequestMethod.rmDELETE; RESTRequest.Resource:= 'job/delete'; RESTRequest.AddParameter('Content-Type', 'application/json', TRESTRequestParameterKind.pkHTTPHEADER, [poDoNotEncode]); RESTRequest.AddParameter('Accept', 'text/json', TRESTRequestParameterKind.pkHTTPHEADER, [poDoNotEncode]); RESTRequest.AddParameter('myId', '467925', TRESTRequestParameterKind.pkQUERY, [poDoNotEncode]); RESTRequest.Execute; I get the error 404: Job does not exists. I'm 100% sur about myId. I also tried with ID property: same result. I also tried with all relevant TRESTRequestParameterKind for myId parameter. I always get 404 What would be the correct way to delete a record using Delphi REST.Client.TRESTRequest ? Thank you for your help
×