Sunday, May 19, 2024

Civic Education Grade 6 English Medium Unit 1.5 Our School Identify the One Million Years BC 1966


Civic Education

Health & Physical Education

### Assisting Planning and Implementing Cleanliness in School and Classroom

#### Key Points to Pay Attention to:

1. **Program Preparation:**
   - Create a program to keep the classroom tidy and orderly.

2. **Material Survey:**
   - Survey available materials in the classroom.
   - Identify and list shortages.

3. **Suggestions Collection:**
   - Collect suggestions to maintain cleanliness and order.
   - Prioritize suggestions.

4. **Program Implementation:**
   - Plan and implement the suggestions.

#### Activity

- **Task:** Prepare a program to maintain the front area of the Grade 6 classroom.
- **Approach:** Work according to a plan for greater success and minimum oversights.
- **Groups:** Form several groups and select one of the topics below to prepare a plan:
  - Sportsmeet
  - Prize-giving
  - Concert
  - Felicitation ceremony for teachers
  - Children's Day commemoration

### School Culture

#### Importance of Rules and Regulations

- **Reasons:**
  - Build a good learning environment.
  - Administer the school systematically.
  - Make disciplined students.
  - Safeguard the rights of the school community.
  - Protect the school's identity.

- **Student Responsibilities:**
  - Conform to school rules to benefit personally and contribute to school well-being.

#### School Rules for Students

- Attend school regularly.
- Arrive on time.
- Wear the school uniform.
- Stay in school during hours.
- Follow the timetable.
- Obey and respect the principal and teachers.
- Respect leadership.
- Safeguard school traditions.

#### School Traditions

- Customs and conventions unique to the school.
- Followed at assemblies, prize-giving, sports meets, etc.
- Important for discipline, self-respect, and school identity.
- Handed down to future generations.

### Activities

1. **Rules and Traditions:**
   - Write two rules and two traditions of your school.
   - Prepare a class code of rules.

2. **School Emblems:**
   - Discuss and understand the school motto and crest.
   - Create a model of the school crest.
   - Draw the school flag and explain its symbols and colors.
   - Recall and describe the school anthem.

3. **School Vision and Mission:**
   - Discuss and understand the school’s vision and mission.
   - Note down and inquire about their meanings.

4. **School Uniform:**
   - Draw a picture of the school uniform.
   - Understand its importance in representing the school’s identity.

### Rights and Responsibilities

- **Student Rights:**
  - Right to education.
  - Right to develop talents.
  - Right to security.
  - Right to equality.
  - Right to express ideas.
  - Right to associate with peers.
  - Right to safeguard identity.

- **Responsibilities:**
  - Be involved in educational activities.
  - Be disciplined and law-abiding.
  - Respect other students' rights.
  - Protect school property.
  - Contribute to a clean and tidy environment.
  - Treat all members of the school community with respect and brotherhood.

### Activity

- **Rights and Duties Table:**
  - Complete the table linking student rights with corresponding duties.

By understanding and following these guidelines, students can effectively contribute to maintaining cleanliness, order, and a positive school culture.

