Add new REST api resource to may ionic app

this is my first time working on creation api resources, so i need some guide line here.
i have this table image
and i want to create new REST api resources and then consume it in my ionic app like this
http://medecinesStore.com/webservice/api.php/Apotheke/GetLocationApotheke
here’s my app.config.ts

import { OpaqueToken } from "@angular/core";

export let APP_CONFIG = new OpaqueToken("app.config");

export interface IAppConfig {

    apiEndpoint: string;

}

export const AppConfig: IAppConfig = {

    apiEndpoint: "http://www.medecinesStore.com/"

};

export class Config {

     public static apiEndpoint = 'http://www.medecinesStore.com/webservice/';
     public static baseUrl = 'http://www.medecinesStore.com/';
     public static codeProprietaire = '*****';
     public static ApothekeId = 1258;

}

i’am not fimiliare with this! i spent to much time googling but i get lost and i didn’t know how to do it !
i need some guide lines please.

I can’t tell if you’re asking for PHP help or client-side help here, so I’ll just say what I can based on what we have so far.

There are two crucial problems here, one of which is much easier than the other to address. The easy one is: get a proper SSL certificate for your server (I use and recommend LetsEncrypt - it’s free) and use https:// instead of http:// as an endpoint. This will save you from a ton of grief and provide better security for your users.

The hard one is codeProprietaire. It can’t exist as it does now. You cannot bake hardcoded secrets into your app binaries. Anybody with a copy of the app binary can extract them. You need to replace this authentication system with something that doesn’t require hardcoded secrets. Far and away the most typical workflow here is to have a table on the server of usernames and hashed passwords, the user provides a username and a password (this is why you absolutely need HTTPS), your server gives back a JWT if the combination matches, and then your client sends back that JWT on any further requests. The presence of a JWT with a valid signature substitutes for the presence of codeProprietaire in the rest of your server-side code.

This way you limit access to authenticated users without needing any secrets in the app binary.