# Website content

# Create and Connect Thirdparty app

# Create App

  1. To create an app I should visit "https://ws.travus.de/#/" and select the 'Apps' tab. Click on the Apps tab
  2. I click on the 'Create App' button. Click on the Create App button
  3. I fill the 'Label' and 'HTTP Address' fields and click on the 'Save' button. Click on the Save button

# Create Content Type

  1. To create a content type I should visit "https://ws.travus.de/#/" and select the 'Content Types' tab. Select the needed tab
  2. I click on the button 'Create Content Type' button. click on the button
  3. I have to fill the 'Label' field and add the valid schema in the second field.After that I save the file. Save the schema

# Learn more about JSON Schema:"https://json-schema.org/understanding-json-schema/"

# Bound Content Type to the App

  1. I open the 'Apps' tab and double click on the newly created app. Double click on the needed app
  2. I click on the 'Create Content' button. Click on the Create Content button
  3. I select the needed content type,then fill all needed fields and click on the 'Save' button. Click on the Save button

# Update App Content Type

  1. To update the already created content types,I can click on the edit button. Update button

  2. Also,I can use Postman use the needed credentials to update the content type.

    1. I open Postman and start to fill request URL.
    2. I type needed service URl. Postman Service Url
    3. I open the App bounded to needed content-type and past 'App ID' into request URl field. Paste App ID in request URL field
    4. I go to the 'Content Types' tab and copy 'Key' of the needed content-type then paste it in the request URL field. Paste the content-type key in request URL field
    5. I go back to App Details and copy 'Access Token'. Copy Access Token
    6. I click on the 'Headers' tab in Postman.Type 'appid' in the 'Key' field and paste access token in the 'Value' field. Fill information in the Headers tab
    7. I select the 'Body' tab,then select the 'raw' format and select 'JSON' in appeared drop down menu.After Paste needed Schema in field at the bottom. Fill all information in Body tab
    8. All information is filled succesfully and I click on the 'Send' button.After that Content type will be updated succesfully with status '200' and I get "uid_content_type" at the response field.That "uid_content_type" I could use for creating content. Content-type updated successfully

# List All Content-types with a specific key in app

  1. I go to the needed App.
  2. I copy the 'App ID' and paste it in the request URL field. Paste App ID in request URL field
  3. I select 'Headers' tab,then create new query param with 'appid' name and paste the 'Access Token' in value field. Paste access token in query param
  4. I select the 'Body' tab,then select the 'raw' format and select 'JSON' in appeared drop down menu.After type curly brackets in filed at the bottom. Fill all information in body tab
  5. At the end of request url, I write the required key that is specified in the app. Type Content-type key at the end of request URL
  6. All information is filled succesfully and I click on the 'Send' button.After that I get all content-types with specified key. List of all content-types with specific key

# Get the last created Content-type with a specific key in app

  1. The difference betwen listing of all content-types and the last content-type is in 's' when specified in the request url.I just have to remove it. List the last created content-type in app
  2. I click on the 'Send' button and after I get successfull response with last content type. Click send button and get last content-type in app

# Add App Content

  1. I go to the needed app and copy 'App ID'. Then I should paste it in the request URL. Add AppID in request Url
  2. I copy the 'Access Token' and paste it in the 'Value' field with Key 'appid'. Add Access Token in value field
  3. Then I select the 'Body' tab and type the needed schema:
    1. The "uid_content_type" I should use from the previous step 'Update App Content Type'.
    2. The "label" сan have any data. He is independent.
    3. The "key" I should take from the content type bounded to app.
    4. The "content" structure should be identical with content schema. Body datas
    5. I click on the 'Send' button and I get "uid_content." Send data

# Get all Contents bounded to App

  1. I change the method from 'POST' to 'GET'.
  2. Remove all data from structure and leave only curly brackets.
  3. In the last request URL element, I must put the required key instead of '/content '. In the test case it is '/1234'. Data needed to get all contents
  4. I click on the 'Send' button and then I get all contents with requierd key which is bound to the needed app. Get all contents with required key

# Get the last Content bounded to App

  1. The difference betwen listing of all contents and the last content is in 's' when specified in the request url.I just have to remove it. Get the last content with required key