Askwith Forums - Michael Sandel: Civic Education Goes Global
Harvard Graduate School of Education
Speaker: Michael Sandel, Anne T. and Robert M. Bass Professor of Government, Faculty of Arts and Sciences, Harvard University ...
Introduction | Public Discourse | Justice at Harvard | Beyond Access | Hate Speech | Marriage Prediction App | Socrates | Technology and Community | Using Social Media | Civic Engagement Debate | Higher Education as a Public Good | Free Online Courses | Changing Identity
How to Write Essay Questions in Civic Education
CIVIC EDUCATION EXAM PAPER | 2019 QUESTION | Failure to follow the
Class 6 - Social Studies - Chapter 15 - Lecture 1 Citizenship - Rights - Allied Schools
Allied Schools
In this video, we are talking about citizenship, repsonsibilities and rights of a citizen and rights given by UN charter.
Grade 6 /Civic and geography Education/ Unit 01 Our school /Civics English Medium/0718055767
Streamed 3  
PMP Education
Dear children, I am going to discussed about grade 6 Civic Education unit 1 Our school Sub topics one's Weaknesses Obstacles ...
Civic Education ECZ 2023 Exam paper Predictions
Civic Education Minds
This is a prediciton of the exam questions for the 2023 ECZ Exam paper. This a just a prediciton by reading the contents in the ...
Moral and Citizenship Education Review Questions
Sanyii Insights
SanyiiAcademy In this session today, I came with Review Questions on Moral and Citizenship Education. It is aimed to recap ...
Civic Education | Grade 6 | English Medium | Unit 1 | Our School - Part 2
Explora
Hello Student! This video is for the students in Grade 6 studying in English Medium. In this video, you will be learning about the ...
Civic Education (English Medium) -Grade 6 - Paper discussion
GEO Education
geography#englishmedium#grade6#civiceducation#grade7#english WhatsApp to 071 76 74 753 to join the Online classes .
Prof Ramneek Ahluwalia on the launch of the National Civic Education and Health Skills Programme
Dr Blade Nzimande
Civic education grade 6 lesson 1
English Master SL
Online Classes 07 11 55 99 51 and 075 850 95 05.
Civic Education | Grade 6 | English Medium | Unit 1 | Our School - Part 3

13K  
3  

Explora
Hello Students! This video is for the students in Grade 6 studying in English Medium. In this video, you will be learning about the ...

30:19
 
Civic Education -Grade 6 -Unit 2 ,By Rathna Ramanayake

13K  
2  

GEO Education
englishmedium #geography#civiceducation #grade6 #english.

District | The physical resources in our province | Uses of physical resources | Let us conserve resources
4 moments


31:35
 
amahric freshman course civic & moral unit 1 (part 1)

13K  
1 year ago

ED school
2:34 In south africa right education south africa rights equation by using german citizenship education but singapore citizenship and ...

7:38
 
Citizenship Education and Community Engagement: Introduction (Part A). English and Urdu ارد و

12K  
4  

Ahmad Bilal Cheema
it is an introduction, rationale and scope of the Subject: Citizenship Education and Community Engagement. beneficial for ...

13:09
 
Civic Education (English Medium) -Grade 7- Unit 1 ( First lesson)

11K  
1 year ago

GEO Education
civiceducation#Geography#Englishmedium#grade7#rathnaramanayaka.

Extended Family The family which consists of mother, father, children and some paternal or maternal relatives living together in the same residence is known as an extended family | Significance of an extended family in relation to a nuclear family | Benefits of being a member of a family
3 moments


58:43
 
Civic Education -Grade 6 English Medium (ΰΆ΄ුΰΆ»ΰ·€ැΰ·ƒි ΰΆ…‍‍.)

10K  
2  

GEO Education
geography#englishmedium#civiceducation#grade8#english#education#onlineclass.

Natural Resources | Avoid Misuse of Public Property | Preserve Local Identity
3 moments


3:51
 
Civic Education (Mutual Respect)

10K  
3  

Izzaida Ibrahim
0:00 Hello and good day everyone i hope you guys are fine today okay for today's class we are going to have a civic lesson which will ...

21:19
 
Grade 9 - 1st Term - Civic Education - Video 2 - Lesson 2 - Contemporary Changes - Part 1

10K  
3  

Leeds International School
4:50 Technology is used today for: • Various domestic needs • Multi-service necessities(education, transport, communication) .

21:30
 
Grade 9 - 2nd Mid Term - Civic Education - Video 1 - Lesson 3 - Democratic Governance

9.8K  
3  

Leeds International School
6:31 Right to possess a name and a nationality Right to obtain education Right to do a legal job Right to follow a religion that one likes ...

29:54
 
CIVIC EDUCATION PAPER ONE(1) 2021 REVISION GRADE 12 ECZ.

9.9K  
1 year ago

SHINETEXS
answers for civic education paper one for 2021. well elaborated and explained step by step.

Instructions | Section a | Question Four | Civil and Political Rights | Question Five | Question Six | Question Seven | Question 7 | Question 8 | Question Nine | Question 10 | Question 11 | Question 12 | Question Number 13 | Question 14 | Question 16 | Question 7 Question 16 | Question 20
18 moments


38:48
 
Form 3 - 1st Mid Term - Civics - Video 1 - Lesson 1 - Public Services

8.9K  
3  

Leeds International School
9:13 ... Implementing health education programs Holding health and dental clinics for school children *Implementation of family health ...

10:36
 
Civic Education Grade 6 A good Citizen lesson 1

8.7K  
3  

Kithmi Kaushalya
0:02 Hello children welcome to the civic lesson series today i'm going to start the third unit a good citizen in this video i'm going to ...

11:13
 
Why we need civic education? | Usama Khilji | TEDxLahore

8.3K  
6  

TEDx Talks
Usama Khilji urges Pakistanis to do away with complacency and to be better informed about their rights as citizens, calling for ...

How the Government Is Censoring Websites in Pakistan | Lack of Democratic Culture in Pakistan | Contact Your Representatives | Curriculum on Fundamental Rights in the Pakistani Constitution
4 moments


1:42:16
 
Civics Education -Grade 6 -Unit 3

7.9K  
2  

GEO Education
civiceducation#englishmedium#grade6.

16:15
 
Grade 8 Civic Education Lesson 01 - Public Services | English Medium Civic Education Grade 8 πŸ‡±πŸ‡°

7.9K  
1 year ago

Zooni Vlogs by Ruvini Nanayakkara
Grade 8 Civic Education Lesson 01 - Public Services | English Medium Civic Education Grade 8 Lesson 01 - Public Services ...

8:01
 
Civic education Essay Writing. //Exam preparation//

7.6K  
1 year ago

Sensor Academy School of Tuitions
0:23 And in the following Theory we are essentially going to consider civic education preparing advocacy for an exam we are going to ...

18:46
 
2020 Civic Education(SPECIMEN) exam revision questions and answers

7.6K  
1 year ago

ALBERT NGOMA 1ST CHANNEL
For WhatsApp tuitions, +260962978457 Subscribe to this channel for more videos. Welcome to the channel-School work with ...

18 videos
 
CIVIC EDUCATION ZAMBIA
MIKE SIKATEMA
 · 
Playlist
CIVIC EDUCATION ECZ ZAMBIA, CONSTITUTION
52:13
GOVERNACE
1:25:50
VIEW FULL PLAYLIST

5:55
 
Center for Civic Education Deaf Community Outreach

7.5K  
13  

CCEwethepeople
The Center for Civic Education has partnered with Civication, Inc. to implement the We the People: The Citizen and the ...
CC

1:00:01
 
Civic Education, Grade 10, Chapter 04, Prabuddha Academy

7.5K  
2  

Prabuddha Academy
Civic Education, Grade 10, Chapter 04, Economic System.

2:15
 
Civic Education 101 - Value Part 1 - Mobile Classroom App Nigeria

7.5K  
4  

Mobile Classroom
Civic education is the study of the theoretical, political and practical aspects of citizenship, as well as its rights and duties.

10:12
 
Form 1 - 1MT - Civic - Video 1 - Lesson 1 - OUR SCHOOL - PART 1 - (P1 - 11)

7.1K  
3  

Leeds International School
4:12 Act as the head of the school and pilot of educational activities. • Admission of students, their assignment into classes and ...

50:51
 
Civic Education (English medium) grade 7 paper discussion

6.7K  
2  

GEO Education
23:53 Since education is compulsory in Sri Lanka, every child under the age of 14 should attend school. Children are employed mainly ...

3:40
 
Civic Education - The constitution part 1

6.6K  
1 year ago

Mr 6points
Hi friends, In this video I'll be looking at the constitution in civic education Be sure to SUBSCRIBE so you don't miss out on other ...

Intro | WHAT IS CIVIC EDUCATION? | THE CONSTITUTION | TYPES OF CONSTITUTIONS | ADVANTAGES AND DISADVANTAGES | FORMS OF CONSTITUTIONS
6 chapters


7:18
 
2021 (2022) May OL | Civic Education Past Paper Answers

6.7K  
1 year ago

DCH EDU PLATFORM
2021 (2022) May OL | Civic Education Past Paper Answers 2021 (2022) ΰΆΈැΰΆΊි ΰΆ….ΰΆ΄ො.ΰ·ƒ (ΰ·ƒා.ΰΆ΄ෙΰ·…) ΰΆ΄ුΰΆ»ΰ·€ැΰ·ƒි ...

7:16
 
Civic Education Grade 6 unit 2 The Region we live in #civics#grade6#EnglishMedium

6.4K  
2  

Grammaticus Edu
Civic Education Grade 6 unit 2 The Region we live in #civics#grade6#EnglishMedium this is the second part of the lesson ...

22:42
 
Civic Education (English Medium)- Grade 7 - Paper Discussion

6.2K  
2  

GEO Education
geography#englishmedium #civiceducation#grade8 #english #education.

Sunday, May 12, 2024

Grade 6 Civics English medium lesson 1.4 The bond between the school Exam passpaper model questions


Civic Education

  • The school is vital for meeting societal needs and maintains relationships with various groups and organizations.
  • Mutual relations between the school and society result in reciprocal service.
  • Services rendered by society to the school include assisting in development activities, safeguarding school property, participating in festivals, and educating on hygiene and technology.
  • Ways the school maintains relations with the community include involvement in school development programs and forming School Development Committees.
  • The School Development Committee comprises representatives of past students, parents, academic staff, and a zonal education office representative.
  • Parents, past pupils, and well-wishers contribute to school development through donations, shramdana campaigns, and maintenance tasks.
  • Relations with public representatives help secure funds and resources for school improvement.
  • Close relationships with past students are crucial for school development.
  • Utilization of school facilities for community services fosters good relations.
  • Community involvement in school activities includes utilizing physical resources and inviting skilled individuals for development.
  • Child-friendly schools prioritize safe and clean environments, equitable treatment, student-centered learning, and community support.
  • Child-friendly schools aim to maximize students' potentials for national development.

Saturday, May 11, 2024

CommValut API Integration commonly used APIs along with their HTTP methods and endpoints DevOps SRE Automations

  1. Authentication

    • POST /login: Authenticate and obtain an AuthToken for subsequent API requests.
  2. Jobs

    • GET /Job: Retrieve a list of jobs and their statuses.
    • GET /Job/{jobId}: Retrieve details of a specific job.
    • POST /Job: Create a new job.
    • PUT /Job/{jobId}: Modify an existing job.
    • DELETE /Job/{jobId}: Delete a job.
  3. Backups

    • GET /Backup: Retrieve a list of backups and their statuses.
    • GET /Backup/{backupId}: Retrieve details of a specific backup.
    • POST /Backup: Create a new backup.
    • PUT /Backup/{backupId}: Modify an existing backup.
    • DELETE /Backup/{backupId}: Delete a backup.
  4. Clients

    • GET /Client: Retrieve a list of clients.
    • GET /Client/{clientId}: Retrieve details of a specific client.
    • POST /Client: Add a new client.
    • PUT /Client/{clientId}: Modify an existing client.
    • DELETE /Client/{clientId}: Delete a client.
    • ID

      GET <webservice>/Client/{clientId} HTTP/1.1
      
    • Name

      GET <webservice>/Client/byName(clientName='{clientName}') HTTP/1.1
  5. Agents

    • GET /Agent: Retrieve a list of agents.
    • GET /Agent/{agentId}: Retrieve details of a specific agent.
    • POST /Agent: Add a new agent.
    • PUT /Agent/{agentId}: Modify an existing agent.
    • DELETE /Agent/{agentId}: Delete an agent.
  6. Media

    • GET /Media: Retrieve a list of media (tapes, disks, etc.).
    • GET /Media/{mediaId}: Retrieve details of a specific media.
    • POST /Media: Add a new media.
    • PUT /Media/{mediaId}: Modify an existing media.
    • DELETE /Media/{mediaId}: Delete a media.
  7. Storage Pools

    • GET /StoragePool: Retrieve a list of storage pools.
    • GET /StoragePool/{storagePoolId}: Retrieve details of a specific storage pool.
    • POST /StoragePool: Add a new storage pool.
    • PUT /StoragePool/{storagePoolId}: Modify an existing storage pool.
    • DELETE /StoragePool/{storagePoolId}: Delete a storage pool.
  8. Alerts

    • GET /Alert: Retrieve a list of alerts.
    • GET /Alert/{alertId}: Retrieve details of a specific alert.
    • POST /Alert: Add a new alert.
    • PUT /Alert/{alertId}: Modify an existing alert.
    • DELETE /Alert/{alertId}: Delete an alert.
  9. Reports

    • GET /Report: Retrieve a list of available reports.
    • POST /Report: Generate a new report.
  10. Schedules

    • GET /Schedule: Retrieve a list of schedules.
    • GET /Schedule/{scheduleId}: Retrieve details of a specific schedule.
    • POST /Schedule: Add a new schedule.
    • PUT /Schedule/{scheduleId}: Modify an existing schedule.
    • DELETE /Schedule/{scheduleId}: Delete a schedule.
  11.  APIs that you can use to find cluster details:

    1. GET /commcell/entities/clients

      • This API retrieves information about all the clients registered with the CommCell environment, including cluster clients.
    2. GET /commcell/entities/clients/{clientId}

      • This API retrieves detailed information about a specific client, including cluster clients, based on the provided clientId.
    3. GET /commcell/entities/virtualservers

      • This API retrieves information about all the virtual servers configured in the CommCell environment, which can include cluster nodes.
    4. GET /commcell/entities/virtualservers/{virtualServerId}

      • This API retrieves detailed information about a specific virtual server, which can be a cluster node, based on the provided virtualServerId.
    5. GET /commcell/entities/mediaagents

      • This API retrieves information about all the media agents configured in the CommCell environment, which can include cluster nodes acting as media agents.
    6. GET /commcell/entities/mediaagents/{mediaAgentId}

      • This API retrieves detailed information about a specific media agent, which can be a cluster node, based on the provided mediaAgentId.
    7. GET /commcell/entities/commservers

      • This API retrieves information about all the CommServers configured in the CommCell environment, which can include cluster nodes acting as CommServers.
    8. GET /commcell/entities/commservers/{commServerId}

      • This API retrieves detailed information about a specific CommServer, which can be a cluster node, based on the provided commServerId.

Please note that the actual endpoint URLs and request/response formats may vary depending on the CommVault version and configuration. It's recommended to refer to the official CommVault documentation or API reference for the most up-to-date and accurate information.



  1. After the authentication request, we check the status code of the response. If it's 200 (OK), we proceed with the API requests. Otherwise, we print an error message with the status code.
  2. For the agent jobs API request, we check the status code of the response. If it's 200 (OK), we process the response data. Otherwise, we print an error message with the status code.
  3. For the backups API request, we check the status code of the response. If it's 200 (OK), we process the response data. Otherwise, we print an error message with the status code.

By checking the status codes, we can handle different error scenarios and provide more informative error messages if something goes wrong with the API requests.


=============================================

import requests
import json

# CommVault API endpoint and credentials
api_endpoint = "https://commvault.example.com/webconsole/api"
username = "your_username"
password = "your_password"

# Authentication
auth_url = f"{api_endpoint}/login"
auth_payload = {
    "username": username,
    "password": password
}
auth_response = requests.post(auth_url, json=auth_payload, verify=False)
auth_token = auth_response.headers.get("AuthToken")

# Set headers for subsequent API requests
headers = {
    "AuthToken": auth_token,
    "Content-Type": "application/json"
}

# Monitor agent jobs
agent_jobs_url = f"{api_endpoint}/Job"
agent_jobs_response = requests.get(agent_jobs_url, headers=headers, verify=False)
agent_jobs_data = agent_jobs_response.json()

for job in agent_jobs_data["jobSummariesValue"]:
    job_id = job["jobId"]
    job_status = job["jobStatus"]["status"]
    if job_status == "failed" or job_status == "stopped":
        print(f"Job {job_id} is {job_status}")

# Monitor backups
backups_url = f"{api_endpoint}/Backup"
backups_response = requests.get(backups_url, headers=headers, verify=False)
backups_data = backups_response.json()

for backup in backups_data["backupSummariesValue"]:
    backup_id = backup["backupId"]
    backup_status = backup["backupStatus"]["status"]
    if backup_status == "failed" or backup_status == "stopped":
        print(f"Backup {backup_id} is {backup_status}")

Here's how the code works:

  1. First, we define the CommVault API endpoint and provide our username and password for authentication.
  2. We send a POST request to the /login endpoint to obtain an authentication token.
  3. We set the AuthToken and Content-Type headers for subsequent API requests.
  4. To monitor agent jobs, we send a GET request to the /Job endpoint and iterate through the jobSummariesValue list in the response. If a job has a status of "failed" or "stopped", we print a message with the job ID and status.
  5. To monitor backups, we send a GET request to the /Backup endpoint and iterate through the backupSummariesValue list in the response. If a backup has a status of "failed" or "stopped", we print a message with the backup ID and status.

Note that you'll need to replace "your_username" and "your_password" with your actual CommVault credentials, and "https://commvault.example.com/webconsole/api" with the correct API endpoint for your CommVault instance.

Also, make sure you have the requests library installed (pip install requests) before running this code.

In Commvault, you can use the following APIs to check job statuses:

  1. Job Manager API: This API provides endpoints to retrieve information about jobs, including their statuses. You can use endpoints like /JobManager/Job to list all jobs or filter by specific criteria such as client, agent, or job status.

  2. Client Computer Group API: If you have client computer groups set up in Commvault, you can use this API to retrieve information about them, including the status of associated jobs.

  3. Alerts API: The Alerts API allows you to query for alerts generated by Commvault, which may include alerts related to job failures or other issues.

  4. Event Viewer API: This API provides access to events generated by Commvault operations, including job-related events that can indicate success or failure.

By leveraging these APIs, you can effectively monitor job statuses and identify any failed agents or other issues within your Commvault environment.

-----------------------------------------------------------------------------------------

Ensuring the health of a Commvault environment via API involves checking various aspects such as job statuses, storage usage, client connectivity, and more. Here are several ways to do this along with examples in Python:

  1. Check Job Statuses:
    • API Endpoint: /JobManager/Job
    • Objective: Ensure backup, restore, and other jobs are completing successfully.
    • Example Code:
import requests

url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/JobManager/Job"

headers = {
    "Content-Type": "application/json",
    "Authtoken": "Your_Auth_Token"
}

response = requests.get(url, headers=headers)
jobs = response.json().get("jobs")

for job in jobs:
    print("Job ID:", job.get("jobId"))
    print("Status:", job.get("status"))
    # Add more job details as needed


  1. Check Storage Usage:
    • API Endpoint: /MediaAgent/Media
    • Objective: Ensure storage utilization is within acceptable limits.
    • Example Code:
url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/MediaAgent/Media" response = requests.get(url, headers=headers) media = response.json().get("media") for m in media: print("Media ID:", m.get("mediaId")) print("Used Capacity:", m.get("usedCapacity")) # Add more media details as needed


  1. Check Client Connectivity:
    • API Endpoint: /Client
    • Objective: Ensure clients are connected and communicating properly.
    • Example Code:
url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/Client" response = requests.get(url, headers=headers) clients = response.json().get("clients") for client in clients: print("Client Name:", client.get("clientName")) print("Status:", client.get("clientStatus")) # Add more client details as needed


  1. Check Storage Policy Usage:
    • API Endpoint: /StoragePolicy
    • Objective: Ensure storage policies are being applied correctly.
    • Example Code:
url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/StoragePolicy" response = requests.get(url, headers=headers) storage_policies = response.json().get("storagePolicies") for sp in storage_policies: print("Storage Policy Name:", sp.get("storagePolicyName")) print("Status:", sp.get("status")) # Add more storage policy details as needed

------------------------------------------------------------------------

Below are examples of how you can use different Commvault APIs to check the health of the environment across various scenarios:
  1. Event Viewer API:
    • API Endpoint: /EventViewer/Events
    • Objective: Monitor system events and errors.
    • Example Code:
url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/EventViewer/Events" response = requests.get(url, headers=headers) events = response.json().get("events") for event in events: print("Event ID:", event.get("eventId")) print("Severity:", event.get("severity")) print("Description:", event.get("description")) # Add more event details as needed


  1. Alerts API:
    • API Endpoint: /Alerts
    • Objective: Check for any active alerts in the system.
    • Example Code:
url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/Alerts" response = requests.get(url, headers=headers) alerts = response.json().get("alerts") for alert in alerts: print("Alert ID:", alert.get("alertId")) print("Severity:", alert.get("severity")) print("Description:", alert.get("description")) # Add more alert details as needed

  1. Client Computer Group API:
    • API Endpoint: /ClientGroup
    • Objective: Ensure client computers are organized into groups properly.
    • Example Code:

url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/ClientGroup" response = requests.get(url, headers=headers) client_groups = response.json().get("clientGroups") for group in client_groups: print("Group Name:", group.get("groupName")) print("Number of Clients:", group.get("numberOfClients")) # Add more group details as needed


  1. Agent API:
    • API Endpoint: /Agent
    • Objective: Check the status and health of agents installed on client computers.
    • Example Code:
url = "https://your-commvault-server:81/SearchSvc/CVWebService.svc/Agent" response = requests.get(url, headers=headers) agents = response.json().get("agents") for agent in agents: print("Agent ID:", agent.get("agentId")) print("Status:", agent.get("status")) # Add more agent details as needed

  1. Backup Recovery API:
    • API Endpoint: /JobManager/Job
    • Objective: Monitor backup and recovery jobs for success and failure.
    • Example Code: (Already provided in previous response)

These examples demonstrate how you can use Python with the requests library to query different aspects of the Commvault environment via API and ensure its health across various scenarios. Adjust the endpoints and parameters based on your specific requirements and API documentation.

=======================================

import requests # Replace with your Commvault environment details commvault_url = "https://<your_commvault_server>/webservice/" username = "<your_username>" password = "<your_password>" # Client and VM details client_name = "<client_name>" vm_name = "<vm_name>" # Define the subclient details (replace with your desired values) subclient_name = "My Subclient" backup_set_name = "DefaultBackupSet" content_type = "VMName" # Can be "VMName" or "DATASTORE" for Datastore content def get_auth_token(): """ Retrieves an authentication token from Commvault. """ url = commvault_url + "login" auth = (username, password) headers = {"Content-Type": "application/json"} response = requests.post(url, auth=auth, headers=headers) response.raise_for_status() # Raise exception for non-200 status codes return response.json()["authenticationToken"] def add_subclient(): """ Adds a subclient to the specified client VM. """ auth_token = get_auth_token() headers = { "Authorization": f"AuthToken {auth_token}", "Content-Type": "application/xml" # Body format for add subclient } # Prepare the XML request body (replace with your specific content details) body = f""" <subclient> <appName>Virtual Server</appName> <subClientEntity> <subClientProperties> <clientName>{client_name}</clientName> <subClientName>{subclient_name}</subClientName> <backupsetName>{backup_set_name}</backupsetName> <instanceName>DefaultInstanceName</instanceName> <content> <vmContent> <type>{content_type}</type> <displayName>{vm_name}</displayName> </vmContent> </content> </subClientProperties> </subClientEntity> </subclient> """ url = commvault_url + "Subclient" response = requests.post(url, headers=headers, data=body) response.raise_for_status() print(f"Subclient '{subclient_name}' added successfully!") if __name__ == "__main__": add_subclient()

=============================================================

import requests import json # Commvault API credentials cv_username = "your_username" cv_password = "your_password" cv_domain = "your_domain" # e.g., "cv" # Commvault API base URL cv_base_url = "https://your_commvault_server/webconsole/api" # Authentication endpoint auth_endpoint = f"{cv_base_url}/login" # Authenticate and get the session ID auth_payload = { "domain": cv_domain, "login": cv_username, "password": cv_password } auth_response = requests.post(auth_endpoint, json=auth_payload, verify=False) session_id = auth_response.headers.get("Set-Cookie").split(";")[0] # Set headers for subsequent API requests headers = { "Cookie": session_id, "Content-Type": "application/json", "Accept": "application/json" } # Client VM details client_name = "your_client_vm_name" client_id = "your_client_vm_id" # You can get this from the Commvault console or API # Subclient details subclient_name = "your_subclient_name" subclient_type = "your_subclient_type" # e.g., "Virtual Server" backup_set_name = "your_backup_set_name" content_path = "your_content_path" # e.g., "/" # Endpoint to add a subclient add_subclient_endpoint = f"{cv_base_url}/Client/{client_id}/Subclient" # Payload for adding a subclient add_subclient_payload = { "subClientProperties": { "clientName": client_name, "subclientName": subclient_name, "subclientType": subclient_type, "backupSetName": backup_set_name, "contentPath": { "path": [ content_path ] } } } # Send the request to add the subclient add_subclient_response = requests.post(add_subclient_endpoint, headers=headers, json=add_subclient_payload, verify=False) # Check the response status code if add_subclient_response.status_code == 200: print("Subclient added successfully.") else: print(f"Failed to add subclient. Error: {add_subclient_response.text}")

===========================================================
import requests
import json

# Replace with your Commvault server details and credentials
commvault_base_url = 'http://your-commvault-server:port'
username = 'your_username'
password = 'your_password'
client_name = 'your_client_vm_name'
backupset_name = 'your_backupset_name'  # Typically 'defaultBackupSet'
subclient_name = 'your_subclient_name'
content_path = 'path_to_include_in_subclient'  # The path to include in the subclient

# Step 1: Authenticate and get the token
auth_url = f'{commvault_base_url}/webconsole/api/Login'
auth_payload = {
    'username': username,
    'password': password
}
response = requests.post(auth_url, json=auth_payload)
if response.status_code != 200:
    raise Exception(f"Authentication failed: {response.text}")

token = response.json()['token']

# Step 2: Get client ID
clients_url = f'{commvault_base_url}/webconsole/api/Client'
headers = {
    'Authtoken': token,
    'Accept': 'application/json'
}
response = requests.get(clients_url, headers=headers)
if response.status_code != 200:
    raise Exception(f"Failed to retrieve clients: {response.text}")

clients = response.json()['clients']
client_id = next((client['clientId'] for client in clients if client['clientName'] == client_name), None)
if not client_id:
    raise Exception(f"Client VM '{client_name}' not found")

# Step 3: Get the backupset ID
backupsets_url = f'{commvault_base_url}/webconsole/api/Client/{client_id}/Backupset'
response = requests.get(backupsets_url, headers=headers)
if response.status_code != 200:
    raise Exception(f"Failed to retrieve backupsets: {response.text}")

backupsets = response.json()['backupsets']
backupset_id = next((backupset['backupsetId'] for backupset in backupsets if backupset['backupsetName'] == backupset_name), None)
if not backupset_id:
    raise Exception(f"Backupset '{backupset_name}' not found for client '{client_name}'")

# Step 4: Add the subclient
subclients_url = f'{commvault_base_url}/webconsole/api/Backupset/{backupset_id}/Subclient'
subclient_payload = {
    'subClientProperties': {
        'subClientEntity': {
            'subclientName': subclient_name
        },
        'contentOperationType': 1,
        'content': [{
            'path': content_path
        }]
    }
}
response = requests.post(subclients_url, headers=headers, json=subclient_payload)
if response.status_code != 200:
    raise Exception(f"Failed to add subclient: {response.text}")

print(f"Subclient '{subclient_name}' added successfully to client '{client_name}'")